so, according to README and docs you just need to pass `--enable_experimental_opencl` to `App_ExampleBrowser` to see the examples. But I tried that, and examples were still missing from the browser. I checked the source code and found this:
Code: Select all
void ExampleEntriesAll::initOpenCLExampleEntries()
{
#ifdef B3_USE_CLEW
#ifndef NO_OPENGL3
int numDefaultEntries = sizeof(gOpenCLExamples) / sizeof(ExampleEntry);
for (int i = 0; i < numDefaultEntries; i++)
{
m_data->m_allExamples.push_back(gOpenCLExamples[i]);
}
#endif
#endif //B3_USE_CLEW
}
So I tried adding `ADD_DEFINITIONS(-DB3_USE_CLEW)` to examples/CMakeLists.txt but this results in undefined references, because the code in examples/OpenCL directory is not being build at all. I tried adding `OpenCL/broadphase` etc. to `SUBDIRS` in examples/CMakeLists.txt but this didn't change anything because, as I realized, there's no CMakeLists.txt in examples/OpenCL
So my question is: documentation gives the impression that all OpenCL examples are build by default, you just need to enable them in the Browser by passing a flag. Yet from what I see, building them requires messing with CMake files and even writing some of them single-handedly. Am I missing something?