VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_bufferobject.c@ 24503

Last change on this file since 24503 was 21423, checked in by vboxsync, 15 years ago

crOpenGL: fix VBOs on NVidia cards

  • 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 "unpacker.h"
8#include "cr_mem.h"
9#include "cr_error.h"
10
11
12void 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
25void 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
37void 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
48void 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
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