gl: add profile-neutral GLSL dispatch and core test support - #65
Conversation
ca87a6a to
a6f4a6d
Compare
59b3a2c to
e5bdbba
Compare
acffc99 to
b57eac0
Compare
|
|
||
| option(COIN_BUILD_SHARED_LIBS "Build shared library when ON (default), static when OFF." ON) | ||
| option(COIN_BUILD_TESTS "Build unit tests when ON (default), skips them when OFF." ON) | ||
| option(COIN_FETCH_TEST_DEPENDENCIES |
There was a problem hiding this comment.
I prefer respecting the FreeCAD policy of not pulling dependencies using the build system but requiring them externally using find_package. This adds "superbuild" complexity that is not actually necessary
| #define COIN_GLUE_GLSLP_H | ||
|
|
||
| /**************************************************************************\ | ||
| * Copyright (c) Kongsberg Oil & Gas Technologies AS |
There was a problem hiding this comment.
may not be a question for you but do we need to keep the Kongsberg copyright for new files?
There was a problem hiding this comment.
what is 'p' supposed to mean in the filename?
| cc_glglue_glGetUniformLocation(const cc_glglue * glue, GLuint program, | ||
| const char * name) | ||
| { | ||
| if (glue->glGetUniformLocation) return glue->glGetUniformLocation(program, name); | ||
| if (glue->glGetUniformLocationARB) { | ||
| return glue->glGetUniformLocationARB((COIN_GLhandle) program, | ||
| (const COIN_GLchar *) name); | ||
| } | ||
| return -1; | ||
| } |
There was a problem hiding this comment.
move impl to glslp.cpp? this file is already long enough
| } | ||
|
|
||
|
|
||
| /* Standard-facing shader wrappers. Keeping the fallback here means shader |
| ${PROJECT_SOURCE_DIR}/src | ||
| ${PROJECT_SOURCE_DIR}/include | ||
| ${PROJECT_BINARY_DIR}/include |
There was a problem hiding this comment.
I would be surprised that these directories are not included when you link the test executable target with Coin
| target_include_directories(GLSLRuntimeTest PRIVATE | ||
| ${PROJECT_SOURCE_DIR}/src | ||
| ${PROJECT_SOURCE_DIR}/include | ||
| ${PROJECT_BINARY_DIR}/include | ||
| ${COIN_TARGET_INCLUDE_DIRECTORIES}) |
There was a problem hiding this comment.
redundant with public includes from CoinGLTestSupport, this should not be necessary
| int skip(const char * reason) | ||
| { | ||
| std::cout << "SKIP: " << reason << std::endl; | ||
| return 77; | ||
| } | ||
|
|
||
| bool check(bool condition, const char * message) | ||
| { | ||
| if (!condition) std::cerr << "FAIL: " << message << std::endl; | ||
| return condition; | ||
| } |
There was a problem hiding this comment.
at this point, we can think about a small header for test utilities defining classic CHECK, SKIP macros
| std::vector<uint8_t> readPixels() const; | ||
|
|
||
| private: | ||
| const cc_glglue * glue_; |
There was a problem hiding this comment.
is suffixing with a _ common in this code base? I don't see the point
| int width() const { return width_; } | ||
| int height() const { return height_; } | ||
|
|
||
| std::vector<uint8_t> readPixels() const; |
There was a problem hiding this comment.
doc at least the pixel order format
b57eac0 to
564a6c8
Compare
3a1313c to
02d5615
Compare
Summary
Make Coin's GLSL implementation independent of compatibility-profile entry points and establish reusable core-profile GL test support.
GLSLRuntimeTestcoverage for shader compilation, linking, uniforms, and execution in a core-profile context.testsuite/support/for generic GL tests.This layer does not own EGL display/context lifecycle or caller-state restoration; that remains in PR #12. Shader diagnostic/source-attribution behavior is intentionally left to PR #22.
This PR replaces #14, which GitHub recorded as merged while the active renderer stack was being repaired. The implementation remains on the existing
stack/profile-neutral-shadersbranch so later layers retain their original ancestry.Stack
Layer 3/18, based on PR #12. PR #22 is the next layer.