VirtualBox

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

最後變更 在這個檔案從43031是 31808,由 vboxsync 提交於 14 年 前

crOpenGL: resource sharing between contexts

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 2.0 KB
 
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}
61
62void SERVER_DISPATCH_APIENTRY
63crServerDispatchBindBufferARB(GLenum target, GLuint buffer)
64{
65 crStateBindBufferARB(target, buffer);
66 cr_server.head_spu->dispatch_table.BindBufferARB(target, crStateGetBufferHWID(buffer));
67}
68
69GLboolean SERVER_DISPATCH_APIENTRY
70crServerDispatchIsBufferARB(GLuint buffer)
71{
72 GLboolean retval;
73 retval = cr_server.head_spu->dispatch_table.IsBufferARB(crStateGetBufferHWID(buffer));
74 crServerReturnValue( &retval, sizeof(retval) );
75 return retval; /* WILL PROBABLY BE IGNORED */
76}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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