AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxOSG::EglContext Class Reference

EglContext is a class that provides a different way to setup a graphics context for 3D rendering. More...

#include <EglContext.h>

+ Inheritance diagram for agxOSG::EglContext:

Public Member Functions

 EglContext (osg::GraphicsContext::Traits *traits)
 
virtual void bindPBufferToTextureImplementation (GLenum buffer)
 Bind the graphics context to associated texture implementation. More...
 
virtual const char * className () const
 
virtual void closeImplementation ()
 Close the graphics context. More...
 
virtual bool isRealizedImplementation () const
 Return true if the graphics context has been realised and is ready to use. More...
 
virtual bool isSameKindAs (const Object *object) const
 
virtual const char * libraryName () const
 
virtual bool makeContextCurrentImplementation (osg::GraphicsContext *readContext)
 Make this graphics context current with specified read context implementation. More...
 
virtual bool makeCurrentImplementation ()
 Make this graphics context current. More...
 
virtual bool realizeImplementation ()
 Realise the GraphicsContext. More...
 
virtual bool releaseContextImplementation ()
 Release the graphics context. More...
 
virtual void swapBuffersImplementation ()
 Swap the front and back buffers. More...
 
virtual bool valid () const
 

Protected Member Functions

 ~EglContext ()
 
EGLDisplay getDisplayFromDevice (EGLDeviceEXT dev)
 
void init ()
 
void queryDevices ()
 

Protected Attributes

EGLContext m_eglContext
 
EGLDeviceEXT * m_eglDevices
 
EGLDisplay m_eglDisplay
 
EGLSurface m_eglSurface
 
bool m_initialized
 
agx::Int32 m_numDevices
 
bool m_realized
 
bool m_valid
 

Detailed Description

EglContext is a class that provides a different way to setup a graphics context for 3D rendering.

The main purpose is to simplify headless rendering in Linux without the need of running a X-server for context creation via GLX.

Using this class in Linux and to avoid problems it is required that:

  • AGX is built with EGL support
  • Vendor-neutral OpenGL dispatch (glvnd) is used and not a legacy libGL without dispatch support.
  • Graphics card with EGL support and driver is present.

Definition at line 50 of file EglContext.h.

Constructor & Destructor Documentation

agxOSG::EglContext::EglContext ( osg::GraphicsContext::Traits *  traits)
agxOSG::EglContext::~EglContext ( )
protected

Member Function Documentation

virtual void agxOSG::EglContext::bindPBufferToTextureImplementation ( GLenum  buffer)
virtual

Bind the graphics context to associated texture implementation.

virtual const char* agxOSG::EglContext::className ( ) const
virtual
virtual void agxOSG::EglContext::closeImplementation ( )
virtual

Close the graphics context.

EGLDisplay agxOSG::EglContext::getDisplayFromDevice ( EGLDeviceEXT  dev)
protected
void agxOSG::EglContext::init ( )
protected
virtual bool agxOSG::EglContext::isRealizedImplementation ( ) const
virtual

Return true if the graphics context has been realised and is ready to use.

virtual bool agxOSG::EglContext::isSameKindAs ( const Object *  object) const
virtual
virtual const char* agxOSG::EglContext::libraryName ( ) const
virtual
virtual bool agxOSG::EglContext::makeContextCurrentImplementation ( osg::GraphicsContext *  readContext)
virtual

Make this graphics context current with specified read context implementation.

virtual bool agxOSG::EglContext::makeCurrentImplementation ( )
virtual

Make this graphics context current.

void agxOSG::EglContext::queryDevices ( )
protected
virtual bool agxOSG::EglContext::realizeImplementation ( )
virtual

Realise the GraphicsContext.

virtual bool agxOSG::EglContext::releaseContextImplementation ( )
virtual

Release the graphics context.

virtual void agxOSG::EglContext::swapBuffersImplementation ( )
virtual

Swap the front and back buffers.

virtual bool agxOSG::EglContext::valid ( ) const
virtual

Member Data Documentation

EGLContext agxOSG::EglContext::m_eglContext
protected

Definition at line 96 of file EglContext.h.

EGLDeviceEXT* agxOSG::EglContext::m_eglDevices
protected

Definition at line 98 of file EglContext.h.

EGLDisplay agxOSG::EglContext::m_eglDisplay
protected

Definition at line 95 of file EglContext.h.

EGLSurface agxOSG::EglContext::m_eglSurface
protected

Definition at line 94 of file EglContext.h.

bool agxOSG::EglContext::m_initialized
protected

Definition at line 103 of file EglContext.h.

agx::Int32 agxOSG::EglContext::m_numDevices
protected

Definition at line 100 of file EglContext.h.

bool agxOSG::EglContext::m_realized
protected

Definition at line 104 of file EglContext.h.

bool agxOSG::EglContext::m_valid
protected

Definition at line 102 of file EglContext.h.


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