lwjgl - how to pass matrix2 to shader -
in shader, have:
uniform mat2 texturematrix;
in java, have:
matrix2f txmat = new matrix2f(); txmat.m00 = (float)1; txmat.m01 = (float)2; txmat.m10 = (float)3; txmat.m11 = (float)4; floatbuffer buffer = bufferutils.createfloatbuffer(4); txmat.load(buffer); int loc5 = glgetuniformlocation(programid, "texturematrix"); gluniformmatrix2(loc5, false, buffer);
why doesn't work ?
haven't used lwjgl i'm gonna go out on whim , guess want store
instead of load
. you're loading matrix buffer created, instead of putting matrix buffer.
Comments
Post a Comment