-
Lamina adapter for using Pygame GUIs in OpenGL displays
When you set the display mode for OpenGL, you enable all the coolness of 3D rendering, but you disable the bread-and-butter raster SDL functionality like fill() and blit(). Since the GUI libraries use those surface methods extensively, they cannot readily be used in OpenGL displays.
Lamina provides the PanelOverlaySurface class, which bridges between the two.
The 'surf' attribute is a surface, and can be drawn on, blitted to, and passed to GUI rendering functions for alteration. The 'display' method displays the surface as a transparent textured quad in the OpenGL model-space. The 'refresh' method indicates that the surface has changed, and that the texture needs regeneration. The 'clear' method restores the blank and transparent original condition.
There are four demonstration scripts in the distribution: The PGU and Ocemp versions of my GUI comparison script have been converted to use PanelOverlays, and the clock-spinner has been replace with a rotating wireframe sphere, to show the 3D quality. The other two scripts are conversions of Nehe tutorial lesson04 for Ocemp and PGU; the GUI provides buttons to toggle the image rotations on and off.
This implementation requires you to stipulate where the PanelOverlay will be drawn, and, if your surface is not screen-sized, to make adjustments for mouse coordinates. This is most useful if your viewer (camera) does not pan or pivot. I may add a feature to pin the PanelOverlay to a fixed location in eyespace.
The file can be found at
https://sourceforge.net/project/showfiles.php?group_id=110483
2006-05-11 12:35:30 UTC by dvkeeney
-
Batter Demo
The last release of the batter demo was in June of this year, and the feedback was that the pitches were unhittable. That would not do. ;)
So after a couple months of trial and error (and a couple months of interstate relocating), here is a more hittable version of the batter demo. Please download, try it, and let me know how it works for you. I am interested in both simple good-enough/not-good-enough (to be fun) evaluations and also in suggestions as to how to make it better. We want an interface that is both easy enough to be satisfying for the first session, but skill-centered enough that hours spent practicing yield improvements in ability.
The figures (batter and pitcher) are graphically primitive, just cylinders and spheres glommed together in a likeness of a baseball player.
If you have any knowledge of 3D graphics, and you are interested in contributing to this project, let me know. The project really needs an artist.
David
dkeeney@travelbyroad.net
2005-10-09 19:02:33 UTC by dvkeeney
-
Pitcher Demo
Previous announcements have been more about our rendering engine than about baseball, but now we have some progress to show in generating the baseball simulation. A pitching demo is online, both in source for all platforms, and as an executable for Windows.
This demo shows the pitchers windup and full pitching motion, as well as the path of the ball, demonstrating fastballs and fancy pitches too. The pitcher himself is graphically primitive, just cylinders and spheres glommed together in a likeness of a pitcher.
If you have any knowledge of 3D graphics, and you are interested in contributing to this project, let me know. The project really needs an artist.
David
2005-01-03 03:58:19 UTC by dvkeeney
-
SPyRE 0.6 released
The "Pitcher's Duel" project has released SPyRE (Simple Pythonic Rendering Engine) version 0.6. This is a lightweight rendering engine for OpenGL.
Provide pyOpenGL code to draw the model, and the SPyRE engine will display the model in an interface that provides zooming, panning and rotation of camera position using mouse and keyboard.
Changes in this release include bug fixes to the only reported bug (an initialization problem), and to a glitch in the pivoting code. This release has 'epydoc' documentation, more detailed than the prior docs, and rewritten summary docs.
The project includes demos such as a fountain of sparks, a swarming behavior model, a random walk example, a whirlpool effect using gravity and drag, and an example of chaos theory, and a lighted shaded forest scene.
The project page is at http://sourceforge.net/projects/pduel/spyre/
To use SPyRE, you also need to have installed Python, OpenGL, pyOpenGL, and PyGame.
2004-12-30 21:17:38 UTC by dvkeeney
-
Spyre 0.5 released (formerly zoePG)
The "Pitcher's Duel" project has released SPyRE (Simple Pythonic Rendering Engine), a conversion of the lightweight rendering engine 'zoe', to use Pygame/SDL rather than GLUT. This release also includes html help files. SPyRE was formerly known as zoePG.
Provide pyOpenGL code to draw the model, and the zoePG engine will display the model in an interface that provides zooming, panning and rotation of camera position using mouse and keyboard.
The project includes demos such as a fountain of sparks, a swarming behavior model, a random walk example, a whirlpool effect using gravity and drag, and an example of chaos theory, and a lighted shaded forest scene.
The project page is at http://sourceforge.net/projects/pduel/
To use SPyRE, you also need to have installed Python, OpenGL, pyOpenGL, and PyGame.
2004-10-24 22:18:09 UTC by dvkeeney