-
Notifications
You must be signed in to change notification settings - Fork 0
dMaggot/QGLFlush
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
QGLFlush ======== Born as a geek joke about the glFlush() function, this project aims to demonstrate tricks on three areas of programming, namely: Pixel by Pixel Animation, Python Embedded Scripting and Mathematics Applied to Computer Graphics. I. Requirements II. Installation III. Usage IV. Documentation V. License VI. Author ================================================================================================== I. Requirements QGLFlush is based on the Qt Framework, specifically on these modules: - QtGui - QtCore - QtOpenGL You will also need: - Python development files - Python OpenGL module - Qscintilla (in particular, the Python Lexer) Finally, you will need Git to fetch the code. -------------------------------------------------------------------------------------------------- II. Installation - Get the code from the repository: git clone git://github.com/dMaggot/QGLFlush.git - Change into the fetched directory, create Makefile and compile: cd QGLFlush qmake make If everything went ok, you should have a QGLFlush binary in the QGLFLush folder. -------------------------------------------------------------------------------------------------- III. Usage QGLFLush provides a Python interpreter which can be used to issue Python OpenGL commands. Under the interpreter, the following modules have already been imported: - OpenGL.GL - OpenGL.GLU - OpenGL.GLUT The 2D orthogonal box defined for the QGLWidget ranges from (-100,-100) to (100,100). Update button updates the QGLWidget with current Python OpenGL code in the interpreter. glFlush() button (literally) flushes the contents of the QGLWidget.An example of code that will work on the interpreter is this one, based on NeHe's lesson 2: def DrawGLScene(): glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) glLoadIdentity() glScalef(25,25,1) glTranslatef(-1.5, 0.0, 0) glBegin(GL_POLYGON) glVertex3f(0.0, 1.0, 0.0) glVertex3f(1.0, -1.0, 0.0) glVertex3f(-1.0, -1.0, 0.0) glEnd() glTranslatef(3.0, 0.0, 0.0) glBegin(GL_QUADS) glVertex3f(-1.0, 1.0, 0.0) glVertex3f(1.0, 1.0, 0.0) glVertex3f(1.0, -1.0, 0.0) glVertex3f(-1.0, -1.0, 0.0) glEnd() DrawGLScene() -------------------------------------------------------------------------------------------------- IV. Documentation -------------------------------------------------------------------------------------------------- V. License This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------------------------------- VI. Author David E. Narváez dMaggot [email protected]
About
Educational Project on Computer Graphics and Scripting
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published