#include <OpenFlipper/libs_required/ACG/GL/ScreenQuad.hh>
This class provides a simple method to draw a screen-aligned quad.
Definition at line 72 of file ScreenQuad.hh.
◆ ~ScreenQuad()
| ACG::ScreenQuad::~ScreenQuad |
( |
| ) |
|
◆ ScreenQuad()
| ACG::ScreenQuad::ScreenQuad |
( |
| ) |
|
|
private |
◆ draw()
Draw the screen quad.
The quad is in projected space with coordinates in [-1, 1].
- Parameters
-
| _prog | GLSL shader to bind attribute id's if needed. Pass null-pointer for fixed function rendering |
Definition at line 138 of file ScreenQuad.cc.
◆ drawInstanced()
| void ACG::ScreenQuad::drawInstanced |
( |
int |
_count, |
|
|
GLSL::Program * |
_prog = 0 |
|
) |
| |
|
static |
Draw the screen quad with instancing.
Can be used for render to 2D-array / 3D volume The quad is in projected space with coordinates in [-1, 1].
- Parameters
-
| _count | number of instances |
| _prog | GLSL shader to bind attribute id's if needed. Pass null-pointer for fixed function rendering |
Definition at line 150 of file ScreenQuad.cc.
◆ drawTexture2D()
| void ACG::ScreenQuad::drawTexture2D |
( |
GLuint |
_texture, |
|
|
const Vec2f & |
_offset = Vec2f(0.0f, 0.0f), |
|
|
const Vec2f & |
_size = Vec2f(1.0f, 1.0f) |
|
) |
| |
|
static |
Draw a 2D texture to screen.
Useful for debugging, copying a texture..
- Parameters
-
| _texture | Texture that should be bound when drawing the quad |
| _offset | Offset passed to the uniform called offset in the shader |
| _size | Size passed to the uniform called size in the shader |
Definition at line 197 of file ScreenQuad.cc.
◆ init()
| void ACG::ScreenQuad::init |
( |
| ) |
|
|
private |
◆ instance()
◆ intDraw()
| void ACG::ScreenQuad::intDraw |
( |
GLSL::Program * |
_prog, |
|
|
int |
_numInstances = 0 |
|
) |
| |
|
private |
◆ decl_
vertex format of screen quad (float2 pos)
Definition at line 128 of file ScreenQuad.hh.
◆ texDrawProg_
◆ vbo_
| GLuint ACG::ScreenQuad::vbo_ |
|
private |
vbo containing the quad in projected coordinates
Definition at line 125 of file ScreenQuad.hh.
The documentation for this class was generated from the following files: