 |
Gorgon Game Engine
|
Go to the documentation of this file.
3 #include "../Geometry/Size.h"
5 #include "../Containers/Collection.h"
7 namespace Gorgon {
namespace GL {
45 return texture != 0 && buffer != 0;
PFNGLDELETERENDERBUFFERS glDeleteRenderbuffers
Definition: OpenGL.cpp:81
static Geometry::Size GetMinimumRequiredSize()
Returns the minimum size required to fit any window inside.
Definition: WindowManager.cpp:14
static void UpdateSizes()
Updates the size of all framebuffers.
Definition: FrameBuffer.cpp:34
FrameBuffer & operator=(const FrameBuffer &)=delete
friend void Resize(const Geometry::Size &size)
Resizes the active context.
Definition: OpenGL.cpp:273
PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers
Definition: OpenGL.cpp:76
PFNGLFRAMEBUFFERRENDERBUFFER glFramebufferRenderbuffer
Definition: OpenGL.cpp:80
@ RGBA
32bit red, green, blue and alpha channel image. Red component is in the lowest byte order and
FrameBuffer(bool depth)
Generates a frame buffer.
Definition: FrameBuffer.h:26
FrameBuffer(const FrameBuffer &)=delete
Texture GenerateEmptyTexture(const Geometry::Size &size, Graphics::ColorMode mode)
This function generates a texture from the given image data.
Definition: OpenGL.cpp:154
PFNGLBINDRENDERBUFFER glBindRenderbuffer
Definition: OpenGL.cpp:77
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
This class represents a 2D geometric size.
Definition: Size.h:23
static bool HardwareSupport
Whether hardware supports frame buffers.
Definition: FrameBuffer.h:69
PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers
Definition: OpenGL.cpp:74
bool IsFunctional() const
Returns if the frame buffer is fully functional.
Definition: FrameBuffer.cpp:61
void Use()
Begin using this frame buffer.
Definition: FrameBuffer.cpp:65
~FrameBuffer()
Definition: FrameBuffer.h:38
PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D
Definition: OpenGL.cpp:75
Collection is a container for reference typed objects.
Definition: Collection.h:21
bool IsReady() const
Returns if the frame buffer ready.
Definition: FrameBuffer.h:44
Texture GetTexture() const
Returns the texture of this buffer.
Definition: FrameBuffer.h:52
void DestroyTexture(Texture texture)
Destroys the given texture.
Definition: OpenGL.cpp:213
void ResizeTexture(Texture texture, const Geometry::Size &size, Graphics::ColorMode mode)
Resizes the given texture to the specified size.
Definition: OpenGL.cpp:169
This is a frame buffer object that can be used for render to texture tasks.
Definition: FrameBuffer.h:13
void Generate(bool depth)
Generates a frame buffer.
Definition: FrameBuffer.cpp:7
PFNGLRENDERBUFFERSTORAGE glRenderbufferStorage
Definition: OpenGL.cpp:78
void RenderToScreen()
Stops rendering to a texture and start rendering to a buffer.
Definition: OpenGL.cpp:221
FrameBuffer()
Does not perform any action, allows late generation of buffers.
Definition: FrameBuffer.h:21
void Destroy()
Destroys the frame buffer.
Definition: FrameBuffer.cpp:46
PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer
Definition: OpenGL.cpp:72
void RenderToScreen()
Stop using this buffer and render to screen instead.
Definition: FrameBuffer.cpp:71
PFNGLDRAWBUFFERSPROC glDrawBuffers
Definition: OpenGL.cpp:23
Gorgon::Utils::Logger log
The logger that is used for GL operations. Default is unset and will not log anything....
Definition: Shader.cpp:19
PFNGLGENRENDERBUFFERS glGenRenderbuffers
Definition: OpenGL.cpp:79