LibreOffice Module vcl (master)
1
|
#include <OpenGLContext.hxx>
Public Member Functions | |
virtual | ~OpenGLContext () |
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 GLWindow & | getOpenGLWindow () const =0 |
SystemChildWindow * | getChildWindow () |
const SystemChildWindow * | getChildWindow () const |
bool | isInitialized () const |
virtual SystemWindowData | generateWinData (vcl::Window *pParent, bool bRequestLegacyContext) |
Static Public Member Functions | |
static rtl::Reference< OpenGLContext > | Create () |
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 | |
OpenGLContext * | mpPrevContext |
OpenGLContext * | mpNextContext |
Protected Member Functions | |
OpenGLContext () | |
bool | InitGL () |
virtual GLWindow & | getModifiableOpenGLWindow ()=0 |
virtual bool | ImplInit () |
Static Protected Member Functions | |
static void | InitGLDebugging () |
static void | InitChildWindow (SystemChildWindow *pChildWindow) |
static void | BuffersSwapped () |
Protected Attributes | |
VclPtr< vcl::Window > | m_xWindow |
VclPtr< vcl::Window > | mpWindow |
VclPtr< SystemChildWindow > | m_pChildWindow |
bool | mbInitialized |
int | mnRefCount |
bool | mbRequestLegacyContext |
Private Member Functions | |
virtual void | initWindow () |
virtual void | destroyCurrentContext () |
virtual void | adjustToNewSize () |
Friends | |
class | OpenGLTests |
Definition at line 41 of file OpenGLContext.hxx.
|
protected |
Definition at line 42 of file OpenGLContext.cxx.
References ImplGetSVData(), ImplSVData::maGDIData, mbInitialized, ImplSVGDIData::mpLastContext, mpNextContext, mpPrevContext, mpWindow, and VCL_GL_INFO.
|
virtual |
Definition at line 65 of file OpenGLContext.cxx.
References assert(), VclPtr< reference_type >::disposeAndClear(), ImplGetSVData(), m_pChildWindow, ImplSVData::maGDIData, mnRefCount, ImplSVGDIData::mpLastContext, mpNextContext, mpPrevContext, reset(), and VCL_GL_INFO.
|
inline |
Definition at line 49 of file OpenGLContext.hxx.
|
privatevirtual |
Definition at line 310 of file OpenGLContext.cxx.
References getOpenGLWindow(), GLWindow::Height, and GLWindow::Width.
Referenced by setWinPosAndSize().
|
staticprotected |
Definition at line 453 of file OpenGLContext.cxx.
References nBufferSwapCounter.
Referenced by swapBuffers().
|
static |
release bound resources from the current context
Definition at line 387 of file OpenGLContext.cxx.
Referenced by makeCurrent(), and resetCurrent().
|
static |
Definition at line 93 of file OpenGLContext.cxx.
References SalInstance::CreateOpenGLContext(), ImplGetSVData(), and ImplSVData::mpDefInst.
|
privatevirtual |
Reimplemented in Qt5OpenGLContext.
Definition at line 329 of file OpenGLContext.cxx.
Referenced by reset().
Definition at line 87 of file OpenGLContext.cxx.
References VclPtr< reference_type >::disposeAndClear(), m_pChildWindow, and reset().
|
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.
|
protectedpure virtual |
Implemented in Qt5OpenGLContext.
Referenced by setWinPosAndSize().
|
pure virtual |
Implemented in Qt5OpenGLContext.
Referenced by adjustToNewSize().
|
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().
|
protectedvirtual |
Reimplemented in Qt5OpenGLContext.
Definition at line 217 of file OpenGLContext.cxx.
References VCL_GL_INFO.
Referenced by init().
bool OpenGLContext::init | ( | vcl::Window * | pParent | ) |
Definition at line 200 of file OpenGLContext.cxx.
References VclPtr< reference_type >::disposeAndClear(), VclPtr< reference_type >::get(), ImplInit(), initWindow(), m_pChildWindow, m_xWindow, mbInitialized, mpWindow, VclPtr< reference_type >::reset(), vcl::Window::setPosSizePixel(), WB_NOBORDER, and WB_NODIALOGCONTROL.
|
staticprotected |
Definition at line 316 of file OpenGLContext.cxx.
References Clip, SystemChildWindow::EnableEraseBackground(), vcl::Window::SetControlBackground(), vcl::Window::SetControlForeground(), vcl::Window::SetMouseTransparent(), and vcl::Window::SetParentClipMode().
|
protected |
Definition at line 236 of file OpenGLContext.cxx.
References getGLString(), OpenGLHelper::getGLVersion(), mbInitialized, SAL_WARN, and VCL_GL_INFO.
|
staticprotected |
Definition at line 259 of file OpenGLContext.cxx.
References VCL_GL_INFO.
|
privatevirtual |
Reimplemented in Qt5OpenGLContext.
Definition at line 325 of file OpenGLContext.cxx.
Referenced by init().
|
virtual |
Is any GL context the current context ?
Reimplemented in Qt5OpenGLContext.
Definition at line 375 of file OpenGLContext.cxx.
|
virtual |
Is this GL context the current context ?
Reimplemented in Qt5OpenGLContext.
Definition at line 355 of file OpenGLContext.cxx.
References void().
Referenced by makeCurrent(), and reset().
|
inline |
Definition at line 88 of file OpenGLContext.hxx.
References mbInitialized.
|
virtual |
make this GL context current - so it is implicit in subsequent GL calls
Reimplemented in Qt5OpenGLContext.
Definition at line 361 of file OpenGLContext.cxx.
References clearCurrent(), isCurrent(), and registerAsCurrent().
|
static |
release contexts etc. before (potentially) allowing another thread run.
Definition at line 391 of file OpenGLContext.cxx.
References assert(), 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().
|
inline |
Definition at line 50 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().
|
virtual |
reset the GL context so this context is not implicit in subsequent GL calls.
Reimplemented in Qt5OpenGLContext.
Definition at line 441 of file OpenGLContext.cxx.
References clearCurrent().
Referenced by reset().
|
virtual |
unbind the GL_FRAMEBUFFER to its default state, needed for gtk3
Definition at line 292 of file OpenGLContext.cxx.
Definition at line 297 of file OpenGLContext.cxx.
References adjustToNewSize(), getModifiableOpenGLWindow(), Size::Height(), GLWindow::Height, m_pChildWindow, m_xWindow, vcl::Window::SetPosSizePixel(), Size::Width(), and GLWindow::Width.
void OpenGLContext::show | ( | ) |
Definition at line 477 of file OpenGLContext.cxx.
References m_pChildWindow, m_xWindow, and vcl::Window::Show().
|
virtual |
Reimplemented in Qt5OpenGLContext.
Definition at line 447 of file OpenGLContext.cxx.
References BuffersSwapped().
|
virtual |
Definition at line 471 of file OpenGLContext.cxx.
References void().
|
friend |
Definition at line 43 of file OpenGLContext.hxx.
|
protected |
Definition at line 110 of file OpenGLContext.hxx.
Referenced by dispose(), getChildWindow(), init(), setWinPosAndSize(), show(), and ~OpenGLContext().
|
protected |
Definition at line 108 of file OpenGLContext.hxx.
Referenced by init(), setWinPosAndSize(), and show().
|
protected |
Definition at line 111 of file OpenGLContext.hxx.
|
protected |
Definition at line 113 of file OpenGLContext.hxx.
Referenced by requestLegacyContext().
|
protected |
Definition at line 112 of file OpenGLContext.hxx.
Referenced by ~OpenGLContext().
OpenGLContext* OpenGLContext::mpNextContext |
Definition at line 119 of file OpenGLContext.hxx.
Referenced by OpenGLContext(), registerAsCurrent(), and ~OpenGLContext().
OpenGLContext* OpenGLContext::mpPrevContext |
Definition at line 118 of file OpenGLContext.hxx.
Referenced by OpenGLContext(), registerAsCurrent(), and ~OpenGLContext().
|
protected |
Definition at line 109 of file OpenGLContext.hxx.
Referenced by init().