Question

I'm getting the error

fatal error C9999: *** exception during compilation ***

Whenever I try to recompile a GLSL shader that uses Image api for texture writes, for example

layout(binding = 0) coherent uniform image3D Voxels;

Initial compilation works fine however. Has anyone else encountered this, and is there workaround?

Was it helpful?

Solution

Okay, I've come up with a workaround. Essentially, I had to make my recompilation process a bit more destructive.

First, it is (now) necessary to detach all shaders (vert,frag,geom,etc...) from your shader program.

Second, when recompiling the individual shaders it is (now) necessary to delete and recreate a new shader id

glDeleteShader(shader_id);
shader_id = glCreateShader(GL_FRAGMENT_SHADER);

Then you can reload the shader source, after which you can safely re-attach, or rather attach the new shaders to your shader program, re-link everything, and hopefully it all works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top