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 "chromium.h"
|
---|
8 | #include "cr_error.h"
|
---|
9 | #include "cr_mem.h"
|
---|
10 | #include "server_dispatch.h"
|
---|
11 | #include "server.h"
|
---|
12 |
|
---|
13 | void * SERVER_DISPATCH_APIENTRY
|
---|
14 | crServerDispatchMapBufferARB( GLenum target, GLenum access )
|
---|
15 | {
|
---|
16 | return NULL;
|
---|
17 | }
|
---|
18 |
|
---|
19 | GLboolean SERVER_DISPATCH_APIENTRY
|
---|
20 | crServerDispatchUnmapBufferARB( GLenum target )
|
---|
21 | {
|
---|
22 | return GL_FALSE;
|
---|
23 | }
|
---|
24 |
|
---|
25 | void SERVER_DISPATCH_APIENTRY
|
---|
26 | crServerDispatchGenBuffersARB(GLsizei n, GLuint *buffers)
|
---|
27 | {
|
---|
28 | GLuint *local_buffers = (GLuint *) crAlloc( n * sizeof(*local_buffers) );
|
---|
29 | (void) buffers;
|
---|
30 | cr_server.head_spu->dispatch_table.GenBuffersARB( n, local_buffers );
|
---|
31 | crServerReturnValue( local_buffers, n * sizeof(*local_buffers) );
|
---|
32 | crFree( local_buffers );
|
---|
33 | }
|
---|
34 |
|
---|
35 | void SERVER_DISPATCH_APIENTRY
|
---|
36 | crServerDispatchGetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params)
|
---|
37 | {
|
---|
38 | crError( "glGetBufferPointervARB isn't *ever* allowed to be on the wire!" );
|
---|
39 | (void) target;
|
---|
40 | (void) pname;
|
---|
41 | (void) params;
|
---|
42 | }
|
---|
43 |
|
---|
44 | void SERVER_DISPATCH_APIENTRY
|
---|
45 | crServerDispatchGetBufferSubDataARB(GLenum target, GLintptrARB offset,
|
---|
46 | GLsizeiptrARB size, void * data)
|
---|
47 | {
|
---|
48 | void *b;
|
---|
49 |
|
---|
50 | b = crAlloc(size);
|
---|
51 | if (b) {
|
---|
52 | cr_server.head_spu->dispatch_table.GetBufferSubDataARB( target, offset, size, b );
|
---|
53 |
|
---|
54 | crServerReturnValue( b, size );
|
---|
55 | crFree( b );
|
---|
56 | }
|
---|
57 | else {
|
---|
58 | crError("Out of memory in crServerDispatchGetBufferSubDataARB");
|
---|
59 | }
|
---|
60 | }
|
---|
61 |
|
---|