Changeset 33475 in vbox for trunk/src/VBox/GuestHost/OpenGL/packer/pack_matrices.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_matrices.c
r33457 r33475 10 10 void PACK_APIENTRY crPackMultMatrixd( const GLdouble *m ) 11 11 { 12 GET_PACKER_CONTEXT(pc);13 unsigned char *data_ptr; 14 int packet_length = 16*sizeof( *m ); 15 GET_BUFFERED_POINTER(pc, packet_length );12 CR_GET_PACKER_CONTEXT(pc); 13 unsigned char *data_ptr; 14 int packet_length = 16*sizeof( *m ); 15 CR_GET_BUFFERED_POINTER(pc, packet_length ); 16 16 WRITE_DOUBLE( 0*sizeof(double), m[ 0] ); 17 17 WRITE_DOUBLE( 1*sizeof(double), m[ 1] ); … … 31 31 WRITE_DOUBLE( 15*sizeof(double), m[15] ); 32 32 WRITE_OPCODE( pc, CR_MULTMATRIXD_OPCODE ); 33 CR_UNLOCK_PACKER_CONTEXT(pc); 33 34 } 34 35 35 36 void PACK_APIENTRY crPackMultMatrixf( const GLfloat *m ) 36 37 { 37 GET_PACKER_CONTEXT(pc);38 unsigned char *data_ptr; 39 int packet_length = 16*sizeof( *m ); 40 GET_BUFFERED_POINTER(pc, packet_length );38 CR_GET_PACKER_CONTEXT(pc); 39 unsigned char *data_ptr; 40 int packet_length = 16*sizeof( *m ); 41 CR_GET_BUFFERED_POINTER(pc, packet_length ); 41 42 WRITE_DATA( 0*sizeof(GLfloat), GLfloat, m[ 0] ); 42 43 WRITE_DATA( 1*sizeof(GLfloat), GLfloat, m[ 1] ); … … 56 57 WRITE_DATA( 15*sizeof(GLfloat), GLfloat, m[15] ); 57 58 WRITE_OPCODE( pc, CR_MULTMATRIXF_OPCODE ); 59 CR_UNLOCK_PACKER_CONTEXT(pc); 58 60 } 59 61 60 62 void PACK_APIENTRY crPackLoadMatrixd( const GLdouble *m ) 61 63 { 62 GET_PACKER_CONTEXT(pc);63 unsigned char *data_ptr; 64 int packet_length = 16*sizeof( *m ); 65 GET_BUFFERED_POINTER(pc, packet_length );64 CR_GET_PACKER_CONTEXT(pc); 65 unsigned char *data_ptr; 66 int packet_length = 16*sizeof( *m ); 67 CR_GET_BUFFERED_POINTER(pc, packet_length ); 66 68 WRITE_DOUBLE( 0*sizeof(double), m[ 0] ); 67 69 WRITE_DOUBLE( 1*sizeof(double), m[ 1] ); … … 81 83 WRITE_DOUBLE( 15*sizeof(double), m[15] ); 82 84 WRITE_OPCODE( pc, CR_LOADMATRIXD_OPCODE ); 85 CR_UNLOCK_PACKER_CONTEXT(pc); 83 86 } 84 87 85 88 void PACK_APIENTRY crPackLoadMatrixf( const GLfloat *m ) 86 89 { 87 GET_PACKER_CONTEXT(pc);88 unsigned char *data_ptr; 89 int packet_length = 16*sizeof( *m ); 90 GET_BUFFERED_POINTER(pc, packet_length );90 CR_GET_PACKER_CONTEXT(pc); 91 unsigned char *data_ptr; 92 int packet_length = 16*sizeof( *m ); 93 CR_GET_BUFFERED_POINTER(pc, packet_length ); 91 94 WRITE_DATA( 0*sizeof(GLfloat), GLfloat, m[ 0] ); 92 95 WRITE_DATA( 1*sizeof(GLfloat), GLfloat, m[ 1] ); … … 106 109 WRITE_DATA( 15*sizeof(GLfloat), GLfloat, m[15] ); 107 110 WRITE_OPCODE( pc, CR_LOADMATRIXF_OPCODE ); 111 CR_UNLOCK_PACKER_CONTEXT(pc); 108 112 } 109 113 110 114 void PACK_APIENTRY crPackMultTransposeMatrixdARB( const GLdouble *m ) 111 115 { 112 GET_PACKER_CONTEXT(pc);113 unsigned char *data_ptr; 114 int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum); 115 GET_BUFFERED_POINTER(pc, packet_length );116 CR_GET_PACKER_CONTEXT(pc); 117 unsigned char *data_ptr; 118 int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum); 119 CR_GET_BUFFERED_POINTER(pc, packet_length ); 116 120 WRITE_DATA( 0, GLint, packet_length ); 117 121 WRITE_DATA( 4, GLenum, CR_MULTTRANSPOSEMATRIXDARB_EXTEND_OPCODE ); … … 133 137 WRITE_DOUBLE( 8 + 15*sizeof(double), m[15] ); 134 138 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 139 CR_UNLOCK_PACKER_CONTEXT(pc); 135 140 } 136 141 137 142 void PACK_APIENTRY crPackMultTransposeMatrixfARB( const GLfloat *m ) 138 143 { 139 GET_PACKER_CONTEXT(pc);140 unsigned char *data_ptr; 141 int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum); 142 GET_BUFFERED_POINTER(pc, packet_length );144 CR_GET_PACKER_CONTEXT(pc); 145 unsigned char *data_ptr; 146 int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum); 147 CR_GET_BUFFERED_POINTER(pc, packet_length ); 143 148 WRITE_DATA( 0, GLint, packet_length ); 144 149 WRITE_DATA( 4, GLenum, CR_MULTTRANSPOSEMATRIXFARB_EXTEND_OPCODE ); … … 160 165 WRITE_DATA( 8 + 15*sizeof(GLfloat), GLfloat, m[15] ); 161 166 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 167 CR_UNLOCK_PACKER_CONTEXT(pc); 162 168 } 163 169 164 170 void PACK_APIENTRY crPackLoadTransposeMatrixdARB( const GLdouble *m ) 165 171 { 166 GET_PACKER_CONTEXT(pc);167 unsigned char *data_ptr; 168 int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum); 169 GET_BUFFERED_POINTER(pc, packet_length );172 CR_GET_PACKER_CONTEXT(pc); 173 unsigned char *data_ptr; 174 int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum); 175 CR_GET_BUFFERED_POINTER(pc, packet_length ); 170 176 WRITE_DATA( 0, GLint, packet_length ); 171 177 WRITE_DATA( 4, GLenum, CR_LOADTRANSPOSEMATRIXDARB_EXTEND_OPCODE ); … … 187 193 WRITE_DOUBLE( 8 + 15*sizeof(double), m[15] ); 188 194 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 195 CR_UNLOCK_PACKER_CONTEXT(pc); 189 196 } 190 197 191 198 void PACK_APIENTRY crPackLoadTransposeMatrixfARB( const GLfloat *m ) 192 199 { 193 GET_PACKER_CONTEXT(pc);194 unsigned char *data_ptr; 195 int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum); 196 GET_BUFFERED_POINTER(pc, packet_length );200 CR_GET_PACKER_CONTEXT(pc); 201 unsigned char *data_ptr; 202 int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum); 203 CR_GET_BUFFERED_POINTER(pc, packet_length ); 197 204 WRITE_DATA( 0, GLint, packet_length ); 198 205 WRITE_DATA( 4, GLenum, CR_LOADTRANSPOSEMATRIXFARB_EXTEND_OPCODE ); … … 214 221 WRITE_DATA( 8 + 15*sizeof(GLfloat), GLfloat, m[15] ); 215 222 WRITE_OPCODE( pc, CR_EXTEND_OPCODE ); 216 } 223 CR_UNLOCK_PACKER_CONTEXT(pc); 224 }
Note:
See TracChangeset
for help on using the changeset viewer.