I can't use glGetFloat() function well. please help me.
I wrote this code.
1 2 3 4 5 6 7 8 9 10
| GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glScalef(10.f, 10.f, 10.f); FloatBuffer FB = ByteBuffer.allocateDirect(16 * 4).asFloatBuffer(); GL11.glGetFloat(GL11.GL_MODELVIEW, FB);
for(int i = 0 ; i < 16 ; ++i) { System.out.println(FB.get(i)); } |
but, this program out put this.
0.0
0.0
0.0
0.0
...
0.0
all Zero.
this output is not good.
it is different from I expected.
Where is wrong?
I'm Japanese. So My English may have some problems. Please pardon me.