Basic Image AlgorithmS Library
2.8.0
|
Base class for GLX rendering contexts. More...
#include <OpenGLFramework/RenderingContext/glfRenderingContext_GLX.hh>
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... | |
glfRenderingContext_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... | |
~glfRenderingContext_GLX () | |
Protected Member Functions | |
virtual GLXDrawable | CreateDrawable (int width, int height, GLXFBConfig fbConfig)=0 |
virtual void | DestroyDrawable ()=0 |
virtual int | GetDrawableType () const =0 |
void | InitGlew () |
Initializes GLEW if enabled in the BIAS configuration. More... | |
Protected Attributes | |
GLXContext | context_ |
Display * | display_ |
GLXDrawable | drawable_ |
Base class for GLX rendering contexts.
Definition at line 40 of file glfRenderingContext_GLX.hh.
|
inherited |
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.
glfRenderingContext_GLX::glfRenderingContext_GLX | ( | ) |
Definition at line 31 of file glfRenderingContext_GLX.cpp.
glfRenderingContext_GLX::~glfRenderingContext_GLX | ( | ) |
Definition at line 38 of file glfRenderingContext_GLX.cpp.
|
protectedpure virtual |
Implemented in BIAS::glfPBuffer_GLX.
|
virtual |
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 141 of file glfRenderingContext_GLX.cpp.
|
protectedpure virtual |
Implemented in BIAS::glfPBuffer_GLX.
|
virtual |
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.
|
virtual |
Gets the currently used config of the rendering context.
The rendering context must have been successfully initialized before this method may be called.
config | The config structure to be filled |
Implements BIAS::glfRenderingContext.
Definition at line 177 of file glfRenderingContext_GLX.cpp.
References BIAS::glfRenderingContextConfig::alphaSize, BIAS::glfRenderingContextConfig::blueSize, BIAS::glfRenderingContextConfig::depthSize, BIAS::glfRenderingContextConfig::doubleBuffer, BIAS::glfRenderingContextConfig::greenSize, BIAS::glfRenderingContextConfig::height, BIAS::glfRenderingContextConfig::redSize, BIAS::glfRenderingContextConfig::stencilSize, and BIAS::glfRenderingContextConfig::width.
|
protectedpure virtual |
Implemented in BIAS::glfPBuffer_GLX.
|
inherited |
Copies the contents of the framebuffer to an image.
This method calls MakeCurrent
on this rendering context.
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.
|
virtual |
Initializes the rendering context with the given configuration.
All implementations should call MakeCurrent
and InitGlew
in this method. A context may be initialized multiple times.
config | Requested configuration |
Implements BIAS::glfRenderingContext.
Definition at line 47 of file glfRenderingContext_GLX.cpp.
References BIAS::glfRenderingContextConfig::alphaSize, BIAS::glfRenderingContextConfig::blueSize, BIAS::glfRenderingContextConfig::depthSize, BIAS::glfRenderingContextConfig::doubleBuffer, BIAS::glfRenderingContextConfig::greenSize, BIAS::glfRenderingContextConfig::height, BIAS::glfRenderingContextConfig::redSize, BIAS::glfRenderingContextConfig::stencilSize, and BIAS::glfRenderingContextConfig::width.
|
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().
|
virtual |
Makes this context the current target for OpenGL calls.
Must be called when switching between multiple rendering contexts.
Implements BIAS::glfRenderingContext.
Definition at line 159 of file glfRenderingContext_GLX.cpp.
Referenced by BIAS::ContextPBuffer::MakeGLContextCurrent().
|
protected |
Definition at line 58 of file glfRenderingContext_GLX.hh.
|
protected |
Definition at line 56 of file glfRenderingContext_GLX.hh.
Referenced by BIAS::glfPBuffer_GLX::CreateDrawable(), and BIAS::glfPBuffer_GLX::DestroyDrawable().
|
protected |
Definition at line 57 of file glfRenderingContext_GLX.hh.