6 #ifndef GLW_FRAME_BUFFER_H 7 #define GLW_FRAME_BUFFER_H 9 #include <glbinding/gl/gl.h> 12 #include <GLW/Texture.h> 17 using PFrameBuffer = std::shared_ptr<class FrameBuffer>;
40 bool multisample_enabled{
false };
42 uint32_t multisample_samples{ 4 };
80 size_t GetTextureCount()
const;
83 PTexture GetTexture(
size_t texture_id = 0)
const;
86 PTexture2D GetTexture2D(
size_t texture_id = 0)
const;
89 PTexture GetDepthTexture()
const;
92 PTexture2D GetDepthTexture2D()
const;
95 void BindTextures()
const;
98 glm::uvec2 GetResolution()
const;
101 uint32_t GetWidth()
const;
104 uint32_t GetHeight()
const;
107 gl::GLuint GetId()
const;
110 bool CopyTo(
const PFrameBuffer &dest)
const;
113 PFrameBuffer Clone()
const;
116 static bool TestMaxColorAttachments(int32_t color_att_count);
119 static bool TestOpenGLVersion();
125 bool is_good_{
false };
126 gl::GLuint fbo_id_{ 0 };
127 gl::GLuint depth_renderbuffer_id_{ 0 };
128 PTexture depth_texture_{
nullptr };
129 std::vector<PTexture> color_textures_;
OpenGL wrapper library namespace. Provides simplified interface for using OpenGL features.
Definition: API.h:17
DepthDataFormat
Definition: Texture.h:95
range < 0.0, 1.0> internally represented as 24 bit unsigned integral number
std::vector< gl::GLenum > color_format
Color format for every color attachment. Vector size defines number of attachments.
Definition: FrameBuffer.h:48
DepthBufferType
Possible depth buffer types.
Definition: FrameBuffer.h:25
Settings defining frame buffer properties.
Definition: FrameBuffer.h:33
Class used to store buffers for internal rendering.
Definition: FrameBuffer.h:20