24 May 2004 bratsche   » (Master)

Hacking
    I spent some time yesterday in Windows working on GLSL support in NeoEngine. I had started on it before, but I scrapped that code in favor of this new design. I can't really decide yet if I like the new design or not, but it involves no API breakage so it seemed like the way to go. The previous design involved breaking the API for how we deal with shaders, and it ended up complicating the API, especially for systems that use DirectX or older OpenGL shader implementations.

    The major difference in GLSL is in that it allows you to link shaders into a final program object binary. All previous technology required that you send the entire source code for the vertex program, compile it, and entire source code for the fragment program, compile it.. and with each render you have to enable the vertex program and enable the fragment program. With GLSL you can upload the source code for as many vertex shaders and as many fragment shaders as you need, compile them, then link them all together. Much more like a traditional compiler. This is good, because we can make pipeline programming modular now. Well, we can do so much more easily now anyway. To do so in DirectX HLSL you need to do manually "compile" the source code together from multiple string sources before you upload it and really compile it. That's a lot of trouble.

C++ streams
    I learned a lot about C++ I/O streams back when I was working on NeoEngine's logging system. I'm pretty happy with how it works. It's set up with a log sink and log source system (with the streambuf class used internally). It doesn't appear that there's any standard C++ stream method of doing the equivalent of mmap(), so I think I'm going to try to make an mmmap-based stream sometime. I need to use mmap() for something else I'm working on, but I'd like to keep with the C++ style stream I/O if possible. Also, just so I learn better how to use it.

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!