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.

    Executable & MSVC++ 6.0 Workspace - Requires DirectX SDK 8.1+ to compile
  • GameEngine.zip
Here's the c++ interface for the sample abstract renderer:

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;
};