-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Hi,
I changed content of OnSurfaceChanged function with code which sets origin to left top corner. But after that is text flipped. Please can someone help to fix it?
public void onSurfaceChanged(GL10 unused, int width, int height) {
GLES20.glViewport(0, 0, width, height);
for(int i=0;i<16;i++)
{
mtrxProjection[i] = 0.0f;
mtrxView[i] = 0.0f;
mtrxProjectionAndView[i] = 0.0f;
}
Matrix.orthoM(mtrxProjection, 0, 0, width, height, 0, -1, 1);
Matrix.setLookAtM(mtrxView, 0,
0f, 0f, 1f,
0f, 0f, 0f,
0f, 1.0f, 0.0f);
Matrix.multiplyMM(mtrxProjectionAndView, 0,
mtrxProjection, 0,
mtrxView, 0);
}
// Our matrices
private final float[] mtrxProjection = new float[16];
private final float[] mtrxView = new float[16];
private final float[] mtrxProjectionAndView = new float[16];
Many thanks
Metadata
Metadata
Assignees
Labels
No labels