Categories
GSoC 2020

Refactoring the renderer interface and getting some work done on binary .X files

So last time we were at a point were the engine port works with OpenGL ES 2 shaders. One reason to implement this was actually to find out what a proper base interface for the rendering part would look like. This interface should abstract away the differences between the fixed and programmable pipeline APIs being used and also at least allow for a potential software renderer based on TinyGL.

The next step was thus to reorganize the current renderer code in a somewhat more proper way and also move some rendering API calls into more suited spots like the renderer classes for example. Also the old OpenGL matrix stack is not used anymore, since it was kind of unnecessary and there is a clear boundary now on which matrices are going to be transposed so that they can be passed to OpenGL (the boundary being the renderer interface actually).

One more thing that has happened is the implementation of a binary .X file lexer. Originally I though that this step would be straightforward, but actually the grammar for binary .X files is slightly different to save some space. Instead of writing a new parser I decided to hack the lexer in such a way (and also introduced some new functions for it) that the parser could stay essentially the same.

Here is a screenshot of “On the track of dinosaurs” demo, which has a binary. X file:

There are some oddities with this file, for example, it has less normal vectors than actual vertices. This might explain the dark spots because no or wrong normal vectors means messed up lighting. Also the animation data is contained in an additional file and support for loading of such a file is still missing.

Leave a Reply

Your email address will not be published. Required fields are marked *