#pragma once #include "Node.h" #include class Scene; #define SPTR boost::shared_ptr #define WPTR boost::weak_ptr class Renderer { public: friend class RenderPass; Renderer(void); virtual ~Renderer(void); void setNode(WPTR &_myNode); void setScene(Scene &scene); void setRenderPriority(int _priority); int getRenderPriority(); //Funktionen die eventuell von RenderPass aufgerufen werden virtual void setWorldMatrix(D3DXMATRIX &_worldMat); virtual void setViewMatrix(D3DXMATRIX &_viewMat); virtual void setProjectionMatrix(D3DXMATRIX &_projMat); virtual void render() = 0; virtual void init() = 0; virtual bool isLowerThan(Renderer* renderer) = 0; friend class Scene; virtual void OnLostDevice( void* pUserContext ) = 0; virtual void OnDestroyDevice( void* pUserContext ) = 0; virtual HRESULT OnResetDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext ) = 0; virtual void setCurrentTexture(IDirect3DTexture9* texture); bool isA(int _rendererType); static const int RENDERER_HUD = 1; static const int RENDERER_OCEAN = 2; static const int RENDERER_PARTICLE = 4; static const int RENDERER_RAYTRACE = 8; static const int RENDERER_SIMPLEMESH = 16; static const int RENDERER_SKYBOX = 32; static const int RENDERER_TERRAIN = 64; virtual bool needsExtraPass(); WPTR myNode; protected: IDirect3DDevice9 *device; Scene *myScene; bool nodeAdded; int rendererType; int myRenderPriority; };