/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// Avoid implicitly defined copy constructors/assignments for the DLLPUBLIC class (they may // require forward-declared classes used internally to be defined in places using OpenGLContext)
OpenGLContext(const OpenGLContext&) = delete;
OpenGLContext(OpenGLContext&&) = delete;
OpenGLContext& operator=(const OpenGLContext&) = delete;
OpenGLContext& operator=(OpenGLContext&&) = delete;
/// Is this GL context the current context ? virtualbool isCurrent(); /// Is any GL context the current context ? virtualbool isAnyCurrent(); /// release bound resources from the current context staticvoid clearCurrent(); /// release contexts etc. before (potentially) allowing another thread run.
SAL_DLLPRIVATE staticvoid prepareForYield(); /// Is there a current GL context ?
SAL_DLLPRIVATE staticbool hasCurrent();
/// make this GL context current - so it is implicit in subsequent GL calls
SAL_DLLPRIVATE virtualvoid makeCurrent(); /// Put this GL context to the end of the context list. void registerAsCurrent(); /// reset the GL context so this context is not implicit in subsequent GL calls.
SAL_DLLPRIVATE virtualvoid resetCurrent(); /// unbind the GL_FRAMEBUFFER to its default state, needed for gtk3 virtualvoid restoreDefaultFramebuffer();
SAL_DLLPRIVATE virtualvoid swapBuffers(); virtualvoid sync(); void show();
VclPtr<vcl::Window> m_xWindow;
VclPtr<vcl::Window> mpWindow; //points to m_pWindow or the parent window, don't delete it
VclPtr<SystemChildWindow> m_pChildWindow; bool mbInitialized; int mnRefCount; bool mbRequestLegacyContext;
public:
// Don't hold references to ourselves:
OpenGLContext *mpPrevContext;
OpenGLContext *mpNextContext;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.