How can I mirror a texture bitmap in OpenGL Android?
質問
When I'm applying a texture to a shape, I keep seeing it mirrored. The GLU.gluLookAt is set to be 5 units up, so it's GLU.gluLookAt(gl, 0, 0, 5, 0, 0, 0, 0, 2, 0);. If it would be 5 units down, the x axis would be reversed, and that would be an even bigger problem.
Can you please tell me how to mirror the bitmap that is being load to be a texture? I want to maintain the position of the axis and the shapes being drawn the way they are, I just want to automatically mirror the bitmap.
Can you please tell me how to do that? Perhaps give me a code sequence that mirrors the bitmap on the x axis?
解決
You should be able to reverse the texture mapping coordinates you're using. For horizontal mirror, reverse the u
values. For vertical, reverse v
.