Changeset 33475 in vbox for trunk/src/VBox/GuestHost/OpenGL/packer/pack_lights.c
- Timestamp:
- Oct 26, 2010 5:23:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/packer/pack_lights.c
r33457 r33475 10 10 static GLboolean __handleLightData( GLenum light, GLenum pname, const GLfloat *params ) 11 11 { 12 GET_PACKER_CONTEXT(pc);12 CR_GET_PACKER_CONTEXT(pc); 13 13 unsigned int packet_length = sizeof( int ) + sizeof( light ) + sizeof( pname ); 14 14 unsigned int params_length = 0; … … 38 38 } 39 39 packet_length += params_length; 40 GET_BUFFERED_POINTER(pc, packet_length );40 CR_GET_BUFFERED_POINTER(pc, packet_length ); 41 41 WRITE_DATA( 0, int, packet_length ); 42 42 WRITE_DATA( sizeof( int ) + 0, GLenum, light ); … … 57 57 void PACK_APIENTRY crPackLightfv (GLenum light, GLenum pname, const GLfloat *params) 58 58 { 59 GET_PACKER_CONTEXT(pc);59 CR_GET_PACKER_CONTEXT(pc); 60 60 if (__handleLightData( light, pname, params )) 61 61 WRITE_OPCODE( pc, CR_LIGHTFV_OPCODE ); 62 CR_UNLOCK_PACKER_CONTEXT(pc); 62 63 } 63 64 … … 65 66 { 66 67 /* floats and ints are the same size, so the packing should be the same */ 67 GET_PACKER_CONTEXT(pc);68 CR_GET_PACKER_CONTEXT(pc); 68 69 if (__handleLightData( light, pname, (const GLfloat *) params )) 69 70 WRITE_OPCODE( pc, CR_LIGHTIV_OPCODE ); 71 CR_UNLOCK_PACKER_CONTEXT(pc); 70 72 } 71 73 72 74 static GLboolean __handleLightModelData( GLenum pname, const GLfloat *params ) 73 75 { 74 GET_PACKER_CONTEXT(pc);76 CR_GET_PACKER_CONTEXT(pc); 75 77 unsigned int packet_length = sizeof( int ) + sizeof( pname ); 76 78 unsigned int params_length = 0; … … 91 93 } 92 94 packet_length += params_length; 93 GET_BUFFERED_POINTER(pc, packet_length );95 CR_GET_BUFFERED_POINTER(pc, packet_length ); 94 96 WRITE_DATA( 0, int, packet_length ); 95 97 WRITE_DATA( sizeof( int ) + 0, GLenum, pname ); … … 106 108 void PACK_APIENTRY crPackLightModelfv (GLenum pname, const GLfloat *params) 107 109 { 108 GET_PACKER_CONTEXT(pc);110 CR_GET_PACKER_CONTEXT(pc); 109 111 if (__handleLightModelData( pname, params )) 110 112 WRITE_OPCODE( pc, CR_LIGHTMODELFV_OPCODE ); 113 CR_UNLOCK_PACKER_CONTEXT(pc); 111 114 } 112 115 … … 114 117 { 115 118 /* floats and ints are the same size, so the packing should be the same */ 116 GET_PACKER_CONTEXT(pc);119 CR_GET_PACKER_CONTEXT(pc); 117 120 if (__handleLightModelData( pname, (const GLfloat *) params )) 118 121 WRITE_OPCODE( pc, CR_LIGHTMODELIV_OPCODE ); 122 CR_UNLOCK_PACKER_CONTEXT(pc); 119 123 }
Note:
See TracChangeset
for help on using the changeset viewer.