sandbucket

07-30-2013, 08:18 AM

hi, i am trying to modify the position of an object using matrices. i define a matrix like this:

GLfloat matrix[] = {1, 0, 0, .25, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};

i then set the uniform matrix value using glUniformMatrix4fv(matrixloc, 1, GL_FALSE, matrix);

when i multiply the matrix by the vector in the vertex shader (gl_Position = Matrix * Vector) (my vector has a 1 in the w value) it doesnt draw the triangle. whats going on?

GLfloat matrix[] = {1, 0, 0, .25, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};

i then set the uniform matrix value using glUniformMatrix4fv(matrixloc, 1, GL_FALSE, matrix);

when i multiply the matrix by the vector in the vertex shader (gl_Position = Matrix * Vector) (my vector has a 1 in the w value) it doesnt draw the triangle. whats going on?