11 Oct 2000 drivers   » (Apprentice)

Well, I am now officially the Documenter for ClanLib.

I'm also working on writing a multiplayer ClanTTT (Tic-Tac-Toe), network multiplayer game. Of course it's only an example. I will use it as a basis for a ClanLib tutorial. (The current tutorials (not written by me) are way out of date.)

I got one of the two lead developers to join Advogato. If some people could certify him as a Journeyer, that would be cool. Then he could actually sign himself up on the project page. Funny how "observers" can't sign themselves up even to their own projects. He's mstarch.

I have been studying object oriented architecture and design, along with trying to figure out the architecture of ClanLib, in order to write documentation for it. For the longest time I was stuck because the inheritance tree didn't make sense. There is a CL_Target interface, which is something you can draw on. Then there is a CL_SurfaceProvider which instantiates images that can be blitted to the screen. Then there is a CL_Canvas, which acts as both a CL_SurfaceProvider and CL_Target. That is, you can draw on it, then use it to instantiate a CL_Surface. A CL_Surface is packed into a special format designed for fast blitting to the video card, not for drawing on. In fact, the data may be cached on the video card. For some reason (probably for the benefit of CL_Canvas) CL_SurfaceProvider (which is an interface class) inherits from CL_Target. Yet, not all surface providers are intended to be Targets. Most surface providers just load an image from a file, or the resource manager. So I asked why they made it the way they did, and suggested an improvement if there wasn't a reason. That is, make CL_Canvas use multiple inheritance of interfaces, both CL_Target and CL_SurfaceProvider. I haven't heard back from the mailing list yet. I'm new to this so maybe it's some kind of social mistake to suggest an improvement (stated as a question) without knowing the whole situation, and without providing a patch (and testing it out yourself to see if it is feasible). Who knows. We shall see. Actually I just wanted to ask if I was way off base before I tried changing the code.

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!