DXGL r58 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r57‎ | r58 | r59 >
Date:17:15, 31 December 2011
Author:admin
Status:new
Tags:
Comment:
Add IDirect3D7::EnumZBufferFormats
Update glext.h and wglext.h
Modified paths:
  • /ddraw/glDirect3D.cpp (modified) (history)
  • /ddraw/glExtensions.cpp (modified) (history)
  • /ddraw/glExtensions.h (modified) (history)
  • /ddraw/include/GL/glext.h (modified) (history)
  • /ddraw/include/GL/wglext.h (modified) (history)
  • /dxgltest/Tests3D.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirect3D.cpp
@@ -71,8 +71,32 @@
7272 }
7373 HRESULT WINAPI glDirect3D7::EnumZBufferFormats(REFCLSID riidDevice, LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback, LPVOID lpContext)
7474 {
75 - FIXME("glDirect3D7::EnumZBufferFormats: stub");
76 - return DDERR_GENERIC;
 75+ DDPIXELFORMAT ddpf;
 76+ ZeroMemory(&ddpf,sizeof(DDPIXELFORMAT));
 77+ ddpf.dwSize = sizeof(DDPIXELFORMAT);
 78+ ddpf.dwFlags = DDPF_ZBUFFER;
 79+ ddpf.dwZBufferBitDepth = 16;
 80+ ddpf.dwZBitMask = 0xffff;
 81+ if(lpEnumCallback(&ddpf,lpContext) == D3DEMUMRET_CANCEL) return D3D_OK;
 82+ ddpf.dwZBufferBitDepth = 24;
 83+ ddpf.dwZBitMask = 0xffffff00;
 84+ if(lpEnumCallback(&ddpf,lpContext) == D3DEMUMRET_CANCEL) return D3D_OK;
 85+ ddpf.dwZBufferBitDepth = 32;
 86+ if(lpEnumCallback(&ddpf,lpContext) == D3DEMUMRET_CANCEL) return D3D_OK;
 87+ ddpf.dwZBitMask = 0xffffffff;
 88+ if(lpEnumCallback(&ddpf,lpContext) == D3DEMUMRET_CANCEL) return D3D_OK;
 89+ if(GLEXT_EXT_packed_depth_stencil || GLEXT_NV_packed_depth_stencil)
 90+ {
 91+ ddpf.dwZBufferBitDepth = 32;
 92+ ddpf.dwStencilBitDepth = 8;
 93+ ddpf.dwZBitMask = 0xffffff00;
 94+ ddpf.dwStencilBitMask = 0xff;
 95+ if(lpEnumCallback(&ddpf,lpContext) == D3DEMUMRET_CANCEL) return D3D_OK;
 96+ ddpf.dwZBitMask = 0x00ffffff;
 97+ ddpf.dwStencilBitMask = 0xff000000;
 98+ if(lpEnumCallback(&ddpf,lpContext) == D3DEMUMRET_CANCEL) return D3D_OK;
 99+ }
 100+ return D3D_OK;
77101 }
78102 HRESULT WINAPI glDirect3D7::EvictManagedTextures()
79103 {
Index: ddraw/glExtensions.cpp
@@ -54,6 +54,10 @@
5555
5656 int GLEXT_ARB_framebuffer_object = 0;
5757 int GLEXT_EXT_framebuffer_object = 0;
 58+int GLEXT_NV_packed_depth_stencil = 0;
 59+int GLEXT_EXT_packed_depth_stencil = 0;
 60+int GLEXT_ARB_depth_buffer_float = 0;
 61+int GLEXT_ARB_depth_texture = 0;
5862 int glver_major, glver_minor = 0;
5963
6064 void InitGLExt()
@@ -81,6 +85,10 @@
8286 const GLubyte *glextensions = glGetString(GL_EXTENSIONS);
8387 if(strstr((char*)glextensions,"GL_ARB_framebuffer_object")) GLEXT_ARB_framebuffer_object = 1;
8488 if(strstr((char*)glextensions,"GL_EXT_framebuffer_object")) GLEXT_EXT_framebuffer_object = 1;
 89+ if(strstr((char*)glextensions,"GL_NV_packed_depth_stencil")) GLEXT_NV_packed_depth_stencil = 1;
 90+ if(strstr((char*)glextensions,"GL_EXT_packed_depth_stencil")) GLEXT_EXT_packed_depth_stencil = 1;
 91+ if(strstr((char*)glextensions,"GL_ARB_depth_buffer_float")) GLEXT_ARB_depth_buffer_float = 1;
 92+ if(strstr((char*)glextensions,"GL_ARB_depth_texture")) GLEXT_ARB_depth_texture = 1;
8593 if(GLEXT_ARB_framebuffer_object)
8694 {
8795 glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)wglGetProcAddress("glGenFramebuffers");
Index: ddraw/glExtensions.h
@@ -19,8 +19,21 @@
2020 #ifndef _GLEXTENSIONS_H
2121 #define _GLEXTENSIONS_H
2222
 23+#ifndef GL_DEPTH_BUFFER
 24+#define GL_DEPTH_BUFFER 0x8223
 25+#endif
 26+#ifndef GL_STENCIL_BUFFER
 27+#define GL_STENCIL_BUFFER 0x8224
 28+#endif
 29+
 30+
2331 extern int GLEXT_ARB_framebuffer_object;
2432 extern int GLEXT_EXT_framebuffer_object;
 33+extern int GLEXT_NV_packed_depth_stencil;
 34+extern int GLEXT_EXT_packed_depth_stencil;
 35+extern int GLEXT_ARB_depth_buffer_float;
 36+extern int GLEXT_ARB_depth_texture;
 37+
2538 #ifdef __GNUC__
2639 #undef GLAPI
2740 #define GLAPI extern
Index: ddraw/include/GL/glext.h
@@ -6,7 +6,7 @@
77 #endif
88
99 /*
10 -** Copyright (c) 2007-2010 The Khronos Group Inc.
 10+** Copyright (c) 2007-2011 The Khronos Group Inc.
1111 **
1212 ** Permission is hereby granted, free of charge, to any person obtaining a
1313 ** copy of this software and/or associated documentation files (the
@@ -29,9 +29,9 @@
3030 */
3131
3232 /* Header file version number, required by OpenGL ABI for Linux */
33 -/* glext.h last updated $Date: 2011-04-05 23:08:32 -0700 (Tue, 05 Apr 2011) $ */
 33+/* glext.h last updated $Date: 2011-12-19 02:48:12 -0800 (Mon, 19 Dec 2011) $ */
3434 /* Current version at http://www.opengl.org/registry/ */
35 -#define GL_GLEXT_VERSION 68
 35+#define GL_GLEXT_VERSION 74
3636 /* Function declaration macros - to move into glplatform.h */
3737
3838 #if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
@@ -516,8 +516,6 @@
517517 #define GL_MINOR_VERSION 0x821C
518518 #define GL_NUM_EXTENSIONS 0x821D
519519 #define GL_CONTEXT_FLAGS 0x821E
520 -#define GL_DEPTH_BUFFER 0x8223
521 -#define GL_STENCIL_BUFFER 0x8224
522520 #define GL_COMPRESSED_RED 0x8225
523521 #define GL_COMPRESSED_RG 0x8226
524522 #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
@@ -1047,6 +1045,124 @@
10481046 /* reuse GL_UNDEFINED_VERTEX */
10491047 #endif
10501048
 1049+#ifndef GL_VERSION_4_2
 1050+/* Reuse tokens from ARB_base_instance (none) */
 1051+/* Reuse tokens from ARB_shading_language_420pack (none) */
 1052+/* Reuse tokens from ARB_transform_feedback_instanced (none) */
 1053+/* Reuse tokens from ARB_compressed_texture_pixel_storage */
 1054+/* reuse GL_UNPACK_COMPRESSED_BLOCK_WIDTH */
 1055+/* reuse GL_UNPACK_COMPRESSED_BLOCK_HEIGHT */
 1056+/* reuse GL_UNPACK_COMPRESSED_BLOCK_DEPTH */
 1057+/* reuse GL_UNPACK_COMPRESSED_BLOCK_SIZE */
 1058+/* reuse GL_PACK_COMPRESSED_BLOCK_WIDTH */
 1059+/* reuse GL_PACK_COMPRESSED_BLOCK_HEIGHT */
 1060+/* reuse GL_PACK_COMPRESSED_BLOCK_DEPTH */
 1061+/* reuse GL_PACK_COMPRESSED_BLOCK_SIZE */
 1062+/* Reuse tokens from ARB_conservative_depth (none) */
 1063+/* Reuse tokens from ARB_internalformat_query */
 1064+/* reuse GL_NUM_SAMPLE_COUNTS */
 1065+/* Reuse tokens from ARB_map_buffer_alignment */
 1066+/* reuse GL_MIN_MAP_BUFFER_ALIGNMENT */
 1067+/* Reuse tokens from ARB_shader_atomic_counters */
 1068+/* reuse GL_ATOMIC_COUNTER_BUFFER */
 1069+/* reuse GL_ATOMIC_COUNTER_BUFFER_BINDING */
 1070+/* reuse GL_ATOMIC_COUNTER_BUFFER_START */
 1071+/* reuse GL_ATOMIC_COUNTER_BUFFER_SIZE */
 1072+/* reuse GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE */
 1073+/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS */
 1074+/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES */
 1075+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER */
 1076+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER */
 1077+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER */
 1078+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER */
 1079+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER */
 1080+/* reuse GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS */
 1081+/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS */
 1082+/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS */
 1083+/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS */
 1084+/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS */
 1085+/* reuse GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS */
 1086+/* reuse GL_MAX_VERTEX_ATOMIC_COUNTERS */
 1087+/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS */
 1088+/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS */
 1089+/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTERS */
 1090+/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTERS */
 1091+/* reuse GL_MAX_COMBINED_ATOMIC_COUNTERS */
 1092+/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE */
 1093+/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS */
 1094+/* reuse GL_ACTIVE_ATOMIC_COUNTER_BUFFERS */
 1095+/* reuse GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX */
 1096+/* reuse GL_UNSIGNED_INT_ATOMIC_COUNTER */
 1097+/* Reuse tokens from ARB_shader_image_load_store */
 1098+/* reuse GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT */
 1099+/* reuse GL_ELEMENT_ARRAY_BARRIER_BIT */
 1100+/* reuse GL_UNIFORM_BARRIER_BIT */
 1101+/* reuse GL_TEXTURE_FETCH_BARRIER_BIT */
 1102+/* reuse GL_SHADER_IMAGE_ACCESS_BARRIER_BIT */
 1103+/* reuse GL_COMMAND_BARRIER_BIT */
 1104+/* reuse GL_PIXEL_BUFFER_BARRIER_BIT */
 1105+/* reuse GL_TEXTURE_UPDATE_BARRIER_BIT */
 1106+/* reuse GL_BUFFER_UPDATE_BARRIER_BIT */
 1107+/* reuse GL_FRAMEBUFFER_BARRIER_BIT */
 1108+/* reuse GL_TRANSFORM_FEEDBACK_BARRIER_BIT */
 1109+/* reuse GL_ATOMIC_COUNTER_BARRIER_BIT */
 1110+/* reuse GL_ALL_BARRIER_BITS */
 1111+/* reuse GL_MAX_IMAGE_UNITS */
 1112+/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */
 1113+/* reuse GL_IMAGE_BINDING_NAME */
 1114+/* reuse GL_IMAGE_BINDING_LEVEL */
 1115+/* reuse GL_IMAGE_BINDING_LAYERED */
 1116+/* reuse GL_IMAGE_BINDING_LAYER */
 1117+/* reuse GL_IMAGE_BINDING_ACCESS */
 1118+/* reuse GL_IMAGE_1D */
 1119+/* reuse GL_IMAGE_2D */
 1120+/* reuse GL_IMAGE_3D */
 1121+/* reuse GL_IMAGE_2D_RECT */
 1122+/* reuse GL_IMAGE_CUBE */
 1123+/* reuse GL_IMAGE_BUFFER */
 1124+/* reuse GL_IMAGE_1D_ARRAY */
 1125+/* reuse GL_IMAGE_2D_ARRAY */
 1126+/* reuse GL_IMAGE_CUBE_MAP_ARRAY */
 1127+/* reuse GL_IMAGE_2D_MULTISAMPLE */
 1128+/* reuse GL_IMAGE_2D_MULTISAMPLE_ARRAY */
 1129+/* reuse GL_INT_IMAGE_1D */
 1130+/* reuse GL_INT_IMAGE_2D */
 1131+/* reuse GL_INT_IMAGE_3D */
 1132+/* reuse GL_INT_IMAGE_2D_RECT */
 1133+/* reuse GL_INT_IMAGE_CUBE */
 1134+/* reuse GL_INT_IMAGE_BUFFER */
 1135+/* reuse GL_INT_IMAGE_1D_ARRAY */
 1136+/* reuse GL_INT_IMAGE_2D_ARRAY */
 1137+/* reuse GL_INT_IMAGE_CUBE_MAP_ARRAY */
 1138+/* reuse GL_INT_IMAGE_2D_MULTISAMPLE */
 1139+/* reuse GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY */
 1140+/* reuse GL_UNSIGNED_INT_IMAGE_1D */
 1141+/* reuse GL_UNSIGNED_INT_IMAGE_2D */
 1142+/* reuse GL_UNSIGNED_INT_IMAGE_3D */
 1143+/* reuse GL_UNSIGNED_INT_IMAGE_2D_RECT */
 1144+/* reuse GL_UNSIGNED_INT_IMAGE_CUBE */
 1145+/* reuse GL_UNSIGNED_INT_IMAGE_BUFFER */
 1146+/* reuse GL_UNSIGNED_INT_IMAGE_1D_ARRAY */
 1147+/* reuse GL_UNSIGNED_INT_IMAGE_2D_ARRAY */
 1148+/* reuse GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY */
 1149+/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE */
 1150+/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY */
 1151+/* reuse GL_MAX_IMAGE_SAMPLES */
 1152+/* reuse GL_IMAGE_BINDING_FORMAT */
 1153+/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */
 1154+/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE */
 1155+/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS */
 1156+/* reuse GL_MAX_VERTEX_IMAGE_UNIFORMS */
 1157+/* reuse GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS */
 1158+/* reuse GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS */
 1159+/* reuse GL_MAX_GEOMETRY_IMAGE_UNIFORMS */
 1160+/* reuse GL_MAX_FRAGMENT_IMAGE_UNIFORMS */
 1161+/* reuse GL_MAX_COMBINED_IMAGE_UNIFORMS */
 1162+/* Reuse tokens from ARB_shading_language_packing (none) */
 1163+/* Reuse tokens from ARB_texture_storage */
 1164+/* reuse GL_TEXTURE_IMMUTABLE_FORMAT */
 1165+#endif
 1166+
10511167 #ifndef GL_ARB_multitexture
10521168 #define GL_TEXTURE0_ARB 0x84C0
10531169 #define GL_TEXTURE1_ARB 0x84C1
@@ -2140,6 +2256,143 @@
21412257 #ifndef GL_ARB_shader_stencil_export
21422258 #endif
21432259
 2260+#ifndef GL_ARB_base_instance
 2261+#endif
 2262+
 2263+#ifndef GL_ARB_shading_language_420pack
 2264+#endif
 2265+
 2266+#ifndef GL_ARB_transform_feedback_instanced
 2267+#endif
 2268+
 2269+#ifndef GL_ARB_compressed_texture_pixel_storage
 2270+#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
 2271+#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
 2272+#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
 2273+#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
 2274+#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
 2275+#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
 2276+#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
 2277+#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
 2278+#endif
 2279+
 2280+#ifndef GL_ARB_conservative_depth
 2281+#endif
 2282+
 2283+#ifndef GL_ARB_internalformat_query
 2284+#define GL_NUM_SAMPLE_COUNTS 0x9380
 2285+#endif
 2286+
 2287+#ifndef GL_ARB_map_buffer_alignment
 2288+#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
 2289+#endif
 2290+
 2291+#ifndef GL_ARB_shader_atomic_counters
 2292+#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
 2293+#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
 2294+#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
 2295+#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
 2296+#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
 2297+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
 2298+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
 2299+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
 2300+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
 2301+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
 2302+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
 2303+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
 2304+#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
 2305+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
 2306+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
 2307+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
 2308+#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
 2309+#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
 2310+#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
 2311+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
 2312+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
 2313+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
 2314+#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
 2315+#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
 2316+#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
 2317+#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
 2318+#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
 2319+#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
 2320+#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
 2321+#endif
 2322+
 2323+#ifndef GL_ARB_shader_image_load_store
 2324+#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
 2325+#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
 2326+#define GL_UNIFORM_BARRIER_BIT 0x00000004
 2327+#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
 2328+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
 2329+#define GL_COMMAND_BARRIER_BIT 0x00000040
 2330+#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
 2331+#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
 2332+#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
 2333+#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
 2334+#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
 2335+#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
 2336+#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
 2337+#define GL_MAX_IMAGE_UNITS 0x8F38
 2338+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
 2339+#define GL_IMAGE_BINDING_NAME 0x8F3A
 2340+#define GL_IMAGE_BINDING_LEVEL 0x8F3B
 2341+#define GL_IMAGE_BINDING_LAYERED 0x8F3C
 2342+#define GL_IMAGE_BINDING_LAYER 0x8F3D
 2343+#define GL_IMAGE_BINDING_ACCESS 0x8F3E
 2344+#define GL_IMAGE_1D 0x904C
 2345+#define GL_IMAGE_2D 0x904D
 2346+#define GL_IMAGE_3D 0x904E
 2347+#define GL_IMAGE_2D_RECT 0x904F
 2348+#define GL_IMAGE_CUBE 0x9050
 2349+#define GL_IMAGE_BUFFER 0x9051
 2350+#define GL_IMAGE_1D_ARRAY 0x9052
 2351+#define GL_IMAGE_2D_ARRAY 0x9053
 2352+#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
 2353+#define GL_IMAGE_2D_MULTISAMPLE 0x9055
 2354+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
 2355+#define GL_INT_IMAGE_1D 0x9057
 2356+#define GL_INT_IMAGE_2D 0x9058
 2357+#define GL_INT_IMAGE_3D 0x9059
 2358+#define GL_INT_IMAGE_2D_RECT 0x905A
 2359+#define GL_INT_IMAGE_CUBE 0x905B
 2360+#define GL_INT_IMAGE_BUFFER 0x905C
 2361+#define GL_INT_IMAGE_1D_ARRAY 0x905D
 2362+#define GL_INT_IMAGE_2D_ARRAY 0x905E
 2363+#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
 2364+#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
 2365+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
 2366+#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
 2367+#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
 2368+#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
 2369+#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
 2370+#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
 2371+#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
 2372+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
 2373+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
 2374+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
 2375+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
 2376+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
 2377+#define GL_MAX_IMAGE_SAMPLES 0x906D
 2378+#define GL_IMAGE_BINDING_FORMAT 0x906E
 2379+#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
 2380+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
 2381+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
 2382+#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
 2383+#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
 2384+#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
 2385+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
 2386+#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
 2387+#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
 2388+#endif
 2389+
 2390+#ifndef GL_ARB_shading_language_packing
 2391+#endif
 2392+
 2393+#ifndef GL_ARB_texture_storage
 2394+#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
 2395+#endif
 2396+
21442397 #ifndef GL_EXT_abgr
21452398 #define GL_ABGR_EXT 0x8000
21462399 #endif
@@ -5042,7 +5295,27 @@
50435296 #define GL_FACTOR_MAX_AMD 0x901D
50445297 #endif
50455298
 5299+#ifndef GL_AMD_sample_positions
 5300+#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F
 5301+#endif
50465302
 5303+#ifndef GL_EXT_x11_sync_object
 5304+#define GL_SYNC_X11_FENCE_EXT 0x90E1
 5305+#endif
 5306+
 5307+#ifndef GL_AMD_multi_draw_indirect
 5308+#endif
 5309+
 5310+#ifndef GL_EXT_framebuffer_multisample_blit_scaled
 5311+#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA
 5312+#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB
 5313+#endif
 5314+
 5315+#ifndef GL_AMD_pinned_memory
 5316+#define GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD 0x9160
 5317+#endif
 5318+
 5319+
50475320 /*************************************************************/
50485321
50495322 #include <stddef.h>
@@ -5901,7 +6174,7 @@
59026175
59036176 #ifndef GL_VERSION_4_1
59046177 #define GL_VERSION_4_1 1
5905 -/* OpenGL 4.1 also reuses entry points from these extensions: */
 6178+/* OpenGL 4.1 reuses entry points from these extensions: */
59066179 /* ARB_ES2_compatibility */
59076180 /* ARB_get_program_binary */
59086181 /* ARB_separate_shader_objects */
@@ -5910,6 +6183,22 @@
59116184 /* ARB_viewport_array */
59126185 #endif
59136186
 6187+#ifndef GL_VERSION_4_2
 6188+#define GL_VERSION_4_2 1
 6189+/* OpenGL 4.2 reuses entry points from these extensions: */
 6190+/* ARB_base_instance */
 6191+/* ARB_shading_language_420pack (no entry points) */
 6192+/* ARB_transform_feedback_instanced */
 6193+/* ARB_compressed_texture_pixel_storage (no entry points) */
 6194+/* ARB_conservative_depth (no entry points) */
 6195+/* ARB_internalformat_query */
 6196+/* ARB_map_buffer_alignment (no entry points) */
 6197+/* ARB_shader_atomic_counters */
 6198+/* ARB_shader_image_load_store */
 6199+/* ARB_shading_language_packing (no entry points) */
 6200+/* ARB_texture_storage */
 6201+#endif
 6202+
59146203 #ifndef GL_ARB_multitexture
59156204 #define GL_ARB_multitexture 1
59166205 #ifdef GL_GLEXT_PROTOTYPES
@@ -6835,6 +7124,10 @@
68367125 typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
68377126 #endif
68387127
 7128+#ifndef GL_ARB_shader_bit_encoding
 7129+#define GL_ARB_shader_bit_encoding 1
 7130+#endif
 7131+
68397132 #ifndef GL_ARB_texture_rgb10_a2ui
68407133 #define GL_ARB_texture_rgb10_a2ui 1
68417134 #endif
@@ -7341,6 +7634,92 @@
73427635 #define GL_ARB_shader_stencil_export 1
73437636 #endif
73447637
 7638+#ifndef GL_ARB_base_instance
 7639+#define GL_ARB_base_instance 1
 7640+#ifdef GL_GLEXT_PROTOTYPES
 7641+GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance);
 7642+GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance);
 7643+GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance);
 7644+#endif /* GL_GLEXT_PROTOTYPES */
 7645+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance);
 7646+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance);
 7647+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance);
 7648+#endif
 7649+
 7650+#ifndef GL_ARB_shading_language_420pack
 7651+#define GL_ARB_shading_language_420pack 1
 7652+#endif
 7653+
 7654+#ifndef GL_ARB_transform_feedback_instanced
 7655+#define GL_ARB_transform_feedback_instanced 1
 7656+#ifdef GL_GLEXT_PROTOTYPES
 7657+GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei primcount);
 7658+GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei primcount);
 7659+#endif /* GL_GLEXT_PROTOTYPES */
 7660+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei primcount);
 7661+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei primcount);
 7662+#endif
 7663+
 7664+#ifndef GL_ARB_compressed_texture_pixel_storage
 7665+#define GL_ARB_compressed_texture_pixel_storage 1
 7666+#endif
 7667+
 7668+#ifndef GL_ARB_conservative_depth
 7669+#define GL_ARB_conservative_depth 1
 7670+#endif
 7671+
 7672+#ifndef GL_ARB_internalformat_query
 7673+#define GL_ARB_internalformat_query 1
 7674+#ifdef GL_GLEXT_PROTOTYPES
 7675+GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
 7676+#endif /* GL_GLEXT_PROTOTYPES */
 7677+typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
 7678+#endif
 7679+
 7680+#ifndef GL_ARB_map_buffer_alignment
 7681+#define GL_ARB_map_buffer_alignment 1
 7682+#endif
 7683+
 7684+#ifndef GL_ARB_shader_atomic_counters
 7685+#define GL_ARB_shader_atomic_counters 1
 7686+#ifdef GL_GLEXT_PROTOTYPES
 7687+GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
 7688+#endif /* GL_GLEXT_PROTOTYPES */
 7689+typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
 7690+#endif
 7691+
 7692+#ifndef GL_ARB_shader_image_load_store
 7693+#define GL_ARB_shader_image_load_store 1
 7694+#ifdef GL_GLEXT_PROTOTYPES
 7695+GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
 7696+GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);
 7697+#endif /* GL_GLEXT_PROTOTYPES */
 7698+typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
 7699+typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
 7700+#endif
 7701+
 7702+#ifndef GL_ARB_shading_language_packing
 7703+#define GL_ARB_shading_language_packing 1
 7704+#endif
 7705+
 7706+#ifndef GL_ARB_texture_storage
 7707+#define GL_ARB_texture_storage 1
 7708+#ifdef GL_GLEXT_PROTOTYPES
 7709+GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
 7710+GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
 7711+GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
 7712+GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
 7713+GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
 7714+GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
 7715+#endif /* GL_GLEXT_PROTOTYPES */
 7716+typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
 7717+typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
 7718+typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
 7719+typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
 7720+typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
 7721+typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
 7722+#endif
 7723+
73457724 #ifndef GL_EXT_abgr
73467725 #define GL_EXT_abgr 1
73477726 #endif
@@ -11073,7 +11452,41 @@
1107411453 #define GL_AMD_blend_minmax_factor 1
1107511454 #endif
1107611455
 11456+#ifndef GL_AMD_sample_positions
 11457+#define GL_AMD_sample_positions 1
 11458+#ifdef GL_GLEXT_PROTOTYPES
 11459+GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val);
 11460+#endif /* GL_GLEXT_PROTOTYPES */
 11461+typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val);
 11462+#endif
1107711463
 11464+#ifndef GL_EXT_x11_sync_object
 11465+#define GL_EXT_x11_sync_object 1
 11466+#ifdef GL_GLEXT_PROTOTYPES
 11467+GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
 11468+#endif /* GL_GLEXT_PROTOTYPES */
 11469+typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags);
 11470+#endif
 11471+
 11472+#ifndef GL_AMD_multi_draw_indirect
 11473+#define GL_AMD_multi_draw_indirect 1
 11474+#ifdef GL_GLEXT_PROTOTYPES
 11475+GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride);
 11476+GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride);
 11477+#endif /* GL_GLEXT_PROTOTYPES */
 11478+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride);
 11479+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride);
 11480+#endif
 11481+
 11482+#ifndef GL_EXT_framebuffer_multisample_blit_scaled
 11483+#define GL_EXT_framebuffer_multisample_blit_scaled 1
 11484+#endif
 11485+
 11486+#ifndef GL_AMD_pinned_memory
 11487+#define GL_AMD_pinned_memory 1
 11488+#endif
 11489+
 11490+
1107811491 #ifdef __cplusplus
1107911492 }
1108011493 #endif
Index: ddraw/include/GL/wglext.h
@@ -6,7 +6,7 @@
77 #endif
88
99 /*
10 -** Copyright (c) 2007-2010 The Khronos Group Inc.
 10+** Copyright (c) 2007-2011 The Khronos Group Inc.
1111 **
1212 ** Permission is hereby granted, free of charge, to any person obtaining a
1313 ** copy of this software and/or associated documentation files (the
Index: dxgltest/Tests3D.cpp
@@ -223,12 +223,12 @@
224224 return;
225225 }
226226 if(resizable)
227 - hWnd = CreateWindowEx(WS_EX_APPWINDOW,wndclassname3d,_T("DDraw Test Window"),WS_OVERLAPPEDWINDOW,
 227+ hWnd = CreateWindowEx(WS_EX_APPWINDOW,wndclassname3d,_T("D3D Test Window"),WS_OVERLAPPEDWINDOW,
228228 CW_USEDEFAULT,CW_USEDEFAULT,width,height,NULL,NULL,hinstance,NULL);
229229 else if(!fullscreen)
230 - hWnd = CreateWindowEx(WS_EX_APPWINDOW,wndclassname3d,_T("DDraw Test Window"),WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX,
 230+ hWnd = CreateWindowEx(WS_EX_APPWINDOW,wndclassname3d,_T("D3D Test Window"),WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX,
231231 CW_USEDEFAULT,CW_USEDEFAULT,width,height,NULL,NULL,hinstance,NULL);
232 - else hWnd = CreateWindowEx(WS_EX_TOPMOST,wndclassname3d,_T("DDraw Test Window"),WS_POPUP,0,0,
 232+ else hWnd = CreateWindowEx(WS_EX_TOPMOST,wndclassname3d,_T("D3D Test Window"),WS_POPUP,0,0,
233233 GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN),NULL,NULL,hinstance,NULL);
234234
235235 DWORD err = GetLastError();