Caffeine Peter Colijn
(RSS)

May 07, 2005 (link)
AdSense

AdSense at work:

Can't take 4 more years?
5' tall inflatable George W. Bush punching bags, make great gifts
www.bushbop.com

Tee hee.

May 18, 2005 (link)

Tetris

So our first assignment in grazaphics was to write Tetris. Well, sort of. They gave us some code that implemented the game logic, and some stubs, and we had to render the whole thing in OpenGL. I quite enjoyed it, and implemented an extra feature to enable anti-aliasing.

[image]
It's suprisingly hard to play when it's rotating

At first I tried a jittered anti-aliasing algorithm using the accumulation buffer. It rendered every frame 4 times, but since I was easily getting over 100fps I figured it would be ok. But it ended up absolutely killing performance. Then I dug up the right OpenGL-fu to check if the hardware supports FSAA and enable it :)

This was also my first time using gtkmm, which I must say is much nicer than using GTK+ directly, where it'll take ~100 lines of code just to pop up a freaking window. Although as jdeboer mentioned, Doxygen isn't giving them much love for some reason.

GObject

It looks like some introspection work is happening in GObject, which should bring more binding-y goodness.

Heh. Odd, it was about last year this time when I last lamented about GObject. I guess I've cooled down a bit since then; I no longer think GObject is a creation of satan himself. I haven't had to subclass a GObject in a long time, and so I haven't been reminded of its true horrors for a while, but that also made me realise that subclassing really is something you do (relatively) infrequently. So while it's not good if subclassing is so painful it makes you want to eat glass for relief, you do it rarely enough that it doesn't (often) get in the way. Though I do think the fact that it's really painful to subclass in GObject does prevent people from creating custom new widgets and things, which is potentially bad (and also potentially good; as pphaneuf would remind me, you know something's easy when it's been done millions of times -- badly).

Back: April 2005 Next: June 2005

email: caffeine@colijn.ca