Basic Image AlgorithmS Library 2.8.0
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions

BIAS::glfScreen Class Reference

Represents the default render target of the current OpenGL context, i.e. More...

#include <OpenGLFramework/Base/glfScreen.hh>

Inheritance diagram for BIAS::glfScreen:
Collaboration diagram for BIAS::glfScreen:

List of all members.

Public Types

enum  BufferType { BUFFER_COLOR, BUFFER_DEPTH, BUFFER_STENCIL }

Public Member Functions

virtual void Bind () const
 Makes this render target the currently used render target.
void ClearAccumBuffer (float red=0.0f, float green=0.0f, float blue=0.0f, float alpha=0.0f)
 Clears the accumulation buffer of the render target with the given color.
void ClearColorBuffer (float red=0.0f, float green=0.0f, float blue=0.0f, float alpha=0.0f)
 Clears the color buffer of the render target with the given color.
void ClearDepthBuffer (float depth=1.0f)
 Clears the depth buffer of the render target with the given value.
void ClearStencilBuffer (int s=0)
 Clears the stencil buffer of the render target with the given value.
void ReadBuffer (BIAS::ImageBase &image, BufferType bufferType, int x, int y, int width, int height)
 Copies the contents of a buffer to an image.

Static Public Member Functions

static glfScreenGetInstance ()
 Returns the global screen instance.

Private Member Functions

 glfScreen ()

Detailed Description

Represents the default render target of the current OpenGL context, i.e.

a window or a pbuffer. This class is a singleton and cannot be instantiated.

Author:
jkollmann
Examples:

ExampleRenderingContext.cpp.

Definition at line 40 of file glfScreen.hh.


Member Enumeration Documentation

Enumerator:
BUFFER_COLOR 
BUFFER_DEPTH 
BUFFER_STENCIL 

Definition at line 66 of file glfRenderTarget.hh.


Constructor & Destructor Documentation

BIAS::glfScreen::glfScreen ( ) [inline, private]

Definition at line 52 of file glfScreen.hh.


Member Function Documentation

void glfScreen::Bind ( ) const [virtual]

Makes this render target the currently used render target.

This must call glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, ?).

Implements BIAS::glfRenderTarget.

Definition at line 36 of file glfScreen.cpp.

Referenced by BIAS::GLProjectionParametersBase::GetGreyImage(), BIAS::GLProjectionParametersBase::GetImage(), BIAS::GLProjectionParametersBase::GetZBuffer(), and BIAS::glfBatch::SetDefaultRenderStates().

void glfRenderTarget::ClearAccumBuffer ( float  red = 0.0f,
float  green = 0.0f,
float  blue = 0.0f,
float  alpha = 0.0f 
) [inherited]

Clears the accumulation buffer of the render target with the given color.

The color (0,0,0,0) is the default clear color in OpenGL.

Definition at line 50 of file glfRenderTarget.cpp.

void glfRenderTarget::ClearColorBuffer ( float  red = 0.0f,
float  green = 0.0f,
float  blue = 0.0f,
float  alpha = 0.0f 
) [inherited]
void glfRenderTarget::ClearDepthBuffer ( float  depth = 1.0f) [inherited]

Clears the depth buffer of the render target with the given value.

The value 1 is the default clear value for depth buffers in OpenGL.

Examples:
ExampleRenderingContext.cpp.

Definition at line 41 of file glfRenderTarget.cpp.

Referenced by BIAS::GLProjectionParametersBase::BeginDraw_(), BIAS::DistortionRendering::BeginRendering(), BIAS::OutputLensDistortion::Draw_(), BIAS::FramebufferSetup::Execute(), BIAS::DistortionRendering::Init(), and BIAS::TriangleMeshSplatRendering::Splat().

void glfRenderTarget::ClearStencilBuffer ( int  s = 0) [inherited]

Clears the stencil buffer of the render target with the given value.

The value 0 is the default clear value for stencil buffers in OpenGL.

Definition at line 59 of file glfRenderTarget.cpp.

Referenced by BIAS::GLProjectionParametersBase::BeginDraw_(), and BIAS::DistortionRendering::BeginRendering().

glfScreen & glfScreen::GetInstance ( ) [static]
void glfRenderTarget::ReadBuffer ( BIAS::ImageBase image,
BufferType  bufferType,
int  x,
int  y,
int  width,
int  height 
) [inherited]

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends