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 "cr_error.h"
|
---|
9 | #include "cr_protocol.h"
|
---|
10 | #include "cr_mem.h"
|
---|
11 | #include "cr_version.h"
|
---|
12 |
|
---|
13 |
|
---|
14 | void crUnpackExtendProgramParameter4dvNV(PCrUnpackerState pState)
|
---|
15 | {
|
---|
16 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
|
---|
17 |
|
---|
18 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
19 | GLuint index = READ_DATA(pState, 12, GLuint);
|
---|
20 | GLdouble params[4];
|
---|
21 | params[0] = READ_DOUBLE(pState, 16);
|
---|
22 | params[1] = READ_DOUBLE(pState, 24);
|
---|
23 | params[2] = READ_DOUBLE(pState, 32);
|
---|
24 | params[3] = READ_DOUBLE(pState, 40);
|
---|
25 | pState->pDispatchTbl->ProgramParameter4dvNV(target, index, params);
|
---|
26 | }
|
---|
27 |
|
---|
28 |
|
---|
29 | void crUnpackExtendProgramParameter4fvNV(PCrUnpackerState pState)
|
---|
30 | {
|
---|
31 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
|
---|
32 |
|
---|
33 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
34 | GLuint index = READ_DATA(pState, 12, GLuint);
|
---|
35 | GLfloat params[4];
|
---|
36 | params[0] = READ_DATA(pState, 16, GLfloat);
|
---|
37 | params[1] = READ_DATA(pState, 20, GLfloat);
|
---|
38 | params[2] = READ_DATA(pState, 24, GLfloat);
|
---|
39 | params[3] = READ_DATA(pState, 28, GLfloat);
|
---|
40 | pState->pDispatchTbl->ProgramParameter4fvNV(target, index, params);
|
---|
41 | }
|
---|
42 |
|
---|
43 |
|
---|
44 | void crUnpackExtendProgramParameters4dvNV(PCrUnpackerState pState)
|
---|
45 | {
|
---|
46 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 16, GLuint);
|
---|
47 |
|
---|
48 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
49 | GLuint index = READ_DATA(pState, 12, GLuint);
|
---|
50 | GLuint num = READ_DATA(pState, 16, GLuint);
|
---|
51 |
|
---|
52 | if (num <= 0 || num >= INT32_MAX / (4 * sizeof(GLdouble)))
|
---|
53 | {
|
---|
54 | crError("crUnpackExtendProgramParameters4dvNV: parameter 'num' is out of range");
|
---|
55 | pState->rcUnpack = VERR_INVALID_PARAMETER;
|
---|
56 | return;
|
---|
57 | }
|
---|
58 |
|
---|
59 | GLdouble *params = DATA_POINTER(pState, 20, GLdouble);
|
---|
60 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, params, 4 * num, GLdouble);
|
---|
61 |
|
---|
62 | pState->pDispatchTbl->ProgramParameters4dvNV(target, index, num, params);
|
---|
63 | }
|
---|
64 |
|
---|
65 |
|
---|
66 | void crUnpackExtendProgramParameters4fvNV(PCrUnpackerState pState)
|
---|
67 | {
|
---|
68 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 16, GLuint);
|
---|
69 |
|
---|
70 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
71 | GLuint index = READ_DATA(pState, 12, GLuint);
|
---|
72 | GLuint num = READ_DATA(pState, 16, GLuint);
|
---|
73 |
|
---|
74 | if (num <= 0 || num >= INT32_MAX / (4 * sizeof(GLfloat)))
|
---|
75 | {
|
---|
76 | crError("crUnpackExtendProgramParameters4fvNV: parameter 'num' is out of range");
|
---|
77 | pState->rcUnpack = VERR_INVALID_PARAMETER;
|
---|
78 | return;
|
---|
79 | }
|
---|
80 |
|
---|
81 | GLfloat *params = DATA_POINTER(pState, 20, GLfloat);
|
---|
82 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, params, 4 * num, GLfloat);
|
---|
83 |
|
---|
84 | pState->pDispatchTbl->ProgramParameters4fvNV(target, index, num, params);
|
---|
85 | }
|
---|
86 |
|
---|
87 |
|
---|
88 | void crUnpackExtendAreProgramsResidentNV(PCrUnpackerState pState)
|
---|
89 | {
|
---|
90 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 8, GLsizei);
|
---|
91 | GLsizei n = READ_DATA(pState, 8, GLsizei);
|
---|
92 | const GLuint *programs = DATA_POINTER(pState, 12, const GLuint);
|
---|
93 |
|
---|
94 | if (n <= 0 || n >= INT32_MAX / sizeof(GLuint) / 4 || !DATA_POINTER_CHECK(pState, 20 + n * sizeof(GLuint)))
|
---|
95 | {
|
---|
96 | crError("crUnpackExtendAreProgramsResidentNV: %d is out of range", n);
|
---|
97 | pState->rcUnpack = VERR_INVALID_PARAMETER;
|
---|
98 | return;
|
---|
99 | }
|
---|
100 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, programs, n, GLuint);
|
---|
101 | CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, 20 + n * sizeof(GLuint), CRNetworkPointer);
|
---|
102 |
|
---|
103 | SET_RETURN_PTR(pState, 12 + n * sizeof(GLuint));
|
---|
104 | SET_WRITEBACK_PTR(pState, 20 + n * sizeof(GLuint));
|
---|
105 | (void) pState->pDispatchTbl->AreProgramsResidentNV(n, programs, NULL);
|
---|
106 | }
|
---|
107 |
|
---|
108 |
|
---|
109 | void crUnpackExtendLoadProgramNV(PCrUnpackerState pState)
|
---|
110 | {
|
---|
111 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 16, GLsizei);
|
---|
112 |
|
---|
113 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
114 | GLuint id = READ_DATA(pState, 12, GLuint);
|
---|
115 | GLsizei len = READ_DATA(pState, 16, GLsizei);
|
---|
116 |
|
---|
117 | GLvoid *program = DATA_POINTER(pState, 20, GLvoid);
|
---|
118 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, program, len, GLubyte);
|
---|
119 | pState->pDispatchTbl->LoadProgramNV(target, id, len, (GLubyte *)program);
|
---|
120 | }
|
---|
121 |
|
---|
122 |
|
---|
123 | void crUnpackExtendExecuteProgramNV(PCrUnpackerState pState)
|
---|
124 | {
|
---|
125 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 20, GLfloat);
|
---|
126 |
|
---|
127 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
128 | GLuint id = READ_DATA(pState, 12, GLuint);
|
---|
129 | GLfloat params[4];
|
---|
130 | params[0] = READ_DATA(pState, 16, GLfloat);
|
---|
131 | params[1] = READ_DATA(pState, 20, GLfloat);
|
---|
132 | params[2] = READ_DATA(pState, 24, GLfloat);
|
---|
133 | params[3] = READ_DATA(pState, 28, GLfloat);
|
---|
134 | pState->pDispatchTbl->ExecuteProgramNV(target, id, params);
|
---|
135 | }
|
---|
136 |
|
---|
137 | void crUnpackExtendRequestResidentProgramsNV(PCrUnpackerState pState)
|
---|
138 | {
|
---|
139 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 8, GLsizei);
|
---|
140 |
|
---|
141 | GLsizei n = READ_DATA(pState, 8, GLsizei);
|
---|
142 | crError("RequestResidentProgramsNV needs to be special cased!");
|
---|
143 | pState->pDispatchTbl->RequestResidentProgramsNV(n, NULL);
|
---|
144 | }
|
---|
145 |
|
---|
146 |
|
---|
147 | void crUnpackExtendProgramLocalParameter4fvARB(PCrUnpackerState pState)
|
---|
148 | {
|
---|
149 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
|
---|
150 |
|
---|
151 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
152 | GLuint index = READ_DATA(pState, 12, GLuint);
|
---|
153 | GLfloat params[4];
|
---|
154 | params[0] = READ_DATA(pState, 16, GLfloat);
|
---|
155 | params[1] = READ_DATA(pState, 20, GLfloat);
|
---|
156 | params[2] = READ_DATA(pState, 24, GLfloat);
|
---|
157 | params[3] = READ_DATA(pState, 28, GLfloat);
|
---|
158 | pState->pDispatchTbl->ProgramLocalParameter4fvARB(target, index, params);
|
---|
159 | }
|
---|
160 |
|
---|
161 |
|
---|
162 | void crUnpackExtendProgramLocalParameter4dvARB(PCrUnpackerState pState)
|
---|
163 | {
|
---|
164 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
|
---|
165 |
|
---|
166 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
167 | GLuint index = READ_DATA(pState, 12, GLuint);
|
---|
168 | GLdouble params[4];
|
---|
169 | params[0] = READ_DOUBLE(pState, 16);
|
---|
170 | params[1] = READ_DOUBLE(pState, 24);
|
---|
171 | params[2] = READ_DOUBLE(pState, 32);
|
---|
172 | params[3] = READ_DOUBLE(pState, 40);
|
---|
173 | pState->pDispatchTbl->ProgramLocalParameter4dvARB(target, index, params);
|
---|
174 | }
|
---|
175 |
|
---|
176 |
|
---|
177 |
|
---|
178 | void crUnpackExtendProgramNamedParameter4dvNV(PCrUnpackerState pState)
|
---|
179 | {
|
---|
180 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
|
---|
181 |
|
---|
182 | GLuint id = READ_DATA(pState, 8, GLuint);
|
---|
183 | GLsizei len = READ_DATA(pState, 12, GLsizei);
|
---|
184 | GLdouble *params = DATA_POINTER(pState, 16, GLdouble);
|
---|
185 | GLubyte *name = DATA_POINTER(pState, 48, GLubyte);
|
---|
186 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
|
---|
187 | pState->pDispatchTbl->ProgramNamedParameter4dvNV(id, len, name, params);
|
---|
188 | }
|
---|
189 |
|
---|
190 | void crUnpackExtendProgramNamedParameter4dNV(PCrUnpackerState pState)
|
---|
191 | {
|
---|
192 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
|
---|
193 |
|
---|
194 | GLuint id = READ_DATA(pState, 8, GLuint);
|
---|
195 | GLsizei len = READ_DATA(pState, 12, GLsizei);
|
---|
196 | GLdouble params[4];
|
---|
197 | params[0] = READ_DOUBLE(pState, 16);
|
---|
198 | params[1] = READ_DOUBLE(pState, 24);
|
---|
199 | params[2] = READ_DOUBLE(pState, 32);
|
---|
200 | params[3] = READ_DOUBLE(pState, 40);
|
---|
201 |
|
---|
202 | GLubyte *name = DATA_POINTER(pState, 48, GLubyte);
|
---|
203 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
|
---|
204 | pState->pDispatchTbl->ProgramNamedParameter4dNV(id, len, name, params[0], params[1], params[2], params[3]);
|
---|
205 | }
|
---|
206 |
|
---|
207 | void crUnpackExtendProgramNamedParameter4fNV(PCrUnpackerState pState)
|
---|
208 | {
|
---|
209 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
|
---|
210 |
|
---|
211 | GLenum id = READ_DATA(pState, 8, GLuint);
|
---|
212 | GLsizei len = READ_DATA(pState, 12, GLsizei);
|
---|
213 | GLfloat params[4];
|
---|
214 | params[0] = READ_DATA(pState, 16, GLfloat);
|
---|
215 | params[1] = READ_DATA(pState, 20, GLfloat);
|
---|
216 | params[2] = READ_DATA(pState, 24, GLfloat);
|
---|
217 | params[3] = READ_DATA(pState, 28, GLfloat);
|
---|
218 |
|
---|
219 | GLubyte *name = DATA_POINTER(pState, 32, GLubyte);
|
---|
220 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
|
---|
221 | pState->pDispatchTbl->ProgramNamedParameter4fNV(id, len, name, params[0], params[1], params[2], params[3]);
|
---|
222 | }
|
---|
223 |
|
---|
224 | void crUnpackExtendProgramNamedParameter4fvNV(PCrUnpackerState pState)
|
---|
225 | {
|
---|
226 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
|
---|
227 |
|
---|
228 | GLenum id = READ_DATA(pState, 8, GLuint);
|
---|
229 | GLsizei len = READ_DATA(pState, 12, GLsizei);
|
---|
230 | GLfloat *params = DATA_POINTER(pState, 16, GLfloat);
|
---|
231 | GLubyte *name = DATA_POINTER(pState, 32, GLubyte);
|
---|
232 |
|
---|
233 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
|
---|
234 | pState->pDispatchTbl->ProgramNamedParameter4fvNV(id, len, name, params);
|
---|
235 | }
|
---|
236 |
|
---|
237 | void crUnpackExtendGetProgramNamedParameterdvNV(PCrUnpackerState pState)
|
---|
238 | {
|
---|
239 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 12, GLsizei);
|
---|
240 |
|
---|
241 | GLuint id = READ_DATA(pState, 8, GLuint);
|
---|
242 | GLsizei len = READ_DATA(pState, 12, GLsizei);
|
---|
243 | const GLubyte *name = DATA_POINTER(pState, 16, GLubyte);
|
---|
244 |
|
---|
245 | if (len <= 0 || len >= INT32_MAX / 4)
|
---|
246 | {
|
---|
247 | crError("crUnpackExtendGetProgramNamedParameterdvNV: len %d is out of range", len);
|
---|
248 | pState->rcUnpack = VERR_INVALID_PARAMETER;
|
---|
249 | return;
|
---|
250 | }
|
---|
251 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
|
---|
252 | CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, 16 + len + sizeof(CRNetworkPointer), CRNetworkPointer);
|
---|
253 |
|
---|
254 | SET_RETURN_PTR(pState, 16+len);
|
---|
255 | SET_WRITEBACK_PTR(pState, 16+len+8);
|
---|
256 | pState->pDispatchTbl->GetProgramNamedParameterdvNV(id, len, name, NULL);
|
---|
257 | }
|
---|
258 |
|
---|
259 | void crUnpackExtendGetProgramNamedParameterfvNV(PCrUnpackerState pState)
|
---|
260 | {
|
---|
261 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 12, GLsizei);
|
---|
262 |
|
---|
263 | GLuint id = READ_DATA(pState, 8, GLuint);
|
---|
264 | GLsizei len = READ_DATA(pState, 12, GLsizei);
|
---|
265 | const GLubyte *name = DATA_POINTER(pState, 16, GLubyte);
|
---|
266 |
|
---|
267 | if (len <= 0 || len >= INT32_MAX / 4)
|
---|
268 | {
|
---|
269 | crError("crUnpackExtendGetProgramNamedParameterfvNV: len %d is out of range", len);
|
---|
270 | pState->rcUnpack = VERR_INVALID_PARAMETER;
|
---|
271 | return;
|
---|
272 | }
|
---|
273 |
|
---|
274 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, name, len, GLubyte);
|
---|
275 | CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, 16 + len + sizeof(CRNetworkPointer), CRNetworkPointer);
|
---|
276 | SET_RETURN_PTR(pState, 16+len);
|
---|
277 | SET_WRITEBACK_PTR(pState, 16+len+8);
|
---|
278 | pState->pDispatchTbl->GetProgramNamedParameterfvNV(id, len, name, NULL);
|
---|
279 | }
|
---|
280 |
|
---|
281 | void crUnpackExtendProgramStringARB(PCrUnpackerState pState)
|
---|
282 | {
|
---|
283 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 16, GLsizei);
|
---|
284 |
|
---|
285 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
286 | GLenum format = READ_DATA(pState, 12, GLuint);
|
---|
287 | GLsizei len = READ_DATA(pState, 16, GLsizei);
|
---|
288 | GLvoid *program = DATA_POINTER(pState, 20, GLvoid);
|
---|
289 |
|
---|
290 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, program, len, GLubyte);
|
---|
291 | pState->pDispatchTbl->ProgramStringARB(target, format, len, program);
|
---|
292 | }
|
---|
293 |
|
---|
294 | void crUnpackExtendGetProgramStringARB(PCrUnpackerState pState)
|
---|
295 | {
|
---|
296 | }
|
---|
297 |
|
---|
298 | void crUnpackExtendProgramEnvParameter4dvARB(PCrUnpackerState pState)
|
---|
299 | {
|
---|
300 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 40, GLdouble);
|
---|
301 |
|
---|
302 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
303 | GLuint index = READ_DATA(pState, 12, GLuint);
|
---|
304 | GLdouble params[4];
|
---|
305 | params[0] = READ_DOUBLE(pState, 16);
|
---|
306 | params[1] = READ_DOUBLE(pState, 24);
|
---|
307 | params[2] = READ_DOUBLE(pState, 32);
|
---|
308 | params[3] = READ_DOUBLE(pState, 40);
|
---|
309 | pState->pDispatchTbl->ProgramEnvParameter4dvARB(target, index, params);
|
---|
310 | }
|
---|
311 |
|
---|
312 | void crUnpackExtendProgramEnvParameter4fvARB(PCrUnpackerState pState)
|
---|
313 | {
|
---|
314 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 28, GLfloat);
|
---|
315 |
|
---|
316 | GLenum target = READ_DATA(pState, 8, GLenum);
|
---|
317 | GLuint index = READ_DATA(pState, 12, GLuint);
|
---|
318 | GLfloat params[4];
|
---|
319 | params[0] = READ_DATA(pState, 16, GLfloat);
|
---|
320 | params[1] = READ_DATA(pState, 20, GLfloat);
|
---|
321 | params[2] = READ_DATA(pState, 24, GLfloat);
|
---|
322 | params[3] = READ_DATA(pState, 28, GLfloat);
|
---|
323 | pState->pDispatchTbl->ProgramEnvParameter4fvARB(target, index, params);
|
---|
324 | }
|
---|
325 |
|
---|
326 | void crUnpackExtendDeleteProgramsARB(PCrUnpackerState pState)
|
---|
327 | {
|
---|
328 | CHECK_BUFFER_SIZE_STATIC_LAST(pState, 8, GLsizei);
|
---|
329 |
|
---|
330 | GLsizei n = READ_DATA(pState, 8, GLsizei);
|
---|
331 | const GLuint *programs = DATA_POINTER(pState, 12, GLuint);
|
---|
332 |
|
---|
333 | CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, programs, n, GLuint);
|
---|
334 | pState->pDispatchTbl->DeleteProgramsARB(n, programs);
|
---|
335 | }
|
---|
336 |
|
---|
337 | void crUnpackVertexAttrib4NbvARB(PCrUnpackerState pState)
|
---|
338 | {
|
---|
339 | CHECK_BUFFER_SIZE_STATIC(pState, 8);
|
---|
340 |
|
---|
341 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
342 | const GLbyte *v = DATA_POINTER(pState, 4, const GLbyte);
|
---|
343 |
|
---|
344 | pState->pDispatchTbl->VertexAttrib4NbvARB(index, v);
|
---|
345 | INCR_DATA_PTR(pState, 8);
|
---|
346 | }
|
---|
347 |
|
---|
348 | void crUnpackVertexAttrib4NivARB(PCrUnpackerState pState)
|
---|
349 | {
|
---|
350 | CHECK_BUFFER_SIZE_STATIC(pState, 20);
|
---|
351 |
|
---|
352 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
353 | const GLint *v = DATA_POINTER(pState, 4, const GLint);
|
---|
354 |
|
---|
355 | pState->pDispatchTbl->VertexAttrib4NivARB(index, v);
|
---|
356 | INCR_DATA_PTR(pState, 20);
|
---|
357 | }
|
---|
358 |
|
---|
359 | void crUnpackVertexAttrib4NsvARB(PCrUnpackerState pState)
|
---|
360 | {
|
---|
361 | CHECK_BUFFER_SIZE_STATIC(pState, 12);
|
---|
362 |
|
---|
363 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
364 | const GLshort *v = DATA_POINTER(pState, 4, const GLshort);
|
---|
365 |
|
---|
366 | pState->pDispatchTbl->VertexAttrib4NsvARB(index, v);
|
---|
367 | INCR_DATA_PTR(pState, 12);
|
---|
368 | }
|
---|
369 |
|
---|
370 | void crUnpackVertexAttrib4NubvARB(PCrUnpackerState pState)
|
---|
371 | {
|
---|
372 | CHECK_BUFFER_SIZE_STATIC(pState, 8);
|
---|
373 |
|
---|
374 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
375 | const GLubyte *v = DATA_POINTER(pState, 4, const GLubyte);
|
---|
376 |
|
---|
377 | pState->pDispatchTbl->VertexAttrib4NubvARB(index, v);
|
---|
378 | INCR_DATA_PTR(pState, 8);
|
---|
379 | }
|
---|
380 |
|
---|
381 | void crUnpackVertexAttrib4NuivARB(PCrUnpackerState pState)
|
---|
382 | {
|
---|
383 | CHECK_BUFFER_SIZE_STATIC(pState, 20);
|
---|
384 |
|
---|
385 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
386 | const GLuint *v = DATA_POINTER(pState, 4, const GLuint);
|
---|
387 |
|
---|
388 | pState->pDispatchTbl->VertexAttrib4NuivARB(index, v);
|
---|
389 | INCR_DATA_PTR(pState, 20);
|
---|
390 | }
|
---|
391 |
|
---|
392 | void crUnpackVertexAttrib4NusvARB(PCrUnpackerState pState)
|
---|
393 | {
|
---|
394 | CHECK_BUFFER_SIZE_STATIC(pState, 12);
|
---|
395 |
|
---|
396 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
397 | const GLushort *v = DATA_POINTER(pState, 4, const GLushort);
|
---|
398 |
|
---|
399 | pState->pDispatchTbl->VertexAttrib4NusvARB(index, v);
|
---|
400 | INCR_DATA_PTR(pState, 12);
|
---|
401 | }
|
---|
402 |
|
---|
403 | void crUnpackVertexAttrib4bvARB(PCrUnpackerState pState)
|
---|
404 | {
|
---|
405 | CHECK_BUFFER_SIZE_STATIC(pState, 8);
|
---|
406 |
|
---|
407 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
408 | const GLbyte *v = DATA_POINTER(pState, 4, const GLbyte);
|
---|
409 |
|
---|
410 | pState->pDispatchTbl->VertexAttrib4bvARB(index, v);
|
---|
411 | INCR_DATA_PTR(pState, 8);
|
---|
412 | }
|
---|
413 |
|
---|
414 | void crUnpackVertexAttrib4ivARB(PCrUnpackerState pState)
|
---|
415 | {
|
---|
416 | CHECK_BUFFER_SIZE_STATIC(pState, 20);
|
---|
417 |
|
---|
418 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
419 | const GLint *v = DATA_POINTER(pState, 4, const GLint);
|
---|
420 |
|
---|
421 | pState->pDispatchTbl->VertexAttrib4ivARB(index, v);
|
---|
422 | INCR_DATA_PTR(pState, 20);
|
---|
423 | }
|
---|
424 |
|
---|
425 | void crUnpackVertexAttrib4ubvARB(PCrUnpackerState pState)
|
---|
426 | {
|
---|
427 | CHECK_BUFFER_SIZE_STATIC(pState, 8);
|
---|
428 |
|
---|
429 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
430 | const GLubyte *v = DATA_POINTER(pState, 4, const GLubyte);
|
---|
431 |
|
---|
432 | pState->pDispatchTbl->VertexAttrib4ubvARB(index, v);
|
---|
433 | INCR_DATA_PTR(pState, 8);
|
---|
434 | }
|
---|
435 |
|
---|
436 | void crUnpackVertexAttrib4uivARB(PCrUnpackerState pState)
|
---|
437 | {
|
---|
438 | CHECK_BUFFER_SIZE_STATIC(pState, 20);
|
---|
439 |
|
---|
440 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
441 | const GLuint *v = DATA_POINTER(pState, 4, const GLuint);
|
---|
442 |
|
---|
443 | pState->pDispatchTbl->VertexAttrib4uivARB(index, v);
|
---|
444 | INCR_DATA_PTR(pState, 20);
|
---|
445 | }
|
---|
446 |
|
---|
447 | void crUnpackVertexAttrib4usvARB(PCrUnpackerState pState)
|
---|
448 | {
|
---|
449 | CHECK_BUFFER_SIZE_STATIC(pState, 12);
|
---|
450 |
|
---|
451 | GLuint index = READ_DATA(pState, 0, GLuint);
|
---|
452 | const GLushort *v = DATA_POINTER(pState, 4, const GLushort);
|
---|
453 |
|
---|
454 | pState->pDispatchTbl->VertexAttrib4usvARB(index, v);
|
---|
455 | INCR_DATA_PTR(pState, 12);
|
---|
456 | }
|
---|