gl: add profile-neutral GLSL dispatch and core test support - #65
Conversation
ca87a6a to
a6f4a6d
Compare
59b3a2c to
e5bdbba
Compare
acffc99 to
b57eac0
Compare
| 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
e92e352 to
3ddbee8
Compare
|
Thanks for the review. I rewrote the PR around the feedback:
|
ca9215d to
e5887f4
Compare
2cefee8 to
61a4642
Compare
10782f5 to
a778ffb
Compare
58c7afe to
af9297e
Compare
af9297e to
6af035f
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 position
Builds on #12. PR #22 is the next layer.