ReactOS 0.4.15-dev-8433-ge87f1d5
util.c
Go to the documentation of this file.
1#ifdef __REACTOS__
2#include "precomp.h"
3#else
4/*
5 * Copyright (C) 2009 Tony Wasserka
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 *
21 */
22
23
24#include "d3dx9_private.h"
25#endif /* __REACTOS__ */
26
28
29static void la_from_rgba(const struct vec4 *rgba, struct vec4 *la)
30{
31 la->x = rgba->x * 0.2125f + rgba->y * 0.7154f + rgba->z * 0.0721f;
32 la->w = rgba->w;
33}
34
35static void la_to_rgba(const struct vec4 *la, struct vec4 *rgba, const PALETTEENTRY *palette)
36{
37 rgba->x = la->x;
38 rgba->y = la->x;
39 rgba->z = la->x;
40 rgba->w = la->w;
41}
42
43static void index_to_rgba(const struct vec4 *index, struct vec4 *rgba, const PALETTEENTRY *palette)
44{
45 ULONG idx = (ULONG)(index->x * 255.0f + 0.5f);
46
47 rgba->x = palette[idx].peRed / 255.0f;
48 rgba->y = palette[idx].peGreen / 255.0f;
49 rgba->z = palette[idx].peBlue / 255.0f;
50 rgba->w = palette[idx].peFlags / 255.0f; /* peFlags is the alpha component in DX8 and higher */
51}
52
53/************************************************************
54 * pixel format table providing info about number of bytes per pixel,
55 * number of bits per channel and format type.
56 *
57 * Call get_format_info to request information about a specific format.
58 */
59static const struct pixel_format_desc formats[] =
60{
61 /* format bpc shifts bpp blocks type from_rgba to_rgba */
62 {D3DFMT_R8G8B8, { 0, 8, 8, 8}, { 0, 16, 8, 0}, 3, 1, 1, 3, FORMAT_ARGB, NULL, NULL },
63 {D3DFMT_A8R8G8B8, { 8, 8, 8, 8}, {24, 16, 8, 0}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL },
64 {D3DFMT_X8R8G8B8, { 0, 8, 8, 8}, { 0, 16, 8, 0}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL },
65 {D3DFMT_A8B8G8R8, { 8, 8, 8, 8}, {24, 0, 8, 16}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL },
66 {D3DFMT_X8B8G8R8, { 0, 8, 8, 8}, { 0, 0, 8, 16}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL },
67 {D3DFMT_R5G6B5, { 0, 5, 6, 5}, { 0, 11, 5, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL },
68 {D3DFMT_X1R5G5B5, { 0, 5, 5, 5}, { 0, 10, 5, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL },
69 {D3DFMT_A1R5G5B5, { 1, 5, 5, 5}, {15, 10, 5, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL },
70 {D3DFMT_R3G3B2, { 0, 3, 3, 2}, { 0, 5, 2, 0}, 1, 1, 1, 1, FORMAT_ARGB, NULL, NULL },
71 {D3DFMT_A8R3G3B2, { 8, 3, 3, 2}, { 8, 5, 2, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL },
72 {D3DFMT_A4R4G4B4, { 4, 4, 4, 4}, {12, 8, 4, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL },
73 {D3DFMT_X4R4G4B4, { 0, 4, 4, 4}, { 0, 8, 4, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL },
74 {D3DFMT_A2R10G10B10, { 2, 10, 10, 10}, {30, 20, 10, 0}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL },
75 {D3DFMT_A2B10G10R10, { 2, 10, 10, 10}, {30, 0, 10, 20}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL },
76 {D3DFMT_A16B16G16R16, {16, 16, 16, 16}, {48, 0, 16, 32}, 8, 1, 1, 8, FORMAT_ARGB, NULL, NULL },
77 {D3DFMT_G16R16, { 0, 16, 16, 0}, { 0, 0, 16, 0}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL },
78 {D3DFMT_A8, { 8, 0, 0, 0}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_ARGB, NULL, NULL },
79 {D3DFMT_A8L8, { 8, 8, 0, 0}, { 8, 0, 0, 0}, 2, 1, 1, 2, FORMAT_ARGB, la_from_rgba, la_to_rgba},
80 {D3DFMT_A4L4, { 4, 4, 0, 0}, { 4, 0, 0, 0}, 1, 1, 1, 1, FORMAT_ARGB, la_from_rgba, la_to_rgba},
81 {D3DFMT_L8, { 0, 8, 0, 0}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_ARGB, la_from_rgba, la_to_rgba},
82 {D3DFMT_L16, { 0, 16, 0, 0}, { 0, 0, 0, 0}, 2, 1, 1, 2, FORMAT_ARGB, la_from_rgba, la_to_rgba},
83 {D3DFMT_DXT1, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 8, FORMAT_DXT, NULL, NULL },
84 {D3DFMT_DXT2, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL },
85 {D3DFMT_DXT3, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL },
86 {D3DFMT_DXT4, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL },
87 {D3DFMT_DXT5, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL },
88 {D3DFMT_R16F, { 0, 16, 0, 0}, { 0, 0, 0, 0}, 2, 1, 1, 2, FORMAT_ARGBF16, NULL, NULL },
89 {D3DFMT_G16R16F, { 0, 16, 16, 0}, { 0, 0, 16, 0}, 4, 1, 1, 4, FORMAT_ARGBF16, NULL, NULL },
90 {D3DFMT_A16B16G16R16F, {16, 16, 16, 16}, {48, 0, 16, 32}, 8, 1, 1, 8, FORMAT_ARGBF16, NULL, NULL },
91 {D3DFMT_R32F, { 0, 32, 0, 0}, { 0, 0, 0, 0}, 4, 1, 1, 4, FORMAT_ARGBF, NULL, NULL },
92 {D3DFMT_G32R32F, { 0, 32, 32, 0}, { 0, 0, 32, 0}, 8, 1, 1, 8, FORMAT_ARGBF, NULL, NULL },
93 {D3DFMT_A32B32G32R32F, {32, 32, 32, 32}, {96, 0, 32, 64}, 16, 1, 1, 16, FORMAT_ARGBF, NULL, NULL },
94 {D3DFMT_P8, { 8, 8, 8, 8}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_INDEX, NULL, index_to_rgba},
95 {D3DFMT_X8L8V8U8, { 0, 8, 8, 8}, { 0, 0, 8, 16}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL },
96 /* marks last element */
97 {D3DFMT_UNKNOWN, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 0, 1, 1, 0, FORMAT_UNKNOWN, NULL, NULL },
98};
99
100
101/************************************************************
102 * map_view_of_file
103 *
104 * Loads a file into buffer and stores the number of read bytes in length.
105 *
106 * PARAMS
107 * filename [I] name of the file to be loaded
108 * buffer [O] pointer to destination buffer
109 * length [O] size of the obtained data
110 *
111 * RETURNS
112 * Success: D3D_OK
113 * Failure:
114 * see error codes for CreateFileW, GetFileSize, CreateFileMapping and MapViewOfFile
115 *
116 * NOTES
117 * The caller must UnmapViewOfFile when it doesn't need the data anymore
118 *
119 */
121{
122 HANDLE hfile, hmapping = NULL;
123
125 if(hfile == INVALID_HANDLE_VALUE) goto error;
126
127 *length = GetFileSize(hfile, NULL);
128 if(*length == INVALID_FILE_SIZE) goto error;
129
130 hmapping = CreateFileMappingW(hfile, NULL, PAGE_READONLY, 0, 0, NULL);
131 if(!hmapping) goto error;
132
133 *buffer = MapViewOfFile(hmapping, FILE_MAP_READ, 0, 0, 0);
134 if(*buffer == NULL) goto error;
135
136 CloseHandle(hmapping);
137 CloseHandle(hfile);
138
139 return S_OK;
140
141error:
142 if (hmapping)
143 CloseHandle(hmapping);
144 if (hfile != INVALID_HANDLE_VALUE)
145 CloseHandle(hfile);
147}
148
149/************************************************************
150 * load_resource_into_memory
151 *
152 * Loads a resource into buffer and stores the number of
153 * read bytes in length.
154 *
155 * PARAMS
156 * module [I] handle to the module
157 * resinfo [I] handle to the resource's information block
158 * buffer [O] pointer to destination buffer
159 * length [O] size of the obtained data
160 *
161 * RETURNS
162 * Success: D3D_OK
163 * Failure:
164 * See error codes for SizeofResource, LoadResource and LockResource
165 *
166 * NOTES
167 * The memory doesn't need to be freed by the caller manually
168 *
169 */
171{
173
174 *length = SizeofResource(module, resinfo);
175 if(*length == 0) return HRESULT_FROM_WIN32(GetLastError());
176
177 resource = LoadResource(module, resinfo);
179
181 if(*buffer == NULL) return HRESULT_FROM_WIN32(GetLastError());
182
183 return S_OK;
184}
185
187{
188 HRESULT hr = S_OK;
189 void *buffer_pointer;
191 DWORD bytes_written;
195
196 buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer);
198
199 if (!WriteFile(file, buffer_pointer, buffer_size, &bytes_written, NULL))
201
203 return hr;
204}
205
206
207/************************************************************
208 * get_format_info
209 *
210 * Returns information about the specified format.
211 * If the format is unsupported, it's filled with the D3DFMT_UNKNOWN desc.
212 *
213 * PARAMS
214 * format [I] format whose description is queried
215 *
216 */
218{
219 unsigned int i = 0;
220 while(formats[i].format != format && formats[i].format != D3DFMT_UNKNOWN) i++;
222 FIXME("Unknown format %#x (as FOURCC %s).\n", format, debugstr_an((const char *)&format, 4));
223 return &formats[i];
224}
225
227{
228 if(idx >= ARRAY_SIZE(formats))
229 return NULL;
231 return NULL;
232 return &formats[idx];
233}
234
235#define WINE_D3DX_TO_STR(x) case x: return #x
236
238{
239 switch (c)
240 {
247 default:
248 FIXME("Unrecognized D3DXPARAMETER_CLASS %#x.\n", c);
249 return "unrecognized";
250 }
251}
252
254{
255 switch (t)
256 {
277 default:
278 FIXME("Unrecognized D3DXPARAMETER_TYP %#x.\n", t);
279 return "unrecognized";
280 }
281}
282
284{
285 switch (r)
286 {
291 default:
292 FIXME("Unrecognized D3DXREGISTER_SET %#x.\n", r);
293 return "unrecognized";
294 }
295}
296
297#undef WINE_D3DX_TO_STR
298
299/***********************************************************************
300 * D3DXDebugMute
301 * Returns always FALSE for us.
302 */
304{
305 return FALSE;
306}
307
308/***********************************************************************
309 * D3DXGetDriverLevel.
310 * Returns always 900 (DX 9) for us
311 */
312UINT WINAPI D3DXGetDriverLevel(struct IDirect3DDevice9 *device)
313{
314 return 900;
315}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:33
#define FIXME(fmt,...)
Definition: precomp.h:53
@ D3DFMT_DXT5
Definition: d3d8types.h:638
@ D3DFMT_A1R5G5B5
Definition: d3d8types.h:608
@ D3DFMT_X1R5G5B5
Definition: d3d8types.h:607
@ D3DFMT_DXT2
Definition: d3d8types.h:635
@ D3DFMT_R8G8B8
Definition: d3d8types.h:603
@ D3DFMT_R3G3B2
Definition: d3d8types.h:610
@ D3DFMT_A8L8
Definition: d3d8types.h:621
@ D3DFMT_A8R8G8B8
Definition: d3d8types.h:604
@ D3DFMT_A2B10G10R10
Definition: d3d8types.h:614
@ D3DFMT_X8L8V8U8
Definition: d3d8types.h:626
@ D3DFMT_A8
Definition: d3d8types.h:611
@ D3DFMT_DXT1
Definition: d3d8types.h:634
@ D3DFMT_X4R4G4B4
Definition: d3d8types.h:613
@ D3DFMT_R5G6B5
Definition: d3d8types.h:606
@ D3DFMT_A8R3G3B2
Definition: d3d8types.h:612
@ D3DFMT_DXT4
Definition: d3d8types.h:637
@ D3DFMT_A4R4G4B4
Definition: d3d8types.h:609
@ D3DFMT_P8
Definition: d3d8types.h:618
@ D3DFMT_UNKNOWN
Definition: d3d8types.h:601
@ D3DFMT_DXT3
Definition: d3d8types.h:636
@ D3DFMT_X8R8G8B8
Definition: d3d8types.h:605
@ D3DFMT_L8
Definition: d3d8types.h:620
@ D3DFMT_G16R16
Definition: d3d8types.h:615
@ D3DFMT_A4L4
Definition: d3d8types.h:622
enum _D3DFORMAT D3DFORMAT
@ D3DFMT_A32B32G32R32F
Definition: d3d9types.h:836
@ D3DFMT_A16B16G16R16F
Definition: d3d9types.h:831
@ D3DFMT_R32F
Definition: d3d9types.h:834
@ D3DFMT_X8B8G8R8
Definition: d3d9types.h:777
@ D3DFMT_A2R10G10B10
Definition: d3d9types.h:779
@ D3DFMT_G32R32F
Definition: d3d9types.h:835
@ D3DFMT_A8B8G8R8
Definition: d3d9types.h:776
@ D3DFMT_A16B16G16R16
Definition: d3d9types.h:780
@ D3DFMT_L16
Definition: d3d9types.h:815
@ D3DFMT_G16R16F
Definition: d3d9types.h:830
@ D3DFMT_R16F
Definition: d3d9types.h:829
struct ID3DXBuffer ID3DXBuffer
Definition: d3dx8core.h:51
@ FORMAT_ARGBF16
Definition: d3dx9_private.h:51
@ FORMAT_ARGB
Definition: d3dx9_private.h:50
@ FORMAT_ARGBF
Definition: d3dx9_private.h:52
@ FORMAT_INDEX
Definition: d3dx9_private.h:54
@ FORMAT_DXT
Definition: d3dx9_private.h:53
#define ID3DXBuffer_GetBufferSize(p)
Definition: d3dx9core.h:86
#define ID3DXBuffer_GetBufferPointer(p)
Definition: d3dx9core.h:85
D3DXPARAMETER_CLASS
Definition: d3dx9shader.h:61
@ D3DXPC_SCALAR
Definition: d3dx9shader.h:62
@ D3DXPC_MATRIX_COLUMNS
Definition: d3dx9shader.h:65
@ D3DXPC_STRUCT
Definition: d3dx9shader.h:67
@ D3DXPC_MATRIX_ROWS
Definition: d3dx9shader.h:64
@ D3DXPC_VECTOR
Definition: d3dx9shader.h:63
@ D3DXPC_OBJECT
Definition: d3dx9shader.h:66
@ D3DXRS_FLOAT4
Definition: d3dx9shader.h:55
@ D3DXRS_BOOL
Definition: d3dx9shader.h:53
@ D3DXRS_INT4
Definition: d3dx9shader.h:54
@ D3DXRS_SAMPLER
Definition: d3dx9shader.h:56
enum _D3DXREGISTER_SET D3DXREGISTER_SET
D3DXPARAMETER_TYPE
Definition: d3dx9shader.h:72
@ D3DXPT_STRING
Definition: d3dx9shader.h:77
@ D3DXPT_TEXTURE
Definition: d3dx9shader.h:78
@ D3DXPT_SAMPLER3D
Definition: d3dx9shader.h:86
@ D3DXPT_UNSUPPORTED
Definition: d3dx9shader.h:92
@ D3DXPT_VERTEXSHADER
Definition: d3dx9shader.h:89
@ D3DXPT_VERTEXFRAGMENT
Definition: d3dx9shader.h:91
@ D3DXPT_TEXTURE1D
Definition: d3dx9shader.h:79
@ D3DXPT_SAMPLERCUBE
Definition: d3dx9shader.h:87
@ D3DXPT_FLOAT
Definition: d3dx9shader.h:76
@ D3DXPT_TEXTURECUBE
Definition: d3dx9shader.h:82
@ D3DXPT_PIXELSHADER
Definition: d3dx9shader.h:88
@ D3DXPT_PIXELFRAGMENT
Definition: d3dx9shader.h:90
@ D3DXPT_BOOL
Definition: d3dx9shader.h:74
@ D3DXPT_INT
Definition: d3dx9shader.h:75
@ D3DXPT_VOID
Definition: d3dx9shader.h:73
@ D3DXPT_SAMPLER
Definition: d3dx9shader.h:83
@ D3DXPT_SAMPLER1D
Definition: d3dx9shader.h:84
@ D3DXPT_SAMPLER2D
Definition: d3dx9shader.h:85
@ D3DXPT_TEXTURE3D
Definition: d3dx9shader.h:81
@ D3DXPT_TEXTURE2D
Definition: d3dx9shader.h:80
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
const struct pixel_format_desc * get_format_info(D3DFORMAT format)
Definition: util.c:217
static const struct pixel_format_desc formats[]
Definition: util.c:59
HRESULT map_view_of_file(const WCHAR *filename, void **buffer, DWORD *length)
Definition: util.c:120
static void la_to_rgba(const struct vec4 *la, struct vec4 *rgba, const PALETTEENTRY *palette)
Definition: util.c:35
UINT WINAPI D3DXGetDriverLevel(struct IDirect3DDevice9 *device)
Definition: util.c:312
const char * debug_d3dxparameter_type(D3DXPARAMETER_TYPE t)
Definition: util.c:253
static void la_from_rgba(const struct vec4 *rgba, struct vec4 *la)
Definition: util.c:29
const struct pixel_format_desc * get_format_info_idx(int idx)
Definition: util.c:226
static void index_to_rgba(const struct vec4 *index, struct vec4 *rgba, const PALETTEENTRY *palette)
Definition: util.c:43
const char * debug_d3dxparameter_registerset(D3DXREGISTER_SET r)
Definition: util.c:283
HRESULT write_buffer_to_file(const WCHAR *dst_filename, ID3DXBuffer *buffer)
Definition: util.c:186
#define WINE_D3DX_TO_STR(x)
Definition: util.c:235
const char * debug_d3dxparameter_class(D3DXPARAMETER_CLASS c)
Definition: util.c:237
HRESULT load_resource_into_memory(HMODULE module, HRSRC resinfo, void **buffer, DWORD *length)
Definition: util.c:170
BOOL WINAPI D3DXDebugMute(BOOL mute)
Definition: util.c:303
unsigned int idx
Definition: utils.c:41
#define CloseHandle
Definition: compat.h:739
#define PAGE_READONLY
Definition: compat.h:138
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:744
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:55
#define GENERIC_READ
Definition: compat.h:135
#define CreateFileW
Definition: compat.h:741
#define FILE_MAP_READ
Definition: compat.h:776
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define MapViewOfFile
Definition: compat.h:745
#define FILE_SHARE_READ
Definition: compat.h:136
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:331
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble GLdouble t
Definition: gl.h:2047
GLuint buffer
Definition: glext.h:5915
const GLubyte * c
Definition: glext.h:8905
GLuint index
Definition: glext.h:6031
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define S_OK
Definition: intsafe.h:52
const char * filename
Definition: ioapi.h:137
#define resource
Definition: kernel32.h:9
#define error(str)
Definition: mkdosfs.c:1605
#define CREATE_ALWAYS
Definition: disk.h:72
static HPALETTE palette
Definition: clipboard.c:1345
unsigned int UINT
Definition: ndis.h:50
#define GENERIC_WRITE
Definition: nt_native.h:90
HRESULT hr
Definition: shlfolder.c:183
Definition: devices.h:37
Definition: fci.c:127
float w
Definition: d3dx9_private.h:38
float z
Definition: d3dx9_private.h:38
float x
Definition: d3dx9_private.h:38
float y
Definition: d3dx9_private.h:38
static void buffer_size(GLcontext *ctx, GLuint *width, GLuint *height)
Definition: swimpl.c:888
#define FORMAT_UNKNOWN
Definition: trio.c:409
uint32_t ULONG
Definition: typedefs.h:59
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define INVALID_FILE_SIZE
Definition: winbase.h:548
#define WINAPI
Definition: msvc.h:6
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
__wchar_t WCHAR
Definition: xmlstorage.h:180