I also had to add the relevant headers in. The resolution determination from the Pi also had to be connected to the screen resolution variables sr_screenWidth and sr_screenHeight. eglSwapBuffers() had to be added in with the regular OpenGL swap function so that the display would update. gArmagetron.cpp is where the main() function is at, and it was just a matter of hacking out the normal display init function (sr_InitDisplay()) that would take place and replacing it with the OpenGL ES initialization code for the Pi. Fortunately I've done some Armagetron programming before so I had a rough idea of what I was doing there. Hello GLU!)Īfter learning how OpenGL ES worked on the Pi, the next issue was transplanting that into Voodoo's Armagetron code. (It isn't part of OpenGL, and is definitely not part of OpenGL ES. The critical pieces are establishing the EGL context, initializing SDL solely for input, and re-implementing the gluPerspective function. Fortunately I already knew some OpenGL from my work on Androgetron, which while not Armagetron, did use OpenGL ES under Java. Documentation there is surprisingly thin on the ground, but eventually I cobbled together a simple bouncing cube program that had all the essentials. The first step was to learn how to do OpenGL ES on the Pi.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |