Archives for September 2008 (3)
September 22, 2008

Different versions of MSVC have different versions of STL

Something that I have only recently noticed only after I have used MSVC for a while is that different versions of MSVC use different versions of the C++ standard template library. This isn’t a problem, unless you are linking libraries statically that were built with different versions of MSVC. For example, a static library that uses the STL built with MSVC 2003 would not be linkable with a program built with MSVC 2005 without a considerable amount of dicking around.

This is weird, because the STL is meant to be portable and make programs portable. It appears that Microsoft’s STL are not only a set of headers, but also a corresponding set of libraries that contain a set of functions that are used by the STL.

If you attempt to link a library built with a version of MSVC with a program built with another version of MSVC, the compiler will complain because it is unable to find references to the functions the library’s version of the STL calls.

The obvious way around this would be to link all the libraries the library depends on into itself, but that would cause problems with compiling with the same version of MSVC, and even more so when you are using static libraries that were all compiled with different versions of MSVC.

Usually you wouldn’t worry about this unless you are creating libraries to be used by other people, or using libraries written by other people. I wonder what Microsoft has against one STL to rule them all? So how do we get around this? Easy answer: You don’t use the STL.

September 17, 2008

Shaders, where math meets art

Since playing with shaders is so much fun, lets have a little fun looking at what happens when you take an old game, and breathe some new life into it using a crazily reprogrammed pipeline:

September 16, 2008

Vertex Buffer Objects

In my last post I mentioned that if you wanted to draw a large number of things on a screen, you need VBOs. Well, honestly at the time, I only knew what it was but never touched it before. VBOs are Vertex Buffer Objects, in other words, boxes in the GPU to store vertices, their colors, normals and attributes. After a considerable amount of Googling, I was finally able to learn what VBOs are and relate them to the intermediate mode. This would probably help those who have started openGL by learning glBegin and glEnd learn about what VBOs truly are, and why they exist.

(more…)

page 1 of 1