Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_ContextGLX.h
| /* SPDX-License-Identifier: GPL-2.0-or-later | /* SPDX-License-Identifier: GPL-2.0-or-later | ||||
| * Copyright 2014 Blender Foundation. All rights reserved. */ | * Copyright 2014 Blender Foundation. All rights reserved. */ | ||||
| /** \file | /** \file | ||||
| * \ingroup GHOST | * \ingroup GHOST | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #include "GHOST_Context.h" | #include "GHOST_Context.h" | ||||
| #include <GL/glxew.h> | #include <epoxy/glx.h> | ||||
| #ifndef GHOST_OPENGL_GLX_CONTEXT_FLAGS | #ifndef GHOST_OPENGL_GLX_CONTEXT_FLAGS | ||||
| /* leave as convenience define for the future */ | /* leave as convenience define for the future */ | ||||
| # define GHOST_OPENGL_GLX_CONTEXT_FLAGS 0 | # define GHOST_OPENGL_GLX_CONTEXT_FLAGS 0 | ||||
| #endif | #endif | ||||
| #ifndef GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY | #ifndef GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY | ||||
| # define GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY 0 | # define GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY 0 | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | public: | ||||
| /** | /** | ||||
| * Gets the current swap interval for #swapBuffers. | * Gets the current swap interval for #swapBuffers. | ||||
| * \param intervalOut: Variable to store the swap interval if it can be read. | * \param intervalOut: Variable to store the swap interval if it can be read. | ||||
| * \return Whether the swap interval can be read. | * \return Whether the swap interval can be read. | ||||
| */ | */ | ||||
| GHOST_TSuccess getSwapInterval(int &intervalOut); | GHOST_TSuccess getSwapInterval(int &intervalOut); | ||||
| private: | private: | ||||
| void initContextGLXEW(); | |||||
| Display *m_display; | Display *m_display; | ||||
| GLXFBConfig m_fbconfig; | GLXFBConfig m_fbconfig; | ||||
| Window m_window; | Window m_window; | ||||
| const int m_contextProfileMask; | const int m_contextProfileMask; | ||||
| const int m_contextMajorVersion; | const int m_contextMajorVersion; | ||||
| const int m_contextMinorVersion; | const int m_contextMinorVersion; | ||||
| const int m_contextFlags; | const int m_contextFlags; | ||||
| Show All 12 Lines | |||||