Possible bug in ofGLRenderer


#1

There is already a git issue opened regarding that.

I have the same problem as mentioned in the issue.
I further tracked down the origin of the error and came to the following conclusion:

  • The error only appears in openGL < 3.0 (therefore in ofGLRenderer)
  • The program crashes during the first drawcall after a texture with alphamask has been drawn (only with gflags enabled. Without gflags, it crashes after a random time)
  • When crashing, it seems to throw an exception in “nvoglv64.dll”. Therefore this issue seems to happen in the Nvidia driver. It doesnt happen with an Intel GPU i tested.

Possible fix:
I have very limited knowledge in OpenGL, so take this with a grain of salt.
Commenting out line 112 and line 113 in ofGLRenderer.cpp seems to solve the issue and doesnt seem to produce any other issues. “textureLocationsEnabled” has size 2 when an alpha mask is set and the programm crashes as mentioned. Without alpha mask it has size 1 and everything is working fine.

Can someone with OpenGL knowledge look into this and check the two lines in question please?

If its really a bug it’s very possible that it has gone unnoticed for so long, as it only happens with Nvidia GPUs and also without gflags, sometimes it takes hours or even days to crash…but it will crash for sure sooner or later.


#2

can you please report this in the issue? it would be easy for anyone that wants to look into fixing this to find the information there


#3

All right, posted it here.


#4

thanks!