#ifndef RENDER_TARGET_FBO_H #define RENDER_TARGET_FBO_H #include "common.h" #include "samplerstate.h" #include "texture.h" #include "rendertarget.h" class RenderTargetFBO: public RenderTarget, public Texture { protected: GLuint fb,/*colorrb,*/colortex,depthrb/*,depthtex*/; int po2lev; friend class RendererOpenGL; public: RenderTargetFBO(SamplerState samp,int po2lev,bool floatformat); virtual ~RenderTargetFBO(); virtual RenderTargetType Type() {return RAVEN_RENDER_TARGET_COLORTEX;} virtual bool IsValid() {return rtis_valid&&is_valid;} virtual bool BindTarget(); virtual void *GetID() {return (void *)colortex;} virtual void Bind(int stage); virtual Texture *GetTexture() {return dynamic_cast(this);} }; #endif