texture mapping issue
Hi folks, I'm having some trouble tracking down a texturing issue. It's been a while since I've worked with OpenGL so forgive me if this has an obvious fix. This image demonstrates my issue:
As you can see, the edges of quads are seems to be grabbing texels from the opposite edge of the texture.
Initially I assumed my texture coords were somehow wrong, but after extensive checking I'm pretty sure they are correct. I tried using glTexParameter() with GL_CLAMP, various filtering options, and different textures with the same result. Also glGetError() shows no errors at any point.
I'm about to start banging my head on the keyboard so any help would be appreciated
I tried that also, same result.
Also tried using using GLuints instead of GLfloat for the texture coords, just to be sure.
Also tried using using GLuints instead of GLfloat for the texture coords, just to be sure.
Ok, so as it turns out GL_CLAMP_TO_EDGE works but I was using it incorrectly.
That leads me to another question however. If I wanted to double the length of the cube without texture stretching, I'd need to render additional quads?
That leads me to another question however. If I wanted to double the length of the cube without texture stretching, I'd need to render additional quads?
Quote:Original post by HeretusPretty much, yes. You can however do some tricks with texture borders, but I am not sure how well this meshes with modern hardware.
That leads me to another question however. If I wanted to double the length of the cube without texture stretching, I'd need to render additional quads?
Quote:If I wanted to double the length of the cube without texture stretching, I'd need to render additional quads?You can always do things like "glTexCoord2f(2.0,2.0)" to tile the texture twice over a cube with sides twice as long. Note that you can't use clamp in that case, though.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement