: Hey everyone,
: Im <still> working on my video code..Jeez I cant wait
: 'till I ge this done!!
: Anyway, I ran into <another> problem with design..Ugh!
: I developed a system that makes the API (DX/OGL/etc.)
: indepent of the video code. This works well..except the
: layers of software.
: Now for the question..
: I have three classes...
: _IVideoTask -updates every frame by core engine
: _IRenderer -The link to outside API *.libs
: _IVideoDX -Part of the engines' DirectX lib
: Now the question...How should I access *specific*
: DirectX features? For example, If I want to set the
: video mode, I would need THREE functions. One empty
: (_IRenderer), one wrapper _IVideoTask), and te actual
: defnition (_IVideoDX).
: Theres GOT to be a better way!! _IRender links with
: _IVideoDX. _IRender is used by _IVideoTask like this..
: class _IVideoTask : _ITaskManager
: _IRenderer renderer;
: class _IRenderer
: // pure virual base class that _IVideoDX isbased off of
: class _IVideoDX : _IRenderer
: // DirectX
: Does anyone have any suggestions, or a better method?
: Anything would be great!
Let me add on to my previus post..
I want to be able to access my _IVideoDX:_IRenderer
object diretly from my _IVideoTask. I know one possible
way is this..
#pragma comment (lib, "DirectX.lib") // _IVideoDX
_IVideoDX dx= (_IVideoDX*)_IVideoTask::GetRenderer();
// access dx directly!
This would work--but Im trying to wrap these APIs so that
the game doesnt need to worry 'bout it. (Yeah, my code has
Does anyone have any suggestions?