| 727 | class CFrameBufferObject { |
| 728 | public: |
| 729 | CFrameBufferObject(unsigned int width, unsigned int height, unsigned int Bpp, |
| 730 | bool bUseFloat, GLenum eTarget) |
| 731 | : m_Width(width), |
| 732 | m_Height(height), |
| 733 | m_bUseFloat(bUseFloat), |
| 734 | m_eGLTarget(eTarget) { |
| 735 | glGenFramebuffers(1, &m_fboData.fb); |
| 736 | |
| 737 | m_fboData.colorTex = |
| 738 | createTexture(m_eGLTarget, width, height, GL_RGBA, GL_RGBA); |
| 739 | m_fboData.depthTex = createTexture( |
| 740 | m_eGLTarget, width, height, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT); |
| 741 | |
| 742 | attachTexture(m_eGLTarget, m_fboData.depthTex, GL_DEPTH_ATTACHMENT); |
| 743 | attachTexture(m_eGLTarget, m_fboData.colorTex, GL_COLOR_ATTACHMENT0); |
| 744 | |
| 745 | bool ret = checkStatus(__FILE__, __LINE__, false); |
| 746 | } |
| 747 | |
| 748 | void check_gl_error(const char *file, int line) { |
| 749 | GLenum err(glGetError()); |
nothing calls this directly
no test coverage detected