I have an OES texture which renders off-screen to another 2D texture using frame buffer object (FBO) My output is completely flipped both upside- down and left - right
Read that by inverting texture coordinates, it will solve the issue.
So I did this :
private final float[] mTriangleVerticesData = {
// X, Y, Z, U, V
-1.0f, -1.0f, 0, 0.f, 0.f,
1.0f, -1.0f, 0, 1.f, 0.f,
-1.0f, 1.0f, 0, 0.f, 1.f,
1.0f, 1.0f, 0, 1.f, 1.f,
};
changed to
private final float[] mTriangleVerticesData = {
// X, Y, Z, U, V
-1.0f, -1.0f, 0, 0.f, 0.f,
1.0f, -1.0f, 0, 0.f, 1.f,
-1.0f, 1.0f, 0, 1.f, 0.f,
1.0f, 1.0f, 0, 1.f, 1.f,
};
This solved by upside down issue, but left right is stll flipped. Any ideas.? Or is there any elegant way to solve this issue.
I am using Androd GLES20.