Hey,
I’m tryin’ to display a texture on a square. It does somehow but not in the right way for any reason. (colors are correct somehow) I thought the problem would be the shaders (asked for that in a recent post). but that seemed to be a different issue. searched the web again and found almost the same examples with squares using the same uv mapping.
it makes no difference, wether i use glActiveTexture(GL_TEXTURE0) after calling glGenTexture, glBindTexture or not. (cause that was missing in my code). the file is 24 bit .bmp (R8, G8, B8). Switching order of RGB for glTexImage2D with GL_RGB to GL_BGR wouldn’t make any difference as well.
Generally: Does the order of uv mapping matter, as long you stick to the order of vertex positions initialization? (cause that’s the only difference in different tutorials -> starting for e.g. with left bottom instead of left top.)
I uploaded everything on GitHub
The functions which initialize the square are CModel_3D::set_texture_square and CModel_3D::create_square in en_3d_mdl.cpp (src directory).
Any ideas? I appreciate your help