OO DX engine
Can anybody give my some suggestions on how they would go about making an object orients DX engine. I have my functions, its just how to make them fit into a nice object oriented package. Also my goal in this engine would be to have as little global functions as possible and to encapsulate as much as possible.
Frank
ECKILLER
ECKILLER
Start with a surface class. You should be able to set the init properties of this to any kind of surface and then have a generic create surface function. Put pixel plotting and bitmap functions in here. Then make a screen class. This should be higher up in the level of abstraction than the surface. It should have 3 pointers to surfaces and initalize them to make a double buffered screen system or a triple. This class should do windowed/fullscreen changes. the constructor of this should take width,height,bpp and the window handle as the params. also in your surface make a offscreen surface function that uses your lower level surface creation functions to make an offscreen surface for you and even automatically load a bmp and then create the surface for it automatically so all you have to do is Surface->LoadBmp("bm.bmp"); and then it creates everything for you. Im sure you can think of several other neat things to add too.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement