Git Product home page Git Product logo

clew's People

Contributors

hughperkins avatar kinddragon avatar martijnberger avatar oracle2025 avatar sergeyvfx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clew's Issues

Possible improvements in CMake configuration

Hi!

I've looked through the project build configuration, and I found few moments I can improve it:

  • Merge all CMakeLists.txt into a the topmost one. You cannot build only part of the project by issuing cmake ../src or cmake ../clewTest, so why have them separated at all?
  • Options like BUILD_TESTS or BUILD_SHARED_LIBRARY should have CLEW_ prefix in their name.
  • Maybe rename clewTest directory to clew_test or simply test?

What you you think about the proposal?
Option renaming is a breaking change, so I'd want to discuss it prior PR'ing. See the EasyCL issue discussion for more information why this rename maybe a right thing to do.

Out of sync with Blender

Just ran into this building against blender's copy of clew, inside /blender/extern/clew path off of Trunk.

I don't know why they didn't roll it up to you but they've modified clew.c and clew.h making it useless against their new split kernel.

You can get their changes that compile Blender with no mistakes from blender.git.

Out of sync with Blender

Blender has a need for libGLEW.so instead of libglew.so and fails to build without it. On Linux I just made a ln -s libglew.so libGLEW.so but I imagine you can make a cleaner solution by providing a link installed version of it.

Static linking with clew

There is some strange code in clew.h:

// #define CLEW_STATIC

#ifdef _WIN32
  #ifdef clew_STATIC
  #  define CLEWAPI extern
  #else
  #  ifdef clew_EXPORTS
#pragma message("exporting")
  #    define CLEWAPI extern __declspec(dllexport)
  #  else
#pragma message("importing")
  #    define CLEWAPI extern __declspec(dllimport)
  #  endif
  #endif
#else
#  define CLEWAPI extern
#endif
  1. clew_STATIC is a strange combination of lower and upper case letters.
  2. If producing static lib is the default, clew should have CLEW_DYNAMIC which should NOT be defined by default. There should be a note saying that CLEW_DYNAMIC needs to be defined (or uncommented) for .dll builds.

clGetGLContextInfoKHR not found even if cl_khr_gl_sharing is found

clGetGLContextInfoKHR (https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/clGetGLContextInfoKHR.html) is defined in the cl_khr_gl_sharing (https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/cl_khr_gl_sharing.html) extension. However, clew doesn't necessarily always find it.

That's because clGetGLContextInfoKHR is an extension function, and according to https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetExtensionFunctionAddress.html

For functions that are queryable with clGetExtensionFunctionAddress, implementations may choose to also export those functions statically from the object libraries implementing those functions. However, portable applications cannot rely on this behavior.

Since clew uses dlsym-like mechanism, it fails to find the function.

AFAIK that's the only extension function currently exposed by clew. We wound need a proper mechanism to get it, i.e. clGetExtensionFunctionAddress() if we don't want to use the platform, or clGetExtensionFunctionAddressForPlatform() if we want to do it right.

That might require introducing another version of clew initialization that is called with a platform ID to initialize the functions for a given platform.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.