VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_texture.c@ 77709

最後變更 在這個檔案從77709是 76787,由 vboxsync 提交於 6 年 前

3D: Parameters validation corrected, bugref:9327

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 18.9 KB
 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#include "unpacker.h"
8#include "cr_error.h"
9#include "cr_protocol.h"
10#include "cr_mem.h"
11#include "cr_version.h"
12
13#if defined( GL_EXT_texture3D )
14void crUnpackTexImage3DEXT( void )
15{
16 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
17 GLint level = READ_DATA( sizeof( int ) + 4, GLint );
18 GLenum internalformat = READ_DATA( sizeof( int ) + 8, GLint );
19 GLsizei width = READ_DATA( sizeof( int ) + 12, GLsizei );
20 GLsizei height = READ_DATA( sizeof( int ) + 16, GLsizei );
21 GLsizei depth = READ_DATA( sizeof( int ) + 20, GLsizei );
22 GLint border = READ_DATA( sizeof( int ) + 24, GLint );
23 GLenum format = READ_DATA( sizeof( int ) + 28, GLenum );
24 GLenum type = READ_DATA( sizeof( int ) + 32, GLenum );
25 int noimagedata = READ_DATA( sizeof( int ) + 36, int );
26 GLvoid *pixels;
27
28 /*If there's no imagedata send, it's either that passed pointer was NULL or
29 there was GL_PIXEL_UNPACK_BUFFER_ARB bound, in both cases 4bytes of passed
30 pointer would convert to either NULL or offset in the bound buffer.
31 */
32 if ( noimagedata )
33 pixels = (void*) (uintptr_t) READ_DATA(sizeof(int)+40, GLint);
34 else
35 pixels = DATA_POINTER( sizeof( int ) + 44, GLvoid );
36
37 cr_unpackDispatch.TexImage3DEXT(target, level, internalformat, width,
38 height, depth, border, format, type,
39 pixels);
40 INCR_VAR_PTR();
41}
42#endif /* GL_EXT_texture3D */
43
44#if defined( CR_OPENGL_VERSION_1_2 )
45void crUnpackTexImage3D( void )
46{
47 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
48 GLint level = READ_DATA( sizeof( int ) + 4, GLint );
49 GLint internalformat = READ_DATA( sizeof( int ) + 8, GLint );
50 GLsizei width = READ_DATA( sizeof( int ) + 12, GLsizei );
51 GLsizei height = READ_DATA( sizeof( int ) + 16, GLsizei );
52 GLsizei depth = READ_DATA( sizeof( int ) + 20, GLsizei );
53 GLint border = READ_DATA( sizeof( int ) + 24, GLint );
54 GLenum format = READ_DATA( sizeof( int ) + 28, GLenum );
55 GLenum type = READ_DATA( sizeof( int ) + 32, GLenum );
56 int noimagedata = READ_DATA( sizeof( int ) + 36, int );
57 GLvoid *pixels;
58
59 if ( noimagedata )
60 pixels = (void*) (uintptr_t) READ_DATA(sizeof(int)+40, GLint);
61 else
62 pixels = DATA_POINTER( sizeof( int ) + 44, GLvoid );
63
64 cr_unpackDispatch.TexImage3D( target, level, internalformat, width, height,
65 depth, border, format, type, pixels );
66 INCR_VAR_PTR();
67}
68#endif /* CR_OPENGL_VERSION_1_2 */
69
70void crUnpackTexImage2D( void )
71{
72 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
73 GLint level = READ_DATA( sizeof( int ) + 4, GLint );
74 GLint internalformat = READ_DATA( sizeof( int ) + 8, GLint );
75 GLsizei width = READ_DATA( sizeof( int ) + 12, GLsizei );
76 GLsizei height = READ_DATA( sizeof( int ) + 16, GLsizei );
77 GLint border = READ_DATA( sizeof( int ) + 20, GLint );
78 GLenum format = READ_DATA( sizeof( int ) + 24, GLenum );
79 GLenum type = READ_DATA( sizeof( int ) + 28, GLenum );
80 int noimagedata = READ_DATA( sizeof( int ) + 32, int );
81 GLvoid *pixels;
82
83 if ( noimagedata )
84 pixels = (void*) (uintptr_t) READ_DATA(sizeof(int)+36, GLint);
85 else
86 pixels = DATA_POINTER( sizeof( int ) + 40, GLvoid );
87
88 cr_unpackDispatch.TexImage2D( target, level, internalformat, width, height,
89 border, format, type, pixels );
90 INCR_VAR_PTR();
91}
92
93void crUnpackTexImage1D( void )
94{
95 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
96 GLint level = READ_DATA( sizeof( int ) + 4, GLint );
97 GLint internalformat = READ_DATA( sizeof( int ) + 8, GLint );
98 GLsizei width = READ_DATA( sizeof( int ) + 12, GLsizei );
99 GLint border = READ_DATA( sizeof( int ) + 16, GLint );
100 GLenum format = READ_DATA( sizeof( int ) + 20, GLenum );
101 GLenum type = READ_DATA( sizeof( int ) + 24, GLenum );
102 int noimagedata = READ_DATA( sizeof( int ) + 28, int );
103 GLvoid *pixels;
104
105 if ( noimagedata )
106 pixels = (void*) (uintptr_t) READ_DATA(sizeof(int)+32, GLint);
107 else
108 pixels = DATA_POINTER( sizeof( int ) + 36, GLvoid );
109
110 cr_unpackDispatch.TexImage1D( target, level, internalformat, width, border,
111 format, type, pixels );
112 INCR_VAR_PTR();
113}
114
115void crUnpackDeleteTextures( void )
116{
117 GLsizei n = READ_DATA( sizeof( int ) + 0, GLsizei );
118 GLuint *textures = DATA_POINTER( sizeof( int ) + 4, GLuint );
119
120 cr_unpackDispatch.DeleteTextures( n, textures );
121 INCR_VAR_PTR();
122}
123
124
125void crUnpackPrioritizeTextures( void )
126{
127 GLsizei n = READ_DATA( sizeof( int ) + 0, GLsizei );
128 GLuint *textures = DATA_POINTER( sizeof( int ) + 4, GLuint );
129 GLclampf *priorities = DATA_POINTER( sizeof( int ) + 4 + n*sizeof( GLuint ),
130 GLclampf );
131
132 cr_unpackDispatch.PrioritizeTextures( n, textures, priorities );
133 INCR_VAR_PTR();
134}
135
136void crUnpackTexParameterfv( void )
137{
138 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
139 GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum );
140 GLfloat *params = DATA_POINTER( sizeof( int ) + 8, GLfloat );
141
142 cr_unpackDispatch.TexParameterfv( target, pname, params );
143 INCR_VAR_PTR();
144}
145
146void crUnpackTexParameteriv( void )
147{
148 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
149 GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum );
150 GLint *params = DATA_POINTER( sizeof( int ) + 8, GLint );
151
152 cr_unpackDispatch.TexParameteriv( target, pname, params );
153 INCR_VAR_PTR();
154}
155
156void crUnpackTexParameterf( void )
157{
158 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
159 GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum );
160 GLfloat param = READ_DATA( sizeof( int ) + 8, GLfloat );
161
162 cr_unpackDispatch.TexParameterf( target, pname, param );
163 INCR_VAR_PTR();
164}
165
166void crUnpackTexParameteri( void )
167{
168 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
169 GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum );
170 GLint param = READ_DATA( sizeof( int ) + 8, GLint );
171
172 cr_unpackDispatch.TexParameteri( target, pname, param );
173 INCR_VAR_PTR();
174}
175
176#if defined(CR_OPENGL_VERSION_1_2)
177void crUnpackTexSubImage3D( void )
178{
179 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
180 GLint level = READ_DATA( sizeof( int ) + 4, GLint );
181 GLint xoffset = READ_DATA( sizeof( int ) + 8, GLint );
182 GLint yoffset = READ_DATA( sizeof( int ) + 12, GLint );
183 GLint zoffset = READ_DATA( sizeof( int ) + 16, GLint );
184 GLsizei width = READ_DATA( sizeof( int ) + 20, GLsizei );
185 GLsizei height = READ_DATA( sizeof( int ) + 24, GLsizei );
186 GLsizei depth = READ_DATA( sizeof( int ) + 28, GLsizei );
187 GLenum format = READ_DATA( sizeof( int ) + 32, GLenum );
188 GLenum type = READ_DATA( sizeof( int ) + 36, GLenum );
189 int noimagedata = READ_DATA( sizeof( int ) + 40, int );
190 GLvoid *pixels;
191
192 if ( noimagedata )
193 pixels = (void*) (uintptr_t) READ_DATA(sizeof(int)+44, GLint);
194 else
195 pixels = DATA_POINTER( sizeof( int ) + 48, GLvoid );
196
197 cr_unpackDispatch.PixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
198 cr_unpackDispatch.PixelStorei( GL_UNPACK_SKIP_PIXELS, 0 );
199 cr_unpackDispatch.PixelStorei( GL_UNPACK_SKIP_ROWS, 0 );
200 cr_unpackDispatch.PixelStorei( GL_UNPACK_ALIGNMENT, 1 );
201
202 cr_unpackDispatch.TexSubImage3D(target, level, xoffset, yoffset, zoffset,
203 width, height, depth, format, type, pixels);
204 INCR_VAR_PTR();
205}
206#endif /* CR_OPENGL_VERSION_1_2 */
207
208void crUnpackTexSubImage2D( void )
209{
210 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
211 GLint level = READ_DATA( sizeof( int ) + 4, GLint );
212 GLint xoffset = READ_DATA( sizeof( int ) + 8, GLint );
213 GLint yoffset = READ_DATA( sizeof( int ) + 12, GLint );
214 GLsizei width = READ_DATA( sizeof( int ) + 16, GLsizei );
215 GLsizei height = READ_DATA( sizeof( int ) + 20, GLsizei );
216 GLenum format = READ_DATA( sizeof( int ) + 24, GLenum );
217 GLenum type = READ_DATA( sizeof( int ) + 28, GLenum );
218 int noimagedata = READ_DATA( sizeof( int ) + 32, int );
219 GLvoid *pixels;
220
221 if ( noimagedata )
222 pixels = (void*) (uintptr_t) READ_DATA(sizeof(int)+36, GLint);
223 else
224 pixels = DATA_POINTER( sizeof( int ) + 40, GLvoid );
225
226 cr_unpackDispatch.PixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
227 cr_unpackDispatch.PixelStorei( GL_UNPACK_SKIP_PIXELS, 0 );
228 cr_unpackDispatch.PixelStorei( GL_UNPACK_SKIP_ROWS, 0 );
229 cr_unpackDispatch.PixelStorei( GL_UNPACK_ALIGNMENT, 1 );
230
231 cr_unpackDispatch.TexSubImage2D( target, level, xoffset, yoffset, width,
232 height, format, type, pixels );
233 INCR_VAR_PTR();
234}
235
236void crUnpackTexSubImage1D( void )
237{
238 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
239 GLint level = READ_DATA( sizeof( int ) + 4, GLint );
240 GLint xoffset = READ_DATA( sizeof( int ) + 8, GLint );
241 GLsizei width = READ_DATA( sizeof( int ) + 12, GLsizei );
242 GLenum format = READ_DATA( sizeof( int ) + 16, GLenum );
243 GLenum type = READ_DATA( sizeof( int ) + 20, GLenum );
244 int noimagedata = READ_DATA( sizeof( int ) + 24, int );
245 GLvoid *pixels;
246
247 if ( noimagedata )
248 pixels = (void*) (uintptr_t) READ_DATA(sizeof(int)+28, GLint);
249 else
250 pixels = DATA_POINTER( sizeof( int ) + 32, GLvoid );
251
252 cr_unpackDispatch.PixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
253 cr_unpackDispatch.PixelStorei( GL_UNPACK_SKIP_PIXELS, 0 );
254 cr_unpackDispatch.PixelStorei( GL_UNPACK_SKIP_ROWS, 0 );
255 cr_unpackDispatch.PixelStorei( GL_UNPACK_ALIGNMENT, 1 );
256
257 cr_unpackDispatch.TexSubImage1D( target, level, xoffset, width, format,
258 type, pixels );
259 INCR_VAR_PTR();
260}
261
262
263void crUnpackTexEnvfv( void )
264{
265 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
266 GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum );
267 GLfloat *params = DATA_POINTER( sizeof( int ) + 8, GLfloat );
268
269 cr_unpackDispatch.TexEnvfv( target, pname, params );
270 INCR_VAR_PTR();
271}
272
273void crUnpackTexEnviv( void )
274{
275 GLenum target = READ_DATA( sizeof( int ) + 0, GLenum );
276 GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum );
277 GLint *params = DATA_POINTER( sizeof( int ) + 8, GLint );
278
279 cr_unpackDispatch.TexEnviv( target, pname, params );
280 INCR_VAR_PTR();
281}
282
283#define DATA_POINTER_DOUBLE( offset )
284
285void crUnpackTexGendv( void )
286{
287 GLenum coord = READ_DATA( sizeof( int ) + 0, GLenum );
288 GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum );
289 GLdouble params[4];
290 unsigned int n_param = READ_DATA( 0, int ) - ( sizeof(int) + 8 );
291
292 if (n_param > sizeof(params))
293 {
294 crError("crUnpackTexGendv: n_param=%d, expected <= %d\n", n_param,
295 (unsigned int)sizeof(params));
296 return;
297 }
298
299 crMemcpy( params, DATA_POINTER( sizeof( int ) + 8, GLdouble ), n_param );
300
301 cr_unpackDispatch.TexGendv( coord, pname, params );
302 INCR_VAR_PTR();
303}
304
305void crUnpackTexGenfv( void )
306{
307 GLenum coord = READ_DATA( sizeof( int ) + 0, GLenum );
308 GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum );
309 GLfloat *params = DATA_POINTER( sizeof( int ) + 8, GLfloat );
310
311 cr_unpackDispatch.TexGenfv( coord, pname, params );
312 INCR_VAR_PTR();
313}
314
315void crUnpackTexGeniv( void )
316{
317 GLenum coord = READ_DATA( sizeof( int ) + 0, GLenum );
318 GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum );
319 GLint *params = DATA_POINTER( sizeof( int ) + 8, GLint );
320
321 cr_unpackDispatch.TexGeniv( coord, pname, params );
322 INCR_VAR_PTR();
323}
324
325void crUnpackExtendAreTexturesResident( void )
326{
327 GLsizei n = READ_DATA( 8, GLsizei );
328 const GLuint *textures = DATA_POINTER( 12, const GLuint );
329
330 if (n <= 0 || n >= INT32_MAX / sizeof(GLuint) / 4 || !DATA_POINTER_CHECK(20 + n * sizeof(GLuint)))
331 {
332 crError("crUnpackExtendAreTexturesResident: %d is out of range", n);
333 return;
334 }
335
336 SET_RETURN_PTR(12 + n * sizeof(GLuint));
337 SET_WRITEBACK_PTR(20 + n * sizeof(GLuint));
338 (void) cr_unpackDispatch.AreTexturesResident( n, textures, NULL );
339}
340
341
342void crUnpackExtendCompressedTexImage3DARB( void )
343{
344 GLenum target = READ_DATA( 4 + sizeof(int) + 0, GLenum );
345 GLint level = READ_DATA( 4 + sizeof(int) + 4, GLint );
346 GLenum internalformat = READ_DATA( 4 + sizeof(int) + 8, GLenum );
347 GLsizei width = READ_DATA( 4 + sizeof(int) + 12, GLsizei );
348 GLsizei height = READ_DATA( 4 + sizeof(int) + 16, GLsizei );
349 GLsizei depth = READ_DATA( 4 + sizeof(int) + 20, GLsizei );
350 GLint border = READ_DATA( 4 + sizeof(int) + 24, GLint );
351 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 28, GLsizei );
352 int noimagedata = READ_DATA( 4 + sizeof(int) + 32, int );
353 GLvoid *pixels;
354
355 if( noimagedata )
356 pixels = (void*) (uintptr_t) READ_DATA(4+sizeof(int)+36, GLint);
357 else
358 pixels = DATA_POINTER( 4 + sizeof(int) + 40, GLvoid );
359
360 cr_unpackDispatch.CompressedTexImage3DARB(target, level, internalformat,
361 width, height, depth, border,
362 imagesize, pixels);
363}
364
365
366void crUnpackExtendCompressedTexImage2DARB( void )
367{
368 GLenum target = READ_DATA( 4 + sizeof( int ) + 0, GLenum );
369 GLint level = READ_DATA( 4 + sizeof( int ) + 4, GLint );
370 GLenum internalformat = READ_DATA( 4 + sizeof( int ) + 8, GLenum );
371 GLsizei width = READ_DATA( 4 + sizeof( int ) + 12, GLsizei );
372 GLsizei height = READ_DATA( 4 + sizeof( int ) + 16, GLsizei );
373 GLint border = READ_DATA( 4 + sizeof( int ) + 20, GLint );
374 GLsizei imagesize = READ_DATA( 4 + sizeof( int ) + 24, GLsizei );
375 int noimagedata = READ_DATA( 4 + sizeof( int ) + 28, int );
376 GLvoid *pixels;
377
378 if ( noimagedata )
379 pixels = (void*) (uintptr_t) READ_DATA(4+sizeof(int)+32, GLint);
380 else
381 pixels = DATA_POINTER( 4 + sizeof( int ) + 36, GLvoid );
382
383 cr_unpackDispatch.CompressedTexImage2DARB( target, level, internalformat,
384 width, height, border, imagesize,
385 pixels );
386}
387
388
389void crUnpackExtendCompressedTexImage1DARB( void )
390{
391 GLenum target = READ_DATA( 4 + sizeof(int) + 0, GLenum );
392 GLint level = READ_DATA( 4 + sizeof(int) + 4, GLint );
393 GLenum internalformat = READ_DATA( 4 + sizeof(int) + 8, GLenum );
394 GLsizei width = READ_DATA( 4 + sizeof(int) + 12, GLsizei );
395 GLint border = READ_DATA( 4 + sizeof(int) + 16, GLint );
396 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 20, GLsizei );
397 int noimagedata = READ_DATA( 4 + sizeof(int) + 24, int );
398 GLvoid *pixels;
399
400 if( noimagedata )
401 pixels = (void*) (uintptr_t) READ_DATA(4+sizeof(int)+28, GLint);
402 else
403 pixels = DATA_POINTER( 4 + sizeof(int) + 32, GLvoid );
404
405 cr_unpackDispatch.CompressedTexImage1DARB(target, level, internalformat,
406 width, border, imagesize, pixels);
407}
408
409
410void crUnpackExtendCompressedTexSubImage3DARB( void )
411{
412 GLenum target = READ_DATA( 4 + sizeof(int) + 0, GLenum );
413 GLint level = READ_DATA( 4 + sizeof(int) + 4, GLint );
414 GLint xoffset = READ_DATA( 4 + sizeof(int) + 8, GLint );
415 GLint yoffset = READ_DATA( 4 + sizeof(int) + 12, GLint );
416 GLint zoffset = READ_DATA( 4 + sizeof(int) + 16, GLint );
417 GLsizei width = READ_DATA( 4 + sizeof(int) + 20, GLsizei );
418 GLsizei height = READ_DATA( 4 + sizeof(int) + 24, GLsizei );
419 GLsizei depth = READ_DATA( 4 + sizeof(int) + 28, GLsizei );
420 GLenum format = READ_DATA( 4 + sizeof(int) + 32, GLenum );
421 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 36, GLsizei );
422 int noimagedata = READ_DATA( 4 + sizeof(int) + 40, int );
423 GLvoid *pixels;
424
425 if( noimagedata )
426 pixels = (void*) (uintptr_t) READ_DATA(4+sizeof(int)+44, GLint);
427 else
428 pixels = DATA_POINTER( 4 + sizeof(int) + 48, GLvoid );
429
430 cr_unpackDispatch.CompressedTexSubImage3DARB(target, level, xoffset,
431 yoffset, zoffset, width,
432 height, depth, format,
433 imagesize, pixels);
434}
435
436
437void crUnpackExtendCompressedTexSubImage2DARB( void )
438{
439 GLenum target = READ_DATA( 4 + sizeof(int) + 0, GLenum );
440 GLint level = READ_DATA( 4 + sizeof(int) + 4, GLint );
441 GLint xoffset = READ_DATA( 4 + sizeof(int) + 8, GLint );
442 GLint yoffset = READ_DATA( 4 + sizeof(int) + 12, GLint );
443 GLsizei width = READ_DATA( 4 + sizeof(int) + 16, GLsizei );
444 GLsizei height = READ_DATA( 4 + sizeof(int) + 20, GLsizei );
445 GLenum format = READ_DATA( 4 + sizeof(int) + 24, GLenum );
446 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 28, GLsizei );
447 int noimagedata = READ_DATA( 4 + sizeof(int) + 32, int );
448 GLvoid *pixels;
449
450 if( noimagedata )
451 pixels = (void*) (uintptr_t) READ_DATA(4+sizeof(int)+36, GLint);
452 else
453 pixels = DATA_POINTER( 4 + sizeof(int) + 40, GLvoid );
454
455 cr_unpackDispatch.CompressedTexSubImage2DARB(target, level, xoffset,
456 yoffset, width, height,
457 format, imagesize, pixels);
458}
459
460
461void crUnpackExtendCompressedTexSubImage1DARB( void )
462{
463 GLenum target = READ_DATA( 4 + sizeof(int) + 0, GLenum );
464 GLint level = READ_DATA( 4 + sizeof(int) + 4, GLint );
465 GLint xoffset = READ_DATA( 4 + sizeof(int) + 8, GLint );
466 GLsizei width = READ_DATA( 4 + sizeof(int) + 12, GLsizei );
467 GLenum format = READ_DATA( 4 + sizeof(int) + 16, GLenum );
468 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 20, GLsizei );
469 int noimagedata = READ_DATA( 4 + sizeof(int) + 24, int );
470 GLvoid *pixels;
471
472 if( noimagedata )
473 pixels = (void*) (uintptr_t) READ_DATA(4+sizeof(int)+28, GLint);
474 else
475 pixels = DATA_POINTER( 4 + sizeof(int) + 32, GLvoid );
476
477 cr_unpackDispatch.CompressedTexSubImage1DARB(target, level, xoffset, width,
478 format, imagesize, pixels);
479}
480
481void crUnpackExtendGetTexImage(void)
482{
483 GLenum target = READ_DATA( 8, GLenum );
484 GLint level = READ_DATA( 12, GLint );
485 GLenum format = READ_DATA( 16, GLenum );
486 GLenum type = READ_DATA( 20, GLenum );
487 GLvoid *pixels;
488
489 SET_RETURN_PTR(24);
490 SET_WRITEBACK_PTR(32);
491 pixels = DATA_POINTER(24, GLvoid);
492
493 cr_unpackDispatch.GetTexImage(target, level, format, type, pixels);
494}
495
496void crUnpackExtendGetCompressedTexImageARB(void)
497{
498 GLenum target = READ_DATA( 8, GLenum );
499 GLint level = READ_DATA( 12, GLint );
500 GLvoid *img;
501
502 SET_RETURN_PTR( 16 );
503 SET_WRITEBACK_PTR( 24 );
504 img = DATA_POINTER(16, GLvoid);
505
506 cr_unpackDispatch.GetCompressedTexImageARB( target, level, img );
507}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette