The Quad with DrawElements Example do not work on Mac OS X

Started by kKdH, August 20, 2012, 09:44:57

Previous topic - Next topic

kKdH

Hi,

i copied the source code from the "The Quad with DrawElements Example"
http://lwjgl.org/wiki/index.php?title=The_Quad_with_DrawElements#Complete_source_code
and tried to execute it but it doesn't work on Mac OS X 10.8.

The only changes i made:
I changed:
ContextAttribs contextAtrributes = new ContextAttribs(3, 2);
contextAtrributes.withForwardCompatible(true);
contextAtrributes.withProfileCore(true);


to:

ContextAttribs contextAtrributes = new ContextAttribs(3, 2).withProfileCore(true);


Due to the ContextAttribs class is immutable.

But line 140...
GL11.glDrawElements(GL11.GL_TRIANGLES, indicesCount, GL11.GL_UNSIGNED_BYTE, 0);


...leads alway to the OpenGL error: Invalid operation


Can someone help me to fix the problem?



P.S.: I don't know whether it works on other operating systems.

abcdef

I don't think anything works in Mountain Lion at the moment as they depricated 32 bit libraries (Carbon) and removed Java as a built in component. Oracle and Open JDK have compiled versions you can install but AWT using JNI has been deprecated and doesn't work. LWJGL uses AWT for Mac's.

The interface needs to be rewritten for it to work