Re: Perspective and LookAt matrices: Python implementation renders nothing

"Nicolas P. Rougier" <[email protected]> Sat, 28 Nov 2015 18:15:51 +0100
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
> I also provide my running code (where getXRotation, getYRotation and getZRotation behave as expected) so I suppose the issue com from my perspective and lookAt matrices.


Make sure to stick to np.float32 when you create matrices.

> 
> I have two last questions about matrices in GLSL: 
> - I have found that mat*vec4(position, 1) and vec4(position,1)*mat do not trigger any errors while the latter, in my opinion, should fail, why?

See section 5.11 of GLSL spec at https://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf


> - As OpenGL and bumpy are not identically ordered (column/row major), should I always have to transpose my matrix before using OpenGL functions?

You can fix the order in the shader.


Nicolas
------------------------------------------------------------------------------
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net