Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwindowsglcontext.cpp File Reference

(dc5a29b3246d19bd620acc9fdaea929bf856d8dc)

#include "qwindowsglcontext.h"
#include "qwindowscontext.h"
#include "qwindowswindow.h"
#include "qwindowsintegration.h"
#include <QtCore/qdebug.h>
#include <QtCore/qsysinfo.h>
#include <QtGui/qcolorspace.h>
#include <QtGui/qguiapplication.h>
#include <qpa/qplatformnativeinterface.h>
#include <private/qsystemlibrary_p.h>
#include <algorithm>
#include <wingdi.h>
#include <GL/gl.h>
+ Include dependency graph for qwindowsglcontext.cpp:

Go to the source code of this file.

Classes

class  QOpenGLTemporaryContext
 A temporary context that can be instantiated on the stack. More...
 

Namespaces

namespace  GDI
 
namespace  ARB
 

Macros

#define WGL_SAMPLE_BUFFERS_ARB   0x2041
 
#define WGL_SAMPLES_ARB   0x2042
 
#define WGL_NUMBER_PIXEL_FORMATS_ARB   0x2000
 
#define WGL_DRAW_TO_WINDOW_ARB   0x2001
 
#define WGL_DRAW_TO_BITMAP_ARB   0x2002
 
#define WGL_ACCELERATION_ARB   0x2003
 
#define WGL_NEED_PALETTE_ARB   0x2004
 
#define WGL_NEED_SYSTEM_PALETTE_ARB   0x2005
 
#define WGL_SWAP_LAYER_BUFFERS_ARB   0x2006
 
#define WGL_SWAP_METHOD_ARB   0x2007
 
#define WGL_NUMBER_OVERLAYS_ARB   0x2008
 
#define WGL_NUMBER_UNDERLAYS_ARB   0x2009
 
#define WGL_TRANSPARENT_ARB   0x200A
 
#define WGL_TRANSPARENT_RED_VALUE_ARB   0x2037
 
#define WGL_TRANSPARENT_GREEN_VALUE_ARB   0x2038
 
#define WGL_TRANSPARENT_BLUE_VALUE_ARB   0x2039
 
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB   0x203A
 
#define WGL_TRANSPARENT_INDEX_VALUE_ARB   0x203B
 
#define WGL_SHARE_DEPTH_ARB   0x200C
 
#define WGL_SHARE_STENCIL_ARB   0x200D
 
#define WGL_SHARE_ACCUM_ARB   0x200E
 
#define WGL_SUPPORT_GDI_ARB   0x200F
 
#define WGL_SUPPORT_OPENGL_ARB   0x2010
 
#define WGL_DOUBLE_BUFFER_ARB   0x2011
 
#define WGL_STEREO_ARB   0x2012
 
#define WGL_PIXEL_TYPE_ARB   0x2013
 
#define WGL_COLOR_BITS_ARB   0x2014
 
#define WGL_RED_BITS_ARB   0x2015
 
#define WGL_RED_SHIFT_ARB   0x2016
 
#define WGL_GREEN_BITS_ARB   0x2017
 
#define WGL_GREEN_SHIFT_ARB   0x2018
 
#define WGL_BLUE_BITS_ARB   0x2019
 
#define WGL_BLUE_SHIFT_ARB   0x201A
 
#define WGL_ALPHA_BITS_ARB   0x201B
 
#define WGL_ALPHA_SHIFT_ARB   0x201C
 
#define WGL_ACCUM_BITS_ARB   0x201D
 
#define WGL_ACCUM_RED_BITS_ARB   0x201E
 
#define WGL_ACCUM_GREEN_BITS_ARB   0x201F
 
#define WGL_ACCUM_BLUE_BITS_ARB   0x2020
 
#define WGL_ACCUM_ALPHA_BITS_ARB   0x2021
 
#define WGL_DEPTH_BITS_ARB   0x2022
 
#define WGL_STENCIL_BITS_ARB   0x2023
 
#define WGL_AUX_BUFFERS_ARB   0x2024
 
#define WGL_NO_ACCELERATION_ARB   0x2025
 
#define WGL_GENERIC_ACCELERATION_ARB   0x2026
 
#define WGL_FULL_ACCELERATION_ARB   0x2027
 
#define WGL_SWAP_EXCHANGE_ARB   0x2028
 
#define WGL_SWAP_COPY_ARB   0x2029
 
#define WGL_SWAP_UNDEFINED_ARB   0x202A
 
#define WGL_TYPE_RGBA_ARB   0x202B
 
#define WGL_TYPE_COLORINDEX_ARB   0x202C
 
#define WGL_CONTEXT_MAJOR_VERSION_ARB   0x2091
 
#define WGL_CONTEXT_MINOR_VERSION_ARB   0x2092
 
#define WGL_CONTEXT_LAYER_PLANE_ARB   0x2093
 
#define WGL_CONTEXT_FLAGS_ARB   0x2094
 
#define WGL_CONTEXT_PROFILE_MASK_ARB   0x9126
 
#define WGL_CONTEXT_DEBUG_BIT_ARB   0x0001
 
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB   0x0002
 
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB   0x0001
 
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB   0x0002
 
#define ERROR_INVALID_VERSION_ARB   0x2095
 
#define ERROR_INVALID_PROFILE_ARB   0x2096
 
#define GL_CONTEXT_PROFILE_MASK   0x9126
 
#define GL_MAJOR_VERSION   0x821B
 
#define GL_MINOR_VERSION   0x821C
 
#define GL_NUM_EXTENSIONS   0x821D
 
#define GL_CONTEXT_FLAGS   0x821E
 
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT   0x0001
 
#define GL_CONTEXT_FLAG_DEBUG_BIT   0x00000002
 
#define RESET_NOTIFICATION_STRATEGY_ARB   0x8256
 
#define LOSE_CONTEXT_ON_RESET_ARB   0x8252
 
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT   0x20A9
 
#define SAMPLE_BUFFER_EXTENSION   "GL_ARB_multisample"
 
#define ROBUSTNESS_EXTENSION   "GL_ARB_robustness"
 

Functions

template<class MaskType , class FlagType >
bool testFlag (MaskType mask, FlagType flag)
 
static bool hasGLOverlay (const PIXELFORMATDESCRIPTOR &pd)
 
static bool isDirectRendering (const PIXELFORMATDESCRIPTOR &pfd)
 
static void initPixelFormatDescriptor (PIXELFORMATDESCRIPTOR *d)
 
QDebug operator<< (QDebug d, const PIXELFORMATDESCRIPTOR &pd)
 
QDebug operator<< (QDebug d, const QOpenGLStaticContext &s)
 
QDebug operator<< (QDebug d, const QWindowsOpenGLContextFormat &f)
 
static bool isAcceptableFormat (const QWindowsOpenGLAdditionalFormat &additional, const PIXELFORMATDESCRIPTOR &pfd, bool ignoreGLSupport=false)
 
static void describeFormats (HDC hdc)
 
static QSurfaceFormat GDI::qSurfaceFormatFromPixelFormat (const PIXELFORMATDESCRIPTOR &pfd, QWindowsOpenGLAdditionalFormat *additionalIn=nullptr)
 
static PIXELFORMATDESCRIPTOR GDI::qPixelFormatFromSurfaceFormat (const QSurfaceFormat &format, const QWindowsOpenGLAdditionalFormat &additional)
 
static int GDI::choosePixelFormat (HDC hdc, const QSurfaceFormat &format, const QWindowsOpenGLAdditionalFormat &additional, PIXELFORMATDESCRIPTOR *obtainedPfd)
 
static HGLRC GDI::createContext (HDC hdc, HGLRC shared)
 
static int ARB::choosePixelFormat (HDC hdc, const QOpenGLStaticContext &staticContext, const QSurfaceFormat &format, const QWindowsOpenGLAdditionalFormat &additional, PIXELFORMATDESCRIPTOR *obtainedPfd)
 
static QSurfaceFormat ARB::qSurfaceFormatFromHDC (const QOpenGLStaticContext &staticContext, HDC hdc, int pixelFormat, QWindowsOpenGLAdditionalFormat *additionalIn=nullptr)
 
static HGLRC ARB::createContext (const QOpenGLStaticContext &staticContext, HDC hdc, const QSurfaceFormat &format, const QWindowsOpenGLAdditionalFormat &, HGLRC shared=nullptr)
 
static HWND createDummyGLWindow ()
 
static HGLRC createDummyGLContext (HDC dc)
 
static QOpenGLContextData currentOpenGLContextData ()
 
static QOpenGLContextData createDummyWindowOpenGLContextData ()
 
static QWindowsWindowglWindowOf (QPlatformSurface *s)
 
static HWND handleOf (QPlatformSurface *s)
 
static const QOpenGLContextDatafindByHWND (const std::vector< QOpenGLContextData > &data, HWND hwnd)
 

Macro Definition Documentation

◆ ERROR_INVALID_PROFILE_ARB

#define ERROR_INVALID_PROFILE_ARB   0x2096

Definition at line 92 of file qwindowsglcontext.cpp.

◆ ERROR_INVALID_VERSION_ARB

#define ERROR_INVALID_VERSION_ARB   0x2095

Definition at line 91 of file qwindowsglcontext.cpp.

◆ GL_CONTEXT_FLAG_DEBUG_BIT

#define GL_CONTEXT_FLAG_DEBUG_BIT   0x00000002

Definition at line 105 of file qwindowsglcontext.cpp.

◆ GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT

#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT   0x0001

Definition at line 101 of file qwindowsglcontext.cpp.

◆ GL_CONTEXT_FLAGS

#define GL_CONTEXT_FLAGS   0x821E

Definition at line 100 of file qwindowsglcontext.cpp.

◆ GL_CONTEXT_PROFILE_MASK

#define GL_CONTEXT_PROFILE_MASK   0x9126

Definition at line 96 of file qwindowsglcontext.cpp.

◆ GL_MAJOR_VERSION

#define GL_MAJOR_VERSION   0x821B

Definition at line 97 of file qwindowsglcontext.cpp.

◆ GL_MINOR_VERSION

#define GL_MINOR_VERSION   0x821C

Definition at line 98 of file qwindowsglcontext.cpp.

◆ GL_NUM_EXTENSIONS

#define GL_NUM_EXTENSIONS   0x821D

Definition at line 99 of file qwindowsglcontext.cpp.

◆ LOSE_CONTEXT_ON_RESET_ARB

#define LOSE_CONTEXT_ON_RESET_ARB   0x8252

Definition at line 110 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ RESET_NOTIFICATION_STRATEGY_ARB

#define RESET_NOTIFICATION_STRATEGY_ARB   0x8256

Definition at line 109 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ ROBUSTNESS_EXTENSION

#define ROBUSTNESS_EXTENSION   "GL_ARB_robustness"

Definition at line 943 of file qwindowsglcontext.cpp.

◆ SAMPLE_BUFFER_EXTENSION

#define SAMPLE_BUFFER_EXTENSION   "GL_ARB_multisample"

Definition at line 942 of file qwindowsglcontext.cpp.

◆ WGL_ACCELERATION_ARB

#define WGL_ACCELERATION_ARB   0x2003

Definition at line 32 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_ACCUM_ALPHA_BITS_ARB

#define WGL_ACCUM_ALPHA_BITS_ARB   0x2021

Definition at line 66 of file qwindowsglcontext.cpp.

◆ WGL_ACCUM_BITS_ARB

#define WGL_ACCUM_BITS_ARB   0x201D

Definition at line 62 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_ACCUM_BLUE_BITS_ARB

#define WGL_ACCUM_BLUE_BITS_ARB   0x2020

Definition at line 65 of file qwindowsglcontext.cpp.

◆ WGL_ACCUM_GREEN_BITS_ARB

#define WGL_ACCUM_GREEN_BITS_ARB   0x201F

Definition at line 64 of file qwindowsglcontext.cpp.

◆ WGL_ACCUM_RED_BITS_ARB

#define WGL_ACCUM_RED_BITS_ARB   0x201E

Definition at line 63 of file qwindowsglcontext.cpp.

◆ WGL_ALPHA_BITS_ARB

#define WGL_ALPHA_BITS_ARB   0x201B

Definition at line 60 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_ALPHA_SHIFT_ARB

#define WGL_ALPHA_SHIFT_ARB   0x201C

Definition at line 61 of file qwindowsglcontext.cpp.

◆ WGL_AUX_BUFFERS_ARB

#define WGL_AUX_BUFFERS_ARB   0x2024

Definition at line 69 of file qwindowsglcontext.cpp.

◆ WGL_BLUE_BITS_ARB

#define WGL_BLUE_BITS_ARB   0x2019

Definition at line 58 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_BLUE_SHIFT_ARB

#define WGL_BLUE_SHIFT_ARB   0x201A

Definition at line 59 of file qwindowsglcontext.cpp.

◆ WGL_COLOR_BITS_ARB

#define WGL_COLOR_BITS_ARB   0x2014

Definition at line 53 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat().

◆ WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB

#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB   0x0002

Definition at line 89 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ WGL_CONTEXT_CORE_PROFILE_BIT_ARB

#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB   0x0001

Definition at line 88 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ WGL_CONTEXT_DEBUG_BIT_ARB

#define WGL_CONTEXT_DEBUG_BIT_ARB   0x0001

Definition at line 86 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ WGL_CONTEXT_FLAGS_ARB

#define WGL_CONTEXT_FLAGS_ARB   0x2094

Definition at line 84 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB

#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB   0x0002

Definition at line 87 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ WGL_CONTEXT_LAYER_PLANE_ARB

#define WGL_CONTEXT_LAYER_PLANE_ARB   0x2093

Definition at line 83 of file qwindowsglcontext.cpp.

◆ WGL_CONTEXT_MAJOR_VERSION_ARB

#define WGL_CONTEXT_MAJOR_VERSION_ARB   0x2091

Definition at line 81 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ WGL_CONTEXT_MINOR_VERSION_ARB

#define WGL_CONTEXT_MINOR_VERSION_ARB   0x2092

Definition at line 82 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ WGL_CONTEXT_PROFILE_MASK_ARB

#define WGL_CONTEXT_PROFILE_MASK_ARB   0x9126

Definition at line 85 of file qwindowsglcontext.cpp.

Referenced by ARB::createContext().

◆ WGL_DEPTH_BITS_ARB

#define WGL_DEPTH_BITS_ARB   0x2022

Definition at line 67 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_DOUBLE_BUFFER_ARB

#define WGL_DOUBLE_BUFFER_ARB   0x2011

Definition at line 50 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_DRAW_TO_BITMAP_ARB

#define WGL_DRAW_TO_BITMAP_ARB   0x2002

Definition at line 31 of file qwindowsglcontext.cpp.

◆ WGL_DRAW_TO_WINDOW_ARB

#define WGL_DRAW_TO_WINDOW_ARB   0x2001

Definition at line 30 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat().

◆ WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT

#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT   0x20A9

Definition at line 113 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_FULL_ACCELERATION_ARB

#define WGL_FULL_ACCELERATION_ARB   0x2027

Definition at line 72 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_GENERIC_ACCELERATION_ARB

#define WGL_GENERIC_ACCELERATION_ARB   0x2026

Definition at line 71 of file qwindowsglcontext.cpp.

◆ WGL_GREEN_BITS_ARB

#define WGL_GREEN_BITS_ARB   0x2017

Definition at line 56 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_GREEN_SHIFT_ARB

#define WGL_GREEN_SHIFT_ARB   0x2018

Definition at line 57 of file qwindowsglcontext.cpp.

◆ WGL_NEED_PALETTE_ARB

#define WGL_NEED_PALETTE_ARB   0x2004

Definition at line 33 of file qwindowsglcontext.cpp.

◆ WGL_NEED_SYSTEM_PALETTE_ARB

#define WGL_NEED_SYSTEM_PALETTE_ARB   0x2005

Definition at line 34 of file qwindowsglcontext.cpp.

◆ WGL_NO_ACCELERATION_ARB

#define WGL_NO_ACCELERATION_ARB   0x2025

Definition at line 70 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat().

◆ WGL_NUMBER_OVERLAYS_ARB

#define WGL_NUMBER_OVERLAYS_ARB   0x2008

Definition at line 37 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_NUMBER_PIXEL_FORMATS_ARB

#define WGL_NUMBER_PIXEL_FORMATS_ARB   0x2000

Definition at line 29 of file qwindowsglcontext.cpp.

◆ WGL_NUMBER_UNDERLAYS_ARB

#define WGL_NUMBER_UNDERLAYS_ARB   0x2009

Definition at line 38 of file qwindowsglcontext.cpp.

◆ WGL_PIXEL_TYPE_ARB

#define WGL_PIXEL_TYPE_ARB   0x2013

Definition at line 52 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_RED_BITS_ARB

#define WGL_RED_BITS_ARB   0x2015

Definition at line 54 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_RED_SHIFT_ARB

#define WGL_RED_SHIFT_ARB   0x2016

Definition at line 55 of file qwindowsglcontext.cpp.

◆ WGL_SAMPLE_BUFFERS_ARB

#define WGL_SAMPLE_BUFFERS_ARB   0x2041

Definition at line 24 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_SAMPLES_ARB

#define WGL_SAMPLES_ARB   0x2042

Definition at line 25 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_SHARE_ACCUM_ARB

#define WGL_SHARE_ACCUM_ARB   0x200E

Definition at line 47 of file qwindowsglcontext.cpp.

◆ WGL_SHARE_DEPTH_ARB

#define WGL_SHARE_DEPTH_ARB   0x200C

Definition at line 45 of file qwindowsglcontext.cpp.

◆ WGL_SHARE_STENCIL_ARB

#define WGL_SHARE_STENCIL_ARB   0x200D

Definition at line 46 of file qwindowsglcontext.cpp.

◆ WGL_STENCIL_BITS_ARB

#define WGL_STENCIL_BITS_ARB   0x2023

Definition at line 68 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_STEREO_ARB

#define WGL_STEREO_ARB   0x2012

Definition at line 51 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat(), and ARB::qSurfaceFormatFromHDC().

◆ WGL_SUPPORT_GDI_ARB

#define WGL_SUPPORT_GDI_ARB   0x200F

Definition at line 48 of file qwindowsglcontext.cpp.

◆ WGL_SUPPORT_OPENGL_ARB

#define WGL_SUPPORT_OPENGL_ARB   0x2010

Definition at line 49 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat().

◆ WGL_SWAP_COPY_ARB

#define WGL_SWAP_COPY_ARB   0x2029

Definition at line 74 of file qwindowsglcontext.cpp.

◆ WGL_SWAP_EXCHANGE_ARB

#define WGL_SWAP_EXCHANGE_ARB   0x2028

Definition at line 73 of file qwindowsglcontext.cpp.

◆ WGL_SWAP_LAYER_BUFFERS_ARB

#define WGL_SWAP_LAYER_BUFFERS_ARB   0x2006

Definition at line 35 of file qwindowsglcontext.cpp.

◆ WGL_SWAP_METHOD_ARB

#define WGL_SWAP_METHOD_ARB   0x2007

Definition at line 36 of file qwindowsglcontext.cpp.

◆ WGL_SWAP_UNDEFINED_ARB

#define WGL_SWAP_UNDEFINED_ARB   0x202A

Definition at line 75 of file qwindowsglcontext.cpp.

◆ WGL_TRANSPARENT_ALPHA_VALUE_ARB

#define WGL_TRANSPARENT_ALPHA_VALUE_ARB   0x203A

Definition at line 43 of file qwindowsglcontext.cpp.

◆ WGL_TRANSPARENT_ARB

#define WGL_TRANSPARENT_ARB   0x200A

Definition at line 39 of file qwindowsglcontext.cpp.

◆ WGL_TRANSPARENT_BLUE_VALUE_ARB

#define WGL_TRANSPARENT_BLUE_VALUE_ARB   0x2039

Definition at line 42 of file qwindowsglcontext.cpp.

◆ WGL_TRANSPARENT_GREEN_VALUE_ARB

#define WGL_TRANSPARENT_GREEN_VALUE_ARB   0x2038

Definition at line 41 of file qwindowsglcontext.cpp.

◆ WGL_TRANSPARENT_INDEX_VALUE_ARB

#define WGL_TRANSPARENT_INDEX_VALUE_ARB   0x203B

Definition at line 44 of file qwindowsglcontext.cpp.

◆ WGL_TRANSPARENT_RED_VALUE_ARB

#define WGL_TRANSPARENT_RED_VALUE_ARB   0x2037

Definition at line 40 of file qwindowsglcontext.cpp.

◆ WGL_TYPE_COLORINDEX_ARB

#define WGL_TYPE_COLORINDEX_ARB   0x202C

Definition at line 77 of file qwindowsglcontext.cpp.

◆ WGL_TYPE_RGBA_ARB

#define WGL_TYPE_RGBA_ARB   0x202B

Definition at line 76 of file qwindowsglcontext.cpp.

Referenced by ARB::choosePixelFormat().

Function Documentation

◆ createDummyGLContext()

static HGLRC createDummyGLContext ( HDC dc)
inlinestatic

Definition at line 786 of file qwindowsglcontext.cpp.

References initPixelFormatDescriptor(), QOpenGLStaticContext::opengl32, and qErrnoWarning().

Referenced by createDummyWindowOpenGLContextData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createDummyGLWindow()

static HWND createDummyGLWindow ( )
inlinestatic

Definition at line 778 of file qwindowsglcontext.cpp.

References createDummyWindow(), QWindowsContext::instance(), and QStringLiteral.

Referenced by QWindowsGLContext::QWindowsGLContext(), and createDummyWindowOpenGLContextData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createDummyWindowOpenGLContextData()

static QOpenGLContextData createDummyWindowOpenGLContextData ( )
inlinestatic

Definition at line 820 of file qwindowsglcontext.cpp.

References createDummyGLContext(), createDummyGLWindow(), and QOpenGLContextData::hwnd.

+ Here is the call graph for this function:

◆ currentOpenGLContextData()

static QOpenGLContextData currentOpenGLContextData ( )
inlinestatic

◆ describeFormats()

static void describeFormats ( HDC hdc)
static

Definition at line 304 of file qwindowsglcontext.cpp.

References i, initPixelFormatDescriptor(), QOpenGLStaticContext::opengl32, and qCDebug.

Referenced by QWindowsGLContext::QWindowsGLContext().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findByHWND()

static const QOpenGLContextData * findByHWND ( const std::vector< QOpenGLContextData > & data,
HWND hwnd )
inlinestatic

Definition at line 1234 of file qwindowsglcontext.cpp.

Referenced by QWindowsGLContext::makeCurrent(), and QWindowsGLContext::swapBuffers().

+ Here is the caller graph for this function:

◆ glWindowOf()

static QWindowsWindow * glWindowOf ( QPlatformSurface * s)
inlinestatic

Definition at line 1222 of file qwindowsglcontext.cpp.

Referenced by handleOf().

+ Here is the caller graph for this function:

◆ handleOf()

static HWND handleOf ( QPlatformSurface * s)
inlinestatic

Definition at line 1227 of file qwindowsglcontext.cpp.

References glWindowOf().

Referenced by QWindowsGLContext::swapBuffers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasGLOverlay()

static bool hasGLOverlay ( const PIXELFORMATDESCRIPTOR & pd)
inlinestatic

Definition at line 208 of file qwindowsglcontext.cpp.

Referenced by isAcceptableFormat(), operator<<(), and GDI::qSurfaceFormatFromPixelFormat().

+ Here is the caller graph for this function:

◆ initPixelFormatDescriptor()

static void initPixelFormatDescriptor ( PIXELFORMATDESCRIPTOR * d)
inlinestatic

Definition at line 214 of file qwindowsglcontext.cpp.

References d.

Referenced by ARB::choosePixelFormat(), GDI::choosePixelFormat(), createDummyGLContext(), describeFormats(), and GDI::qPixelFormatFromSurfaceFormat().

+ Here is the caller graph for this function:

◆ isAcceptableFormat()

static bool isAcceptableFormat ( const QWindowsOpenGLAdditionalFormat & additional,
const PIXELFORMATDESCRIPTOR & pfd,
bool ignoreGLSupport = false )
inlinestatic

Definition at line 292 of file qwindowsglcontext.cpp.

References hasGLOverlay(), QWindowsGLOverlay, QWindowsGLRenderToPixmap, and testFlag().

Referenced by ARB::choosePixelFormat(), and GDI::choosePixelFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isDirectRendering()

static bool isDirectRendering ( const PIXELFORMATDESCRIPTOR & pfd)
inlinestatic

Definition at line 211 of file qwindowsglcontext.cpp.

Referenced by GDI::choosePixelFormat(), and GDI::qSurfaceFormatFromPixelFormat().

+ Here is the caller graph for this function:

◆ operator<<() [1/3]

QDebug operator<< ( QDebug d,
const PIXELFORMATDESCRIPTOR & pd )

Definition at line 222 of file qwindowsglcontext.cpp.

References d, Qt::dec(), hasGLOverlay(), Qt::hex(), Qt::noshowbase(), and Qt::showbase().

+ Here is the call graph for this function:

◆ operator<<() [2/3]

QDebug operator<< ( QDebug d,
const QOpenGLStaticContext & s )

◆ operator<<() [3/3]

QDebug operator<< ( QDebug d,
const QWindowsOpenGLContextFormat & f )

Definition at line 280 of file qwindowsglcontext.cpp.

References d.

◆ testFlag()