mrtortoise's picture

How to get errors out of opentk

I cant find anything explaining how to get at exceptions thrown inside of opengl

such as shader problems.

Its a bit vague as i am an utter noob
following this tutorial atm

So i am trying to find the parallels / analogies to GLFW in opentk and hook things up.

Some bits i am finding others i am not .. exceptions (especially in shaders - but i bet i will fidn other areas soon enough) are the big hole for me atm.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

You cannot get exceptions out of shaders, it's just not possible with OpenGL. What you can do is get the status of shader compilation and linkage, using GL.GetShaderInfoLog and GL.GetProgramInfoLog respectively.

Example code here. Check under the same folder for more examples.

mrtortoise's picture


exactly what i was looking for thanks.