Qt 4.8
Macros | Typedefs | Functions
qglpixelbuffer_win.cpp File Reference
#include <qglpixelbuffer.h>
#include <qgl.h>
#include <private/qgl_p.h>
#include <private/qglpixelbuffer_p.h>
#include <qimage.h>
#include <qdebug.h>

Go to the source code of this file.

Macros

#define GL_SAMPLES_ARB   0x80A9
 
#define WGL_ACCELERATION_ARB   0x2003
 
#define WGL_ACCUM_ALPHA_BITS_ARB   0x2021
 
#define WGL_ACCUM_BITS_ARB   0x201D
 
#define WGL_ACCUM_BLUE_BITS_ARB   0x2020
 
#define WGL_ACCUM_GREEN_BITS_ARB   0x201F
 
#define WGL_ACCUM_RED_BITS_ARB   0x201E
 
#define WGL_ALPHA_BITS_ARB   0x201B
 
#define WGL_ALPHA_SHIFT_ARB   0x201C
 
#define WGL_AUX0_ARB   0x2087
 
#define WGL_AUX1_ARB   0x2088
 
#define WGL_AUX2_ARB   0x2089
 
#define WGL_AUX3_ARB   0x208A
 
#define WGL_AUX4_ARB   0x208B
 
#define WGL_AUX5_ARB   0x208C
 
#define WGL_AUX6_ARB   0x208D
 
#define WGL_AUX7_ARB   0x208E
 
#define WGL_AUX8_ARB   0x208F
 
#define WGL_AUX9_ARB   0x2090
 
#define WGL_AUX_BUFFERS_ARB   0x2024
 
#define WGL_BACK_LEFT_ARB   0x2085
 
#define WGL_BACK_RIGHT_ARB   0x2086
 
#define WGL_BIND_TO_TEXTURE_RGB_ARB   0x2070
 
#define WGL_BIND_TO_TEXTURE_RGBA_ARB   0x2071
 
#define WGL_BLUE_BITS_ARB   0x2019
 
#define WGL_BLUE_SHIFT_ARB   0x201A
 
#define WGL_COLOR_BITS_ARB   0x2014
 
#define WGL_CUBE_MAP_FACE_ARB   0x207C
 
#define WGL_DEPTH_BITS_ARB   0x2022
 
#define WGL_DOUBLE_BUFFER_ARB   0x2011
 
#define WGL_DRAW_TO_BITMAP_ARB   0x2002
 
#define WGL_DRAW_TO_PBUFFER_ARB   0x202D
 
#define WGL_DRAW_TO_WINDOW_ARB   0x2001
 
#define WGL_FLOAT_COMPONENTS_NV   0x20B0
 
#define WGL_FRONT_LEFT_ARB   0x2083
 
#define WGL_FRONT_RIGHT_ARB   0x2084
 
#define WGL_FULL_ACCELERATION_ARB   0x2027
 
#define WGL_GENERIC_ACCELERATION_ARB   0x2026
 
#define WGL_GREEN_BITS_ARB   0x2017
 
#define WGL_GREEN_SHIFT_ARB   0x2018
 
#define WGL_MAX_PBUFFER_HEIGHT_ARB   0x2030
 
#define WGL_MAX_PBUFFER_PIXELS_ARB   0x202E
 
#define WGL_MAX_PBUFFER_WIDTH_ARB   0x202F
 
#define WGL_MIPMAP_LEVEL_ARB   0x207B
 
#define WGL_MIPMAP_TEXTURE_ARB   0x2074
 
#define WGL_NEED_PALETTE_ARB   0x2004
 
#define WGL_NEED_SYSTEM_PALETTE_ARB   0x2005
 
#define WGL_NO_ACCELERATION_ARB   0x2025
 
#define WGL_NO_TEXTURE_ARB   0x2077
 
#define WGL_NUMBER_OVERLAYS_ARB   0x2008
 
#define WGL_NUMBER_PIXEL_FORMATS_ARB   0x2000
 
#define WGL_NUMBER_UNDERLAYS_ARB   0x2009
 
#define WGL_PBUFFER_HEIGHT_ARB   0x2035
 
#define WGL_PBUFFER_LARGEST_ARB   0x2033
 
#define WGL_PBUFFER_LOST_ARB   0x2036
 
#define WGL_PBUFFER_WIDTH_ARB   0x2034
 
#define WGL_PIXEL_TYPE_ARB   0x2013
 
#define WGL_RED_BITS_ARB   0x2015
 
#define WGL_RED_SHIFT_ARB   0x2016
 
#define WGL_SAMPLE_BUFFERS_ARB   0x2041
 
#define WGL_SAMPLES_ARB   0x2042
 
#define WGL_SHARE_ACCUM_ARB   0x200E
 
#define WGL_SHARE_DEPTH_ARB   0x200C
 
#define WGL_SHARE_STENCIL_ARB   0x200D
 
#define WGL_STENCIL_BITS_ARB   0x2023
 
#define WGL_STEREO_ARB   0x2012
 
#define WGL_SUPPORT_GDI_ARB   0x200F
 
#define WGL_SUPPORT_OPENGL_ARB   0x2010
 
#define WGL_SWAP_COPY_ARB   0x2029
 
#define WGL_SWAP_EXCHANGE_ARB   0x2028
 
#define WGL_SWAP_LAYER_BUFFERS_ARB   0x2006
 
#define WGL_SWAP_METHOD_ARB   0x2007
 
#define WGL_SWAP_UNDEFINED_ARB   0x202A
 
#define WGL_TEXTURE_1D_ARB   0x2079
 
#define WGL_TEXTURE_2D_ARB   0x207A
 
#define WGL_TEXTURE_CUBE_MAP_ARB   0x2078
 
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB   0x207E
 
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB   0x2080
 
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB   0x2082
 
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB   0x207D
 
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB   0x207F
 
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB   0x2081
 
#define WGL_TEXTURE_FORMAT_ARB   0x2072
 
#define WGL_TEXTURE_RGB_ARB   0x2075
 
#define WGL_TEXTURE_RGBA_ARB   0x2076
 
#define WGL_TEXTURE_TARGET_ARB   0x2073
 
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB   0x203A
 
#define WGL_TRANSPARENT_ARB   0x200A
 
#define WGL_TRANSPARENT_BLUE_VALUE_ARB   0x2039
 
#define WGL_TRANSPARENT_GREEN_VALUE_ARB   0x2038
 
#define WGL_TRANSPARENT_INDEX_VALUE_ARB   0x203B
 
#define WGL_TRANSPARENT_RED_VALUE_ARB   0x2037
 
#define WGL_TYPE_COLORINDEX_ARB   0x202C
 
#define WGL_TYPE_RGBA_ARB   0x202B
 

Typedefs

typedef BOOL(WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer)
 
typedef BOOL(WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats)
 
typedef HPBUFFERARB(WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList)
 
typedef BOOL(WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer)
 
typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc)
 
typedef HDC(WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer)
 
typedef BOOL(WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues)
 
typedef BOOL(WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues)
 
typedef BOOL(WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue)
 
typedef int(WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC)
 
typedef BOOL(WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer)
 
typedef BOOL(WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList)
 

Functions

QGLFormat pfiToQGLFormat (HDC hdc, int pfi)
 
static void qt_format_to_attrib_list (bool has_render_texture, const QGLFormat &f, int attribs[])
 

Macro Definition Documentation

◆ GL_SAMPLES_ARB

#define GL_SAMPLES_ARB   0x80A9

Definition at line 176 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_ACCELERATION_ARB

#define WGL_ACCELERATION_ARB   0x2003

Definition at line 82 of file qglpixelbuffer_win.cpp.

◆ WGL_ACCUM_ALPHA_BITS_ARB

#define WGL_ACCUM_ALPHA_BITS_ARB   0x2021

Definition at line 116 of file qglpixelbuffer_win.cpp.

◆ WGL_ACCUM_BITS_ARB

#define WGL_ACCUM_BITS_ARB   0x201D

Definition at line 112 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_ACCUM_BLUE_BITS_ARB

#define WGL_ACCUM_BLUE_BITS_ARB   0x2020

Definition at line 115 of file qglpixelbuffer_win.cpp.

◆ WGL_ACCUM_GREEN_BITS_ARB

#define WGL_ACCUM_GREEN_BITS_ARB   0x201F

Definition at line 114 of file qglpixelbuffer_win.cpp.

◆ WGL_ACCUM_RED_BITS_ARB

#define WGL_ACCUM_RED_BITS_ARB   0x201E

Definition at line 113 of file qglpixelbuffer_win.cpp.

◆ WGL_ALPHA_BITS_ARB

#define WGL_ALPHA_BITS_ARB   0x201B

Definition at line 110 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_ALPHA_SHIFT_ARB

#define WGL_ALPHA_SHIFT_ARB   0x201C

Definition at line 111 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX0_ARB

#define WGL_AUX0_ARB   0x2087

Definition at line 154 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX1_ARB

#define WGL_AUX1_ARB   0x2088

Definition at line 155 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX2_ARB

#define WGL_AUX2_ARB   0x2089

Definition at line 156 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX3_ARB

#define WGL_AUX3_ARB   0x208A

Definition at line 157 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX4_ARB

#define WGL_AUX4_ARB   0x208B

Definition at line 158 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX5_ARB

#define WGL_AUX5_ARB   0x208C

Definition at line 159 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX6_ARB

#define WGL_AUX6_ARB   0x208D

Definition at line 160 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX7_ARB

#define WGL_AUX7_ARB   0x208E

Definition at line 161 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX8_ARB

#define WGL_AUX8_ARB   0x208F

Definition at line 162 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX9_ARB

#define WGL_AUX9_ARB   0x2090

Definition at line 163 of file qglpixelbuffer_win.cpp.

◆ WGL_AUX_BUFFERS_ARB

#define WGL_AUX_BUFFERS_ARB   0x2024

Definition at line 119 of file qglpixelbuffer_win.cpp.

◆ WGL_BACK_LEFT_ARB

#define WGL_BACK_LEFT_ARB   0x2085

Definition at line 152 of file qglpixelbuffer_win.cpp.

◆ WGL_BACK_RIGHT_ARB

#define WGL_BACK_RIGHT_ARB   0x2086

Definition at line 153 of file qglpixelbuffer_win.cpp.

◆ WGL_BIND_TO_TEXTURE_RGB_ARB

#define WGL_BIND_TO_TEXTURE_RGB_ARB   0x2070

Definition at line 131 of file qglpixelbuffer_win.cpp.

◆ WGL_BIND_TO_TEXTURE_RGBA_ARB

#define WGL_BIND_TO_TEXTURE_RGBA_ARB   0x2071

Definition at line 132 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_BLUE_BITS_ARB

#define WGL_BLUE_BITS_ARB   0x2019

Definition at line 108 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_BLUE_SHIFT_ARB

#define WGL_BLUE_SHIFT_ARB   0x201A

Definition at line 109 of file qglpixelbuffer_win.cpp.

◆ WGL_COLOR_BITS_ARB

#define WGL_COLOR_BITS_ARB   0x2014

Definition at line 103 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_CUBE_MAP_FACE_ARB

#define WGL_CUBE_MAP_FACE_ARB   0x207C

Definition at line 143 of file qglpixelbuffer_win.cpp.

◆ WGL_DEPTH_BITS_ARB

#define WGL_DEPTH_BITS_ARB   0x2022

Definition at line 117 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_DOUBLE_BUFFER_ARB

#define WGL_DOUBLE_BUFFER_ARB   0x2011

Definition at line 100 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_DRAW_TO_BITMAP_ARB

#define WGL_DRAW_TO_BITMAP_ARB   0x2002

Definition at line 81 of file qglpixelbuffer_win.cpp.

◆ WGL_DRAW_TO_PBUFFER_ARB

#define WGL_DRAW_TO_PBUFFER_ARB   0x202D

Definition at line 68 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_DRAW_TO_WINDOW_ARB

#define WGL_DRAW_TO_WINDOW_ARB   0x2001

Definition at line 80 of file qglpixelbuffer_win.cpp.

◆ WGL_FLOAT_COMPONENTS_NV

#define WGL_FLOAT_COMPONENTS_NV   0x20B0

Definition at line 167 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_FRONT_LEFT_ARB

#define WGL_FRONT_LEFT_ARB   0x2083

Definition at line 150 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_FRONT_RIGHT_ARB

#define WGL_FRONT_RIGHT_ARB   0x2084

Definition at line 151 of file qglpixelbuffer_win.cpp.

◆ WGL_FULL_ACCELERATION_ARB

#define WGL_FULL_ACCELERATION_ARB   0x2027

Definition at line 122 of file qglpixelbuffer_win.cpp.

◆ WGL_GENERIC_ACCELERATION_ARB

#define WGL_GENERIC_ACCELERATION_ARB   0x2026

Definition at line 121 of file qglpixelbuffer_win.cpp.

◆ WGL_GREEN_BITS_ARB

#define WGL_GREEN_BITS_ARB   0x2017

Definition at line 106 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_GREEN_SHIFT_ARB

#define WGL_GREEN_SHIFT_ARB   0x2018

Definition at line 107 of file qglpixelbuffer_win.cpp.

◆ WGL_MAX_PBUFFER_HEIGHT_ARB

#define WGL_MAX_PBUFFER_HEIGHT_ARB   0x2030

Definition at line 71 of file qglpixelbuffer_win.cpp.

◆ WGL_MAX_PBUFFER_PIXELS_ARB

#define WGL_MAX_PBUFFER_PIXELS_ARB   0x202E

Definition at line 69 of file qglpixelbuffer_win.cpp.

◆ WGL_MAX_PBUFFER_WIDTH_ARB

#define WGL_MAX_PBUFFER_WIDTH_ARB   0x202F

Definition at line 70 of file qglpixelbuffer_win.cpp.

◆ WGL_MIPMAP_LEVEL_ARB

#define WGL_MIPMAP_LEVEL_ARB   0x207B

Definition at line 142 of file qglpixelbuffer_win.cpp.

◆ WGL_MIPMAP_TEXTURE_ARB

#define WGL_MIPMAP_TEXTURE_ARB   0x2074

Definition at line 135 of file qglpixelbuffer_win.cpp.

◆ WGL_NEED_PALETTE_ARB

#define WGL_NEED_PALETTE_ARB   0x2004

Definition at line 83 of file qglpixelbuffer_win.cpp.

◆ WGL_NEED_SYSTEM_PALETTE_ARB

#define WGL_NEED_SYSTEM_PALETTE_ARB   0x2005

Definition at line 84 of file qglpixelbuffer_win.cpp.

◆ WGL_NO_ACCELERATION_ARB

#define WGL_NO_ACCELERATION_ARB   0x2025

Definition at line 120 of file qglpixelbuffer_win.cpp.

◆ WGL_NO_TEXTURE_ARB

#define WGL_NO_TEXTURE_ARB   0x2077

Definition at line 138 of file qglpixelbuffer_win.cpp.

◆ WGL_NUMBER_OVERLAYS_ARB

#define WGL_NUMBER_OVERLAYS_ARB   0x2008

Definition at line 87 of file qglpixelbuffer_win.cpp.

◆ WGL_NUMBER_PIXEL_FORMATS_ARB

#define WGL_NUMBER_PIXEL_FORMATS_ARB   0x2000

Definition at line 79 of file qglpixelbuffer_win.cpp.

◆ WGL_NUMBER_UNDERLAYS_ARB

#define WGL_NUMBER_UNDERLAYS_ARB   0x2009

Definition at line 88 of file qglpixelbuffer_win.cpp.

◆ WGL_PBUFFER_HEIGHT_ARB

#define WGL_PBUFFER_HEIGHT_ARB   0x2035

Definition at line 74 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_PBUFFER_LARGEST_ARB

#define WGL_PBUFFER_LARGEST_ARB   0x2033

Definition at line 72 of file qglpixelbuffer_win.cpp.

◆ WGL_PBUFFER_LOST_ARB

#define WGL_PBUFFER_LOST_ARB   0x2036

Definition at line 75 of file qglpixelbuffer_win.cpp.

◆ WGL_PBUFFER_WIDTH_ARB

#define WGL_PBUFFER_WIDTH_ARB   0x2034

Definition at line 73 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_PIXEL_TYPE_ARB

#define WGL_PIXEL_TYPE_ARB   0x2013

Definition at line 102 of file qglpixelbuffer_win.cpp.

◆ WGL_RED_BITS_ARB

#define WGL_RED_BITS_ARB   0x2015

Definition at line 104 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_RED_SHIFT_ARB

#define WGL_RED_SHIFT_ARB   0x2016

Definition at line 105 of file qglpixelbuffer_win.cpp.

◆ WGL_SAMPLE_BUFFERS_ARB

#define WGL_SAMPLE_BUFFERS_ARB   0x2041

Definition at line 171 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_SAMPLES_ARB

#define WGL_SAMPLES_ARB   0x2042

Definition at line 172 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_SHARE_ACCUM_ARB

#define WGL_SHARE_ACCUM_ARB   0x200E

Definition at line 97 of file qglpixelbuffer_win.cpp.

◆ WGL_SHARE_DEPTH_ARB

#define WGL_SHARE_DEPTH_ARB   0x200C

Definition at line 95 of file qglpixelbuffer_win.cpp.

◆ WGL_SHARE_STENCIL_ARB

#define WGL_SHARE_STENCIL_ARB   0x200D

Definition at line 96 of file qglpixelbuffer_win.cpp.

◆ WGL_STENCIL_BITS_ARB

#define WGL_STENCIL_BITS_ARB   0x2023

Definition at line 118 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_STEREO_ARB

#define WGL_STEREO_ARB   0x2012

Definition at line 101 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_SUPPORT_GDI_ARB

#define WGL_SUPPORT_GDI_ARB   0x200F

Definition at line 98 of file qglpixelbuffer_win.cpp.

◆ WGL_SUPPORT_OPENGL_ARB

#define WGL_SUPPORT_OPENGL_ARB   0x2010

Definition at line 99 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_SWAP_COPY_ARB

#define WGL_SWAP_COPY_ARB   0x2029

Definition at line 124 of file qglpixelbuffer_win.cpp.

◆ WGL_SWAP_EXCHANGE_ARB

#define WGL_SWAP_EXCHANGE_ARB   0x2028

Definition at line 123 of file qglpixelbuffer_win.cpp.

◆ WGL_SWAP_LAYER_BUFFERS_ARB

#define WGL_SWAP_LAYER_BUFFERS_ARB   0x2006

Definition at line 85 of file qglpixelbuffer_win.cpp.

◆ WGL_SWAP_METHOD_ARB

#define WGL_SWAP_METHOD_ARB   0x2007

Definition at line 86 of file qglpixelbuffer_win.cpp.

◆ WGL_SWAP_UNDEFINED_ARB

#define WGL_SWAP_UNDEFINED_ARB   0x202A

Definition at line 125 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_1D_ARB

#define WGL_TEXTURE_1D_ARB   0x2079

Definition at line 140 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_2D_ARB

#define WGL_TEXTURE_2D_ARB   0x207A

Definition at line 141 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_TEXTURE_CUBE_MAP_ARB

#define WGL_TEXTURE_CUBE_MAP_ARB   0x2078

Definition at line 139 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB

#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB   0x207E

Definition at line 145 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB

#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB   0x2080

Definition at line 147 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB

#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB   0x2082

Definition at line 149 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB

#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB   0x207D

Definition at line 144 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB

#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB   0x207F

Definition at line 146 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB

#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB   0x2081

Definition at line 148 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_FORMAT_ARB

#define WGL_TEXTURE_FORMAT_ARB   0x2072

Definition at line 133 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_TEXTURE_RGB_ARB

#define WGL_TEXTURE_RGB_ARB   0x2075

Definition at line 136 of file qglpixelbuffer_win.cpp.

◆ WGL_TEXTURE_RGBA_ARB

#define WGL_TEXTURE_RGBA_ARB   0x2076

Definition at line 137 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_TEXTURE_TARGET_ARB

#define WGL_TEXTURE_TARGET_ARB   0x2073

Definition at line 134 of file qglpixelbuffer_win.cpp.

Referenced by qt_format_to_attrib_list().

◆ WGL_TRANSPARENT_ALPHA_VALUE_ARB

#define WGL_TRANSPARENT_ALPHA_VALUE_ARB   0x203A

Definition at line 93 of file qglpixelbuffer_win.cpp.

◆ WGL_TRANSPARENT_ARB

#define WGL_TRANSPARENT_ARB   0x200A

Definition at line 89 of file qglpixelbuffer_win.cpp.

◆ WGL_TRANSPARENT_BLUE_VALUE_ARB

#define WGL_TRANSPARENT_BLUE_VALUE_ARB   0x2039

Definition at line 92 of file qglpixelbuffer_win.cpp.

◆ WGL_TRANSPARENT_GREEN_VALUE_ARB

#define WGL_TRANSPARENT_GREEN_VALUE_ARB   0x2038

Definition at line 91 of file qglpixelbuffer_win.cpp.

◆ WGL_TRANSPARENT_INDEX_VALUE_ARB

#define WGL_TRANSPARENT_INDEX_VALUE_ARB   0x203B

Definition at line 94 of file qglpixelbuffer_win.cpp.

◆ WGL_TRANSPARENT_RED_VALUE_ARB

#define WGL_TRANSPARENT_RED_VALUE_ARB   0x2037

Definition at line 90 of file qglpixelbuffer_win.cpp.

◆ WGL_TYPE_COLORINDEX_ARB

#define WGL_TYPE_COLORINDEX_ARB   0x202C

Definition at line 127 of file qglpixelbuffer_win.cpp.

◆ WGL_TYPE_RGBA_ARB

#define WGL_TYPE_RGBA_ARB   0x202B

Definition at line 126 of file qglpixelbuffer_win.cpp.

Typedef Documentation

◆ PFNWGLBINDTEXIMAGEARBPROC

typedef BOOL(WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer)

Definition at line 63 of file qglpixelbuffer_win.cpp.

◆ PFNWGLCHOOSEPIXELFORMATARBPROC

typedef BOOL(WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats)

Definition at line 62 of file qglpixelbuffer_win.cpp.

◆ PFNWGLCREATEPBUFFERARBPROC

typedef HPBUFFERARB(WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList)

Definition at line 55 of file qglpixelbuffer_win.cpp.

◆ PFNWGLDESTROYPBUFFERARBPROC

typedef BOOL(WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer)

Definition at line 58 of file qglpixelbuffer_win.cpp.

◆ PFNWGLGETEXTENSIONSSTRINGARBPROC

typedef const char*(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc)

Definition at line 54 of file qglpixelbuffer_win.cpp.

◆ PFNWGLGETPBUFFERDCARBPROC

typedef HDC(WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer)

Definition at line 56 of file qglpixelbuffer_win.cpp.

◆ PFNWGLGETPIXELFORMATATTRIBFVARBPROC

typedef BOOL(WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues)

Definition at line 61 of file qglpixelbuffer_win.cpp.

◆ PFNWGLGETPIXELFORMATATTRIBIVARBPROC

typedef BOOL(WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues)

Definition at line 60 of file qglpixelbuffer_win.cpp.

◆ PFNWGLQUERYPBUFFERARBPROC

typedef BOOL(WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue)

Definition at line 59 of file qglpixelbuffer_win.cpp.

◆ PFNWGLRELEASEPBUFFERDCARBPROC

typedef int(WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC)

Definition at line 57 of file qglpixelbuffer_win.cpp.

◆ PFNWGLRELEASETEXIMAGEARBPROC

typedef BOOL(WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer)

Definition at line 64 of file qglpixelbuffer_win.cpp.

◆ PFNWGLSETPBUFFERATTRIBARBPROC

typedef BOOL(WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList)

Definition at line 65 of file qglpixelbuffer_win.cpp.

Function Documentation

◆ pfiToQGLFormat()

QGLFormat pfiToQGLFormat ( HDC  hdc,
int  pfi 
)

Definition at line 572 of file qgl_win.cpp.

Referenced by qt_format_to_attrib_list(), and QGLContextPrivate::updateFormatVersion().

573 {
574  QGLFormat fmt;
575  QVarLengthArray<int> iAttributes(40);
576  QVarLengthArray<int> iValues(40);
577  int i = 0;
578  bool has_sample_buffers = QGLExtensions::glExtensions() & QGLExtensions::SampleBuffers;
579 
580  iAttributes[i++] = WGL_DOUBLE_BUFFER_ARB; // 0
581  iAttributes[i++] = WGL_DEPTH_BITS_ARB; // 1
582  iAttributes[i++] = WGL_PIXEL_TYPE_ARB; // 2
583  iAttributes[i++] = WGL_RED_BITS_ARB; // 3
584  iAttributes[i++] = WGL_GREEN_BITS_ARB; // 4
585  iAttributes[i++] = WGL_BLUE_BITS_ARB; // 5
586  iAttributes[i++] = WGL_ALPHA_BITS_ARB; // 6
587  iAttributes[i++] = WGL_ACCUM_BITS_ARB; // 7
588  iAttributes[i++] = WGL_STENCIL_BITS_ARB; // 8
589  iAttributes[i++] = WGL_STEREO_ARB; // 9
590  iAttributes[i++] = WGL_ACCELERATION_ARB; // 10
591  iAttributes[i++] = WGL_NUMBER_OVERLAYS_ARB; // 11
592  if (has_sample_buffers) {
593  iAttributes[i++] = WGL_SAMPLE_BUFFERS_ARB; // 12
594  iAttributes[i++] = WGL_SAMPLES_ARB; // 13
595  }
596  PFNWGLGETPIXELFORMATATTRIBIVARB wglGetPixelFormatAttribivARB =
597  (PFNWGLGETPIXELFORMATATTRIBIVARB) wglGetProcAddress("wglGetPixelFormatAttribivARB");
598 
599  if (wglGetPixelFormatAttribivARB
600  && wglGetPixelFormatAttribivARB(hdc, pfi, 0, i,
601  iAttributes.constData(),
602  iValues.data()))
603  {
604  fmt.setDoubleBuffer(iValues[0]);
605  fmt.setDepth(iValues[1]);
606  if (fmt.depth())
607  fmt.setDepthBufferSize(iValues[1]);
608  fmt.setRgba(iValues[2] == WGL_TYPE_RGBA_ARB);
609  fmt.setRedBufferSize(iValues[3]);
610  fmt.setGreenBufferSize(iValues[4]);
611  fmt.setBlueBufferSize(iValues[5]);
612  fmt.setAlpha(iValues[6]);
613  if (fmt.alpha())
614  fmt.setAlphaBufferSize(iValues[6]);
615  fmt.setAccum(iValues[7]);
616  if (fmt.accum())
617  fmt.setAccumBufferSize(iValues[7]);
618  fmt.setStencil(iValues[8]);
619  if (fmt.stencil())
620  fmt.setStencilBufferSize(iValues[8]);
621  fmt.setStereo(iValues[9]);
622  if (iValues[10] == WGL_FULL_ACCELERATION_ARB)
623  fmt.setDirectRendering(true);
624  else
625  fmt.setDirectRendering(false);
626  fmt.setOverlay(iValues[11]);
627  if (has_sample_buffers) {
628  fmt.setSampleBuffers(iValues[12]);
629  if (fmt.sampleBuffers())
630  fmt.setSamples(iValues[13]);
631  }
632  }
633 #if 0
634  qDebug() << "values for pfi:" << pfi;
635  qDebug() << "doublebuffer 0:" << fmt.doubleBuffer();
636  qDebug() << "depthbuffer 1:" << fmt.depthBufferSize();
637  qDebug() << "rgba 2:" << fmt.rgba();
638  qDebug() << "red size 3:" << fmt.redBufferSize();
639  qDebug() << "green size 4:" << fmt.greenBufferSize();
640  qDebug() << "blue size 5:" << fmt.blueBufferSize();
641  qDebug() << "alpha size 6:" << fmt.alphaBufferSize();
642  qDebug() << "accum size 7:" << fmt.accumBufferSize();
643  qDebug() << "stencil size 8:" << fmt.stencilBufferSize();
644  qDebug() << "stereo 9:" << fmt.stereo();
645  qDebug() << "direct 10:" << fmt.directRendering();
646  qDebug() << "has overlays 11:" << fmt.hasOverlay();
647  qDebug() << "sample buff 12:" << fmt.sampleBuffers();
648  qDebug() << "num samples 13:" << fmt.samples();
649 #endif
650  return fmt;
651 }
void setSamples(int numSamples)
Set the preferred number of samples per pixel when multisampling is enabled to numSamples.
Definition: qgl.cpp:836
void setStencil(bool enable)
If enable is true enables the stencil buffer; otherwise disables the stencil buffer.
Definition: qgl.cpp:724
bool rgba() const
Returns true if RGBA color mode is set.
Definition: qgl.h:623
void setAccumBufferSize(int size)
Set the preferred accumulation buffer size, where size is the bit depth for each RGBA component...
Definition: qgl.cpp:1143
int greenBufferSize() const
Returns the green buffer size.
Definition: qgl.cpp:1070
void setRedBufferSize(int size)
Set the preferred red buffer size to size.
Definition: qgl.cpp:1015
#define WGL_RED_BITS_ARB
Definition: qgl_win.cpp:99
#define WGL_TYPE_RGBA_ARB
Definition: qgl_win.cpp:121
void setOverlay(bool enable)
If enable is true enables an overlay plane; otherwise disables the overlay plane. ...
Definition: qgl.cpp:912
void setAlpha(bool enable)
If enable is true enables the alpha buffer; otherwise disables the alpha buffer.
Definition: qgl.cpp:664
void setSampleBuffers(bool enable)
If enable is true, a GL context with multisample buffer support is picked; otherwise ignored...
Definition: qgl.cpp:812
int redBufferSize() const
Returns the red buffer size.
Definition: qgl.cpp:1035
bool directRendering() const
Returns true if direct rendering is enabled; otherwise returns false.
Definition: qgl.h:648
void setDirectRendering(bool enable)
If enable is true enables direct rendering; otherwise disables direct rendering.
Definition: qgl.cpp:787
Q_CORE_EXPORT void qDebug(const char *,...)
bool sampleBuffers() const
Returns true if multisample buffer support is enabled; otherwise returns false.
Definition: qgl.h:658
#define WGL_GREEN_BITS_ARB
Definition: qgl_win.cpp:101
void setAlphaBufferSize(int size)
Set the preferred alpha buffer size to size.
Definition: qgl.cpp:1116
int alphaBufferSize() const
Returns the alpha buffer size.
Definition: qgl.cpp:1132
bool depth() const
Returns true if the depth buffer is enabled; otherwise returns false.
Definition: qgl.h:618
int accumBufferSize() const
Returns the accumulation buffer size.
Definition: qgl.cpp:1159
The QGLFormat class specifies the display format of an OpenGL rendering context.
Definition: qgl.h:175
int depthBufferSize() const
Returns the depth buffer size.
Definition: qgl.cpp:1000
void setDepthBufferSize(int size)
Set the minimum depth buffer size to size.
Definition: qgl.cpp:984
#define WGL_SAMPLE_BUFFERS_ARB
Definition: qgl_win.cpp:69
bool stencil() const
Returns true if the stencil buffer is enabled; otherwise returns false.
Definition: qgl.h:638
void setDoubleBuffer(bool enable)
If enable is true sets double buffering; otherwise sets single buffering.
Definition: qgl.cpp:566
void setGreenBufferSize(int size)
Set the preferred green buffer size to size.
Definition: qgl.cpp:1050
bool accum() const
Returns true if the accumulation buffer is enabled; otherwise returns false.
Definition: qgl.h:633
void setDepth(bool enable)
If enable is true enables the depth buffer; otherwise disables the depth buffer.
Definition: qgl.cpp:599
#define WGL_BLUE_BITS_ARB
Definition: qgl_win.cpp:103
void setRgba(bool enable)
If enable is true sets RGBA mode.
Definition: qgl.cpp:633
bool hasOverlay() const
Returns true if overlay plane is enabled; otherwise returns false.
Definition: qgl.h:653
#define WGL_DEPTH_BITS_ARB
Definition: qgl_win.cpp:112
#define WGL_STEREO_ARB
Definition: qgl_win.cpp:96
#define WGL_SAMPLES_ARB
Definition: qgl_win.cpp:70
bool alpha() const
Returns true if the alpha buffer in the framebuffer is enabled; otherwise returns false...
Definition: qgl.h:628
#define WGL_ACCUM_BITS_ARB
Definition: qgl_win.cpp:107
int blueBufferSize() const
Returns the blue buffer size.
Definition: qgl.cpp:1105
bool doubleBuffer() const
Returns true if double buffering is enabled; otherwise returns false.
Definition: qgl.h:613
static Extensions glExtensions()
Definition: qgl.cpp:5781
#define WGL_DOUBLE_BUFFER_ARB
Definition: qgl_win.cpp:95
void setStereo(bool enable)
If enable is true enables stereo buffering; otherwise disables stereo buffering.
Definition: qgl.cpp:754
bool(APIENTRY * PFNWGLGETPIXELFORMATATTRIBIVARB)(HDC hdc, int iPixelFormat, int iLayerPlane, uint nAttributes, const int *piAttributes, int *piValues)
Definition: qgl_win.cpp:56
#define WGL_ACCELERATION_ARB
Definition: qgl_win.cpp:77
void setBlueBufferSize(int size)
Set the preferred blue buffer size to size.
Definition: qgl.cpp:1085
#define WGL_STENCIL_BITS_ARB
Definition: qgl_win.cpp:113
int stencilBufferSize() const
Returns the stencil buffer size.
Definition: qgl.cpp:1185
bool stereo() const
Returns true if stereo buffering is enabled; otherwise returns false.
Definition: qgl.h:643
void setStencilBufferSize(int size)
Set the preferred stencil buffer size to size.
Definition: qgl.cpp:1169
int samples() const
Returns the number of samples per pixel when multisampling is enabled.
Definition: qgl.cpp:824
#define WGL_PIXEL_TYPE_ARB
Definition: qgl_win.cpp:97
#define WGL_ALPHA_BITS_ARB
Definition: qgl_win.cpp:105
#define WGL_FULL_ACCELERATION_ARB
Definition: qgl_win.cpp:117
void setAccum(bool enable)
If enable is true enables the accumulation buffer; otherwise disables the accumulation buffer...
Definition: qgl.cpp:694
#define WGL_NUMBER_OVERLAYS_ARB
Definition: qgl_win.cpp:82

◆ qt_format_to_attrib_list()

static void qt_format_to_attrib_list ( bool  has_render_texture,
const QGLFormat f,
int  attribs[] 
)
static

Definition at line 181 of file qglpixelbuffer_win.cpp.

182 {
183  int i = 0;
184  attribs[i++] = WGL_SUPPORT_OPENGL_ARB;
185  attribs[i++] = TRUE;
186  attribs[i++] = WGL_DRAW_TO_PBUFFER_ARB;
187  attribs[i++] = TRUE;
188 
189  if (has_render_texture) {
190  attribs[i++] = WGL_BIND_TO_TEXTURE_RGBA_ARB;
191  attribs[i++] = TRUE;
192  }
193 
194  attribs[i++] = WGL_COLOR_BITS_ARB;
195  attribs[i++] = 32;
196  attribs[i++] = WGL_DOUBLE_BUFFER_ARB;
197  attribs[i++] = FALSE;
198 
199  if (f.stereo()) {
200  attribs[i++] = WGL_STEREO_ARB;
201  attribs[i++] = TRUE;
202  }
203  if (f.depth()) {
204  attribs[i++] = WGL_DEPTH_BITS_ARB;
205  attribs[i++] = f.depthBufferSize() == -1 ? 24 : f.depthBufferSize();
206  }
207  if (f.redBufferSize() != -1) {
208  attribs[i++] = WGL_RED_BITS_ARB;
209  attribs[i++] = f.redBufferSize();
210  }
211  if (f.greenBufferSize() != -1) {
212  attribs[i++] = WGL_GREEN_BITS_ARB;
213  attribs[i++] = f.greenBufferSize();
214  }
215  if (f.blueBufferSize() != -1) {
216  attribs[i++] = WGL_BLUE_BITS_ARB;
217  attribs[i++] = f.blueBufferSize();
218  }
219  if (f.alpha()) {
220  attribs[i++] = WGL_ALPHA_BITS_ARB;
221  attribs[i++] = f.alphaBufferSize() == -1 ? 8 : f.alphaBufferSize();
222  }
223  if (f.accum()) {
224  attribs[i++] = WGL_ACCUM_BITS_ARB;
225  attribs[i++] = f.accumBufferSize() == -1 ? 16 : f.accumBufferSize();
226  }
227  if (f.stencil()) {
228  attribs[i++] = WGL_STENCIL_BITS_ARB;
229  attribs[i++] = f.stencilBufferSize() == -1 ? 8 : f.stencilBufferSize();
230  }
231  if ((f.redBufferSize() > 8 || f.greenBufferSize() > 8
232  || f.blueBufferSize() > 8 || f.alphaBufferSize() > 8)
234  {
235  attribs[i++] = WGL_FLOAT_COMPONENTS_NV;
236  attribs[i++] = TRUE;
237  }
238  if (f.sampleBuffers()) {
239  attribs[i++] = WGL_SAMPLE_BUFFERS_ARB;
240  attribs[i++] = 1;
241  attribs[i++] = WGL_SAMPLES_ARB;
242  attribs[i++] = f.samples() == -1 ? 16 : f.samples();
243  }
244  attribs[i] = 0;
245 }
#define WGL_ALPHA_BITS_ARB
int greenBufferSize() const
Returns the green buffer size.
Definition: qgl.cpp:1070
#define WGL_RED_BITS_ARB
#define WGL_SAMPLE_BUFFERS_ARB
int redBufferSize() const
Returns the red buffer size.
Definition: qgl.cpp:1035
#define WGL_BLUE_BITS_ARB
bool sampleBuffers() const
Returns true if multisample buffer support is enabled; otherwise returns false.
Definition: qgl.h:658
#define WGL_ACCUM_BITS_ARB
int alphaBufferSize() const
Returns the alpha buffer size.
Definition: qgl.cpp:1132
bool depth() const
Returns true if the depth buffer is enabled; otherwise returns false.
Definition: qgl.h:618
int accumBufferSize() const
Returns the accumulation buffer size.
Definition: qgl.cpp:1159
int depthBufferSize() const
Returns the depth buffer size.
Definition: qgl.cpp:1000
#define WGL_COLOR_BITS_ARB
#define WGL_FLOAT_COMPONENTS_NV
bool stencil() const
Returns true if the stencil buffer is enabled; otherwise returns false.
Definition: qgl.h:638
#define FALSE
Synonym for false.
Definition: qglobal.h:1019
bool accum() const
Returns true if the accumulation buffer is enabled; otherwise returns false.
Definition: qgl.h:633
#define WGL_BIND_TO_TEXTURE_RGBA_ARB
#define WGL_STENCIL_BITS_ARB
#define TRUE
Synonym for true.
Definition: qglobal.h:1018
#define WGL_GREEN_BITS_ARB
#define WGL_DOUBLE_BUFFER_ARB
#define WGL_SAMPLES_ARB
#define WGL_DRAW_TO_PBUFFER_ARB
#define WGL_DEPTH_BITS_ARB
bool alpha() const
Returns true if the alpha buffer in the framebuffer is enabled; otherwise returns false...
Definition: qgl.h:628
#define WGL_SUPPORT_OPENGL_ARB
#define WGL_STEREO_ARB
int blueBufferSize() const
Returns the blue buffer size.
Definition: qgl.cpp:1105
static Extensions glExtensions()
Definition: qgl.cpp:5781
int stencilBufferSize() const
Returns the stencil buffer size.
Definition: qgl.cpp:1185
bool stereo() const
Returns true if stereo buffering is enabled; otherwise returns false.
Definition: qgl.h:643
int samples() const
Returns the number of samples per pixel when multisampling is enabled.
Definition: qgl.cpp:824