OpenGL pbuffers suck!

Aaargh! Well, the blog title is about as much as I wanted to say on this topic.

…this is just me venting out, during the process of chasing a video memory leak for 4 days already. It involves p-buffers, depth textures, shared OpenGL contexts and other delicious things. Still didn’t find the cause, but I’m getting close.

Pbuffer my a**.



Now that's what I call a good API (stb_image)

The other day at work I needed a command line tool to compare some images (whether they mostly match, used in unit/functional tests). For unknown reason I could not get ImageMagick’s compare to work like I wanted, so I just wrote my own.

I used stb_image library from Sean Barrett - and it just rocks! Here’s the code to load a PNG image from file:

 int width, height, bpp;
 unsigned char* rgb = stbi_load( "myimage.png", &width, &height, &bpp, 3 );
 // rgb is now three bytes per pixel, width*height size. Or NULL if load failed.
 // Do something with it...
 stbi_image_free( rgb );

That’s it! Basically a single line to load the image (and of course the library has similar functions to load from a block of memory, etc.). And the whole “library” is a single file - just add to your project and there it is. In comparison, loading a PNG file using de-facto libpng takes more than 100 lines of code (and some time to read the docs).

Small is beautiful.

…and the way we do graphics related unit/functional/compatibility testing deserves a separate article. Sometime in the future!


Hey, 4 kilobyte intros are starting to get interesting!

Is it just me, or 4k intros really evolved by leaps and bounds in the last few years? I remember the time when 4k stuff was like “ok, that’s cool for a 4k” - but if it weren’t four kilobytes, nobody would watch it. Then in around 2004 came Yellow Rose of Texas, San Angeles Observation and Micropolis - and they were beautiful and interesting by themselves already. In case of Micropolis, it has a city and a big robot - who can resist that? The fact that they are in 4 kilobytes makes that even more interesting.

Fast forward to 2007. Of course every decent 4k intro has music now. Some do have separate scenes, with greets and stuff like “the real demos” (sprite-o-mat). Others have ambient occlusion and interesting lighting (Galiwm, kinderplomber). Some have raytracing in the pixel shaders (4kmdr). And so on.

Woo-hoo! I expect the 4k scene to bring some real jewels in the next couple of years.


MegaPixel on shockwave.com

'Megapixel!'I just have to blog this: shockwave.com just launched a Unity web game - MegaPixel. It’s a pure, abstract, and mega-fun FPS. It’s set up in a very small space (the levels are basically boxes with several smaller boxes inside), and it pretty much uses a single texture for the whole game, and it does not use much more than particle effects for everything (the levels, enemies, weapons and everything else is just particles). Pure genius.

I like it! That says a lot, because last time I played FPS was ages ago. Finally, someone made a game that I can like again. How much I’m biased because it’s made with Unity… decide for yourselves :)

Now the killer part: the game is designed and developed solely by a 15 year old - Forest “Yoggy” Johnson. How cool is that?

Enough talking, just go and play it. And remember that you didn’t see cool until you get to the robot level!