28 Oct 2002 TheCorruptor   » (Master)

OpenGL

Spent some time today playing with OpenGL and going throught NeHe's tutorials (again!). I found the SDL "Base" Code for the tutorials, which handles setting up a window, timing and event handling. As there was only a linux and win32 version of this (that I could see) I created an OS X PB project for it, made a few changes (and removed the win32 pragmas) so I have a nice framework for playing around in.

From there, I went through some of the examples and got the texture mapped cube up and running, making some changes to use SDL/SDL_Image to load the texture from a surface. All very easy admittedly, but I've not had the time to sit down and do this despite saying I would for ages. I'm also happy that I know what I'm doing (now) instead of stumbling around in the dark.

I'm surprised how nice it is to use SDL for events and surface mangling like this, not just because I know what I'm doing with SDL, but because of how easy it is to combine with OpenGL. Of course, the other benefit is taking some of my 2D pixel effects and bunging them on a texture each frame. The addition of linear filtering is gonna make some of those *very* nice when spun about and zoomed all over the place! ;-)

I think I'll have a play with this some more before I start using OpenGL to speed up my sprite work in Seal Basher...

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!