LibreOffice Module vcl (master)  1
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
OpenGLContext Class Referenceabstract

#include <OpenGLContext.hxx>

Inheritance diagram for OpenGLContext:
[legend]
Collaboration diagram for OpenGLContext:
[legend]

Public Member Functions

virtual ~OpenGLContext ()
 
 OpenGLContext (const OpenGLContext &)=delete
 
 OpenGLContext (OpenGLContext &&)=delete
 
OpenGLContextoperator= (const OpenGLContext &)=delete
 
OpenGLContextoperator= (OpenGLContext &&)=delete
 
void acquire ()
 
void release ()
 
void dispose ()
 
void requestLegacyContext ()
 
bool init (vcl::Window *pParent)
 
void reset ()
 
virtual bool isCurrent ()
 Is this GL context the current context ? More...
 
virtual bool isAnyCurrent ()
 Is any GL context the current context ? More...
 
virtual void makeCurrent ()
 make this GL context current - so it is implicit in subsequent GL calls More...
 
void registerAsCurrent ()
 Put this GL context to the end of the context list. More...
 
virtual void resetCurrent ()
 reset the GL context so this context is not implicit in subsequent GL calls. More...
 
virtual void restoreDefaultFramebuffer ()
 unbind the GL_FRAMEBUFFER to its default state, needed for gtk3 More...
 
virtual void swapBuffers ()
 
virtual void sync ()
 
void show ()
 
void setWinPosAndSize (const Point &rPos, const Size &rSize)
 
virtual const GLWindowgetOpenGLWindow () const =0
 
SystemChildWindowgetChildWindow ()
 
const SystemChildWindowgetChildWindow () const
 
bool isInitialized () const
 
virtual SystemWindowData generateWinData (vcl::Window *pParent, bool bRequestLegacyContext)
 

Static Public Member Functions

static rtl::Reference< OpenGLContextCreate ()
 
static void clearCurrent ()
 release bound resources from the current context More...
 
static void prepareForYield ()
 release contexts etc. before (potentially) allowing another thread run. More...
 
static bool hasCurrent ()
 Is there a current GL context ? More...
 

Public Attributes

OpenGLContextmpPrevContext
 
OpenGLContextmpNextContext
 

Protected Member Functions

 OpenGLContext ()
 
bool InitGL ()
 
virtual GLWindowgetModifiableOpenGLWindow ()=0
 
virtual bool ImplInit ()
 

Static Protected Member Functions

static void InitGLDebugging ()
 
static void InitChildWindow (SystemChildWindow *pChildWindow)
 
static void BuffersSwapped ()
 

Protected Attributes

VclPtr< vcl::Windowm_xWindow
 
VclPtr< vcl::WindowmpWindow
 
VclPtr< SystemChildWindowm_pChildWindow
 
bool mbInitialized
 
int mnRefCount
 
bool mbRequestLegacyContext
 

Private Member Functions

virtual void initWindow ()
 
virtual void destroyCurrentContext ()
 
virtual void adjustToNewSize ()
 

Friends

class OpenGLTests
 

Detailed Description

Definition at line 41 of file OpenGLContext.hxx.

Constructor & Destructor Documentation

OpenGLContext::OpenGLContext ( )
protected
OpenGLContext::~OpenGLContext ( )
virtual
OpenGLContext::OpenGLContext ( const OpenGLContext )
delete
OpenGLContext::OpenGLContext ( OpenGLContext &&  )
delete

Member Function Documentation

void OpenGLContext::acquire ( )
inline

Definition at line 57 of file OpenGLContext.hxx.

void OpenGLContext::adjustToNewSize ( )
privatevirtual

Definition at line 310 of file OpenGLContext.cxx.

References getOpenGLWindow(), GLWindow::Height, and GLWindow::Width.

Referenced by setWinPosAndSize().

void OpenGLContext::BuffersSwapped ( )
staticprotected

Definition at line 453 of file OpenGLContext.cxx.

References nBufferSwapCounter.

Referenced by swapBuffers().

void OpenGLContext::clearCurrent ( )
static

release bound resources from the current context

Definition at line 387 of file OpenGLContext.cxx.

Referenced by makeCurrent(), and resetCurrent().

rtl::Reference< OpenGLContext > OpenGLContext::Create ( )
static
void OpenGLContext::destroyCurrentContext ( )
privatevirtual

Reimplemented in QtOpenGLContext.

Definition at line 329 of file OpenGLContext.cxx.

Referenced by reset().

void OpenGLContext::dispose ( void  )
SystemWindowData OpenGLContext::generateWinData ( vcl::Window pParent,
bool  bRequestLegacyContext 
)
virtual

Definition at line 350 of file OpenGLContext.cxx.

SystemChildWindow * OpenGLContext::getChildWindow ( )

Definition at line 485 of file OpenGLContext.cxx.

References m_pChildWindow.

const SystemChildWindow * OpenGLContext::getChildWindow ( ) const

Definition at line 490 of file OpenGLContext.cxx.

References m_pChildWindow.

virtual GLWindow& OpenGLContext::getModifiableOpenGLWindow ( )
protectedpure virtual

Implemented in QtOpenGLContext.

Referenced by setWinPosAndSize().

virtual const GLWindow& OpenGLContext::getOpenGLWindow ( ) const
pure virtual

Implemented in QtOpenGLContext.

Referenced by adjustToNewSize().

bool OpenGLContext::hasCurrent ( )
static

Is there a current GL context ?

Definition at line 380 of file OpenGLContext.cxx.

References ImplGetSVData(), ImplSVData::maGDIData, and ImplSVGDIData::mpLastContext.

Referenced by OpenGLHelper::debugMsgPrint(), and prepareForYield().

bool OpenGLContext::ImplInit ( )
protectedvirtual

Reimplemented in QtOpenGLContext.

Definition at line 217 of file OpenGLContext.cxx.

References VCL_GL_INFO.

Referenced by init().

bool OpenGLContext::init ( vcl::Window pParent)
void OpenGLContext::InitChildWindow ( SystemChildWindow pChildWindow)
staticprotected
bool OpenGLContext::InitGL ( )
protected
void OpenGLContext::InitGLDebugging ( )
staticprotected

Definition at line 259 of file OpenGLContext.cxx.

References VCL_GL_INFO.

void OpenGLContext::initWindow ( )
privatevirtual

Reimplemented in QtOpenGLContext.

Definition at line 325 of file OpenGLContext.cxx.

Referenced by init().

bool OpenGLContext::isAnyCurrent ( )
virtual

Is any GL context the current context ?

Reimplemented in QtOpenGLContext.

Definition at line 375 of file OpenGLContext.cxx.

bool OpenGLContext::isCurrent ( )
virtual

Is this GL context the current context ?

Reimplemented in QtOpenGLContext.

Definition at line 355 of file OpenGLContext.cxx.

References void().

Referenced by makeCurrent(), and reset().

bool OpenGLContext::isInitialized ( ) const
inline

Definition at line 96 of file OpenGLContext.hxx.

References mbInitialized.

void OpenGLContext::makeCurrent ( )
virtual

make this GL context current - so it is implicit in subsequent GL calls

Reimplemented in QtOpenGLContext.

Definition at line 361 of file OpenGLContext.cxx.

References clearCurrent(), isCurrent(), and registerAsCurrent().

OpenGLContext& OpenGLContext::operator= ( const OpenGLContext )
delete
OpenGLContext& OpenGLContext::operator= ( OpenGLContext &&  )
delete
void OpenGLContext::prepareForYield ( )
static

release contexts etc. before (potentially) allowing another thread run.

Definition at line 391 of file OpenGLContext.cxx.

References hasCurrent(), ImplGetSVData(), ImplSVData::maGDIData, ImplSVGDIData::mpLastContext, and SAL_INFO.

void OpenGLContext::registerAsCurrent ( )

Put this GL context to the end of the context list.

Definition at line 421 of file OpenGLContext.cxx.

References ImplGetSVData(), ImplSVData::maGDIData, ImplSVGDIData::mpLastContext, mpNextContext, mpPrevContext, and VCL_GL_INFO.

Referenced by makeCurrent().

void OpenGLContext::release ( )
inline

Definition at line 58 of file OpenGLContext.hxx.

void OpenGLContext::requestLegacyContext ( )

Definition at line 98 of file OpenGLContext.cxx.

References mbRequestLegacyContext.

void OpenGLContext::reset ( )

Definition at line 334 of file OpenGLContext.cxx.

References destroyCurrentContext(), isCurrent(), mbInitialized, and resetCurrent().

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

void OpenGLContext::resetCurrent ( )
virtual

reset the GL context so this context is not implicit in subsequent GL calls.

Reimplemented in QtOpenGLContext.

Definition at line 441 of file OpenGLContext.cxx.

References clearCurrent().

Referenced by reset().

void OpenGLContext::restoreDefaultFramebuffer ( )
virtual

unbind the GL_FRAMEBUFFER to its default state, needed for gtk3

Definition at line 292 of file OpenGLContext.cxx.

void OpenGLContext::setWinPosAndSize ( const Point rPos,
const Size rSize 
)
void OpenGLContext::show ( )

Definition at line 477 of file OpenGLContext.cxx.

References m_pChildWindow, m_xWindow, and vcl::Window::Show().

void OpenGLContext::swapBuffers ( )
virtual

Reimplemented in QtOpenGLContext.

Definition at line 447 of file OpenGLContext.cxx.

References BuffersSwapped().

void OpenGLContext::sync ( )
virtual

Definition at line 471 of file OpenGLContext.cxx.

References void().

Friends And Related Function Documentation

friend class OpenGLTests
friend

Definition at line 43 of file OpenGLContext.hxx.

Member Data Documentation

VclPtr<SystemChildWindow> OpenGLContext::m_pChildWindow
protected

Definition at line 118 of file OpenGLContext.hxx.

Referenced by dispose(), getChildWindow(), init(), setWinPosAndSize(), show(), and ~OpenGLContext().

VclPtr<vcl::Window> OpenGLContext::m_xWindow
protected

Definition at line 116 of file OpenGLContext.hxx.

Referenced by init(), setWinPosAndSize(), and show().

bool OpenGLContext::mbInitialized
protected

Definition at line 119 of file OpenGLContext.hxx.

Referenced by init(), InitGL(), and reset().

bool OpenGLContext::mbRequestLegacyContext
protected

Definition at line 121 of file OpenGLContext.hxx.

Referenced by requestLegacyContext().

int OpenGLContext::mnRefCount
protected

Definition at line 120 of file OpenGLContext.hxx.

Referenced by ~OpenGLContext().

OpenGLContext* OpenGLContext::mpNextContext

Definition at line 127 of file OpenGLContext.hxx.

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

OpenGLContext* OpenGLContext::mpPrevContext

Definition at line 126 of file OpenGLContext.hxx.

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

VclPtr<vcl::Window> OpenGLContext::mpWindow
protected

Definition at line 117 of file OpenGLContext.hxx.

Referenced by init().


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