I wrote this simple framework in PB to make experiments while learning OpenGL, maybe some other people starting right now can found it useful to learn how to use OpenGL with PB.
So, what can you learn from this ? (or if you prefer, what did I learn doing this ?)
* how to setup a windowed OpenGL framework
* how to check for errors after calling an OpenGL function
* how to render a scene while switching resolution on the fly
* how to do simple multithreading and event synchronization
* how to check for OpenGL extensions and use them
* how to execute a demo at the same speed with VSync enabled at 60 Hz (60 FPS) and with VSync disabled drawing at 250 FPS (for example)
* how to count the number of FPS your application is rendering
* how to separate every demo from the framework code, coding it in a dedicated include file
* how to enable multisample to do full scene antialiasing
* how to render some nice text in 3d (not using fixed bitmaps)
* how to grab a texture from memory and apply it to a polygon
* how to do some simple blending effects
* how to use display lists to speed up your rendering
* how to implement basic fog effect
* how to add a light to a scene and specify color tracking for materials
* how to load an RGB image, transform it to RGBA (add an alpha channel) and use it to do blending effects (sprites, etc.)
* how to switch back and forth from #GL_PROJECTION to #GL_MODELVIEW and how to use them both on the same scene, pushing and popping them from the stack

NOTE: this program still use a lot of .l variable declaration, now it works with 4.30 but when coding a new program now you should use .i or avoid the type declaration for integers.
See this article about portability by Freak: http://www.purebasic.fr/blog/?p=42
For the rest, it still can be useful to any Opengl+PB beginner, even if in the meantime I learned a lot more and probably I would rewrite this differently. Maybe I'll do !
EDIT: now SGL is available -> viewtopic.php?t=81764