Blog Archives

Porting Back to Linux II.

This post is the second part of another I posted earlier.

The detection of uninitialized class members is one of  of my recurring problems with C++. The language standard does not guarantee anything about member variables so I should initialize them myself. Unfortunately, VC++ compiler does not warn me if I forget to initialize a class member variable, even if I set the highest warning level. GCC detects this kind of sloppiness and reports them to me keenly, making great improvements in code quality. Furthermore, GCC goes one step beyond and warns me if the initialization order differs from the declaration order (see Effective C++ about this).
Read the rest of this entry

Advertisement

Effects, Passes, Shaders and Parameters

As I promised in an earlier post, this is a short overview about shader support in the engine. Currently Merlin3D supports OpenGL and GLSL. DirectX support is not implemented yet.

Merlin3D uses its own effect files, that describes a particular shader set for the different rendering passes (it has some similarities to .fx files in DirectX, but in OpenGL world there is no effect file support at all). Effect files are in XML format. Each visible scene object has exactly one effect required to render the object in different rendering passes. Multiple scene objects can use the same effect. Anyway, it is the recommended way of effect usage, because the engine tries to group objects by the associated effects to reduce OpenGL state changes.
Read the rest of this entry