[Committed] Fix for LWJGLTextureRenderer

I want to submit a fix but I don't have a svn account.



anyways here is the fix maybe someone can commit it.



com.jme.renderer.lwjgl.LWJGLTextureRenderer.LWJGLTextureRenderer(int width, int height,LWJGLDisplaySystem display, LWJGLRenderer parentRenderer)



           if (supportsMultiDraw) {

               IntBuffer buf = BufferUtils.createIntBuffer(16);

              GL11.glGetInteger(EXTFramebufferObject.GL_MAX_COLOR_ATTACHMENTS_EXT, buf);

               maxDrawBuffers = buf.get(0);

               if (maxDrawBuffers > 1) {

                   attachBuffer = BufferUtils.createIntBuffer(maxDrawBuffers);

                   for (int i = 0; i < maxDrawBuffers; i++) {

                       attachBuffer.put(EXTFramebufferObject.GL_COLOR_ATTACHMENT0_EXT+i);

                   }



               } else {

                   maxDrawBuffers = 1;

               }

           }



line 106:



from:

   if (supportsMultiDraw ) {

to:

   if (supportsMultiDraw && isSupported) {



without this opengl will throw an 1280 error



I have an intel GMA 3100 with Tungsten Graphics, Inc - Mesa DRI Intel® G33 20090712 2009Q2 RC3 x86/MMX/SSE2 - 1.4 Mesa 7.5.1



it also works if you just add the if (isSupported) before GL11.glGetInteger(EXTFramebufferObject.GL_MAX_COLOR_ATTACHMENTS_EXT, buf); but I think the other way is better.



maybe change isSupported to supportsOtherRenderingDestinations

Please fix it in JOGLTextureRenderer too.

Commited fix for LWJGL and JOGL texture renderers.

Momoko_Fan said:

Commited fix for LWJGL and JOGL texture renderers.


woo!  adding [committed] to topic name

Thanks, I had to work that around back a half year ago. Now I know why. :slight_smile: