22 #ifndef BACKENDS_GRAPHICS3D_OPENGL_FRAMEBUFFER_H 23 #define BACKENDS_GRAPHICS3D_OPENGL_FRAMEBUFFER_H 25 #include "graphics/opengl/system_headers.h" 27 #include "graphics/opengl/texture.h" 29 #if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) 33 class FrameBuffer :
public Texture {
35 FrameBuffer(uint width, uint height);
36 virtual ~FrameBuffer();
38 virtual void attach();
39 virtual void detach();
42 FrameBuffer(GLenum glIntFormat, GLenum glFormat, GLenum glType,
bool autoCreate)
43 : Texture(glIntFormat, glFormat, glType, autoCreate) {}
45 GLuint getFrameBufferName()
const {
return _frameBuffer; }
50 GLuint _renderBuffers[2];
54 #if !USE_FORCED_GLES2 || defined(USE_GLAD) 55 class MultiSampleFrameBuffer :
public FrameBuffer {
57 MultiSampleFrameBuffer(uint width, uint height,
int samples);
58 virtual ~MultiSampleFrameBuffer();
60 virtual void attach();
61 virtual void detach();
65 GLuint _msFrameBufferId;
74 #endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) Definition: renderbuffer.h:27