fix vertex shader positioning

This commit is contained in:
Josh Holtrop 2012-12-01 07:48:06 -05:00
parent c7e0b9696d
commit 490f8973d2
2 changed files with 1 additions and 3 deletions

View File

@ -10,6 +10,6 @@ varying vec2 pos_2d_i;
void main()
{
gl_Position = projection *
(modelview * vec4(pos, 0, 1) + vec4(offset, 0, 1));
(modelview * vec4(pos, 0, 1) + vec4(offset, 0, 0));
pos_2d_i = pos + offset;
}

View File

@ -33,7 +33,6 @@ public class MyRenderer implements GLSurfaceView.Renderer
private float m_modelview[] = new float[16];
private int m_width;
private int m_height;
private float m_aspect = 1.0f;
private final int GRID_WIDTH = 16;
private final int GRID_HEIGHT = 9;
private float[][] m_tiles = new float[GRID_WIDTH][GRID_HEIGHT];
@ -186,7 +185,6 @@ public class MyRenderer implements GLSurfaceView.Renderer
{
m_width = width;
m_height = height;
m_aspect = width / (float) height;
GLES20.glViewport(0, 0, width, height);