perjantai 17. helmikuuta 2012

Continuing on bolt framework

Some refactoring... I received some comments about the use of exception specification in functions ( virtual void foo() throws (std::exception); ) ( ). 
With exceptions I tried to convey the idea, that the function throws exception at error, but in c++, if the function throws something else than the specified exceptions, the program will crash and burn. The crashing and burning would probably create sleepless nights and odd error situations in the end, so I've decided to conform to 'no exception specification at functions' style.

Another thing that seemed like a good idea, in the beginning, is the const variables, ( void fuu( const float bar ); ).. the idea behind this, was that at the end of the function, you could still trust the bar to be what it was in the beginning. Totally useless concept, trust the programmer to know what he is doing, polluting the code with useless const's (many tiny reasons.) adds to code bloat, possibly slower etc. Use const with references.

Otherwise, I have added first test of landscape rendering, rendering a quad on bottom, unfortunately I forgot to take out the depth buffer clearing, so the tiny cubes, seem like they are behind the landscape.

Ei kommentteja:

Lähetä kommentti