#ifndef RENDER_TARGET_D3D9_H #define RENDER_TARGET_D3D9_H #include "common.h" #include "samplerstate.h" #include "texture.h" #include "rendertarget.h" class RenderTargetD3D9: public RenderTarget, public Texture { protected: LPDIRECT3DTEXTURE9 tex; LPDIRECT3DSURFACE9 surface; LPDIRECT3DSURFACE9 depthpixels; LPDIRECT3DDEVICE9 dev; int po2lev; int maxaniso; SamplerState samp; friend class RendererD3D9; public: RenderTargetD3D9(LPDIRECT3DDEVICE9 dev,SamplerState samp,int po2lev,bool floatformat); virtual ~RenderTargetD3D9(); virtual RenderTargetType Type() {return RAVEN_RENDER_TARGET_COLORTEX;} virtual bool IsValid() {return rtis_valid&&is_valid;} virtual bool BindTarget(); virtual void *GetID() {return (void *)tex;} virtual void Bind(int stage); virtual Texture *GetTexture() {return dynamic_cast(this);} }; #endif