VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_bufferobject.c@ 28360

Last change on this file since 28360 was 22155, checked in by vboxsync, 15 years ago

crOpenGL: add GL_EXT_framebuffer_object support

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
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
13void * SERVER_DISPATCH_APIENTRY
14crServerDispatchMapBufferARB( GLenum target, GLenum access )
15{
16 return NULL;
17}
18
19GLboolean SERVER_DISPATCH_APIENTRY
20crServerDispatchUnmapBufferARB( GLenum target )
21{
22 return GL_FALSE;
23}
24
25void SERVER_DISPATCH_APIENTRY
26crServerDispatchGenBuffersARB(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
35void SERVER_DISPATCH_APIENTRY
36crServerDispatchGetBufferPointervARB(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
44void SERVER_DISPATCH_APIENTRY
45crServerDispatchGetBufferSubDataARB(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}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette