Stefan Dösinger wrote:
Am Freitag, 14. Dezember 2007 02:46:42 schrieb Ivan Gyurdiev:
As for the "object oriented programmer" - I would hope every programmer thinks in terms of objects, even when writing C code. The GLSL backend wouldn't be available today if the shader compiler was still a big series of if statements.
This is true; And the rest of the code isn't a collection of if statements either(BltOverride is, but that should be fixed). If we had proper C++, then we could have the compiler inline the getters and setters, however, with the current C setup we can't do that(unless we write a bunch of macros or extra inline functions, which doesn't really help maintainability either).
I don't know what you mean with proper inline. It's true that "inline" is only a hint to the compiler but normally the compiler knows anyway better what to inline and what not.
If you really want to force an inline you have the __attribute__((always_inline))
bye michael