[committed] Issue 16: FogState constructor causes GL error

ShadowIsLord has posted a fix which works nicely for this little Bug some time ago.

see Issue #16



since no one else seems to be caring about the issue tracker :slight_smile: , i’ll commit it if no one has any objections.



Index: LWJGLFogState.java
--- LWJGLFogState.java Base (BASE)
+++ LWJGLFogState.java Locally Modified (Based On LOCAL)
@@ -66,6 +66,7 @@
             // Check for support of fog coords.
             supportsFogCoords = supportsFogCoordsDetected = GLContext
                     .getCapabilities().GL_EXT_fog_coord;
+            inited = true;
         }
     }



Index: JOGLFogState.java
--- JOGLFogState.java Base (BASE)
+++ JOGLFogState.java Locally Modified (Based On LOCAL)
@@ -67,6 +67,7 @@
         if (!inited) {
             // Check for support of fog coords.
             supportsFogCoords = supportsFogCoordsDetected = caps.GL_EXT_fog_coord;
+            inited = true;
         }
     }


ah, so your not registered as a contributor in jme ?

it would help getting your fixes faster in :slight_smile:

Just letting you know, ShadowIsLord is my username on google…

No I am not a developer but I am not making any fixes anyway. That issue was made a few months ago or so…

heh, i wondered why this fix actually makes it possible to create a Fogstate outside the OpenGL thread.

I wasn't aware that there was already Renderstates being created in the initial RenderContext creation.



Anyway its committed now.