Here is what I do:
GL11.glBindTexture(GL11.GL_TEXTURE_2D, ID);
makeTexture(readImage(path), GL11.GL_TEXTURE_2D, true, hasAlpha);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR_MIPMAP_NEAREST);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE);
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE);
After I added the last 2 lines with CLAMP_TO_EDGE my texture shows as one color like if I was using glColor. I have checked for glErrors but didnt find any. Im using mipmaped pngs as textures. If I remove the two lines everything works perfect again. Except for the seams between the textures I want to minimize using CLAMP_TO_EDGE.
GL12 is supported on my comp, but I should mention that its a laptop with a graphicscard that dont support shaders for instance. I have an exe-file from a tutorial on how to make a skybox and such that uses CLAMP_TO_EDGE and that file works perfect when executed. so CLAMP should work. So Im quite puzzled about why this happens.
Is it my graphicscard?
Is it LWJGL?
Or maybe something elseā¦
Im desparate!
Thanks in advance.