Changeset 27073 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Mar 5, 2010 11:25:20 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 58392
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/packer/pack_pixelmap.c
r15532 r27073 8 8 #include "cr_mem.h" 9 9 10 static unsigned char * __gl_HandlePixelMapData( GLenum map, GLsizei mapsize, int size_of_value, const GLvoid *values)10 static unsigned char * __gl_HandlePixelMapData(GLenum map, GLsizei mapsize, int size_of_value, const GLvoid *values) 11 11 { 12 13 14 15 16 12 int packet_length = 13 sizeof( map ) + 14 sizeof( mapsize ) + 15 mapsize*size_of_value; 16 unsigned char *data_ptr = (unsigned char *) crPackAlloc( packet_length ); 17 17 18 19 20 21 18 WRITE_DATA( 0, GLenum, map ); 19 WRITE_DATA( 4, GLsizei, mapsize ); 20 crMemcpy( data_ptr + 8, values, mapsize*size_of_value ); 21 return data_ptr; 22 22 } 23 23 24 24 void PACK_APIENTRY crPackPixelMapfv(GLenum map, GLsizei mapsize, 25 const GLfloat *values)25 const GLfloat *values) 26 26 { 27 27 unsigned char *data_ptr = __gl_HandlePixelMapData( map, mapsize, sizeof( *values ), values ); 28 28 29 29 crHugePacket( CR_PIXELMAPFV_OPCODE, data_ptr ); 30 30 crPackFree( data_ptr ); 31 31 } 32 32 33 33 void PACK_APIENTRY crPackPixelMapuiv(GLenum map, GLsizei mapsize, 34 const GLuint *values)34 const GLuint *values) 35 35 { 36 36 unsigned char *data_ptr = __gl_HandlePixelMapData( map, mapsize, sizeof( *values ), values ); 37 37 38 38 crHugePacket( CR_PIXELMAPUIV_OPCODE, data_ptr ); 39 39 crPackFree( data_ptr ); 40 40 } 41 41 42 42 void PACK_APIENTRY crPackPixelMapusv(GLenum map, GLsizei mapsize, 43 const GLushort *values)43 const GLushort *values) 44 44 { 45 45 unsigned char *data_ptr = __gl_HandlePixelMapData( map, mapsize, sizeof( *values ), values ); 46 46 47 47 crHugePacket( CR_PIXELMAPUSV_OPCODE, data_ptr ); 48 48 crPackFree( data_ptr ); 49 49 }
Note:
See TracChangeset
for help on using the changeset viewer.