Download pspgl-demos.zip
Demos written using PSPGL; See http://www.goop.org/psp/gl/ for details and source.
This demonstrates the PSPGL GL_PSP_vertex_blend extension, which exposes the hardware's vertex blending capabilities. The extension is modelled on the ARB_vertex_blend extension, but is more finely tuned to the PSP's hardware. Porting code from one to the other should be straightforward.
Controls:
This shows the PSP's hardware surface patch drawing abilities, lit with diffuse and specular light from spotlights. The surface patch is generated by using the Firefox icon's green channel as a heightfield.
One interesting thing to note is that lighting isn't nearly as expensive with a Bezier patch as it is with plain triangle strips. The subdivision of the patches generates around 2300 vertices, but adding extra lights makes little difference. The "spot" demo uses a 64x64 mesh (4096) vertices, and 4 lights is a severe performance hit.
You can also draw spline patches by pushing "select" 3 times. The interesting thing to note with spline patches is that they're smooth over the whole control mesh. They're also more finely subdivided, so there are more triangles for the same subdivision setting.
Controls:
This shows the PSP's hardware lighting abilities. This is using a fairly fine mesh (64x64), and adding more lights clearly has a performance hit. The scale at the bottom of the screen is in milliseconds, and the green arrow indicates how long we spent waiting for the GE to finish processing. With 4 lights, it can only barely do 60fps, despite being fairly optimised (using indexed triangle strips cached in VRAM). Using a Bezier patch seems to be much more efficient.
Controls:
This demonstrates copying from the framebuffer into a texture and then using this texture for further drawing. The PSP has a high-performance copying unit which is synchronized with the rest of the graphics command queue, leading to a very efficient implementation of glCopyTexImage2D(). Controls: