VirtualBox

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

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

3D: texture unpacking reworked, bugref:9192. Merged r123597, r123598, r123600, r123601, r123755.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 1.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 "state/cr_bufferobject.h"
9
10void crUnpackPixelMapfv( void )
11{
12 GLenum map = READ_DATA( sizeof( int ) + 0, GLenum );
13 GLsizei mapsize = READ_DATA( sizeof( int ) + 4, GLsizei );
14 int nodata = READ_DATA( sizeof(int) + 8, int);
15 GLfloat *values;
16
17 if (nodata && !crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
18 return;
19
20 if (nodata)
21 values = (GLfloat*) (uintptr_t) READ_DATA(sizeof(int) + 12, GLint);
22 else
23 values = DATA_POINTER( sizeof( int ) + 16, GLfloat );
24
25 cr_unpackDispatch.PixelMapfv( map, mapsize, values );
26 INCR_VAR_PTR();
27}
28
29void crUnpackPixelMapuiv( void )
30{
31 GLenum map = READ_DATA( sizeof( int ) + 0, GLenum );
32 GLsizei mapsize = READ_DATA( sizeof( int ) + 4, GLsizei );
33 int nodata = READ_DATA( sizeof(int) + 8, int);
34 GLuint *values;
35
36 if (nodata && !crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
37 return;
38
39 if (nodata)
40 values = (GLuint*) (uintptr_t) READ_DATA(sizeof(int) + 12, GLint);
41 else
42 values = DATA_POINTER( sizeof( int ) + 16, GLuint );
43
44 cr_unpackDispatch.PixelMapuiv( map, mapsize, values );
45 INCR_VAR_PTR();
46}
47
48void crUnpackPixelMapusv( void )
49{
50 GLenum map = READ_DATA( sizeof( int ) + 0, GLenum );
51 GLsizei mapsize = READ_DATA( sizeof( int ) + 4, GLsizei );
52 int nodata = READ_DATA( sizeof(int) + 8, int);
53 GLushort *values;
54
55 if (nodata && !crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB))
56 return;
57
58 if (nodata)
59 values = (GLushort*) (uintptr_t) READ_DATA(sizeof(int) + 12, GLint);
60 else
61 values = DATA_POINTER( sizeof( int ) + 16, GLushort );
62
63 cr_unpackDispatch.PixelMapusv( map, mapsize, values );
64 INCR_VAR_PTR();
65}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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