title: Python opengl cant get modelview matrix
body: <p>I want to make a 3D Planet Simulation using python,pyopengl and pygame. All works fine but now I want to determine the viewers position so that he can add new planets there. I already found that post : </p>
  
  <p><a href="https://stackoverflow.com/questions/9849374/using-glgetfloatv-to-retrieve-the-modelview-matrix-in-pyglet">Using glGetFloatv to retrieve the modelview matrix in pyglet</a></p>
  
  <p>But it doesnt works for me. Combined with some things from the internet I have this code :</p>
  
  <pre><code>x=0;
  y=0;
  z=0;
  mdl=(GLfloat * 16)()
  glGetFloatv(GL_MODELVIEW_MATRIX, mdl);
  x = -(mdl[0] * mdl[12] + mdl[1] * mdl[13] + mdl[2] * mdl[14]);
  y = -(mdl[4] * mdl[12] + mdl[5] * mdl[13] + mdl[6] * mdl[14]);
  z = -(mdl[8] * mdl[12] + mdl[9] * mdl[13] + mdl[10] * mdl[14]);
  </code></pre>
  
  <p>But when I try to execute it, it gives me the following error : </p>
  
  <pre><code>Traceback (most recent call last):
    File "Planets.py", line 372, in &lt;module&gt;
      main() 
    File "Planets.py", line 264, in main
      glGetFloatv(GL_MODELVIEW_MATRIX, mdl);
    File "/usr/lib/python2.7/dist-packages/OpenGL/latebind.py", line 45, in __call__
      return self._finalCall( *args, **named )
    File "/usr/lib/python2.7/dist-packages/OpenGL/wrapper.py", line 570, in wrapperCall
      pyArgs = tuple( calculate_pyArgs( args ))
    File "/usr/lib/python2.7/dist-packages/OpenGL/wrapper.py", line 347, in calculate_pyArgs
      args
  ValueError: glGetFloatv requires 1 arguments (pname), received 2: (GL_MODELVIEW_MATRIX, &lt;__main__.c_float_Array_16 object at 0x7f0d01f4e830&gt;)
  </code></pre>
  
  <p>It says that glGetFloatv only takes one argument, but how else should it work ? I already tried that : </p>
  
  <pre><code>x=0;
  y=0;
  z=0;
  mdl=(GLfloat * 16)()
  glGetFloatv(mdl);
  x = -(mdl[0] * mdl[12] + mdl[1] * mdl[13] + mdl[2] * mdl[14]);
  y = -(mdl[4] * mdl[12] + mdl[5] * mdl[13] + mdl[6] * mdl[14]);
  z = -(mdl[8] * mdl[12] + mdl[9] * mdl[13] + mdl[10] * mdl[14]);
  </code></pre>
  
  <p>This gives the following error :</p>
  
  <pre><code>Traceback (most recent call last):
    File "Planets.py", line 372, in &lt;module&gt;
      main() 
    File "Planets.py", line 264, in main
      glGetFloatv(mdl);
    File "/usr/lib/python2.7/dist-packages/OpenGL/latebind.py", line 45, in __call__
      return self._finalCall( *args, **named )
    File "/usr/lib/python2.7/dist-packages/OpenGL/wrapper.py", line 571, in wrapperCall
      cArgs = tuple(calculate_cArgs( pyArgs ))
    File "/usr/lib/python2.7/dist-packages/OpenGL/wrapper.py", line 374, in calculate_cArgs
      yield converter( pyArgs, index, self )
    File "/usr/lib/python2.7/dist-packages/OpenGL/converters.py", line 195, in __call__
      return self.arrayType.zeros( self.getSize(pyArgs) )
    File "/usr/lib/python2.7/dist-packages/OpenGL/converters.py", line 232, in getSize
      return self.lookup( specifier )
  TypeError: ('unhashable type', 'Failure in cConverter &lt;OpenGL.converters.SizedOutput object at 0x7f91788a9380&gt;', (&lt;__main__.c_float_Array_16 object at 0x7f915d804830&gt;,), 1, &lt;ctypes.glGetFloatv object at 0x7f917890c0e0&gt;)
  </code></pre>
  
  <p>It seems that another argument is expected... pname or such a thing...</p>
  
  <p>Any help would be greatly appreciated !</p>