KhronosGroup / KhronosGroup/OpenGL-API
What is the shader source string after calling glShaderSource with count=0
- Dominant language
- No language data
- Stars
- 42
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
What should be in `buf` when the code below is executed? The second call to `glShaderSource` should not generate an error, so it should presumably replace the existing shader source with... nothing?
```
const GLchar *source = "/* Testing 1... 2... 3... */";
const GLchar *junk = "/* Just some junk. */";
glShaderSource(shader, 1, &source, NULL);
glShaderSource(shader, 0, &junk, NULL);
GLchar buf[512];
GLsizei length;
glGetShaderSource(shader, sizeof(buf), &length, buf);
```
See also https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/521 and https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10477.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.