Re: [PyOpenGL-Users] get Translation inside matrix stack
Brought to you by:
mcfletch
From: Greg E. <gre...@ca...> - 2008-07-23 00:33:31
|
Gary Herron wrote: > All the transformations are recorded by OpenGL in a 4x4 matrix. > You can recover that matrix like this: > > buff = (ctypes.c_double*16)() > pyglet.gl.glGetDoublev(stack, buff) However, reading back the OpenGL matrix as part of your rendering process isn't really a good thing to do, since it requires waiting for any pipelined OpenGL commands that you've sent to complete. This can slow things down considerably. If you're doing this a lot, it may be better to keep track of the transformations yourself. -- Greg |