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_mem.h"
|
---|
9 | #include "cr_error.h"
|
---|
10 |
|
---|
11 |
|
---|
12 | void crUnpackExtendGetBufferSubDataARB( void )
|
---|
13 | {
|
---|
14 | GLenum target = READ_DATA( 8, GLenum );
|
---|
15 | GLintptrARB offset = READ_DATA( 12, GLuint );
|
---|
16 | GLsizeiptrARB size = READ_DATA( 16, GLuint );
|
---|
17 |
|
---|
18 | SET_RETURN_PTR( 20 );
|
---|
19 | SET_WRITEBACK_PTR( 28 );
|
---|
20 |
|
---|
21 | cr_unpackDispatch.GetBufferSubDataARB( target, offset, size, NULL );
|
---|
22 | }
|
---|
23 |
|
---|
24 |
|
---|
25 | void crUnpackExtendBufferDataARB( void )
|
---|
26 | {
|
---|
27 | GLenum target = READ_DATA(sizeof(int) + 4, GLenum);
|
---|
28 | GLsizeiptrARB size = READ_DATA(sizeof(int) + 8, GLuint);
|
---|
29 | GLenum usage = READ_DATA(sizeof(int) + 12, GLenum);
|
---|
30 | GLboolean hasdata = READ_DATA(sizeof(int) + 16, GLint);
|
---|
31 | GLvoid *data = DATA_POINTER(sizeof(int) + 20, GLvoid);
|
---|
32 |
|
---|
33 | cr_unpackDispatch.BufferDataARB(target, size, hasdata ? data:NULL, usage);
|
---|
34 | }
|
---|
35 |
|
---|
36 |
|
---|
37 | void crUnpackExtendBufferSubDataARB( void )
|
---|
38 | {
|
---|
39 | GLenum target = READ_DATA( sizeof(int) + 4, GLenum );
|
---|
40 | GLintptrARB offset = READ_DATA( sizeof(int) + 8, GLuint );
|
---|
41 | GLsizeiptrARB size = READ_DATA( sizeof(int) + 12, GLuint );
|
---|
42 | GLvoid *data = DATA_POINTER( sizeof(int) + 16, GLvoid );
|
---|
43 |
|
---|
44 | cr_unpackDispatch.BufferSubDataARB( target, offset, size, data );
|
---|
45 | }
|
---|
46 |
|
---|
47 |
|
---|
48 | void crUnpackExtendDeleteBuffersARB(void)
|
---|
49 | {
|
---|
50 | GLsizei n = READ_DATA( 8, GLsizei );
|
---|
51 | const GLuint *buffers = DATA_POINTER( 12, GLuint );
|
---|
52 | cr_unpackDispatch.DeleteBuffersARB( n, buffers );
|
---|
53 | }
|
---|
54 |
|
---|