LWJGL Forum

Programming => OpenGL => Topic started by: leejenshil on August 21, 2015, 14:12:01

Title: function not supported for no reason
Post by: leejenshil on August 21, 2015, 14:12:01
in my voxel engine, i am trying to render a simple chunk. i have set up the VBO's and put all the vertices in it, but when i go to render it using these lines:

GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, chunk.getVBOVertexHandle());
    GL11.glVertexPointer(3, GL11.GL_FLOAT, 0, 0);
     
    GL11.glEnableClientState(GL11.GL_COLOR_ARRAY);
    GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, chunk.getVBOColorHandle());
    GL11.glColorPointer(4, GL11.GL_FLOAT, 0, 0);
            GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, chunk.getVertexCount());


it just gives me an Exception in thread "main" java.lang.IllegalStateException: Function is not supported coming from every GL11 function in that block code that's not glDrawArrays. what's weirder is that i'm following this (https://sites.google.com/site/voxelenginelwjglport/00-setting-up-lwjgl) tutorial on how to make a voxel engine and when i downloaded the source from that site and ran it there where no errors. so i copy pasted most of the code and i still got the error! any idea what could make the error?
Title: Re: function not supported for no reason
Post by: spasi on August 21, 2015, 15:35:18
You're running in a core profile context (https://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts).