1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/* Copyright (c) 2001, Stanford University
* All rights reserved
*
* See the file LICENSE.txt for information on redistributing this software.
*/
#include "chromium.h"
#include "cr_error.h"
#include "cr_mem.h"
#include "server_dispatch.h"
#include "server.h"
void * SERVER_DISPATCH_APIENTRY
crServerDispatchMapBufferARB( GLenum target, GLenum access )
{
return NULL;
}
GLboolean SERVER_DISPATCH_APIENTRY
crServerDispatchUnmapBufferARB( GLenum target )
{
return GL_FALSE;
}
void SERVER_DISPATCH_APIENTRY
crServerDispatchGenBuffersARB(GLsizei n, GLuint *buffers)
{
GLuint *local_buffers = (GLuint *) crAlloc( n * sizeof(*local_buffers) );
(void) buffers;
crStateGenBuffersARB(n, local_buffers);
crServerReturnValue( local_buffers, n * sizeof(*local_buffers) );
crFree( local_buffers );
}
void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteBuffersARB( GLsizei n, const GLuint * buffer )
{
crStateDeleteBuffersARB( n, buffer );
}
void SERVER_DISPATCH_APIENTRY
crServerDispatchGetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params)
{
crError( "glGetBufferPointervARB isn't *ever* allowed to be on the wire!" );
(void) target;
(void) pname;
(void) params;
}
void SERVER_DISPATCH_APIENTRY
crServerDispatchGetBufferSubDataARB(GLenum target, GLintptrARB offset,
GLsizeiptrARB size, void * data)
{
void *b;
b = crAlloc(size);
if (b) {
cr_server.head_spu->dispatch_table.GetBufferSubDataARB( target, offset, size, b );
crServerReturnValue( b, size );
crFree( b );
}
else {
crError("Out of memory in crServerDispatchGetBufferSubDataARB");
}
}
void SERVER_DISPATCH_APIENTRY
crServerDispatchBindBufferARB(GLenum target, GLuint buffer)
{
crStateBindBufferARB(target, buffer);
cr_server.head_spu->dispatch_table.BindBufferARB(target, crStateGetBufferHWID(buffer));
}
GLboolean SERVER_DISPATCH_APIENTRY
crServerDispatchIsBufferARB(GLuint buffer)
{
/* since GenBuffersARB issued to host ogl only on bind + some other ops, the host drivers may not know about them
* so use state data*/
GLboolean retval = crStateIsBufferARB(buffer);
crServerReturnValue( &retval, sizeof(retval) );
return retval; /* WILL PROBABLY BE IGNORED */
}
|