VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_pixelmap.c@ 59123

Last change on this file since 59123 was 27983, checked in by vboxsync, 15 years ago

crOpenGL: fix 32/64bit bug

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
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
9void crUnpackPixelMapfv( void )
10{
11 GLenum map = READ_DATA( sizeof( int ) + 0, GLenum );
12 GLsizei mapsize = READ_DATA( sizeof( int ) + 4, GLsizei );
13 int nodata = READ_DATA( sizeof(int) + 8, int);
14 GLfloat *values;
15
16 if (nodata)
17 values = (GLfloat*) (uintptr_t) READ_DATA(sizeof(int) + 12, GLint);
18 else
19 values = DATA_POINTER( sizeof( int ) + 16, GLfloat );
20
21 cr_unpackDispatch.PixelMapfv( map, mapsize, values );
22 INCR_VAR_PTR();
23}
24
25void crUnpackPixelMapuiv( void )
26{
27 GLenum map = READ_DATA( sizeof( int ) + 0, GLenum );
28 GLsizei mapsize = READ_DATA( sizeof( int ) + 4, GLsizei );
29 int nodata = READ_DATA( sizeof(int) + 8, int);
30 GLuint *values;
31
32 if (nodata)
33 values = (GLuint*) (uintptr_t) READ_DATA(sizeof(int) + 12, GLint);
34 else
35 values = DATA_POINTER( sizeof( int ) + 16, GLuint );
36
37 cr_unpackDispatch.PixelMapuiv( map, mapsize, values );
38 INCR_VAR_PTR();
39}
40
41void crUnpackPixelMapusv( void )
42{
43 GLenum map = READ_DATA( sizeof( int ) + 0, GLenum );
44 GLsizei mapsize = READ_DATA( sizeof( int ) + 4, GLsizei );
45 int nodata = READ_DATA( sizeof(int) + 8, int);
46 GLushort *values;
47
48 if (nodata)
49 values = (GLushort*) (uintptr_t) READ_DATA(sizeof(int) + 12, GLint);
50 else
51 values = DATA_POINTER( sizeof( int ) + 16, GLushort );
52
53 cr_unpackDispatch.PixelMapusv( map, mapsize, values );
54 INCR_VAR_PTR();
55}
Note: See TracBrowser for help on using the repository browser.

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