I try to add a cube display to my project, but I get one error that I don’t know how to fix it when I comment on these few lines, every thing works fine, but when they are ... this error occurs
"Exception in thread" main "org.lwjgl.opengl.OpenGLException: cannot use offsets when disconnecting Buffer Unpack Buffer Object
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL13.GL_TEXTURE_CUBE_MAP);
GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 1);
GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_X,0,GL11.GL_RGBA,20,20,0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,temp.getTextureID());
GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_NEGATIVE_X,0,GL11.GL_RGBA,20,20,0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,temp.getTextureID());
GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_Y,0,GL11.GL_RGBA,20,20,0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,temp.getTextureID());
GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,0,GL11.GL_RGBA,20,20,0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,temp.getTextureID());
GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_POSITIVE_Z,0,GL11.GL_RGBA,20,20,0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,temp.getTextureID());
GL11.glTexImage2D(GL13.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,0,GL11.GL_RGBA,20,20,0,GL11.GL_RGBA,GL11.GL_UNSIGNED_BYTE,temp.getTextureID());
Is there something wrong? How can I fix this error?
Thank you for your time.