I'm halfway through the http://open.gl/ tutorials ( http://open.gl/transformations) and am being introduced to "Matrices" to do transformations (rotation, scaling, etc). So far I've been able to translate the C++ in the tutorials to Python, more specifically:
- C++ to Python - SFML to Pyglet - GLEW to pyglet.gl - SOIL to pyglet.image But to do matrice transformations I'm being asked to use GLM (OpenGL Mathematics http://glm.g-truc.net/0.9.5/index.html), and I haven't been able to wrap my head around an appropriate equivalent for that in Pyglet, so I'm wondering, has anyone here had any experience with or know of a way for doing things in Pyglet which in C++ would require GLM? A simple example would be to use GLM to create a mat4 value which is then used in the vertex shader through a uniform variable: glm::mat4 trans; trans = glm::rotate(trans, 180.0f, glm::vec3(0.0f, 0.0f, 1.0f)); ... GLint uniTrans = glGetUniformLocation(shaderProgram, "trans"); ... glUniformMatrix4fv(uniTrans, 1, GL_FALSE, glm::value_ptr(trans)); I'm using: - Pyglet 1.2 - OpenGL 3.2+ -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
