Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_ContextWGL.h
| /* SPDX-License-Identifier: GPL-2.0-or-later | /* SPDX-License-Identifier: GPL-2.0-or-later | ||||
| * Copyright 2013 Blender Foundation. All rights reserved. */ | * Copyright 2013 Blender Foundation. All rights reserved. */ | ||||
| /** \file | /** \file | ||||
| * \ingroup GHOST | * \ingroup GHOST | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| //#define WIN32_COMPOSITING | //#define WIN32_COMPOSITING | ||||
| #include "GHOST_Context.h" | #include "GHOST_Context.h" | ||||
| #include <GL/wglew.h> | #include <epoxy/wgl.h> | ||||
| #ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY | #ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY | ||||
| # define GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY 0 | # define GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY 0 | ||||
| #endif | #endif | ||||
| class GHOST_ContextWGL : public GHOST_Context { | class GHOST_ContextWGL : public GHOST_Context { | ||||
| /* XR code needs low level graphics data to send to OpenXR. */ | /* XR code needs low level graphics data to send to OpenXR. */ | ||||
| friend class GHOST_XrGraphicsBindingOpenGL; | friend class GHOST_XrGraphicsBindingOpenGL; | ||||
| ▲ Show 20 Lines • Show All 58 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: | ||||
| int choose_pixel_format(bool stereoVisual, bool needAlpha); | |||||
| int choose_pixel_format_arb(bool stereoVisual, bool needAlpha); | int choose_pixel_format_arb(bool stereoVisual, bool needAlpha); | ||||
| int _choose_pixel_format_arb_1(bool stereoVisual, bool needAlpha); | int _choose_pixel_format_arb_1(bool stereoVisual, bool needAlpha); | ||||
| void initContextWGLEW(PIXELFORMATDESCRIPTOR &preferredPFD); | |||||
| HWND m_hWnd; | HWND m_hWnd; | ||||
| HDC m_hDC; | HDC m_hDC; | ||||
| 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; | ||||
| const bool m_alphaBackground; | const bool m_alphaBackground; | ||||
| Show All 13 Lines | |||||