I try to add cube mapping to my project but i get one error that i dont know how to fix it
when i comment these few line every thing work fine but when they are in …this error occur
“Exception in thread “main” org.lwjgl.opengl.OpenGLException: Cannot use offsets when Pixel Unpack Buffer Object is disabled”
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 any thing wrong?
how can i fix this error?
thank you for your time