|
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef OPENGLES11APIWRAPPER_H |
|
17 #define OPENGLES11APIWRAPPER_H |
|
18 |
|
19 #ifndef PSU_PLATFORMTYPES_H |
|
20 #include "platformtypes.h" |
|
21 #endif |
|
22 |
|
23 #include "opengles11rfc.h" |
|
24 #include "apiwrapper.h" |
|
25 |
|
26 class MGraphicsVHWCallback; |
|
27 |
|
28 /* vertex array pointers */ |
|
29 enum |
|
30 { |
|
31 COLOR_ARRAY, |
|
32 NORMAL_ARRAY, |
|
33 POINT_SIZE_ARRAY, |
|
34 TEX_COORD_ARRAY, |
|
35 VERTEX_ARRAY, |
|
36 MATRIX_INDEX_ARRAY, |
|
37 WEIGHT_ARRAY, |
|
38 NUM_ARRAYS |
|
39 }; |
|
40 typedef struct |
|
41 { |
|
42 GLint size; |
|
43 GLenum type; |
|
44 GLsizei stride; |
|
45 GLvoid *pointer; |
|
46 } vertexArrayInfo; |
|
47 |
|
48 class OGLES11Wrapper: public APIWrapper |
|
49 { |
|
50 public: |
|
51 OGLES11Wrapper(RemoteFunctionCallData& currentFunctionCallData, |
|
52 APIWrapperStack* stack, |
|
53 void* result, |
|
54 MGraphicsVHWCallback* serviceIf); |
|
55 |
|
56 void SetProcessInformation(TUint32 aProcess, TUint32 aThread) {} |
|
57 void Cleanup(TUint32 aProcess, TUint32 aThread) {} |
|
58 int DispatchRequest(unsigned long aCode); |
|
59 |
|
60 int WriteReply(); |
|
61 private: |
|
62 int m_lastGlError; |
|
63 OpenGlES11RFC m_currentFunctionCall; |
|
64 |
|
65 // Here follows the functions that map to the GL calls |
|
66 |
|
67 int glActiveTexture(); |
|
68 int glAlphaFunc(); |
|
69 int glAlphaFuncx(); |
|
70 int glBindBuffer(); |
|
71 int glBindTexture(); |
|
72 int glBlendFunc(); |
|
73 int glBufferData(); |
|
74 int glBufferSubData(); |
|
75 int glClear(); |
|
76 int glClearColor(); |
|
77 int glClearColorx(); |
|
78 int glClearDepthf(); |
|
79 int glClearDepthx(); |
|
80 int glClearStencil(); |
|
81 int glClientActiveTexture(); |
|
82 int glClipPlanef(); |
|
83 int glClipPlanex(); |
|
84 int glColor4f(); |
|
85 int glColor4ub(); |
|
86 int glColor4x(); |
|
87 int glColorMask(); |
|
88 int glColorPointer(); |
|
89 int glCompressedTexImage2D(); |
|
90 int glCompressedTexSubImage2D(); |
|
91 int glCopyTexImage2D(); |
|
92 int glCopyTexSubImage2D(); |
|
93 int glCullFace(); |
|
94 int glDeleteBuffers(); |
|
95 int glDeleteTextures(); |
|
96 int glDepthFunc(); |
|
97 int glDepthMask(); |
|
98 int glDepthRangef(); |
|
99 int glDepthRangex(); |
|
100 int glDisable(); |
|
101 int glDisableClientState(); |
|
102 int glDrawArrays(); |
|
103 int glDrawElements(); |
|
104 int glEnable(); |
|
105 int glEnableClientState(); |
|
106 int glFinish(); |
|
107 int glFlush(); |
|
108 int glFogf(); |
|
109 int glFogfv(); |
|
110 int glFogx(); |
|
111 int glFogxv(); |
|
112 int glFrontFace(); |
|
113 int glFrustumf(); |
|
114 int glFrustumx(); |
|
115 int glGenBuffers(); |
|
116 int glGenTextures(); |
|
117 int glGetBooleanv(); |
|
118 int glGetBufferParameteriv(); |
|
119 int glGetClipPlanef(); |
|
120 int glGetClipPlanex(); |
|
121 int glGetError(); |
|
122 int glGetFixedv(); |
|
123 int glGetFloatv(); |
|
124 int glGetIntegerv(); |
|
125 int glGetLightfv(); |
|
126 int glGetLightxv(); |
|
127 int glGetMaterialfv(); |
|
128 int glGetMaterialxv(); |
|
129 int glGetPointerv(); |
|
130 int glGetString(); |
|
131 int glGetTexEnvfv(); |
|
132 int glGetTexEnviv(); |
|
133 int glGetTexEnvxv(); |
|
134 int glGetTexParameterfv(); |
|
135 int glGetTexParameteriv(); |
|
136 int glGetTexParameterxv(); |
|
137 int glHint(); |
|
138 int glIsBuffer(); |
|
139 int glIsEnabled(); |
|
140 int glIsTexture(); |
|
141 int glLightModelf(); |
|
142 int glLightModelfv(); |
|
143 int glLightModelx(); |
|
144 int glLightModelxv(); |
|
145 int glLightf(); |
|
146 int glLightfv(); |
|
147 int glLightx(); |
|
148 int glLightxv(); |
|
149 int glLineWidth(); |
|
150 int glLineWidthx(); |
|
151 int glLoadIdentity(); |
|
152 int glLoadMatrixf(); |
|
153 int glLoadMatrixx(); |
|
154 int glLogicOp(); |
|
155 int glMaterialf(); |
|
156 int glMaterialfv(); |
|
157 int glMaterialx(); |
|
158 int glMaterialxv(); |
|
159 int glMatrixMode(); |
|
160 int glMultMatrixf(); |
|
161 int glMultMatrixx(); |
|
162 int glMultiTexCoord4f(); |
|
163 int glMultiTexCoord4x(); |
|
164 int glNormal3f(); |
|
165 int glNormal3x(); |
|
166 int glNormalPointer(); |
|
167 int glOrthof(); |
|
168 int glOrthox(); |
|
169 int glPixelStorei(); |
|
170 int glPointParameterf(); |
|
171 int glPointParameterfv(); |
|
172 int glPointParameterx(); |
|
173 int glPointParameterxv(); |
|
174 int glPointSize(); |
|
175 int glPointSizex(); |
|
176 int glPolygonOffset(); |
|
177 int glPolygonOffsetx(); |
|
178 int glPopMatrix(); |
|
179 int glPushMatrix(); |
|
180 int glReadPixels(); |
|
181 int glRotatef(); |
|
182 int glRotatex(); |
|
183 int glSampleCoverage(); |
|
184 int glSampleCoveragex(); |
|
185 int glScalef(); |
|
186 int glScalex(); |
|
187 int glScissor(); |
|
188 int glShadeModel(); |
|
189 int glStencilFunc(); |
|
190 int glStencilMask(); |
|
191 int glStencilOp(); |
|
192 int glTexCoordPointer(); |
|
193 int glTexEnvf(); |
|
194 int glTexEnvfv(); |
|
195 int glTexEnvi(); |
|
196 int glTexEnviv(); |
|
197 int glTexEnvx(); |
|
198 int glTexEnvxv(); |
|
199 int glTexImage2D(); |
|
200 int glTexParameterf(); |
|
201 int glTexParameterfv(); |
|
202 int glTexParameteri(); |
|
203 int glTexParameteriv(); |
|
204 int glTexParameterx(); |
|
205 int glTexParameterxv(); |
|
206 int glTexSubImage2D(); |
|
207 int glTranslatef(); |
|
208 int glTranslatex(); |
|
209 int glVertexPointer(); |
|
210 int glViewport(); |
|
211 int glCurrentPaletteMatrixOES(); |
|
212 int glDrawTexfOES(); |
|
213 int glDrawTexfvOES(); |
|
214 int glDrawTexiOES(); |
|
215 int glDrawTexivOES(); |
|
216 int glDrawTexsOES(); |
|
217 int glDrawTexsvOES(); |
|
218 int glDrawTexxOES(); |
|
219 int glDrawTexxvOES(); |
|
220 int glLoadPaletteFromModelViewMatrixOES(); |
|
221 int glQueryMatrixxOES(); |
|
222 |
|
223 }; |
|
224 |
|
225 #endif |