Re: [PyOpenGL-Users] Perspective and LookAt matrices: Python implementation renders nothing
Brought to you by:
mcfletch
From: Nicolas P. R. <Nic...@in...> - 2015-11-28 17:16:01
|
> 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 |