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_WGL Class Reference

WGL pbuffer rendering context. More...

#include <OpenGLFramework/RenderingContext/glfPBuffer_WGL.hh>

+ Inheritance diagram for BIAS::glfPBuffer_WGL:
+ Collaboration diagram for BIAS::glfPBuffer_WGL:

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_WGL ()
 
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_WGL ()
 

Protected Member Functions

virtual HDC CreateDeviceContext (int width, int height, int pixelFormat)
 
virtual void DestroyDeviceContext ()
 
virtual void GetSize (int &width, int &height)
 
virtual int GetWglRenderTargetAttribute () const
 
void InitGlew ()
 Initializes GLEW if enabled in the BIAS configuration. More...
 

Protected Attributes

HDC hDC_
 
HPBUFFERARB hglfPBuffer_
 
HGLRC hRC_
 
int pixelFormat_
 

Detailed Description

WGL pbuffer rendering context.

Author
05/2007 jkollmann

Definition at line 43 of file glfPBuffer_WGL.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_WGL::glfPBuffer_WGL ( )

Definition at line 32 of file glfPBuffer_WGL.cpp.

glfPBuffer_WGL::~glfPBuffer_WGL ( )

Definition at line 37 of file glfPBuffer_WGL.cpp.

Member Function Documentation

HDC glfPBuffer_WGL::CreateDeviceContext ( int  width,
int  height,
int  pixelFormat 
)
protectedvirtual

Implements BIAS::glfRenderingContext_WGL.

Definition at line 42 of file glfPBuffer_WGL.cpp.

void glfRenderingContext_WGL::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.

Definition at line 146 of file glfRenderingContext_WGL.cpp.

void glfPBuffer_WGL::DestroyDeviceContext ( )
protectedvirtual

Implements BIAS::glfRenderingContext_WGL.

Definition at line 69 of file glfPBuffer_WGL.cpp.

void glfRenderingContext_WGL::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 165 of file glfRenderingContext_WGL.cpp.

void glfRenderingContext_WGL::GetConfig ( glfRenderingContextConfig config)
virtualinherited
void glfPBuffer_WGL::GetSize ( int &  width,
int &  height 
)
protectedvirtual

Implements BIAS::glfRenderingContext_WGL.

Definition at line 82 of file glfPBuffer_WGL.cpp.

int glfPBuffer_WGL::GetWglRenderTargetAttribute ( ) const
protectedvirtual

Implements BIAS::glfRenderingContext_WGL.

Definition at line 90 of file glfPBuffer_WGL.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_WGL::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_WGL::MakeCurrent ( )
virtualinherited

Makes this context the current target for OpenGL calls.

Must be called when switching between multiple rendering contexts.

Implements BIAS::glfRenderingContext.

Definition at line 157 of file glfRenderingContext_WGL.cpp.

Member Data Documentation

HDC BIAS::glfRenderingContext_WGL::hDC_
protectedinherited

Definition at line 57 of file glfRenderingContext_WGL.hh.

HPBUFFERARB BIAS::glfPBuffer_WGL::hglfPBuffer_
protected

Definition at line 54 of file glfPBuffer_WGL.hh.

HGLRC BIAS::glfRenderingContext_WGL::hRC_
protectedinherited

Definition at line 58 of file glfRenderingContext_WGL.hh.

int BIAS::glfRenderingContext_WGL::pixelFormat_
protectedinherited

Definition at line 59 of file glfRenderingContext_WGL.hh.


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