I've debugged my application with codeXL and can verify that my texture is getting these attributes applied:
GL_TEXTURE_MIN_FILTER: GL_LINEAR
GL_TEXTURE_MAG_FILTER: GL_LINEAR
GL_TEXTURE_WRAP_S: GL_CLAMP_TO_EDGE
GL_TEXTURE_WRAP_T: GL_CLAMP_TO_EDGE
GL_TEXTURE_WRAP_R: GL_CLAMP_TO_EDGE
With the following UV data:
0, 0,
1, 0,
1, 1,
1, 1,
0, 1,
0, 0,
0, 0,
1, 0,
1, 1,
1, 1,
0, 1,
0, 0,
0, 1,
0, 1,
0, 0,
0, 0,
0, 0,
0, 1,
1, 1,
1, 1,
1, 0,
1, 0,
1, 0,
1, 1,
0, 0,
1, 0,
1, 0,
1, 0,
0, 0,
0, 0,
0, 1,
1, 1,
1, 1,
1, 1,
0, 1,
0, 1
Yet my cube still looks like this: https://i.sstatic.net/2FARE.jpg
The Front and Back are being mapped fine, but the sides and top/bot are all stretched. I've tried with GL_REPEAT
, GL_CLAMP_TO_EDGE/BORDER
, GL_MIRRORED_REPEAT
, it's all the same result. I've tried only doing it with S and T. At this point I'm not sure what the problem is.
Vertex Shader + fragment + Buffers: (It's not that long)
I'm not really sure what it could be at this point. I thought my texture wasn't getting it's attributes applied correctly, but it is. Then i thought it was just my wrapping method, but all methods lead to the same result.