| 729 | class CFrameBufferObject { |
| 730 | public: |
| 731 | CFrameBufferObject(unsigned int width, unsigned int height, unsigned int Bpp, |
| 732 | bool bUseFloat, GLenum eTarget) |
| 733 | : m_Width(width), |
| 734 | m_Height(height), |
| 735 | m_bUseFloat(bUseFloat), |
| 736 | m_eGLTarget(eTarget) { |
| 737 | glGenFramebuffersEXT(1, &m_fboData.fb); |
| 738 | |
| 739 | m_fboData.colorTex = |
| 740 | createTexture(m_eGLTarget, width, height, |
| 741 | (bUseFloat ? GL_RGBA32F_ARB : GL_RGBA8), GL_RGBA); |
| 742 | |
| 743 | m_fboData.depthTex = createTexture( |
| 744 | m_eGLTarget, width, height, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT); |
| 745 | |
| 746 | attachTexture(m_eGLTarget, m_fboData.colorTex, GL_COLOR_ATTACHMENT0_EXT); |
| 747 | attachTexture(m_eGLTarget, m_fboData.depthTex, GL_DEPTH_ATTACHMENT_EXT); |
| 748 | |
| 749 | // bool ret = checkStatus(__FILE__, __LINE__, true); |
| 750 | } |
| 751 | |
| 752 | virtual ~CFrameBufferObject() { |
| 753 | // freeResources(); |
nothing calls this directly
no test coverage detected