# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends

# vl::OpenGLContext Class Reference

Represents an OpenGL context, possibly a widget or a pbuffer, which can also respond to keyboard, mouse or system events. More...

`#include <OpenGLContext.hpp>`

Inheritance diagram for vl::OpenGLContext:

List of all members.

## Classes

struct | VertexArrayInfo

## Public Member Functions

| OpenGLContext (int w=0, int h=0)
| Constructor.
| ~OpenGLContext ()
| Destructor.
virtual void | swapBuffers ()=0
| Swaps the back and front buffers to present the last rendering.
virtual void | makeCurrent ()=0
| Sets the OpenGL context as current for the calling thread.
bool | initGLContext (bool log=true)
| Initializes the supported OpenGL extensions.
void | logOpenGLInfo ()
| Logs some information about the OpenGL context.
const std::string & | extensions () const
| Returns the list of OpenGL extensions supported separated by '|' characters.
bool | isExtensionSupported (const char *ext_name)
| Returns true if the given extension is supported.
void * | getProcAddress (const char *function_name)
| Returns the address of an OpenGL extension function.
Framebuffer * | framebuffer ()
| The render target representing this OpenGL context.
const Framebuffer * | framebuffer () const
| The render target representing this OpenGL context.
ref< FramebufferObject > | createFramebufferObject ()
| Equivalent to `"createFramebufferObject(0,0);"`.
ref< FramebufferObject > | createFramebufferObject (int width, int height)
| Creates a new FramebufferObject (framebuffer object Framebuffer).
void | destroyFramebufferObject (FramebufferObject *fbort)
| Destroys the specified FramebufferObject.
void | destroyAllFramebufferObjects ()
| Removes all FramebufferObjects belonging to an OpenGLContext.
virtual void | quitApplication ()
| Asks to the windowing system that is managing the OpenGLContext to quit the application.
virtual void | update ()=0
| If the OpenGLContext is a widget this function requests a redraw and generates an updateEvent().
virtual void | setWindowTitle (const String &)
| If the OpenGL context is a top window this function sets its title.
virtual bool | setFullscreen (bool)
| If the OpenGL context is a widget this function requests a maximization to fullscreen.
virtual bool | fullscreen () const
| If the OpenGL context is a widget this function returns whether it has been maximized to fullscreen.
virtual void | show ()
| If the OpenGL context is a widget this function makes it visible to the user.
virtual void | hide ()
| If the OpenGL context is a widget this function makes it invisible to the user.
virtual void | setPosition (int, int)
| If the OpenGL context is a widget this function sets its position.
virtual ivec2 | position () const
| If the OpenGL context is a widget this function returns its position.
virtual void | setSize (int, int)
| If the OpenGL context is a widget this function sets its size.
int | width () const
| Returns the width in pixels of an OpenGLContext.
int | height () const
| Returns the height in pixels of an OpenGLContext.
virtual void | setMouseVisible (bool)
| If the OpenGL context is a widget this function sets whether the mouse is visible over it or not.
virtual bool | mouseVisible () const
| If the OpenGL context is a widget this function returns whether the mouse is visible over it or not.
virtual void | setMousePosition (int, int)
| If the OpenGL context is a widget this function sets the mouse position.
virtual void | getFocus ()
| If the OpenGL context is a widget this function requests the mouse focus on it.
void | setVSyncEnabled (bool enable)
| If the OpenGL context is a widget this function enabled/disables double buffer swapping to the monitor's vertical synch.
bool | vsyncEnabled () const
| If the OpenGL context is a widget this function returns whether vsync is enabled or not.
virtual void | setContinuousUpdate (bool continuous)
| If the OpenGL context is a widget this function sets whether its area is continuously updated at each frame.
bool | continuousUpdate () const
| If the OpenGL context is a widget this function returns whether its area is continuously updated at each frame.
void | addEventListener (UIEventListener *el)
| Adds an UIEventListener to be notified of OpenGLContext related events.
void | removeEventListener (UIEventListener *el)
| Removes an UIEventListener.
void | eraseAllEventListeners ()
| Removes all UIEventListener previously registered.
const std::vector< ref < UIEventListener > > & | eventListeners () const
| The currently UIEventListener registered to be notified of OpenGLContext related events.
const UIEventListener * | eventListener (int i) const
| Returns the `i-th` UIEventListener registered to an OpenGLContext.
UIEventListener * | eventListener (int i)
| Returns the `i-th` UIEventListener registered to an OpenGLContext.
int | eventListenerCount () const
| Returns the number of UIEventListener registered to an OpenGLContext.
const OpenGLContextFormat & | openglContextInfo () const
| Returns an OpenGLContextFormat structure describing an OpenGLContext.
void | setOpenGLContextInfo (const OpenGLContextFormat &info)
| Sets the OpenGLContextFormat associated to an OpenGLContext.
void | ignoreNextMouseMoveEvent ()
| Requests not to dispatch the next mouse move event.
void | dispatchResizeEvent (int w, int h)
| Dispatches the UIEventListener::resizeEvent() notification to the subscribed UIEventListener objects.
void | dispatchMouseMoveEvent (int x, int y)
| Dispatches the UIEventListener::mouseMoveEvent() notification to the subscribed UIEventListener objects.
void | dispatchMouseUpEvent (EMouseButton button, int x, int y)
| Dispatches the UIEventListener::mouseUpEvent() notification to the subscribed UIEventListener objects.
void | dispatchMouseDownEvent (EMouseButton button, int x, int y)
| Dispatches the UIEventListener::mouseDownEvent() notification to the subscribed UIEventListener objects.
void | dispatchMouseWheelEvent (int n)
| Dispatches the UIEventListener::mouseWheelEvent() notification to the subscribed UIEventListener objects.
void | dispatchKeyPressEvent (unsigned short unicode_ch, EKey key)
| Dispatches the UIEventListener::keyPressEvent() notification to the subscribed UIEventListener objects.
void | dispatchKeyReleaseEvent (unsigned short unicode_ch, EKey key)
| Dispatches the UIEventListener::keyReleaseEvent() notification to the subscribed UIEventListener objects.
void | dispatchDestroyEvent ()
| Dispatches the UIEventListener::destroyEvent() notification to the subscribed UIEventListener(s), calls destroyAllFramebufferObjects() and eraseAllEventListeners() This event must be issued just before the actual GL context is destroyed.
void | dispatchRunEvent ()
| Dispatches the UIEventListener::updateEvent() notification to the subscribed UIEventListener objects.
void | dispatchVisibilityEvent (bool visible)
| Dispatches the UIEventListener::visibilityEvent() notification to the subscribed UIEventListener objects.
void | dispatchInitEvent ()
| Dispatches the UIEventListener::initEvent() notification to the subscribed UIEventListener objects.
void | dispatchFileDroppedEvent (const std::vector< String > &files)
| Dispatches the UIEventListener::fileDroppedEvent() notification to the subscribed UIEventListener objects.
const std::set< EKey > & | keyboard () const
| Returns the std::set containing the currently pressed keys.
bool | isKeyPressed (EKey key) const
| Returns true if the given key is pressed.
void | keyPress (EKey key)
| Inserts the specified key in the set of currently active keys - For internal use only.
void | keyRelease (EKey key)
| Removes the specified key from the set of currently active keys - For internal use only.
bool | isInitialized () const
| Returns true if the OpenGLContext is in an initialized state.
int | textureUnitCount () const
| The number (clamped to VL_MAX_TEXTURE_UNITS) of texture units supported by the current hardware.
bool | hasDoubleBuffer () const
| Returns `true` if an OpenGLContext supports double buffering.
void | bindVAS (const IVertexAttribSet *vas, bool use_vbo, bool force)
| Activates the specified vertex attribute set - For internal use only.
void | applyEnables (const EnableSet *cur)
| Applies an EnableSet to an OpenGLContext - Typically for internal use only.
void | applyRenderStates (const RenderStateSet *cur, const Camera *camera)
| Applies a RenderStateSet to an OpenGLContext - Typically for internal use only.
void | resetEnables ()
| Resets all the interanal enable-tables - For internal use only.
void | resetRenderStates ()
| Resets all the interanal render-states-tables - For internal use only.
void | resetContextStates (EResetContextStates start_or_finish)
| Resets the OpenGL states necessary to begin and finish a rendering. - For internal use only.
void | setTexUnitBinding (int unit_i, ETextureDimension target)
| Declares that texture unit `unit_i` is currently bound to the specified texture target. - For internal use only.
ETextureDimension | texUnitBinding (int unit_i) const
| Returnes the texture target currently active for the specified texture unit. - For internal use only.
bool | isCleanState (bool verbose)
| Checks whether the OpenGL state is clean or not.
const fvec3 & | normal () const
const fvec4 & | color () const
const fvec3 & | secondaryColor () const
const fvec4 & | vertexAttribValue (int i) const

## Static Public Member Functions

static bool | areUniformsColliding (const UniformSet *u1, const UniformSet *u2)
| Returns `true` if the two UniformSet contain at least one Uniform variable with the same name.

## Protected Attributes

ref< Framebuffer > | mFramebuffer
std::vector< ref < FramebufferObject > > | mFramebufferObject
std::vector< ref < UIEventListener > > | mEventListeners
std::set< EKey > | mKeyboard
OpenGLContextFormat | mGLContextInfo
int | mMaxVertexAttrib
int | mTextureSamplerCount
bool | mMouseVisible
bool | mContinuousUpdate
bool | mIgnoreNextMouseMoveEvent
bool | mFullscreen
bool | mHasDoubleBuffer
bool | mIsInitialized
std::string | mExtensions
int | mEnableTable [EN_EnableCount]
int | mRenderStateTable [RS_RenderStateCount]
bool | mCurrentEnable [EN_EnableCount]
const RenderState * | mCurrentRenderState [RS_RenderStateCount]
EEnable | mPrevEnables [EN_EnableCount]
size_t | mPrevEnablesCount
ERenderState | mPrevRenderStates [RS_RenderStateCount]
size_t | mPrevRenderStatesCount
RenderStateSlot | mDefaultRenderStates [RS_RenderStateCount]
ETextureDimension | mTexUnitBinding [VL_MAX_TEXTURE_UNITS]
const IVertexAttribSet * | mCurVAS
VertexArrayInfo | mVertexArray
VertexArrayInfo | mNormalArray
VertexArrayInfo | mColorArray
VertexArrayInfo | mSecondaryColorArray
VertexArrayInfo | mFogArray
VertexArrayInfo | mTexCoordArray [VL_MAX_TEXTURE_UNITS]
VertexArrayInfo | mVertexAttrib [VL_MAX_GENERIC_VERTEX_ATTRIB]
fvec3 | mNormal
fvec4 | mColor
fvec3 | mSecondaryColor
fvec4 | mVertexAttribValue [VL_MAX_GENERIC_VERTEX_ATTRIB]

## Friends

class | VertexAttrib
class | Color
class | SecondaryColor
class | Normal

## Detailed Description

Represents an OpenGL context, possibly a widget or a pbuffer, which can also respond to keyboard, mouse or system events.

OpenGLContext is an abstract class that wraps a minimal common subset of GUI APIs like Win32, Qt, wxWidgets, SDL, GLUT, etc.
In order to respond to the events generated by the OpenGLContext you must subclass an UIEventListener and bind it to the OpenGLContext using the functions addEventListener(ref<UIEventListener>) and removeEventListener(ref<UIEventListener>).

OpenGLContext Custom Implementation
  - Key_Alt/Ctrl/Shift events must always be notified before Key_Left/Right-Alt/Ctrl/Shift events.
  - Always update the mKeyboard structure appropriately especially with respect to Key_[Left/Right]-Alt/Ctrl/Shift events.
  - When cycling through EventListeners to dispatch the events you must do it on a temporary copy of mEventListeners so that the EventListeners can safely add/remove themselves or other EventListeners to the OpenGLContext itself.

Definition at line 126 of file OpenGLContext.hpp.

## Constructor & Destructor Documentation

OpenGLContext::OpenGLContext | ( | int | w = `0`,
|  | int | h = `0`
| ) |  |

Constructor.

Definition at line 54 of file OpenGLContext.cpp.

References mColor, mContinuousUpdate, mCurrentEnable, mCurrentRenderState, mCurVAS, mEnableTable, mFramebuffer, mFullscreen, mHasDoubleBuffer, mIgnoreNextMouseMoveEvent, mIsInitialized, mMaxVertexAttrib, mMouseVisible, mNormal, mPrevEnables, mPrevEnablesCount, mPrevRenderStates, mPrevRenderStatesCount, mRenderStateTable, mSecondaryColor, mTextureSamplerCount, mTexUnitBinding, NULL, and VL_DEBUG_SET_OBJECT_NAME.

OpenGLContext::~OpenGLContext | ( | ) |

Destructor.

Definition at line 91 of file OpenGLContext.cpp.

References eraseAllEventListeners(), mEventListeners, mFramebuffer, mFramebufferObject, NULL, and vl::Log::warning().

## Member Function Documentation

virtual void vl::OpenGLContext::swapBuffers | ( | ) | `[pure virtual]`

Swaps the back and front buffers to present the last rendering.

Implemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlSDL::SDLWindow, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Referenced by vl::Applet::updateEvent().

virtual void vl::OpenGLContext::makeCurrent | ( | ) | `[pure virtual]`

Sets the OpenGL context as current for the calling thread.

Implemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlSDL::SDLWindow, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Referenced by vl::FramebufferObject::bindFramebuffer(), vl::FramebufferObject::checkFramebufferStatus(), vl::FramebufferObject::createFBO(), createFramebufferObject(), vl::FramebufferObject::deleteFBO(), destroyAllFramebufferObjects(), destroyFramebufferObject(), getProcAddress(), initGLContext(), isExtensionSupported(), logOpenGLInfo(), vl::FramebufferObject::removeAttachment(), and setVSyncEnabled().

bool OpenGLContext::initGLContext | ( | bool | log = `true` ) |

Initializes the supported OpenGL extensions.

Definition at line 213 of file OpenGLContext.cpp.

References vl::Log::error(), vl::Has_GL_Version_1_3, vl::Has_GL_Version_2_0, vl::Has_GLES_Version_1_1, vl::Has_GLSL, vl::initializeOpenGL(), logOpenGLInfo(), makeCurrent(), mExtensions, mHasDoubleBuffer, mIsInitialized, mMaxVertexAttrib, mTextureSamplerCount, VL_CHECK_OGL, VL_MAX_GENERIC_VERTEX_ATTRIB, VL_MAX_TEXTURE_UNITS, and VL_TRAP.

Referenced by vlGLUT::GLUTWindow::initGLUTWindow().

void OpenGLContext::logOpenGLInfo | ( | ) |

Logs some information about the OpenGL context.

Definition at line 304 of file OpenGLContext.cpp.

References vl::Log::debug(), extensions(), vl::Has_BufferObject, vl::Has_FBO, vl::Has_Fixed_Function_Pipeline, vl::Has_GL_Version_1_2, vl::Has_GL_Version_1_3, vl::Has_GL_Version_2_0, vl::Has_GL_Version_3_0, vl::Has_GL_Version_4_0, vl::Has_GLES_Version_1_1, vl::Has_GLES_Version_2_0, vl::Has_GLSL, vl::Has_PBO, makeCurrent(), and VL_CHECK_OGL.

Referenced by initGLContext().

const std::string& vl::OpenGLContext::extensions | ( | ) | const`[inline]`

Returns the list of OpenGL extensions supported separated by '|' characters.

Definition at line 154 of file OpenGLContext.hpp.

Referenced by logOpenGLInfo().

bool OpenGLContext::isExtensionSupported | ( | const char * | ext_name ) |

Returns true if the given extension is supported.

Note:
  This is a relatively slow function, don't use it inside loops and similar.

Definition at line 280 of file OpenGLContext.cpp.

References makeCurrent(), and mExtensions.

void * OpenGLContext::getProcAddress | ( | const char * | function_name ) |

Returns the address of an OpenGL extension function.

Definition at line 298 of file OpenGLContext.cpp.

References vl::getGLProcAddress(), and makeCurrent().

Framebuffer* vl::OpenGLContext::framebuffer | ( | ) | `[inline]`

The render target representing this OpenGL context.

The returned Framebuffer's dimensions will be automatically updated to the OpenGLContext's dimensions.

Definition at line 165 of file OpenGLContext.hpp.

Referenced by vl::GhostCameraManipulator::enableEvent(), vlGLUT::GLUTWindow::glut_reshape_func(), vl::TrackballManipulator::mouseDownEvent(), vl::TrackballManipulator::mouseMoveEvent(), vl::GhostCameraManipulator::mouseMoveEvent(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

const Framebuffer* vl::OpenGLContext::framebuffer | ( | ) | const`[inline]`

The render target representing this OpenGL context.

The returned Framebuffer's dimensions will be automatically updated to the OpenGLContext's dimensions.

Definition at line 169 of file OpenGLContext.hpp.

ref<FramebufferObject> vl::OpenGLContext::createFramebufferObject | ( | ) | `[inline]`

Equivalent to `"createFramebufferObject(0,0);"`.

Definition at line 172 of file OpenGLContext.hpp.

References createFramebufferObject().

Referenced by createFramebufferObject().

ref< FramebufferObject > OpenGLContext::createFramebufferObject | ( | int | width,
|  | int | height
| ) |  |

Creates a new FramebufferObject (framebuffer object Framebuffer).

Note:
  A framebuffer object always belongs to an OpenGL context and in order to render on it the appropriate OpenGL context must be active.

Definition at line 111 of file OpenGLContext.cpp.

References makeCurrent(), and mFramebufferObject.

void OpenGLContext::destroyFramebufferObject | ( | FramebufferObject * | fbort ) |

Destroys the specified FramebufferObject.

Definition at line 119 of file OpenGLContext.cpp.

References makeCurrent(), mFramebufferObject, and NULL.

void OpenGLContext::destroyAllFramebufferObjects | ( | ) |

Removes all FramebufferObjects belonging to an OpenGLContext.

Definition at line 134 of file OpenGLContext.cpp.

References makeCurrent(), mFramebufferObject, and NULL.

virtual void vl::OpenGLContext::quitApplication | ( | ) | `[inline, virtual]`

Asks to the windowing system that is managing the OpenGLContext to quit the application.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlSDL::SDLWindow, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 185 of file OpenGLContext.hpp.

Referenced by vl::Applet::keyReleaseEvent().

virtual void vl::OpenGLContext::update | ( | ) | `[pure virtual]`

If the OpenGLContext is a widget this function requests a redraw and generates an updateEvent().

Implemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlSDL::SDLWindow, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Referenced by vl::Applet::keyReleaseEvent(), vl::TrackballManipulator::mouseMoveEvent(), and vl::FlatManipulator::mouseMoveEvent().

virtual void vl::OpenGLContext::setWindowTitle | ( | const String & | ) | `[inline, virtual]`

If the OpenGL context is a top window this function sets its title.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlSDL::SDLWindow, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 191 of file OpenGLContext.hpp.

virtual bool vl::OpenGLContext::setFullscreen | ( | bool | ) | `[inline, virtual]`

If the OpenGL context is a widget this function requests a maximization to fullscreen.

Reimplemented in vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 194 of file OpenGLContext.hpp.

Referenced by vl::Applet::keyReleaseEvent().

virtual bool vl::OpenGLContext::fullscreen | ( | ) | const`[inline, virtual]`

If the OpenGL context is a widget this function returns whether it has been maximized to fullscreen.

Definition at line 197 of file OpenGLContext.hpp.

Referenced by vlWX::WXGLCanvas::setFullscreen().

virtual void vl::OpenGLContext::show | ( | ) | `[inline, virtual]`

If the OpenGL context is a widget this function makes it visible to the user.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 200 of file OpenGLContext.hpp.

virtual void vl::OpenGLContext::hide | ( | ) | `[inline, virtual]`

If the OpenGL context is a widget this function makes it invisible to the user.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 203 of file OpenGLContext.hpp.

virtual void vl::OpenGLContext::setPosition | ( | int | ,
|  | int |
| ) |  | `[inline, virtual]`

If the OpenGL context is a widget this function sets its position.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlSDL::SDLWindow, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 206 of file OpenGLContext.hpp.

virtual ivec2 vl::OpenGLContext::position | ( | ) | const`[inline, virtual]`

If the OpenGL context is a widget this function returns its position.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 209 of file OpenGLContext.hpp.

virtual void vl::OpenGLContext::setSize | ( | int | ,
|  | int |
| ) |  | `[inline, virtual]`

If the OpenGL context is a widget this function sets its size.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 212 of file OpenGLContext.hpp.

int vl::OpenGLContext::width | ( | ) | const`[inline]`

Returns the width in pixels of an OpenGLContext.

Definition at line 215 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::setFullscreen().

int vl::OpenGLContext::height | ( | ) | const`[inline]`

Returns the height in pixels of an OpenGLContext.

Definition at line 218 of file OpenGLContext.hpp.

Referenced by vl::FlatManipulator::mouseInViewport(), and vlGLUT::GLUTWindow::setFullscreen().

virtual void vl::OpenGLContext::setMouseVisible | ( | bool | ) | `[inline, virtual]`

If the OpenGL context is a widget this function sets whether the mouse is visible over it or not.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlSDL::SDLWindow, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 221 of file OpenGLContext.hpp.

Referenced by vl::TrackballManipulator::enableEvent(), vl::GhostCameraManipulator::enableEvent(), and vl::FlatManipulator::enableEvent().

virtual bool vl::OpenGLContext::mouseVisible | ( | ) | const`[inline, virtual]`

If the OpenGL context is a widget this function returns whether the mouse is visible over it or not.

Definition at line 224 of file OpenGLContext.hpp.

Referenced by vlWX::WXGLCanvas::setMouseVisible().

virtual void vl::OpenGLContext::setMousePosition | ( | int | ,
|  | int |
| ) |  | `[inline, virtual]`

If the OpenGL context is a widget this function sets the mouse position.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlSDL::SDLWindow, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 227 of file OpenGLContext.hpp.

Referenced by vl::GhostCameraManipulator::enableEvent(), and vl::GhostCameraManipulator::mouseMoveEvent().

virtual void vl::OpenGLContext::getFocus | ( | ) | `[inline, virtual]`

If the OpenGL context is a widget this function requests the mouse focus on it.

Reimplemented in vlEGL::EGLWindow, vlGLUT::GLUTWindow, vlQt4::Qt4Widget, vlWin32::Win32Context, and vlWX::WXGLCanvas.

Definition at line 230 of file OpenGLContext.hpp.

void OpenGLContext::setVSyncEnabled | ( | bool | enable ) |

If the OpenGL context is a widget this function enabled/disables double buffer swapping to the monitor's vertical synch.

Definition at line 190 of file OpenGLContext.cpp.

References makeCurrent().

Referenced by vlGLUT::GLUTWindow::initGLUTWindow().

bool OpenGLContext::vsyncEnabled | ( | ) | const

If the OpenGL context is a widget this function returns whether vsync is enabled or not.

Definition at line 201 of file OpenGLContext.cpp.

virtual void vl::OpenGLContext::setContinuousUpdate | ( | bool | continuous ) | `[inline, virtual]`

If the OpenGL context is a widget this function sets whether its area is continuously updated at each frame.

Reimplemented in vlQt4::Qt4Widget.

Definition at line 239 of file OpenGLContext.hpp.

Referenced by vl::TrackballManipulator::enableEvent(), vl::GhostCameraManipulator::enableEvent(), vl::FlatManipulator::enableEvent(), and vl::Applet::keyReleaseEvent().

bool vl::OpenGLContext::continuousUpdate | ( | ) | const`[inline]`

If the OpenGL context is a widget this function returns whether its area is continuously updated at each frame.

Definition at line 242 of file OpenGLContext.hpp.

Referenced by vlWin32::dispatchUpdate(), vlEGL::dispatchUpdate(), and vlWX::WXGLCanvas::OnIdle().

void OpenGLContext::addEventListener | ( | UIEventListener * | el ) |

Adds an UIEventListener to be notified of OpenGLContext related events.

This method triggers immediately an UIEventListener::addedListenerEvent() and if the OpenGLContext is initialized also an UIEventListener::initEvent().

Note:
  An `UIEventListener` can be associated only to one OpenGLContext at a time.

Definition at line 145 of file OpenGLContext.cpp.

References vl::UIEventListener::addedListenerEvent(), vl::UIEventListener::initEvent(), isInitialized(), mEventListeners, NULL, and VL_CHECK.

Referenced by vl::Applet::addedListenerEvent().

void OpenGLContext::removeEventListener | ( | UIEventListener * | el ) |

Removes an UIEventListener.

Definition at line 159 of file OpenGLContext.cpp.

References mEventListeners, NULL, vl::UIEventListener::removedListenerEvent(), and VL_CHECK.

Referenced by vl::Applet::removedListenerEvent().

void OpenGLContext::eraseAllEventListeners | ( | ) |

Removes all UIEventListener previously registered.

Definition at line 176 of file OpenGLContext.cpp.

References mEventListeners, NULL, and VL_CHECK.

Referenced by vlWX::WXGLCanvas::quitApplication(), and ~OpenGLContext().

const std::vector< ref<UIEventListener> >& vl::OpenGLContext::eventListeners | ( | ) | const`[inline]`

The currently UIEventListener registered to be notified of OpenGLContext related events.

Definition at line 256 of file OpenGLContext.hpp.

const UIEventListener* vl::OpenGLContext::eventListener | ( | int | i ) | const`[inline]`

Returns the `i-th` UIEventListener registered to an OpenGLContext.

Definition at line 259 of file OpenGLContext.hpp.

UIEventListener* vl::OpenGLContext::eventListener | ( | int | i ) | `[inline]`

Returns the `i-th` UIEventListener registered to an OpenGLContext.

Definition at line 262 of file OpenGLContext.hpp.

int vl::OpenGLContext::eventListenerCount | ( | ) | const`[inline]`

Returns the number of UIEventListener registered to an OpenGLContext.

Definition at line 265 of file OpenGLContext.hpp.

const OpenGLContextFormat& vl::OpenGLContext::openglContextInfo | ( | ) | const`[inline]`

Returns an OpenGLContextFormat structure describing an OpenGLContext.

Definition at line 268 of file OpenGLContext.hpp.

void vl::OpenGLContext::setOpenGLContextInfo | ( | const OpenGLContextFormat & | info ) | `[inline]`

Sets the OpenGLContextFormat associated to an OpenGLContext.

Definition at line 271 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::initGLUTWindow().

void vl::OpenGLContext::ignoreNextMouseMoveEvent | ( | ) | `[inline]`

Requests not to dispatch the next mouse move event.

Definition at line 274 of file OpenGLContext.hpp.

Referenced by vl::GhostCameraManipulator::enableEvent(), and vl::GhostCameraManipulator::mouseMoveEvent().

void vl::OpenGLContext::dispatchResizeEvent | ( | int | w,
|  | int | h
| ) |  | `[inline]`

Dispatches the UIEventListener::resizeEvent() notification to the subscribed UIEventListener objects.

Call this function at the beginning if you reimplement it

Definition at line 278 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_reshape_func(), vlWX::WXGLCanvas::OnSize(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

void vl::OpenGLContext::dispatchMouseMoveEvent | ( | int | x,
|  | int | y
| ) |  | `[inline]`

Dispatches the UIEventListener::mouseMoveEvent() notification to the subscribed UIEventListener objects.

Definition at line 291 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_motion_func(), vlGLUT::GLUTWindow::glut_passive_motion_func(), vlWX::WXGLCanvas::OnMouseMotion(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

void vl::OpenGLContext::dispatchMouseUpEvent | ( | EMouseButton | button,
|  | int | x,
|  | int | y
| ) |  | `[inline]`

Dispatches the UIEventListener::mouseUpEvent() notification to the subscribed UIEventListener objects.

Definition at line 306 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_mouse_func(), vlWX::WXGLCanvas::OnMouseUp(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

void vl::OpenGLContext::dispatchMouseDownEvent | ( | EMouseButton | button,
|  | int | x,
|  | int | y
| ) |  | `[inline]`

Dispatches the UIEventListener::mouseDownEvent() notification to the subscribed UIEventListener objects.

Definition at line 316 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_mouse_func(), vlWX::WXGLCanvas::OnMouseDown(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

void vl::OpenGLContext::dispatchMouseWheelEvent | ( | int | n ) | `[inline]`

Dispatches the UIEventListener::mouseWheelEvent() notification to the subscribed UIEventListener objects.

Definition at line 326 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_mouse_wheel_func(), vlWX::WXGLCanvas::OnMouseWheel(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

void vl::OpenGLContext::dispatchKeyPressEvent | ( | unsigned short | unicode_ch,
|  | EKey | key
| ) |  | `[inline]`

Dispatches the UIEventListener::keyPressEvent() notification to the subscribed UIEventListener objects.

Definition at line 336 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_keyboard_func(), vlGLUT::GLUTWindow::glut_special_func(), vlWX::WXGLCanvas::OnKeyDown(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

void vl::OpenGLContext::dispatchKeyReleaseEvent | ( | unsigned short | unicode_ch,
|  | EKey | key
| ) |  | `[inline]`

Dispatches the UIEventListener::keyReleaseEvent() notification to the subscribed UIEventListener objects.

Definition at line 347 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_keyboard_up_func(), vlGLUT::GLUTWindow::glut_special_up_func(), vlWX::WXGLCanvas::OnKeyUp(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

void vl::OpenGLContext::dispatchDestroyEvent | ( | ) | `[inline]`

Dispatches the UIEventListener::destroyEvent() notification to the subscribed UIEventListener(s), calls destroyAllFramebufferObjects() and eraseAllEventListeners() This event must be issued just before the actual GL context is destroyed.

Definition at line 360 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_close_func(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

void vl::OpenGLContext::dispatchRunEvent | ( | ) | `[inline]`

Dispatches the UIEventListener::updateEvent() notification to the subscribed UIEventListener objects.

Definition at line 372 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_display_func(), vlWX::WXGLCanvas::OnPaint(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

void vl::OpenGLContext::dispatchVisibilityEvent | ( | bool | visible ) | `[inline]`

Dispatches the UIEventListener::visibilityEvent() notification to the subscribed UIEventListener objects.

Definition at line 382 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_visibility_func().

void vl::OpenGLContext::dispatchInitEvent | ( | ) | `[inline]`

Dispatches the UIEventListener::initEvent() notification to the subscribed UIEventListener objects.

Definition at line 396 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::glut_reshape_func().

void vl::OpenGLContext::dispatchFileDroppedEvent | ( | const std::vector< String > & | files ) | `[inline]`

Dispatches the UIEventListener::fileDroppedEvent() notification to the subscribed UIEventListener objects.

Definition at line 406 of file OpenGLContext.hpp.

Referenced by vlWX::WXGLCanvas::OnDropFiles(), vlWin32::Win32Window::WindowProc(), and vlEGL::EGLWindow::WindowProc().

const std::set<EKey>& vl::OpenGLContext::keyboard | ( | ) | const`[inline]`

Returns the std::set containing the currently pressed keys.

Definition at line 416 of file OpenGLContext.hpp.

bool vl::OpenGLContext::isKeyPressed | ( | EKey | key ) | const`[inline]`

Returns true if the given key is pressed.

Definition at line 419 of file OpenGLContext.hpp.

Referenced by vl::GhostCameraManipulator::updateEvent().

void vl::OpenGLContext::keyPress | ( | EKey | key ) | `[inline]`

Inserts the specified key in the set of currently active keys - For internal use only.

Definition at line 422 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::updateModifiers().

void vl::OpenGLContext::keyRelease | ( | EKey | key ) | `[inline]`

Removes the specified key from the set of currently active keys - For internal use only.

Definition at line 425 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::updateModifiers().

bool vl::OpenGLContext::isInitialized | ( | ) | const`[inline]`

Returns true if the OpenGLContext is in an initialized state.

Definition at line 428 of file OpenGLContext.hpp.

Referenced by addEventListener().

int vl::OpenGLContext::textureUnitCount | ( | ) | const`[inline]`

The number (clamped to VL_MAX_TEXTURE_UNITS) of texture units supported by the current hardware.

Definition at line 431 of file OpenGLContext.hpp.

bool vl::OpenGLContext::hasDoubleBuffer | ( | ) | const`[inline]`

Returns `true` if an OpenGLContext supports double buffering.

Definition at line 434 of file OpenGLContext.hpp.

Referenced by resetContextStates().

void OpenGLContext::bindVAS | ( | const IVertexAttribSet * | vas,
|  | bool | use_vbo,
|  | bool | force
| ) |  |

Activates the specified vertex attribute set - For internal use only.

Parameters:

  vas | The IVertexAttribSet to be activated. It can be NULL, in which case all vertex attributes are disabled. If `vas` is the same as the last activated IVertexAttribSet then no operation is done.
  use_vbo | Whether vertex-buffer-objects should be used when activating the vertex attributes.
  force | Binds `vas` even if it was the last to be activated (this is also valid for NULL).

Definition at line 1429 of file OpenGLContext.cpp.

References vl::Vector4< T_Scalar >::a(), vl::Collection< T >::at(), vl::VertexAttribInfo::attribLocation(), vl::Vector3< T_Scalar >::b(), vl::Vector4< T_Scalar >::b(), vl::ArrayAbstract::bufferObject(), vl::IVertexAttribSet::colorArray(), vl::VertexAttribInfo::data(), vl::Log::error(), vl::IVertexAttribSet::fogCoordArray(), vl::Vector3< T_Scalar >::g(), vl::Vector4< T_Scalar >::g(), vl::IVertexAttribSet::getTexCoordArrayAt(), vl::ArrayAbstract::glSize(), vl::ArrayAbstract::glType(), vl::BufferObject::handle(), vl::Has_Fixed_Function_Pipeline, vl::Has_GLES_Version_1_1, vl::VertexAttribInfo::interpretation(), mColor, mColorArray, mCurVAS, mFogArray, mMaxVertexAttrib, mNormal, mNormalArray, mSecondaryColor, mSecondaryColorArray, mTexCoordArray, mTextureSamplerCount, mVertexArray, mVertexAttrib, mVertexAttribValue, vl::IVertexAttribSet::normalArray(), vl::VertexAttribInfo::normalize(), NULL, vl::Buffer::ptr(), vl::Vector3< T_Scalar >::r(), vl::Vector4< T_Scalar >::r(), vl::IVertexAttribSet::secondaryColorArray(), vl::Collection< T >::size(), vl::IVertexAttribSet::texCoordArrayCount(), vl::VAI_DOUBLE, vl::VAI_INTEGER, vl::VAI_NORMAL, vl::IVertexAttribSet::vertexArray(), vl::IVertexAttribSet::vertexAttribArrays(), VL_CHECK, VL_CHECK_OGL, VL_MAX_GENERIC_VERTEX_ATTRIB, VL_MAX_TEXTURE_UNITS, VL_TRAP, vl::Vector3< T_Scalar >::x(), vl::Vector3< T_Scalar >::y(), and vl::Vector3< T_Scalar >::z().

Referenced by vl::Renderer::render(), vl::EdgeRenderer::render(), vl::Text::render_Implementation(), vl::Geometry::render_Implementation(), vl::CoreText::render_Implementation(), and resetContextStates().

void OpenGLContext::applyEnables | ( | const EnableSet * | cur ) |

Applies an EnableSet to an OpenGLContext - Typically for internal use only.

Definition at line 472 of file OpenGLContext.cpp.

References vl::EnableSet::enables(), vl::Log::error(), mCurrentEnable, mEnableTable, mPrevEnables, mPrevEnablesCount, vl::Translate_Enable, vl::Translate_Enable_String, VL_CHECK, VL_CHECK_OGL, and VL_TRAP.

Referenced by vl::Renderer::render(), and vl::OcclusionCullRenderer::render_pass2().

void OpenGLContext::applyRenderStates | ( | const RenderStateSet * | cur,
|  | const Camera * | camera
| ) |  |

Applies a RenderStateSet to an OpenGLContext - Typically for internal use only.

Definition at line 541 of file OpenGLContext.cpp.

References vl::RenderStateSlot::apply(), vl::Log::error(), vl::ref< T >::get(), mCurrentRenderState, mDefaultRenderStates, mPrevRenderStates, mPrevRenderStatesCount, mRenderStateTable, vl::RenderStateSlot::mRS, NULL, vl::RenderStateSet::renderStates(), vl::RenderStateSet::renderStatesCount(), vl::RenderStateSlot::type(), VL_CHECK, VL_CHECK_OGL, and VL_TRAP.

Referenced by vl::Renderer::render(), and vl::OcclusionCullRenderer::render_pass2().

void OpenGLContext::resetEnables | ( | ) |

Resets all the interanal enable-tables - For internal use only.

Definition at line 720 of file OpenGLContext.cpp.

References mCurrentEnable, mEnableTable, mPrevEnables, and mPrevEnablesCount.

Referenced by vl::OcclusionCullRenderer::render_pass2(), and resetContextStates().

void OpenGLContext::resetRenderStates | ( | ) |

Resets all the interanal render-states-tables - For internal use only.

Definition at line 711 of file OpenGLContext.cpp.

References mCurrentRenderState, mPrevRenderStates, mPrevRenderStatesCount, mRenderStateTable, and mTexUnitBinding.

Referenced by vl::OcclusionCullRenderer::render_pass2(), and resetContextStates().

void OpenGLContext::resetContextStates | ( | EResetContextStates | start_or_finish ) |

Resets the OpenGL states necessary to begin and finish a rendering. - For internal use only.

Definition at line 1386 of file OpenGLContext.cpp.

References bindVAS(), vl::globalSettings(), hasDoubleBuffer(), isCleanState(), NULL, vl::RCS_RenderingStarted, resetEnables(), resetRenderStates(), VL_CHECK_OGL, and VL_TRAP.

void vl::OpenGLContext::setTexUnitBinding | ( | int | unit_i,
|  | ETextureDimension | target
| ) |  | `[inline]`

Declares that texture unit `unit_i` is currently bound to the specified texture target. - For internal use only.

Definition at line 461 of file OpenGLContext.hpp.

References VL_CHECK, and VL_MAX_TEXTURE_UNITS.

Referenced by vl::TextureSampler::apply().

ETextureDimension vl::OpenGLContext::texUnitBinding | ( | int | unit_i ) | const`[inline]`

Returnes the texture target currently active for the specified texture unit. - For internal use only.

Definition at line 468 of file OpenGLContext.hpp.

References VL_CHECK, and VL_MAX_TEXTURE_UNITS.

Referenced by vl::TextureSampler::apply().

bool OpenGLContext::areUniformsColliding | ( | const UniformSet * | u1,
|  | const UniformSet * | u2
| ) |  | `[static]`

Returns `true` if the two UniformSet contain at least one Uniform variable with the same name.

Definition at line 1364 of file OpenGLContext.cpp.

References vl::Log::error(), and vl::UniformSet::uniforms().

Referenced by vl::Renderer::render().

bool OpenGLContext::isCleanState | ( | bool | verbose ) |

Checks whether the OpenGL state is clean or not.

Clean state conditions:
  - All functionalities must be disabled, no GL_LIGHTING, GL_DEPTH_TEST, GL_LIGHTn, GL_CLIP_PLANEn etc. enabled, with the sole exception of GL_MULTISAMPLE and GL_DITHER.
  - All buffer objects targets such as GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER etc. must be bound to buffer object #0.
  - Current texture unit and client texture unit must be #0.
  - All texture matrices must be set to identity.
  - All texture targets must be bound to texture #0.
  - All GL_TEXTURE_COORD_ARRAYs must be disabled.
  - All texture targets such as GL_TEXTURE_1D, GL_TEXTURE_2D etc. must be disabled.
  - All texture targets should be bound to texture #0.
  - All texture coordinate generation modes such as GL_TEXTURE_GEN_S/T/R/Q must be disable for all texture units.
  - All vertex arrays such as GL_COLOR_ARRAY, GL_NORMAL_ARRAY etc. must be disabled, including the ones enabled with glEnableVertexAttribArray()
  - NOTE: blending function must be set to glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA).
  - Color write-mask should be glColorMask(GL_TRUE ,GL_TRUE, GL_TRUE, GL_TRUE).
  - Depth write-mask should be glDepthMask(GL_TRUE).
  - Polygon mode should be glPolygonMode(GL_FRONT_AND_BACK, GL_FILL).
  - In general all OpenGL render states should be set to their default values.

Definition at line 728 of file OpenGLContext.cpp.

References vl::EN_DITHER, vl::EN_EnableCount, vl::EN_MULTISAMPLE, vl::Log::error(), vl::Has_BufferObject, vl::Has_Cubemap_Textures, vl::Has_Fixed_Function_Pipeline, vl::Has_GL_Version_1_1, vl::Has_GL_Version_1_3, vl::Has_GL_Version_1_4, vl::Has_GL_Version_2_0, vl::Has_GL_Version_2_1, vl::Has_GLES, vl::Has_GLES_Version_1_1, vl::Has_GLSL, vl::Has_Multitexture, vl::Has_Primitive_Restart, vl::Has_Texture_3D, vl::Has_Texture_Array, vl::Has_Texture_Buffer, vl::Has_Texture_Multisample, vl::Has_Texture_Rectangle, vl::Has_Transform_Feedback, vl::Is_Enable_Supported, vl::Translate_Enable, vl::Translate_Enable_String, VL_CHECK_OGL, and VL_TRAP.

Referenced by vl::Renderer::render(), and resetContextStates().

const fvec3& vl::OpenGLContext::normal | ( | ) | const`[inline]`

Definition at line 499 of file OpenGLContext.hpp.

Referenced by vl::Text::render_Implementation().

const fvec4& vl::OpenGLContext::color | ( | ) | const`[inline]`

Definition at line 500 of file OpenGLContext.hpp.

Referenced by vl::Text::render_Implementation().

const fvec3& vl::OpenGLContext::secondaryColor | ( | ) | const`[inline]`

Definition at line 501 of file OpenGLContext.hpp.

const fvec4& vl::OpenGLContext::vertexAttribValue | ( | int | i ) | const`[inline]`

Definition at line 502 of file OpenGLContext.hpp.

References VL_CHECK, and VL_MAX_GENERIC_VERTEX_ATTRIB.

## Friends And Related Function Documentation

friend class VertexAttrib`[friend]`

Definition at line 129 of file OpenGLContext.hpp.

friend class Color`[friend]`

Definition at line 130 of file OpenGLContext.hpp.

friend class SecondaryColor`[friend]`

Definition at line 131 of file OpenGLContext.hpp.

friend class Normal`[friend]`

Definition at line 132 of file OpenGLContext.hpp.

## Member Data Documentation

ref<Framebuffer> vl::OpenGLContext::mFramebuffer`[protected]`

Definition at line 505 of file OpenGLContext.hpp.

Referenced by OpenGLContext(), and ~OpenGLContext().

std::vector< ref<FramebufferObject> > vl::OpenGLContext::mFramebufferObject`[protected]`

Definition at line 506 of file OpenGLContext.hpp.

Referenced by createFramebufferObject(), destroyAllFramebufferObjects(), destroyFramebufferObject(), and ~OpenGLContext().

std::vector< ref<UIEventListener> > vl::OpenGLContext::mEventListeners`[protected]`

Definition at line 507 of file OpenGLContext.hpp.

Referenced by addEventListener(), eraseAllEventListeners(), removeEventListener(), and ~OpenGLContext().

std::set<EKey> vl::OpenGLContext::mKeyboard`[protected]`

Definition at line 508 of file OpenGLContext.hpp.

OpenGLContextFormat vl::OpenGLContext::mGLContextInfo`[protected]`

Definition at line 509 of file OpenGLContext.hpp.

int vl::OpenGLContext::mMaxVertexAttrib`[protected]`

Definition at line 510 of file OpenGLContext.hpp.

Referenced by bindVAS(), initGLContext(), and OpenGLContext().

int vl::OpenGLContext::mTextureSamplerCount`[protected]`

Definition at line 511 of file OpenGLContext.hpp.

Referenced by bindVAS(), initGLContext(), and OpenGLContext().

bool vl::OpenGLContext::mMouseVisible`[protected]`

Definition at line 512 of file OpenGLContext.hpp.

Referenced by OpenGLContext(), vlWX::WXGLCanvas::setMouseVisible(), and vlGLUT::GLUTWindow::setMouseVisible().

bool vl::OpenGLContext::mContinuousUpdate`[protected]`

Definition at line 513 of file OpenGLContext.hpp.

Referenced by OpenGLContext().

bool vl::OpenGLContext::mIgnoreNextMouseMoveEvent`[protected]`

Definition at line 514 of file OpenGLContext.hpp.

Referenced by OpenGLContext().

bool vl::OpenGLContext::mFullscreen`[protected]`

Definition at line 515 of file OpenGLContext.hpp.

Referenced by vlGLUT::GLUTWindow::initGLUTWindow(), OpenGLContext(), vlWX::WXGLCanvas::setFullscreen(), and vlGLUT::GLUTWindow::setFullscreen().

bool vl::OpenGLContext::mHasDoubleBuffer`[protected]`

Definition at line 516 of file OpenGLContext.hpp.

Referenced by initGLContext(), and OpenGLContext().

bool vl::OpenGLContext::mIsInitialized`[protected]`

Definition at line 517 of file OpenGLContext.hpp.

Referenced by initGLContext(), and OpenGLContext().

std::string vl::OpenGLContext::mExtensions`[protected]`

Definition at line 518 of file OpenGLContext.hpp.

Referenced by initGLContext(), and isExtensionSupported().

int vl::OpenGLContext::mEnableTable[EN_EnableCount]`[protected]`

Definition at line 522 of file OpenGLContext.hpp.

Referenced by applyEnables(), OpenGLContext(), and resetEnables().

int vl::OpenGLContext::mRenderStateTable[RS_RenderStateCount]`[protected]`

Definition at line 523 of file OpenGLContext.hpp.

Referenced by applyRenderStates(), OpenGLContext(), and resetRenderStates().

bool vl::OpenGLContext::mCurrentEnable[EN_EnableCount]`[protected]`

Definition at line 525 of file OpenGLContext.hpp.

Referenced by applyEnables(), OpenGLContext(), and resetEnables().

const RenderState* vl::OpenGLContext::mCurrentRenderState[RS_RenderStateCount]`[protected]`

Definition at line 526 of file OpenGLContext.hpp.

Referenced by applyRenderStates(), OpenGLContext(), and resetRenderStates().

EEnable vl::OpenGLContext::mPrevEnables[EN_EnableCount]`[protected]`

Definition at line 528 of file OpenGLContext.hpp.

Referenced by applyEnables(), OpenGLContext(), and resetEnables().

size_t vl::OpenGLContext::mPrevEnablesCount`[protected]`

Definition at line 529 of file OpenGLContext.hpp.

Referenced by applyEnables(), OpenGLContext(), and resetEnables().

ERenderState vl::OpenGLContext::mPrevRenderStates[RS_RenderStateCount]`[protected]`

Definition at line 530 of file OpenGLContext.hpp.

Referenced by applyRenderStates(), OpenGLContext(), and resetRenderStates().

size_t vl::OpenGLContext::mPrevRenderStatesCount`[protected]`

Definition at line 531 of file OpenGLContext.hpp.

Referenced by applyRenderStates(), OpenGLContext(), and resetRenderStates().

RenderStateSlot vl::OpenGLContext::mDefaultRenderStates[RS_RenderStateCount]`[protected]`

Definition at line 533 of file OpenGLContext.hpp.

Referenced by applyRenderStates().

ETextureDimension vl::OpenGLContext::mTexUnitBinding[VL_MAX_TEXTURE_UNITS]`[protected]`

Definition at line 536 of file OpenGLContext.hpp.

Referenced by OpenGLContext(), and resetRenderStates().

const IVertexAttribSet* vl::OpenGLContext::mCurVAS`[protected]`

Definition at line 550 of file OpenGLContext.hpp.

Referenced by bindVAS(), and OpenGLContext().

VertexArrayInfo vl::OpenGLContext::mVertexArray`[protected]`

Definition at line 551 of file OpenGLContext.hpp.

Referenced by bindVAS().

VertexArrayInfo vl::OpenGLContext::mNormalArray`[protected]`

Definition at line 552 of file OpenGLContext.hpp.

Referenced by bindVAS().

VertexArrayInfo vl::OpenGLContext::mColorArray`[protected]`

Definition at line 553 of file OpenGLContext.hpp.

Referenced by bindVAS().

VertexArrayInfo vl::OpenGLContext::mSecondaryColorArray`[protected]`

Definition at line 554 of file OpenGLContext.hpp.

Referenced by bindVAS().

VertexArrayInfo vl::OpenGLContext::mFogArray`[protected]`

Definition at line 555 of file OpenGLContext.hpp.

Referenced by bindVAS().

VertexArrayInfo vl::OpenGLContext::mTexCoordArray[VL_MAX_TEXTURE_UNITS]`[protected]`

Definition at line 556 of file OpenGLContext.hpp.

Referenced by bindVAS().

VertexArrayInfo vl::OpenGLContext::mVertexAttrib[VL_MAX_GENERIC_VERTEX_ATTRIB]`[protected]`

Definition at line 557 of file OpenGLContext.hpp.

Referenced by bindVAS().

fvec3 vl::OpenGLContext::mNormal`[protected]`

Definition at line 560 of file OpenGLContext.hpp.

Referenced by vl::Normal::apply(), bindVAS(), and OpenGLContext().

fvec4 vl::OpenGLContext::mColor`[protected]`

Definition at line 561 of file OpenGLContext.hpp.

Referenced by vl::Color::apply(), bindVAS(), and OpenGLContext().

fvec3 vl::OpenGLContext::mSecondaryColor`[protected]`

Definition at line 562 of file OpenGLContext.hpp.

Referenced by vl::SecondaryColor::apply(), bindVAS(), and OpenGLContext().

fvec4 vl::OpenGLContext::mVertexAttribValue[VL_MAX_GENERIC_VERTEX_ATTRIB]`[protected]`

Definition at line 563 of file OpenGLContext.hpp.

Referenced by vl::VertexAttrib::apply(), and bindVAS().

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/OpenGLContext.hpp
- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/OpenGLContext.cpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:41.
Permission is granted to use this page to write and publish articles regarding Visualization Library.