|
Render Engine Demo
It's spring cleaning time and to be sure, this program isn't really useful for anything. It just demonstrates of a way of achieving graphical API independance, so you can use OpenGL or DirectX. I have since learned that though the thought is nice, you don't want to be calling a virtual function to draw a single triangle. The code is all nicely documented and it has potentially useful win32 code.
class GameEngineRenderer {
public:
GameEngineRenderer() {};
virtual ~GameEngineRenderer() {};
virtual bool CreateRendererWindow(const int width, const int height, const int bpp, const bool fullScreen) = 0;
virtual void CloseRendererWindow() = 0;
virtual void ClearFrame() = 0;
virtual void ClearWorldMatrix() = 0;
virtual void DrawTriangles(GELitTriangle *t, const int numberOfTriangles) = 0;
virtual void DrawQuads(GEQuad *q, const int numberOfQuads) = 0;
virtual void SwapBuffers() = 0;
virtual void Rotate(GERotate r) = 0;
virtual void Translate(GEVector3 v) = 0;
};
|