VirtualBox

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

最後變更 在這個檔案從53466是 21423,由 vboxsync 提交於 15 年 前

crOpenGL: fix VBOs on NVidia cards

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.5 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 "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
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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