hx3d  1
2D/3D Simple Game Framework
Public Member Functions | Static Public Member Functions | List of all members
hx3d::graphics::Framebuffer Class Reference

Render-to-texture buffer. More...

#include <framebuffer.hpp>

Public Member Functions

 Framebuffer ()
 Create a framebuffer at screen size.
 
 Framebuffer (unsigned int width, unsigned int height)
 Create a framebuffer. More...
 
Ptr< TexturegetColorBuffer ()
 Get the framebuffer color buffer. More...
 
void resize (unsigned int width, unsigned int height)
 Resize the framebuffer. More...
 

Static Public Member Functions

static void fetchDefaultFramebuffer ()
 Fetch the default framebuffer of the application.
 
static void use (Framebuffer &buf)
 Use the framebuffer as current framebuffer. More...
 
static void useDefault ()
 Use the default framebuffer.
 
static void clear (Color color)
 Clear the framebuffer.
 

Detailed Description

Render-to-texture buffer.

Definition at line 37 of file framebuffer.hpp.

Constructor & Destructor Documentation

hx3d::graphics::Framebuffer::Framebuffer ( unsigned int  width,
unsigned int  height 
)

Create a framebuffer.

Parameters
widthWidth
heightHeight

Definition at line 40 of file framebuffer.cpp.

Member Function Documentation

Ptr< Texture > hx3d::graphics::Framebuffer::getColorBuffer ( )

Get the framebuffer color buffer.

Returns
Texture (Ptr)

Definition at line 112 of file framebuffer.cpp.

void hx3d::graphics::Framebuffer::resize ( unsigned int  width,
unsigned int  height 
)

Resize the framebuffer.

Parameters
widthWidth
heightHeight

Definition at line 56 of file framebuffer.cpp.

void hx3d::graphics::Framebuffer::use ( Framebuffer buf)
static

Use the framebuffer as current framebuffer.

Parameters
bufFramebuffer

Definition at line 95 of file framebuffer.cpp.


The documentation for this class was generated from the following files: