Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::glfPBuffer_GLX Class Reference

GLX pbuffer rendering context. More...

#include <OpenGLFramework/RenderingContext/glfPBuffer_GLX.hh>

+ Inheritance diagram for BIAS::glfPBuffer_GLX:
+ Collaboration diagram for BIAS::glfPBuffer_GLX:

Public Types

enum  GrabSource { GRAB_COLOR, GRAB_DEPTH, GRAB_STENCIL }
 Frame buffer data that can be retrieved by Grab. More...
 

Public Member Functions

virtual void Destroy ()
 Uninitializes the rendering context. More...
 
virtual void DoneCurrent ()
 Removes the current state of this context. More...
 
virtual void GetConfig (glfRenderingContextConfig &config)
 Gets the currently used config of the rendering context. More...
 
 glfPBuffer_GLX ()
 
void Grab (BIAS::Image< unsigned char > &image, GrabSource source=GRAB_COLOR, int x=0, int y=0, int width=0, int height=0)
 Copies the contents of the framebuffer to an image. More...
 
virtual void Init (const glfRenderingContextConfig &config)
 Initializes the rendering context with the given configuration. More...
 
virtual void MakeCurrent ()
 Makes this context the current target for OpenGL calls. More...
 
 ~glfPBuffer_GLX ()
 

Protected Member Functions

virtual GLXDrawable CreateDrawable (int width, int height, GLXFBConfig fbConfig)
 
virtual void DestroyDrawable ()
 
virtual int GetDrawableType () const
 
void InitGlew ()
 Initializes GLEW if enabled in the BIAS configuration. More...
 

Protected Attributes

GLXContext context_
 
Display * display_
 
GLXDrawable drawable_
 
GLXPbuffer pbuffer_
 

Detailed Description

GLX pbuffer rendering context.

Author
05/2007 jkollmann
Examples:
ExampleMultipleDepthWarp.cpp, ExampleMultisampleBlit.cpp, ExamplePlainPerPixelProcessing.cpp, ExampleRenderingContext.cpp, ExampleStencilBuffer.cpp, and ExampleTemplateSpecializedBatch.cpp.

Definition at line 37 of file glfPBuffer_GLX.hh.

Member Enumeration Documentation

Frame buffer data that can be retrieved by Grab.

Enumerator
GRAB_COLOR 

Grab RGB image.

GRAB_DEPTH 

Grab depth buffer.

GRAB_STENCIL 

Grab stencil buffer.

Definition at line 102 of file glfRenderingContext.hh.

Constructor & Destructor Documentation

glfPBuffer_GLX::glfPBuffer_GLX ( )

Definition at line 30 of file glfPBuffer_GLX.cpp.

References pbuffer_.

glfPBuffer_GLX::~glfPBuffer_GLX ( )

Definition at line 35 of file glfPBuffer_GLX.cpp.

References DestroyDrawable(), and pbuffer_.

Member Function Documentation

GLXDrawable glfPBuffer_GLX::CreateDrawable ( int  width,
int  height,
GLXFBConfig  fbConfig 
)
protectedvirtual
void glfRenderingContext_GLX::Destroy ( )
virtualinherited

Uninitializes the rendering context.

This method must be called before the application quits and after all Open GL resources (textures etc.) have been deleted.

Implements BIAS::glfRenderingContext.

Examples:
ExampleMultipleDepthWarp.cpp, ExampleMultisampleBlit.cpp, ExamplePlainPerPixelProcessing.cpp, ExampleStencilBuffer.cpp, and ExampleTemplateSpecializedBatch.cpp.

Definition at line 141 of file glfRenderingContext_GLX.cpp.

void glfPBuffer_GLX::DestroyDrawable ( )
protectedvirtual

Implements BIAS::glfRenderingContext_GLX.

Definition at line 58 of file glfPBuffer_GLX.cpp.

References BIAS::glfRenderingContext_GLX::display_, and pbuffer_.

Referenced by ~glfPBuffer_GLX().

void glfRenderingContext_GLX::DoneCurrent ( )
virtualinherited

Removes the current state of this context.

Must be called before MakeCurrent is called from another thread.

Reimplemented from BIAS::glfRenderingContext.

Definition at line 168 of file glfRenderingContext_GLX.cpp.

void glfRenderingContext_GLX::GetConfig ( glfRenderingContextConfig config)
virtualinherited
int glfPBuffer_GLX::GetDrawableType ( ) const
protectedvirtual

Implements BIAS::glfRenderingContext_GLX.

Definition at line 66 of file glfPBuffer_GLX.cpp.

void glfRenderingContext::Grab ( BIAS::Image< unsigned char > &  image,
GrabSource  source = GRAB_COLOR,
int  x = 0,
int  y = 0,
int  width = 0,
int  height = 0 
)
inherited

Copies the contents of the framebuffer to an image.

This method calls MakeCurrent on this rendering context.

Examples:
ExampleRenderingContext.cpp.

Definition at line 58 of file glfRenderingContext.cpp.

References BIAS::Image< StorageType >::GetImageData(), BIAS::glfRenderingContextConfig::height, BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), and BIAS::glfRenderingContextConfig::width.

void glfRenderingContext_GLX::Init ( const glfRenderingContextConfig config)
virtualinherited
void glfRenderingContext::InitGlew ( )
protectedinherited

Initializes GLEW if enabled in the BIAS configuration.

If not, this method does nothing. Should be called during Init by every glfRenderingContext implementation.

Definition at line 117 of file glfRenderingContext.cpp.

References BIAS::Singleton< GlewInitWrapper >::GetInstance(), and BIAS::GlewInitWrapper::Init().

void glfRenderingContext_GLX::MakeCurrent ( )
virtualinherited

Makes this context the current target for OpenGL calls.

Must be called when switching between multiple rendering contexts.

Implements BIAS::glfRenderingContext.

Examples:
ExampleMultisampleBlit.cpp.

Definition at line 159 of file glfRenderingContext_GLX.cpp.

Referenced by BIAS::ContextPBuffer::MakeGLContextCurrent().

Member Data Documentation

GLXContext BIAS::glfRenderingContext_GLX::context_
protectedinherited

Definition at line 58 of file glfRenderingContext_GLX.hh.

Display* BIAS::glfRenderingContext_GLX::display_
protectedinherited

Definition at line 56 of file glfRenderingContext_GLX.hh.

Referenced by CreateDrawable(), and DestroyDrawable().

GLXDrawable BIAS::glfRenderingContext_GLX::drawable_
protectedinherited

Definition at line 57 of file glfRenderingContext_GLX.hh.

GLXPbuffer BIAS::glfPBuffer_GLX::pbuffer_
protected

Definition at line 47 of file glfPBuffer_GLX.hh.

Referenced by CreateDrawable(), DestroyDrawable(), glfPBuffer_GLX(), and ~glfPBuffer_GLX().


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