VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_arrays.c@ 20392

最後變更 在這個檔案從20392是 15532,由 vboxsync 提交於 16 年 前

crOpenGL: export to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 4.4 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 "cr_error.h"
8#include "unpack_extend.h"
9#include "unpacker.h"
10/**
11 * \mainpage Unpacker
12 *
13 * \section UnpackerIntroduction Introduction
14 *
15 * Chromium consists of all the top-level files in the cr
16 * directory. The unpacker module basically takes care of API dispatch,
17 * and OpenGL state management.
18 *
19 */
20
21void crUnpackExtendVertexPointer(void)
22{
23 GLint size = READ_DATA( 8, GLint );
24 GLenum type = READ_DATA( 12, GLenum );
25 GLsizei stride = READ_DATA( 16, GLsizei );
26 GLintptrARB pointer = READ_DATA( 20, GLintptrARB );
27 cr_unpackDispatch.VertexPointer( size, type, stride, (void *) pointer );
28}
29
30void crUnpackExtendTexCoordPointer(void)
31{
32 GLint size = READ_DATA( 8, GLint );
33 GLenum type = READ_DATA( 12, GLenum );
34 GLsizei stride = READ_DATA( 16, GLsizei );
35 GLintptrARB pointer = READ_DATA( 20, GLintptrARB );
36 cr_unpackDispatch.TexCoordPointer( size, type, stride, (void *) pointer );
37}
38
39void crUnpackExtendNormalPointer(void)
40{
41 GLenum type = READ_DATA( 8, GLenum );
42 GLsizei stride = READ_DATA( 12, GLsizei );
43 GLintptrARB pointer = READ_DATA( 16, GLintptrARB );
44 cr_unpackDispatch.NormalPointer( type, stride, (void *) pointer );
45}
46
47void crUnpackExtendIndexPointer(void)
48{
49 GLenum type = READ_DATA( 8, GLenum );
50 GLsizei stride = READ_DATA( 12, GLsizei );
51 GLintptrARB pointer = READ_DATA( 16, GLintptrARB );
52 cr_unpackDispatch.IndexPointer( type, stride, (void *) pointer );
53}
54
55void crUnpackExtendEdgeFlagPointer(void)
56{
57 GLsizei stride = READ_DATA( 8, GLsizei );
58 GLintptrARB pointer = READ_DATA( 12, GLintptrARB );
59 cr_unpackDispatch.EdgeFlagPointer( stride, (void *) pointer );
60}
61
62void crUnpackExtendColorPointer(void)
63{
64 GLint size = READ_DATA( 8, GLint );
65 GLenum type = READ_DATA( 12, GLenum );
66 GLsizei stride = READ_DATA( 16, GLsizei );
67 GLintptrARB pointer = READ_DATA( 20, GLintptrARB );
68 cr_unpackDispatch.ColorPointer( size, type, stride, (void *) pointer );
69}
70
71void crUnpackExtendFogCoordPointerEXT(void)
72{
73 GLenum type = READ_DATA( 8, GLenum );
74 GLsizei stride = READ_DATA( 12, GLsizei );
75 GLintptrARB pointer = READ_DATA( 16, GLintptrARB );
76 cr_unpackDispatch.FogCoordPointerEXT( type, stride, (void *) pointer );
77}
78
79void crUnpackExtendSecondaryColorPointerEXT(void)
80{
81 GLint size = READ_DATA( 8, GLint );
82 GLenum type = READ_DATA( 12, GLenum );
83 GLsizei stride = READ_DATA( 16, GLsizei );
84 GLintptrARB pointer = READ_DATA( 20, GLintptrARB );
85 cr_unpackDispatch.SecondaryColorPointerEXT( size, type, stride, (void *) pointer );
86}
87
88void crUnpackExtendVertexAttribPointerARB(void)
89{
90 GLuint index = READ_DATA( 8, GLuint);
91 GLint size = READ_DATA( 12, GLint );
92 GLenum type = READ_DATA( 16, GLenum );
93 GLboolean normalized = READ_DATA( 20, GLboolean );
94 GLsizei stride = READ_DATA( 24, GLsizei );
95 GLintptrARB pointer = READ_DATA( 28, GLintptrARB );
96 cr_unpackDispatch.VertexAttribPointerARB( index, size, type, normalized, stride, (void *) pointer );
97}
98
99void crUnpackExtendVertexAttribPointerNV(void)
100{
101 GLuint index = READ_DATA( 8, GLuint);
102 GLint size = READ_DATA( 12, GLint );
103 GLenum type = READ_DATA( 16, GLenum );
104 GLsizei stride = READ_DATA( 20, GLsizei );
105 GLintptrARB pointer = READ_DATA( 24, GLintptrARB );
106 cr_unpackDispatch.VertexAttribPointerNV( index, size, type, stride, (void *) pointer );
107}
108
109void crUnpackExtendInterleavedArrays(void)
110{
111 GLenum format = READ_DATA( 8, GLenum );
112 GLsizei stride = READ_DATA( 12, GLsizei );
113 GLintptrARB pointer = READ_DATA( 16, GLintptrARB );
114 cr_unpackDispatch.InterleavedArrays( format, stride, (void *) pointer );
115}
116
117void crUnpackExtendDrawElements(void)
118{
119 GLenum mode = READ_DATA( 8, GLenum );
120 GLsizei count = READ_DATA( 12, GLsizei );
121 GLenum type = READ_DATA( 16, GLenum );
122 GLintptrARB indices = READ_DATA( 20, GLintptrARB );
123 cr_unpackDispatch.DrawElements( mode, count, type, (void *) indices);
124}
125
126void crUnpackExtendDrawRangeElements(void)
127{
128 GLenum mode = READ_DATA( 8, GLenum );
129 GLuint start = READ_DATA( 12, GLuint );
130 GLuint end = READ_DATA( 16, GLuint );
131 GLsizei count = READ_DATA( 20, GLsizei );
132 GLenum type = READ_DATA( 24, GLenum );
133 GLintptrARB indices = READ_DATA( 28, GLintptrARB );
134 cr_unpackDispatch.DrawRangeElements( mode, start, end, count, type, (void *) indices);
135}
136
137void crUnpackMultiDrawArraysEXT(void)
138{
139 crError( "Can't decode MultiDrawArraysEXT" );
140}
141
142void crUnpackMultiDrawElementsEXT(void)
143{
144 crError( "Can't decode MultiDrawElementsEXT" );
145}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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