Quote:Original post by Anonymous Poster
ptBeginDraw();
ptEndDraw();
is fine...
"this" is only needed if ptBeginDraw or ptEndDraw is ambiguous...
also "(*this)." is the same as "this->"
- Steve
Yea I noticed that during recompile and fixed that [wink]
Quote:Original post by _the_phantom_
I also dont see how you'll be able to setup other renderers without having to write any code, as you've got path dependant code already which would need to be dealt with and thats no different from creating a new class, deriving as needed and using it when requested.
Well I didnt mean I wouldnt have to write any more code, just that adding in code would be a breeze. Lets say I wanted to add a DX mode, I would add a RENDERER_DX enum first. Next I would go to my SetupEngine() function and add in a if(m_renderer == RENDERER_DX){} in which I would add the setup code as well as assign the function pointer to BeginDrawDX and EndDrawDX, those 2 functions are added to make life easier for the end programmer. They are not even in the skeleton form of my engine, but for this version, I want the engine to be able to take care as much as possible for the user.
Quote:Original post by silvermace
definatly not the approach id use, defeats the some of the purpose of having a base interface.
I can see your point on the base class stuff, but consider this: If you were to use an engine, would you rather have a system like mine, where you select the rendering mode via a parameter in which the functionality is already part of the engine or having a multi-classes appraoch where you dervive the video component from a base video class and add that to the engine. These are just some ideas I thought of when writing this.
My overall goals were to make something very simple and maintainable (that is why i did not use multiple classes), but after discussing this, I will think of how I can incoperate the ideas presented with using a different method of the graphics layer. Ultimately, i would like the engine to use a "plugin" styled graphics where you can use a default renderer or make your own. That type of design would definitly require the ideas posted by you all, so I will begin thinking about that appraoch.
Thank-you everyone for taking the time to respond! I appreciate your ideas and responses to my craziness [lol]. There is a nice Plugin loading tutorial at flip code I think I will pay another visit to and make a separate design using that and a better inheritance model. Thanks again everyone!