#ifndef _FrameBufferObject_H__ #define _FrameBufferObject_H__ #include #include "common.h" namespace CHCDemoEngine { /** This class implements a wrapper for a color buffer object */ class ColorBufferObject { public: enum COLOR_FORMAT { BUFFER_UBYTE, BUFFER_FLOAT_16, BUFFER_FLOAT_32 }; ColorBufferObject(int w, int h, COLOR_FORMAT c, int wrapType, int filterType, bool useMipMap, bool useMultiSampling); }; /** This class implements a wrapper for a frame buffer object */ class FrameBufferObject { public: enum DEPTH_FORMAT { DEPTH_16, DEPTH_24, DEPTH_32 }; /** constructor requesting an opengl occlusion query. */ FrameBufferObject(int w, int h, bool useDepth, DEPTH_FORMAT d); /** Creates and adds a color buffer to the current frame buffer object. Returns a pointer to the buffer object */ ColorBufferObject *AddColorBuffer(ColorBufferObject::COLOR_FORMAT col, int wrapType, int filterType, bool useMipMap, bool useMultiSampling); protected: std::vector mColorBuffers; unsigned int mId; unsigned int mDepthId; int mHeight; int mWidth; }; } // namespace #endif // _FrameBufferObject_H__