LibreOffice Module vcl (master) 1
|
#include <OpenGLContext.hxx>
Public Member Functions | |
virtual | ~OpenGLContext () |
OpenGLContext (const OpenGLContext &)=delete | |
OpenGLContext (OpenGLContext &&)=delete | |
OpenGLContext & | operator= (const OpenGLContext &)=delete |
OpenGLContext & | operator= (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 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 43 of file OpenGLContext.cxx.
References ImplGetSVData(), ImplSVData::maGDIData, mbInitialized, ImplSVGDIData::mpLastContext, mpNextContext, mpPrevContext, mpWindow, and VCL_GL_INFO.
|
virtual |
Definition at line 66 of file OpenGLContext.cxx.
References VclPtr< reference_type >::disposeAndClear(), ImplGetSVData(), m_pChildWindow, ImplSVData::maGDIData, mnRefCount, ImplSVGDIData::mpLastContext, mpNextContext, mpPrevContext, reset(), and VCL_GL_INFO.
|
delete |
|
delete |
|
inline |
Definition at line 57 of file OpenGLContext.hxx.
|
privatevirtual |
Definition at line 311 of file OpenGLContext.cxx.
References getOpenGLWindow(), GLWindow::Height, and GLWindow::Width.
Referenced by setWinPosAndSize().
|
staticprotected |
Definition at line 454 of file OpenGLContext.cxx.
References nBufferSwapCounter.
Referenced by swapBuffers().
|
static |
release bound resources from the current context
Definition at line 388 of file OpenGLContext.cxx.
Referenced by makeCurrent(), and resetCurrent().
|
static |
Definition at line 94 of file OpenGLContext.cxx.
References ImplGetSVData().
|
privatevirtual |
Reimplemented in QtOpenGLContext.
Definition at line 330 of file OpenGLContext.cxx.
Referenced by reset().
void OpenGLContext::dispose | ( | void | ) |
Definition at line 88 of file OpenGLContext.cxx.
References VclPtr< reference_type >::disposeAndClear(), m_pChildWindow, and reset().
|
virtual |
Definition at line 351 of file OpenGLContext.cxx.
SystemChildWindow * OpenGLContext::getChildWindow | ( | ) |
Definition at line 486 of file OpenGLContext.cxx.
References m_pChildWindow.
const SystemChildWindow * OpenGLContext::getChildWindow | ( | ) | const |
Definition at line 491 of file OpenGLContext.cxx.
References m_pChildWindow.
|
protectedpure virtual |
Implemented in QtOpenGLContext.
Referenced by setWinPosAndSize().
|
pure virtual |
Implemented in QtOpenGLContext.
Referenced by adjustToNewSize().
|
static |
Is there a current GL context ?
Definition at line 381 of file OpenGLContext.cxx.
References ImplGetSVData(), ImplSVData::maGDIData, and ImplSVGDIData::mpLastContext.
Referenced by OpenGLHelper::debugMsgPrint(), and prepareForYield().
|
protectedvirtual |
Reimplemented in QtOpenGLContext.
Definition at line 218 of file OpenGLContext.cxx.
References VCL_GL_INFO.
Referenced by init().
bool OpenGLContext::init | ( | vcl::Window * | pParent | ) |
Definition at line 201 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 317 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 237 of file OpenGLContext.cxx.
References getGLString(), OpenGLHelper::getGLVersion(), mbInitialized, SAL_WARN, and VCL_GL_INFO.
|
staticprotected |
Definition at line 260 of file OpenGLContext.cxx.
References VCL_GL_INFO.
|
privatevirtual |
Reimplemented in QtOpenGLContext.
Definition at line 326 of file OpenGLContext.cxx.
Referenced by init().
|
virtual |
Is any GL context the current context ?
Reimplemented in QtOpenGLContext.
Definition at line 376 of file OpenGLContext.cxx.
|
virtual |
Is this GL context the current context ?
Reimplemented in QtOpenGLContext.
Definition at line 356 of file OpenGLContext.cxx.
Referenced by makeCurrent(), and reset().
|
inline |
Definition at line 96 of file OpenGLContext.hxx.
References mbInitialized.
|
virtual |
make this GL context current - so it is implicit in subsequent GL calls
Reimplemented in QtOpenGLContext.
Definition at line 362 of file OpenGLContext.cxx.
References clearCurrent(), isCurrent(), and registerAsCurrent().
|
delete |
|
delete |
|
static |
release contexts etc. before (potentially) allowing another thread run.
Definition at line 392 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 422 of file OpenGLContext.cxx.
References ImplGetSVData(), ImplSVData::maGDIData, ImplSVGDIData::mpLastContext, mpNextContext, mpPrevContext, and VCL_GL_INFO.
Referenced by makeCurrent().
|
inline |
Definition at line 58 of file OpenGLContext.hxx.
void OpenGLContext::requestLegacyContext | ( | ) |
Definition at line 99 of file OpenGLContext.cxx.
References mbRequestLegacyContext.
void OpenGLContext::reset | ( | ) |
Definition at line 335 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 QtOpenGLContext.
Definition at line 442 of file OpenGLContext.cxx.
References clearCurrent().
Referenced by reset().
|
virtual |
unbind the GL_FRAMEBUFFER to its default state, needed for gtk3
Definition at line 293 of file OpenGLContext.cxx.
Definition at line 298 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 478 of file OpenGLContext.cxx.
References m_pChildWindow, m_xWindow, and vcl::Window::Show().
|
virtual |
Reimplemented in QtOpenGLContext.
Definition at line 448 of file OpenGLContext.cxx.
References BuffersSwapped().
|
virtual |
Definition at line 472 of file OpenGLContext.cxx.
|
friend |
Definition at line 43 of file OpenGLContext.hxx.
|
protected |
Definition at line 118 of file OpenGLContext.hxx.
Referenced by dispose(), getChildWindow(), init(), setWinPosAndSize(), show(), and ~OpenGLContext().
|
protected |
Definition at line 116 of file OpenGLContext.hxx.
Referenced by init(), setWinPosAndSize(), and show().
|
protected |
Definition at line 119 of file OpenGLContext.hxx.
|
protected |
Definition at line 121 of file OpenGLContext.hxx.
Referenced by requestLegacyContext().
|
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().
|
protected |
Definition at line 117 of file OpenGLContext.hxx.
Referenced by init().