VirtualBox

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

最後變更 在這個檔案從45567是 27983,由 vboxsync 提交於 15 年 前

crOpenGL: fix 32/64bit bug

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.6 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
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}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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