Hi Alex PyOpenGL programs look like any other opengl code, only expressed in python.
You start with importing the modules: For example: from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * You initialize GLUT and so on: ... glutInit(sys.argv) ... You set up your transformations and you draw your triangles with glBegin(GL_TRIANGLES) # or strips or fans glVertex3d(x0, y0, z0) ... glEnd() Very straightforward. I have mixed C and python opengl calls in my projects. All the triangle drawing is done in a C++ class that is wrapped to be callable from python (wrapper code generated by swig (swig.org)). For the opengl window I used the glcanvas class in wxpython, but I would like to rewrite all the user interface code to PySide, which I found much easier to use than wx widgets. Hope this helps Martin On 8/14/11, Alex <[email protected]> wrote: > Hello everyone, > > Does anyone in this group have any experience with PyOpenGL? If so I'd > love to see some simple scripts. I intend to start a project coding my > own Finite Element program for static strength engineering > applications. My guiding text for this will be 'Finite Element > Implementation' by Y. K. Cheung, S. H. Lo and A. Y. T. Leung. It will > take me some time to learn the mathematical theory but I will be > receiving help from a mentor at work. I will implement the maths using > Python and Numpy, but for viewing the mesh and the results I want to > use PyOpenGL. The mesh will consist of big bulky tris and quads, so > nothing too fancy and I'm leaving aside solid meshing (hexahedra and > tetrahedra) for now. > > Regards > > Alex > > -- > To post: [email protected] > To unsubscribe: [email protected] > Feeds: http://groups.google.com/group/python-north-west/feeds > More options: http://groups.google.com/group/python-north-west > -- To post: [email protected] To unsubscribe: [email protected] Feeds: http://groups.google.com/group/python-north-west/feeds More options: http://groups.google.com/group/python-north-west
