OpenBarnyard
 
Loading...
Searching...
No Matches
T2FrameBuffer_GL.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef TRENDERINTERFACE_GL
4
5# include <GL/glew.h>
6
8
9class T2FrameBuffer
10{
11public:
12 T2FrameBuffer();
13 ~T2FrameBuffer();
14
15 void Create();
16 void CreateAttachment( TINT a_iAttachment, GLsizei a_iWidth, GLsizei a_iHeight, GLenum a_eInternalFormat, GLenum a_eFormat, GLenum a_ePixelType );
17 void CreateDepthTexture( GLsizei a_iWidth, GLsizei a_iHeight );
18 void SetDrawBuffer( GLenum a_eDrawBuffer );
19
20 void Destroy();
21
22 void Bind();
23 static void Unbind();
24
25 TBOOL IsCreated() const { return m_uiFBO != 0; }
26 GLuint GetAttachment( TINT a_iAttachment ) const { return m_aAttachments[ a_iAttachment ]; }
27 GLuint GetDepthTexture() const { return m_uiDepthTexture; }
28
29private:
30 GLuint m_uiFBO;
31 GLuint m_aAttachments[ 4 ];
32 GLuint m_uiDepthTexture;
33};
34
36
37#endif // TRENDERINTERFACE_GL
#define TOSHI_NAMESPACE_START
Definition Defines.h:47
#define TOSHI_NAMESPACE_END
Definition Defines.h:50
int TINT
Definition Typedefs.h:7
bool TBOOL
Definition Typedefs.h:6