16
|
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 |
// Implementation of Guest OpenGL ES 1.1 serialization stubs
|
|
15 |
|
|
16 |
#include "remotefunctioncall.h"
|
|
17 |
#include "opengles11rfc.h"
|
|
18 |
#include "vghwutils.h"
|
|
19 |
#include "opengl.h"
|
|
20 |
|
|
21 |
// Writeable Static Data, is initialised to 0s by the compiler
|
|
22 |
vertexArrayInfo vertexArrays[NUM_ARRAYS];
|
|
23 |
bool vertexArraysEnabled[NUM_ARRAYS];
|
|
24 |
|
|
25 |
|
|
26 |
// Writeable Static Data - causes constructor to be called at DLL load time.
|
|
27 |
TGles11ApiForEgl GlesApiExporter;
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
// Informative Panic messages
|
|
32 |
_LIT(KGlesPanicCategory, "Guest GLES");
|
|
33 |
|
|
34 |
void GlesPanic(TGlPanic aPanicCode, char* aCondition, char* aFile, TInt aLine)
|
|
35 |
{
|
|
36 |
if (aCondition && aFile)
|
|
37 |
{
|
|
38 |
RDebug::Printf("Guest Open GLES DLL Panic %d for failed Assert (%s), at %s:%d", aPanicCode, aCondition, aFile, aLine);
|
|
39 |
}
|
|
40 |
else
|
|
41 |
{
|
|
42 |
RDebug::Printf("Guest Open GLES DLL Panic %d for failed Assert (line %d)", aPanicCode, aLine);
|
|
43 |
}
|
|
44 |
|
|
45 |
User::Panic(KGlesPanicCategory, aPanicCode);
|
|
46 |
}
|
|
47 |
|
|
48 |
|
|
49 |
inline void SetError(GLint aError)
|
|
50 |
{
|
|
51 |
MGlesContext* glesContext = CVghwUtils::GlesContext();
|
|
52 |
if (glesContext)
|
|
53 |
{ // there is a GL ES context
|
|
54 |
glesContext->SetGlesError(aError);
|
|
55 |
}
|
|
56 |
}
|
|
57 |
|
|
58 |
inline void ExecuteCommand(RemoteFunctionCall& aRequestData)
|
|
59 |
{
|
|
60 |
MGlesContext* glesContext = CVghwUtils::GlesContext();
|
|
61 |
if (glesContext)
|
|
62 |
{ // there is a GL ES context
|
|
63 |
glesContext->ExecuteGlesCommand(aRequestData);
|
|
64 |
}
|
|
65 |
}
|
|
66 |
|
|
67 |
inline TUint32 ExecuteFunction(RemoteFunctionCall& aRequestData)
|
|
68 |
{
|
|
69 |
GLPANIC_ASSERT_DEBUG(aRequestData.Data().Header().iOpType == RemoteFunctionCallData::EOpRequestWithReply, EGlPanicNotReplyOpcode);
|
|
70 |
MGlesContext* glesContext = CVghwUtils::GlesContext();
|
|
71 |
if (glesContext)
|
|
72 |
{ // there is GL ES context
|
|
73 |
glesContext->ExecuteGlesCommand(aRequestData);
|
|
74 |
return aRequestData.ReturnValue();
|
|
75 |
}
|
|
76 |
return 0;
|
|
77 |
}
|
|
78 |
|
|
79 |
|
|
80 |
extern "C" {
|
|
81 |
|
|
82 |
EXPORT_C void GL_APIENTRY glActiveTexture (GLenum texture)
|
|
83 |
{
|
|
84 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glActiveTexture ->\n");
|
|
85 |
RemoteFunctionCallData rfcData;
|
|
86 |
OpenGlES11RFC call( rfcData );
|
|
87 |
call.Init( OpenGlES11RFC::EglActiveTexture, RemoteFunctionCallData::EOpRequest );
|
|
88 |
call.AppendParam( texture );
|
|
89 |
ExecuteCommand(call);
|
|
90 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glActiveTexture <-\n");
|
|
91 |
}
|
|
92 |
|
|
93 |
EXPORT_C void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref) __SOFTFP
|
|
94 |
{
|
|
95 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glAlphaFunc ->\n");
|
|
96 |
RemoteFunctionCallData rfcData;
|
|
97 |
OpenGlES11RFC call( rfcData );
|
|
98 |
call.Init( OpenGlES11RFC::EglAlphaFunc, RemoteFunctionCallData::EOpRequest );
|
|
99 |
call.AppendParam( func );
|
|
100 |
call.AppendParam( ref );
|
|
101 |
ExecuteCommand(call);
|
|
102 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glAlphaFunc <-\n");
|
|
103 |
}
|
|
104 |
|
|
105 |
EXPORT_C void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref)
|
|
106 |
{
|
|
107 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glAlphaFuncx ->\n");
|
|
108 |
RemoteFunctionCallData rfcData;
|
|
109 |
OpenGlES11RFC call( rfcData );
|
|
110 |
call.Init( OpenGlES11RFC::EglAlphaFuncx, RemoteFunctionCallData::EOpRequest );
|
|
111 |
call.AppendParam( func );
|
|
112 |
call.AppendParam( ref );
|
|
113 |
ExecuteCommand(call);
|
|
114 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glAlphaFuncx <-\n");
|
|
115 |
}
|
|
116 |
|
|
117 |
EXPORT_C void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer)
|
|
118 |
{
|
|
119 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBindBuffer ->\n");
|
|
120 |
RemoteFunctionCallData rfcData;
|
|
121 |
OpenGlES11RFC call( rfcData );
|
|
122 |
call.Init( OpenGlES11RFC::EglBindBuffer, RemoteFunctionCallData::EOpRequest );
|
|
123 |
call.AppendParam( target );
|
|
124 |
call.AppendParam( buffer );
|
|
125 |
ExecuteCommand(call);
|
|
126 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBindBuffer <-\n");
|
|
127 |
}
|
|
128 |
|
|
129 |
EXPORT_C void GL_APIENTRY glBindTexture (GLenum target, GLuint texture)
|
|
130 |
{
|
|
131 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBindTexture ->\n");
|
|
132 |
RemoteFunctionCallData rfcData;
|
|
133 |
OpenGlES11RFC call( rfcData );
|
|
134 |
call.Init( OpenGlES11RFC::EglBindTexture, RemoteFunctionCallData::EOpRequest );
|
|
135 |
call.AppendParam( target );
|
|
136 |
call.AppendParam( texture );
|
|
137 |
ExecuteCommand(call);
|
|
138 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBindTexture <-\n");
|
|
139 |
}
|
|
140 |
|
|
141 |
EXPORT_C void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor)
|
|
142 |
{
|
|
143 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBlendFunc ->\n");
|
|
144 |
RemoteFunctionCallData rfcData;
|
|
145 |
OpenGlES11RFC call( rfcData );
|
|
146 |
call.Init( OpenGlES11RFC::EglBlendFunc, RemoteFunctionCallData::EOpRequest );
|
|
147 |
call.AppendParam( sfactor );
|
|
148 |
call.AppendParam( dfactor );
|
|
149 |
ExecuteCommand(call);
|
|
150 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBlendFunc <-\n");
|
|
151 |
}
|
|
152 |
|
|
153 |
EXPORT_C void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
|
|
154 |
{
|
|
155 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBufferData ->\n");
|
|
156 |
if(size < 0) // cannot serialize vector with size < 0
|
|
157 |
{
|
|
158 |
SetError( GL_INVALID_VALUE );
|
|
159 |
return;
|
|
160 |
}
|
|
161 |
RemoteFunctionCallData rfcData;
|
|
162 |
OpenGlES11RFC call( rfcData );
|
|
163 |
call.Init( OpenGlES11RFC::EglBufferData, RemoteFunctionCallData::EOpRequest );
|
|
164 |
call.AppendParam( target );
|
|
165 |
call.AppendParam( size );
|
|
166 |
call.AppendVector( data, size );
|
|
167 |
call.AppendParam( usage );
|
|
168 |
ExecuteCommand(call);
|
|
169 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBufferData <-\n");
|
|
170 |
}
|
|
171 |
|
|
172 |
EXPORT_C void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
|
|
173 |
{
|
|
174 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBufferSubData ->\n");
|
|
175 |
if(offset < 0 || size < 0) // cannot serialize vector with size < 0
|
|
176 |
{
|
|
177 |
SetError( GL_INVALID_VALUE );
|
|
178 |
return;
|
|
179 |
}
|
|
180 |
RemoteFunctionCallData rfcData;
|
|
181 |
OpenGlES11RFC call( rfcData );
|
|
182 |
call.Init( OpenGlES11RFC::EglBufferSubData, RemoteFunctionCallData::EOpRequest );
|
|
183 |
call.AppendParam( target );
|
|
184 |
call.AppendParam( offset );
|
|
185 |
call.AppendParam( size );
|
|
186 |
call.AppendVector( data, offset+size );
|
|
187 |
ExecuteCommand(call);
|
|
188 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glBufferSubData <-\n");
|
|
189 |
}
|
|
190 |
|
|
191 |
EXPORT_C void GL_APIENTRY glClear (GLbitfield mask)
|
|
192 |
{
|
|
193 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClear ->\n");
|
|
194 |
RemoteFunctionCallData rfcData;
|
|
195 |
OpenGlES11RFC call( rfcData );
|
|
196 |
call.Init( OpenGlES11RFC::EglClear, RemoteFunctionCallData::EOpRequest );
|
|
197 |
call.AppendParam( mask );
|
|
198 |
ExecuteCommand(call);
|
|
199 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClear <-\n");
|
|
200 |
}
|
|
201 |
|
|
202 |
EXPORT_C void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) __SOFTFP
|
|
203 |
{
|
|
204 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearColor ->\n");
|
|
205 |
RemoteFunctionCallData rfcData;
|
|
206 |
OpenGlES11RFC call( rfcData );
|
|
207 |
call.Init( OpenGlES11RFC::EglClearColor, RemoteFunctionCallData::EOpRequest );
|
|
208 |
call.AppendParam( red );
|
|
209 |
call.AppendParam( green );
|
|
210 |
call.AppendParam( blue );
|
|
211 |
call.AppendParam( alpha );
|
|
212 |
ExecuteCommand(call);
|
|
213 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearColor <-\n");
|
|
214 |
}
|
|
215 |
|
|
216 |
EXPORT_C void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha)
|
|
217 |
{
|
|
218 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearColorx ->\n");
|
|
219 |
RemoteFunctionCallData rfcData;
|
|
220 |
OpenGlES11RFC call( rfcData );
|
|
221 |
call.Init( OpenGlES11RFC::EglClearColorx, RemoteFunctionCallData::EOpRequest );
|
|
222 |
call.AppendParam( red );
|
|
223 |
call.AppendParam( green );
|
|
224 |
call.AppendParam( blue );
|
|
225 |
call.AppendParam( alpha );
|
|
226 |
ExecuteCommand(call);
|
|
227 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearColorx <-\n");
|
|
228 |
}
|
|
229 |
|
|
230 |
EXPORT_C void GL_APIENTRY glClearDepthf (GLclampf depth) __SOFTFP
|
|
231 |
{
|
|
232 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearDepthf ->\n");
|
|
233 |
RemoteFunctionCallData rfcData;
|
|
234 |
OpenGlES11RFC call( rfcData );
|
|
235 |
call.Init( OpenGlES11RFC::EglClearDepthf, RemoteFunctionCallData::EOpRequest );
|
|
236 |
call.AppendParam( depth );
|
|
237 |
ExecuteCommand(call);
|
|
238 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearDepthf <-\n");
|
|
239 |
}
|
|
240 |
|
|
241 |
EXPORT_C void GL_APIENTRY glClearDepthx (GLclampx depth)
|
|
242 |
{
|
|
243 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearDepthx ->\n");
|
|
244 |
RemoteFunctionCallData rfcData;
|
|
245 |
OpenGlES11RFC call( rfcData );
|
|
246 |
call.Init( OpenGlES11RFC::EglClearDepthx, RemoteFunctionCallData::EOpRequest );
|
|
247 |
call.AppendParam( depth );
|
|
248 |
ExecuteCommand(call);
|
|
249 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearDepthx <-\n");
|
|
250 |
}
|
|
251 |
|
|
252 |
EXPORT_C void GL_APIENTRY glClearStencil (GLint s)
|
|
253 |
{
|
|
254 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearStencil ->\n");
|
|
255 |
RemoteFunctionCallData rfcData;
|
|
256 |
OpenGlES11RFC call( rfcData );
|
|
257 |
call.Init( OpenGlES11RFC::EglClearStencil, RemoteFunctionCallData::EOpRequest );
|
|
258 |
call.AppendParam( s );
|
|
259 |
ExecuteCommand(call);
|
|
260 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClearStencil <-\n");
|
|
261 |
}
|
|
262 |
|
|
263 |
EXPORT_C void GL_APIENTRY glClientActiveTexture (GLenum texture)
|
|
264 |
{
|
|
265 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClientActiveTexture ->\n");
|
|
266 |
RemoteFunctionCallData rfcData;
|
|
267 |
OpenGlES11RFC call( rfcData );
|
|
268 |
call.Init( OpenGlES11RFC::EglClientActiveTexture, RemoteFunctionCallData::EOpRequest );
|
|
269 |
call.AppendParam( texture );
|
|
270 |
ExecuteCommand(call);
|
|
271 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClientActiveTexture <-\n");
|
|
272 |
}
|
|
273 |
|
|
274 |
EXPORT_C void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation)
|
|
275 |
{
|
|
276 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClipPlanef ->\n");
|
|
277 |
RemoteFunctionCallData rfcData;
|
|
278 |
OpenGlES11RFC call( rfcData );
|
|
279 |
call.Init( OpenGlES11RFC::EglClipPlanef, RemoteFunctionCallData::EOpRequest );
|
|
280 |
call.AppendParam( plane );
|
|
281 |
call.AppendVector( equation, 4 ); // 4 values according to OpenGL_ES_1.1.12.pdf, section 2.11
|
|
282 |
ExecuteCommand(call);
|
|
283 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClipPlanef <-\n");
|
|
284 |
}
|
|
285 |
|
|
286 |
EXPORT_C void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation)
|
|
287 |
{
|
|
288 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClipPlanex ->\n");
|
|
289 |
RemoteFunctionCallData rfcData;
|
|
290 |
OpenGlES11RFC call( rfcData );
|
|
291 |
call.Init( OpenGlES11RFC::EglClipPlanex, RemoteFunctionCallData::EOpRequest );
|
|
292 |
call.AppendParam( plane );
|
|
293 |
call.AppendVector( equation, 4 ); // 4 values according to OpenGL_ES_1.1.12.pdf, section 2.11
|
|
294 |
ExecuteCommand(call);
|
|
295 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glClipPlanex <-\n");
|
|
296 |
}
|
|
297 |
|
|
298 |
EXPORT_C void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) __SOFTFP
|
|
299 |
{
|
|
300 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColor4f ->\n");
|
|
301 |
RemoteFunctionCallData rfcData;
|
|
302 |
OpenGlES11RFC call( rfcData );
|
|
303 |
call.Init( OpenGlES11RFC::EglColor4f, RemoteFunctionCallData::EOpRequest );
|
|
304 |
call.AppendParam( red );
|
|
305 |
call.AppendParam( green );
|
|
306 |
call.AppendParam( blue );
|
|
307 |
call.AppendParam( alpha );
|
|
308 |
ExecuteCommand(call);
|
|
309 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColor4f <-\n");
|
|
310 |
}
|
|
311 |
|
|
312 |
EXPORT_C void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
|
|
313 |
{
|
|
314 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColor4ub ->\n");
|
|
315 |
RemoteFunctionCallData rfcData;
|
|
316 |
OpenGlES11RFC call( rfcData );
|
|
317 |
call.Init( OpenGlES11RFC::EglColor4ub, RemoteFunctionCallData::EOpRequest );
|
|
318 |
call.AppendParam( red );
|
|
319 |
call.AppendParam( green );
|
|
320 |
call.AppendParam( blue );
|
|
321 |
call.AppendParam( alpha );
|
|
322 |
ExecuteCommand(call);
|
|
323 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColor4ub <-\n");
|
|
324 |
}
|
|
325 |
|
|
326 |
EXPORT_C void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
|
|
327 |
{
|
|
328 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColor4x ->\n");
|
|
329 |
RemoteFunctionCallData rfcData;
|
|
330 |
OpenGlES11RFC call( rfcData );
|
|
331 |
call.Init( OpenGlES11RFC::EglColor4x, RemoteFunctionCallData::EOpRequest );
|
|
332 |
call.AppendParam( red );
|
|
333 |
call.AppendParam( green );
|
|
334 |
call.AppendParam( blue );
|
|
335 |
call.AppendParam( alpha );
|
|
336 |
ExecuteCommand(call);
|
|
337 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColor4x <-\n");
|
|
338 |
}
|
|
339 |
|
|
340 |
EXPORT_C void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
|
|
341 |
{
|
|
342 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColorMask ->\n");
|
|
343 |
RemoteFunctionCallData rfcData;
|
|
344 |
OpenGlES11RFC call( rfcData );
|
|
345 |
call.Init( OpenGlES11RFC::EglColorMask, RemoteFunctionCallData::EOpRequest );
|
|
346 |
call.AppendParam( red );
|
|
347 |
call.AppendParam( green );
|
|
348 |
call.AppendParam( blue );
|
|
349 |
call.AppendParam( alpha );
|
|
350 |
ExecuteCommand(call);
|
|
351 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColorMask <-\n");
|
|
352 |
}
|
|
353 |
|
|
354 |
EXPORT_C void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
|
355 |
{
|
|
356 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColorPointer ->\n");
|
|
357 |
vertexArrays[COLOR_ARRAY].size = size;
|
|
358 |
vertexArrays[COLOR_ARRAY].type = type;
|
|
359 |
vertexArrays[COLOR_ARRAY].stride = stride;
|
|
360 |
vertexArrays[COLOR_ARRAY].pointer = pointer;
|
|
361 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glColorPointer <-\n");
|
|
362 |
}
|
|
363 |
|
|
364 |
EXPORT_C void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
|
|
365 |
{
|
|
366 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCompressedTexImage2D ->\n");
|
|
367 |
if(imageSize < 0) // cannot serialize vector with size < 0
|
|
368 |
{
|
|
369 |
SetError( GL_INVALID_VALUE );
|
|
370 |
return;
|
|
371 |
}
|
|
372 |
RemoteFunctionCallData rfcData;
|
|
373 |
OpenGlES11RFC call( rfcData );
|
|
374 |
call.Init( OpenGlES11RFC::EglCompressedTexImage2D, RemoteFunctionCallData::EOpRequest );
|
|
375 |
call.AppendParam( target );
|
|
376 |
call.AppendParam( level );
|
|
377 |
call.AppendParam( internalformat );
|
|
378 |
call.AppendParam( width );
|
|
379 |
call.AppendParam( height );
|
|
380 |
call.AppendParam( border );
|
|
381 |
call.AppendParam( imageSize );
|
|
382 |
call.AppendVector( data, imageSize );
|
|
383 |
ExecuteCommand(call);
|
|
384 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCompressedTexImage2D <-\n");
|
|
385 |
}
|
|
386 |
|
|
387 |
EXPORT_C void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
|
|
388 |
{
|
|
389 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCompressedTexSubImage2D ->\n");
|
|
390 |
if(imageSize < 0) // cannot serialize vector with size < 0
|
|
391 |
{
|
|
392 |
SetError( GL_INVALID_VALUE );
|
|
393 |
return;
|
|
394 |
}
|
|
395 |
RemoteFunctionCallData rfcData;
|
|
396 |
OpenGlES11RFC call( rfcData );
|
|
397 |
call.Init( OpenGlES11RFC::EglCompressedTexSubImage2D, RemoteFunctionCallData::EOpRequest );
|
|
398 |
call.AppendParam( target );
|
|
399 |
call.AppendParam( level );
|
|
400 |
call.AppendParam( xoffset );
|
|
401 |
call.AppendParam( yoffset );
|
|
402 |
call.AppendParam( width );
|
|
403 |
call.AppendParam( height );
|
|
404 |
call.AppendParam( format );
|
|
405 |
call.AppendParam( imageSize );
|
|
406 |
call.AppendVector( data, imageSize );
|
|
407 |
ExecuteCommand(call);
|
|
408 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCompressedTexSubImage2D <-\n");
|
|
409 |
}
|
|
410 |
|
|
411 |
EXPORT_C void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
|
|
412 |
{
|
|
413 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCopyTexImage2D ->\n");
|
|
414 |
RemoteFunctionCallData rfcData;
|
|
415 |
OpenGlES11RFC call( rfcData );
|
|
416 |
call.Init( OpenGlES11RFC::EglCopyTexImage2D, RemoteFunctionCallData::EOpRequest );
|
|
417 |
call.AppendParam( target );
|
|
418 |
call.AppendParam( level );
|
|
419 |
call.AppendParam( internalformat );
|
|
420 |
call.AppendParam( x );
|
|
421 |
call.AppendParam( y );
|
|
422 |
call.AppendParam( width );
|
|
423 |
call.AppendParam( height );
|
|
424 |
call.AppendParam( border );
|
|
425 |
ExecuteCommand(call);
|
|
426 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCopyTexImage2D <-\n");
|
|
427 |
}
|
|
428 |
|
|
429 |
EXPORT_C void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
|
|
430 |
{
|
|
431 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCopyTexSubImage2D ->\n");
|
|
432 |
RemoteFunctionCallData rfcData;
|
|
433 |
OpenGlES11RFC call( rfcData );
|
|
434 |
call.Init( OpenGlES11RFC::EglCopyTexSubImage2D, RemoteFunctionCallData::EOpRequest );
|
|
435 |
call.AppendParam( target );
|
|
436 |
call.AppendParam( level );
|
|
437 |
call.AppendParam( xoffset );
|
|
438 |
call.AppendParam( yoffset );
|
|
439 |
call.AppendParam( x );
|
|
440 |
call.AppendParam( y );
|
|
441 |
call.AppendParam( width );
|
|
442 |
call.AppendParam( height );
|
|
443 |
ExecuteCommand(call);
|
|
444 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCopyTexSubImage2D <-\n");
|
|
445 |
}
|
|
446 |
|
|
447 |
EXPORT_C void GL_APIENTRY glCullFace (GLenum mode)
|
|
448 |
{
|
|
449 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCullFace ->\n");
|
|
450 |
RemoteFunctionCallData rfcData;
|
|
451 |
OpenGlES11RFC call( rfcData );
|
|
452 |
call.Init( OpenGlES11RFC::EglCullFace, RemoteFunctionCallData::EOpRequest );
|
|
453 |
call.AppendParam( mode );
|
|
454 |
ExecuteCommand(call);
|
|
455 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCullFace <-\n");
|
|
456 |
}
|
|
457 |
|
|
458 |
EXPORT_C void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers)
|
|
459 |
{
|
|
460 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDeleteBuffers ->\n");
|
|
461 |
if(n < 0) // cannot serialize vector with size < 0
|
|
462 |
{
|
|
463 |
SetError( GL_INVALID_VALUE );
|
|
464 |
return;
|
|
465 |
}
|
|
466 |
RemoteFunctionCallData rfcData;
|
|
467 |
OpenGlES11RFC call( rfcData );
|
|
468 |
call.Init( OpenGlES11RFC::EglDeleteBuffers, RemoteFunctionCallData::EOpRequest );
|
|
469 |
call.AppendParam( n );
|
|
470 |
call.AppendVector( buffers, n );
|
|
471 |
ExecuteCommand(call);
|
|
472 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDeleteBuffers <-\n");
|
|
473 |
}
|
|
474 |
|
|
475 |
EXPORT_C void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures)
|
|
476 |
{
|
|
477 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDeleteTextures ->\n");
|
|
478 |
if(n < 0) // cannot serialize vector with size < 0
|
|
479 |
{
|
|
480 |
SetError( GL_INVALID_VALUE );
|
|
481 |
return;
|
|
482 |
}
|
|
483 |
RemoteFunctionCallData rfcData;
|
|
484 |
OpenGlES11RFC call( rfcData );
|
|
485 |
call.Init( OpenGlES11RFC::EglDeleteTextures, RemoteFunctionCallData::EOpRequest );
|
|
486 |
call.AppendParam( n );
|
|
487 |
call.AppendVector( textures, n );
|
|
488 |
ExecuteCommand(call);
|
|
489 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDeleteTextures <-\n");
|
|
490 |
}
|
|
491 |
|
|
492 |
EXPORT_C void GL_APIENTRY glDepthFunc (GLenum func)
|
|
493 |
{
|
|
494 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDepthFunc ->\n");
|
|
495 |
RemoteFunctionCallData rfcData;
|
|
496 |
OpenGlES11RFC call( rfcData );
|
|
497 |
call.Init( OpenGlES11RFC::EglDepthFunc, RemoteFunctionCallData::EOpRequest );
|
|
498 |
call.AppendParam( func );
|
|
499 |
ExecuteCommand(call);
|
|
500 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDepthFunc <-\n");
|
|
501 |
}
|
|
502 |
|
|
503 |
EXPORT_C void GL_APIENTRY glDepthMask (GLboolean flag)
|
|
504 |
{
|
|
505 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDepthMask ->\n");
|
|
506 |
RemoteFunctionCallData rfcData;
|
|
507 |
OpenGlES11RFC call( rfcData );
|
|
508 |
call.Init( OpenGlES11RFC::EglDepthMask, RemoteFunctionCallData::EOpRequest );
|
|
509 |
call.AppendParam( flag );
|
|
510 |
ExecuteCommand(call);
|
|
511 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDepthMask <-\n");
|
|
512 |
}
|
|
513 |
|
|
514 |
EXPORT_C void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar) __SOFTFP
|
|
515 |
{
|
|
516 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDepthRangef ->\n");
|
|
517 |
RemoteFunctionCallData rfcData;
|
|
518 |
OpenGlES11RFC call( rfcData );
|
|
519 |
call.Init( OpenGlES11RFC::EglDepthRangef, RemoteFunctionCallData::EOpRequest );
|
|
520 |
call.AppendParam( zNear );
|
|
521 |
call.AppendParam( zFar );
|
|
522 |
ExecuteCommand(call);
|
|
523 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDepthRangef <-\n");
|
|
524 |
}
|
|
525 |
|
|
526 |
EXPORT_C void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar)
|
|
527 |
{
|
|
528 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDepthRangex ->\n");
|
|
529 |
RemoteFunctionCallData rfcData;
|
|
530 |
OpenGlES11RFC call( rfcData );
|
|
531 |
call.Init( OpenGlES11RFC::EglDepthRangex, RemoteFunctionCallData::EOpRequest );
|
|
532 |
call.AppendParam( zNear );
|
|
533 |
call.AppendParam( zFar );
|
|
534 |
ExecuteCommand(call);
|
|
535 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDepthRangex <-\n");
|
|
536 |
}
|
|
537 |
|
|
538 |
EXPORT_C void GL_APIENTRY glDisable (GLenum cap)
|
|
539 |
{
|
|
540 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDisable ->\n");
|
|
541 |
RemoteFunctionCallData rfcData;
|
|
542 |
OpenGlES11RFC call( rfcData );
|
|
543 |
call.Init( OpenGlES11RFC::EglDisable, RemoteFunctionCallData::EOpRequest );
|
|
544 |
call.AppendParam( cap );
|
|
545 |
ExecuteCommand(call);
|
|
546 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDisable <-\n");
|
|
547 |
}
|
|
548 |
|
|
549 |
EXPORT_C void GL_APIENTRY glDisableClientState (GLenum array)
|
|
550 |
{
|
|
551 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDisableClientState ->\n");
|
|
552 |
// store state on here as well, used in DrawArrays and DrawElements
|
|
553 |
bool enumError = false;
|
|
554 |
switch( array )
|
|
555 |
{
|
|
556 |
case GL_COLOR_ARRAY:
|
|
557 |
vertexArraysEnabled[COLOR_ARRAY] = false;
|
|
558 |
break;
|
|
559 |
case GL_NORMAL_ARRAY:
|
|
560 |
vertexArraysEnabled[NORMAL_ARRAY] = false;
|
|
561 |
break;
|
|
562 |
case GL_POINT_SIZE_ARRAY_OES:
|
|
563 |
vertexArraysEnabled[POINT_SIZE_ARRAY] = false;
|
|
564 |
break;
|
|
565 |
case GL_TEXTURE_COORD_ARRAY:
|
|
566 |
vertexArraysEnabled[TEX_COORD_ARRAY] = false;
|
|
567 |
break;
|
|
568 |
case GL_VERTEX_ARRAY:
|
|
569 |
vertexArraysEnabled[VERTEX_ARRAY] = false;
|
|
570 |
break;
|
|
571 |
case GL_MATRIX_INDEX_ARRAY_OES:
|
|
572 |
vertexArraysEnabled[MATRIX_INDEX_ARRAY] = false;
|
|
573 |
break;
|
|
574 |
case GL_WEIGHT_ARRAY_OES:
|
|
575 |
vertexArraysEnabled[WEIGHT_ARRAY] = false;
|
|
576 |
break;
|
|
577 |
default:
|
|
578 |
SetError( GL_INVALID_ENUM );
|
|
579 |
enumError = true;
|
|
580 |
break;
|
|
581 |
}
|
|
582 |
if( !enumError )
|
|
583 |
{
|
|
584 |
RemoteFunctionCallData rfcData;
|
|
585 |
OpenGlES11RFC call( rfcData );
|
|
586 |
call.Init( OpenGlES11RFC::EglDisableClientState, RemoteFunctionCallData::EOpRequest );
|
|
587 |
call.AppendParam( array );
|
|
588 |
ExecuteCommand(call);
|
|
589 |
}
|
|
590 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDisableClientState <-\n");
|
|
591 |
}
|
|
592 |
|
|
593 |
EXPORT_C void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count)
|
|
594 |
{
|
|
595 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawArrays ->\n");
|
|
596 |
RemoteFunctionCallData rfcData;
|
|
597 |
OpenGlES11RFC call( rfcData );
|
|
598 |
call.Init( OpenGlES11RFC::EglDrawArrays, RemoteFunctionCallData::EOpRequest );
|
|
599 |
call.AppendParam( mode );
|
|
600 |
call.AppendParam( first );
|
|
601 |
call.AppendParam( count );
|
|
602 |
|
|
603 |
/* serialize vertex arrays
|
|
604 |
order of the data:
|
|
605 |
- number of arrays (int)
|
|
606 |
- bitfield of enabled arrays, order specified by opengl.h vertex array pointer enumeration (int)
|
|
607 |
- for each enabled vertex array:
|
|
608 |
- size (int)
|
|
609 |
- type (int)
|
|
610 |
- stride (int)
|
|
611 |
- data vector
|
|
612 |
*/
|
|
613 |
int arrayCount = 0;
|
|
614 |
int arrayEnabled = 0;
|
|
615 |
for(int i=0; i<NUM_ARRAYS; i++)
|
|
616 |
{
|
|
617 |
arrayEnabled = (arrayEnabled << 1) + vertexArraysEnabled[i];
|
|
618 |
if( vertexArraysEnabled[i] )
|
|
619 |
arrayCount++;
|
|
620 |
}
|
|
621 |
call.AppendParam( arrayCount );
|
|
622 |
call.AppendParam( arrayEnabled );
|
|
623 |
for(int i=0; i<NUM_ARRAYS; i++)
|
|
624 |
{
|
|
625 |
if( vertexArraysEnabled[i] )
|
|
626 |
{
|
|
627 |
call.AppendParam( vertexArrays[i].size );
|
|
628 |
call.AppendParam( vertexArrays[i].type );
|
|
629 |
call.AppendParam( vertexArrays[i].stride );
|
|
630 |
int vectorsize;
|
|
631 |
if( vertexArrays[i].stride )
|
|
632 |
vectorsize = vertexArrays[i].stride * (first + count - 1) + sizeof(vertexArrays[i].type) * vertexArrays[i].size;
|
|
633 |
else
|
|
634 |
vectorsize = sizeof(vertexArrays[i].type) * vertexArrays[i].size * (first + count);
|
|
635 |
call.AppendVector( vertexArrays[i].pointer, vectorsize );
|
|
636 |
}
|
|
637 |
}
|
|
638 |
|
|
639 |
ExecuteCommand(call);
|
|
640 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawArrays <-\n");
|
|
641 |
}
|
|
642 |
|
|
643 |
EXPORT_C void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
|
|
644 |
{
|
|
645 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawElements ->\n");
|
|
646 |
if(count < 0) // cannot serialize vector with size < 0
|
|
647 |
{
|
|
648 |
SetError( GL_INVALID_VALUE );
|
|
649 |
return;
|
|
650 |
}
|
|
651 |
RemoteFunctionCallData rfcData;
|
|
652 |
OpenGlES11RFC call( rfcData );
|
|
653 |
call.Init( OpenGlES11RFC::EglDrawElements, RemoteFunctionCallData::EOpRequest );
|
|
654 |
call.AppendParam( mode );
|
|
655 |
call.AppendParam( count );
|
|
656 |
call.AppendParam( type );
|
|
657 |
call.AppendVector( indices, count );
|
|
658 |
|
|
659 |
/* serialize vertex arrays
|
|
660 |
order of the data:
|
|
661 |
- number of arrays (int)
|
|
662 |
- bitfield of enabled arrays, order specified by opengl.h vertex array pointer enumeration (int)
|
|
663 |
- for each enabled vertex array:
|
|
664 |
- size (int)
|
|
665 |
- type (int)
|
|
666 |
- stride (int)
|
|
667 |
- data vector
|
|
668 |
*/
|
|
669 |
int arrayCount = 0;
|
|
670 |
int arrayEnabled = 0;
|
|
671 |
for(int i=0; i<NUM_ARRAYS; i++)
|
|
672 |
{
|
|
673 |
arrayEnabled = (arrayEnabled << 1) + vertexArraysEnabled[i];
|
|
674 |
if( vertexArraysEnabled[i] )
|
|
675 |
arrayCount++;
|
|
676 |
}
|
|
677 |
call.AppendParam( arrayCount );
|
|
678 |
call.AppendParam( arrayEnabled );
|
|
679 |
// find max index
|
|
680 |
int maxIndex = 0;
|
|
681 |
switch( type )
|
|
682 |
{
|
|
683 |
case GL_UNSIGNED_BYTE:
|
|
684 |
for(int i=0; i<count; i++)
|
|
685 |
{
|
|
686 |
if( ((GLubyte*)indices)[i] > maxIndex )
|
|
687 |
maxIndex = (int)((GLubyte*)indices)[i];
|
|
688 |
}
|
|
689 |
break;
|
|
690 |
case GL_UNSIGNED_SHORT:
|
|
691 |
for(int i=0; i<count; i++)
|
|
692 |
{
|
|
693 |
if( ((GLushort*)indices)[i] > maxIndex )
|
|
694 |
maxIndex = (int)((GLushort*)indices)[i];
|
|
695 |
}
|
|
696 |
break;
|
|
697 |
}
|
|
698 |
for(int i=0; i<NUM_ARRAYS; i++)
|
|
699 |
{
|
|
700 |
if( vertexArraysEnabled[i] )
|
|
701 |
{
|
|
702 |
call.AppendParam( vertexArrays[i].size );
|
|
703 |
call.AppendParam( vertexArrays[i].type );
|
|
704 |
call.AppendParam( vertexArrays[i].stride );
|
|
705 |
int vectorsize;
|
|
706 |
int typesize = 0;
|
|
707 |
switch(vertexArrays[i].type)
|
|
708 |
{
|
|
709 |
case GL_BYTE:
|
|
710 |
case GL_UNSIGNED_BYTE:
|
|
711 |
typesize = 1;
|
|
712 |
break;
|
|
713 |
case GL_SHORT:
|
|
714 |
case GL_UNSIGNED_SHORT:
|
|
715 |
typesize = 2;
|
|
716 |
break;
|
|
717 |
case GL_FLOAT:
|
|
718 |
case GL_FIXED:
|
|
719 |
typesize = 4;
|
|
720 |
break;
|
|
721 |
}
|
|
722 |
if( vertexArrays[i].stride )
|
|
723 |
vectorsize = vertexArrays[i].stride * maxIndex + typesize * vertexArrays[i].size;
|
|
724 |
else
|
|
725 |
vectorsize = typesize * vertexArrays[i].size * (maxIndex+1);
|
|
726 |
call.AppendVector( vertexArrays[i].pointer, vectorsize );
|
|
727 |
}
|
|
728 |
}
|
|
729 |
|
|
730 |
ExecuteCommand(call);
|
|
731 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawElements <-\n");
|
|
732 |
}
|
|
733 |
|
|
734 |
EXPORT_C void GL_APIENTRY glEnable (GLenum cap)
|
|
735 |
{
|
|
736 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glEnable ->\n");
|
|
737 |
RemoteFunctionCallData rfcData;
|
|
738 |
OpenGlES11RFC call( rfcData );
|
|
739 |
call.Init( OpenGlES11RFC::EglEnable, RemoteFunctionCallData::EOpRequest );
|
|
740 |
call.AppendParam( cap );
|
|
741 |
ExecuteCommand(call);
|
|
742 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glEnable <-\n");
|
|
743 |
}
|
|
744 |
|
|
745 |
EXPORT_C void GL_APIENTRY glEnableClientState (GLenum array)
|
|
746 |
{
|
|
747 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glEnableClientState ->\n");
|
|
748 |
// store state on here as well, used in DrawArrays and DrawElements
|
|
749 |
bool enumError = false;
|
|
750 |
switch( array )
|
|
751 |
{
|
|
752 |
case GL_COLOR_ARRAY:
|
|
753 |
vertexArraysEnabled[COLOR_ARRAY] = true;
|
|
754 |
break;
|
|
755 |
case GL_NORMAL_ARRAY:
|
|
756 |
vertexArraysEnabled[NORMAL_ARRAY] = true;
|
|
757 |
break;
|
|
758 |
case GL_POINT_SIZE_ARRAY_OES:
|
|
759 |
vertexArraysEnabled[POINT_SIZE_ARRAY] = true;
|
|
760 |
break;
|
|
761 |
case GL_TEXTURE_COORD_ARRAY:
|
|
762 |
vertexArraysEnabled[TEX_COORD_ARRAY] = true;
|
|
763 |
break;
|
|
764 |
case GL_VERTEX_ARRAY:
|
|
765 |
vertexArraysEnabled[VERTEX_ARRAY] = true;
|
|
766 |
break;
|
|
767 |
case GL_MATRIX_INDEX_ARRAY_OES:
|
|
768 |
vertexArraysEnabled[MATRIX_INDEX_ARRAY] = true;
|
|
769 |
break;
|
|
770 |
case GL_WEIGHT_ARRAY_OES:
|
|
771 |
vertexArraysEnabled[WEIGHT_ARRAY] = true;
|
|
772 |
break;
|
|
773 |
default:
|
|
774 |
SetError( GL_INVALID_ENUM );
|
|
775 |
enumError = true;
|
|
776 |
break;
|
|
777 |
}
|
|
778 |
if( !enumError )
|
|
779 |
{
|
|
780 |
RemoteFunctionCallData rfcData;
|
|
781 |
OpenGlES11RFC call( rfcData );
|
|
782 |
call.Init( OpenGlES11RFC::EglEnableClientState, RemoteFunctionCallData::EOpRequest );
|
|
783 |
call.AppendParam( array );
|
|
784 |
ExecuteCommand(call);
|
|
785 |
}
|
|
786 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glEnableClientState <-\n");
|
|
787 |
}
|
|
788 |
|
|
789 |
EXPORT_C void GL_APIENTRY glFinish (void)
|
|
790 |
{
|
|
791 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFinish ->\n");
|
|
792 |
MGlesContext* glesContext = CVghwUtils::GlesContext();
|
|
793 |
if (glesContext)
|
|
794 |
{ // there is GL ES context
|
|
795 |
glesContext->ExecuteGlesFinishCommand();
|
|
796 |
}
|
|
797 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFinish <-\n");
|
|
798 |
}
|
|
799 |
|
|
800 |
EXPORT_C void GL_APIENTRY glFlush (void)
|
|
801 |
{
|
|
802 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFlush ->\n");
|
|
803 |
MGlesContext* glesContext = CVghwUtils::GlesContext();
|
|
804 |
if (glesContext)
|
|
805 |
{ // there is GL ES context
|
|
806 |
glesContext->ExecuteGlesFlushCommand();
|
|
807 |
}
|
|
808 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFlush <-\n");
|
|
809 |
}
|
|
810 |
|
|
811 |
EXPORT_C void GL_APIENTRY glFogf (GLenum pname, GLfloat param) __SOFTFP
|
|
812 |
{
|
|
813 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFogf ->\n");
|
|
814 |
RemoteFunctionCallData rfcData;
|
|
815 |
OpenGlES11RFC call( rfcData );
|
|
816 |
call.Init( OpenGlES11RFC::EglFogf, RemoteFunctionCallData::EOpRequest );
|
|
817 |
call.AppendParam( pname );
|
|
818 |
call.AppendParam( param );
|
|
819 |
ExecuteCommand(call);
|
|
820 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFogf <-\n");
|
|
821 |
}
|
|
822 |
|
|
823 |
EXPORT_C void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params)
|
|
824 |
{
|
|
825 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFogfv ->\n");
|
|
826 |
TInt32 vectorsize = 1;
|
|
827 |
if( pname == GL_FOG_COLOR )
|
|
828 |
vectorsize = 4;
|
|
829 |
RemoteFunctionCallData rfcData;
|
|
830 |
OpenGlES11RFC call( rfcData );
|
|
831 |
call.Init( OpenGlES11RFC::EglFogfv, RemoteFunctionCallData::EOpRequest );
|
|
832 |
call.AppendParam( pname );
|
|
833 |
call.AppendVector( params, vectorsize );
|
|
834 |
ExecuteCommand(call);
|
|
835 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFogfv <-\n");
|
|
836 |
}
|
|
837 |
|
|
838 |
EXPORT_C void GL_APIENTRY glFogx (GLenum pname, GLfixed param)
|
|
839 |
{
|
|
840 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFogx ->\n");
|
|
841 |
RemoteFunctionCallData rfcData;
|
|
842 |
OpenGlES11RFC call( rfcData );
|
|
843 |
call.Init( OpenGlES11RFC::EglFogx, RemoteFunctionCallData::EOpRequest );
|
|
844 |
call.AppendParam( pname );
|
|
845 |
call.AppendParam( param );
|
|
846 |
ExecuteCommand(call);
|
|
847 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFogx <-\n");
|
|
848 |
}
|
|
849 |
|
|
850 |
EXPORT_C void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params)
|
|
851 |
{
|
|
852 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFogxv ->\n");
|
|
853 |
TInt32 vectorsize = 1;
|
|
854 |
if( pname == GL_FOG_COLOR )
|
|
855 |
vectorsize = 4;
|
|
856 |
RemoteFunctionCallData rfcData;
|
|
857 |
OpenGlES11RFC call( rfcData );
|
|
858 |
call.Init( OpenGlES11RFC::EglFogxv, RemoteFunctionCallData::EOpRequest );
|
|
859 |
call.AppendParam( pname );
|
|
860 |
call.AppendVector( params, vectorsize );
|
|
861 |
ExecuteCommand(call);
|
|
862 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFogxv <-\n");
|
|
863 |
}
|
|
864 |
|
|
865 |
EXPORT_C void GL_APIENTRY glFrontFace (GLenum mode)
|
|
866 |
{
|
|
867 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFrontFace ->\n");
|
|
868 |
RemoteFunctionCallData rfcData;
|
|
869 |
OpenGlES11RFC call( rfcData );
|
|
870 |
call.Init( OpenGlES11RFC::EglFrontFace, RemoteFunctionCallData::EOpRequest );
|
|
871 |
call.AppendParam( mode );
|
|
872 |
ExecuteCommand(call);
|
|
873 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFrontFace <-\n");
|
|
874 |
}
|
|
875 |
|
|
876 |
EXPORT_C void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) __SOFTFP
|
|
877 |
{
|
|
878 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFrustumf ->\n");
|
|
879 |
RemoteFunctionCallData rfcData;
|
|
880 |
OpenGlES11RFC call( rfcData );
|
|
881 |
call.Init( OpenGlES11RFC::EglFrustumf, RemoteFunctionCallData::EOpRequest );
|
|
882 |
call.AppendParam( left );
|
|
883 |
call.AppendParam( right );
|
|
884 |
call.AppendParam( bottom );
|
|
885 |
call.AppendParam( top );
|
|
886 |
call.AppendParam( zNear );
|
|
887 |
call.AppendParam( zFar );
|
|
888 |
ExecuteCommand(call);
|
|
889 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFrustumf <-\n");
|
|
890 |
}
|
|
891 |
|
|
892 |
EXPORT_C void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
|
|
893 |
{
|
|
894 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFrustumx ->\n");
|
|
895 |
RemoteFunctionCallData rfcData;
|
|
896 |
OpenGlES11RFC call( rfcData );
|
|
897 |
call.Init( OpenGlES11RFC::EglFrustumx, RemoteFunctionCallData::EOpRequest );
|
|
898 |
call.AppendParam( left );
|
|
899 |
call.AppendParam( right );
|
|
900 |
call.AppendParam( bottom );
|
|
901 |
call.AppendParam( top );
|
|
902 |
call.AppendParam( zNear );
|
|
903 |
call.AppendParam( zFar );
|
|
904 |
ExecuteCommand(call);
|
|
905 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glFrustumx <-\n");
|
|
906 |
}
|
|
907 |
|
|
908 |
EXPORT_C void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers)
|
|
909 |
{
|
|
910 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGenBuffers ->\n");
|
|
911 |
if(n < 0)
|
|
912 |
{
|
|
913 |
SetError( GL_INVALID_VALUE );
|
|
914 |
return;
|
|
915 |
}
|
|
916 |
RemoteFunctionCallData rfcData;
|
|
917 |
OpenGlES11RFC call( rfcData );
|
|
918 |
call.Init( OpenGlES11RFC::EglGenBuffers );
|
|
919 |
call.AppendParam( n );
|
|
920 |
call.AppendVector( buffers, n, RemoteFunctionCallData::EOut );
|
|
921 |
ExecuteCommand(call);
|
|
922 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGenBuffers <-\n");
|
|
923 |
}
|
|
924 |
|
|
925 |
EXPORT_C void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures)
|
|
926 |
{
|
|
927 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGenTextures ->\n");
|
|
928 |
if(n < 0) // cannot serialize vector with size < 0
|
|
929 |
{
|
|
930 |
SetError( GL_INVALID_VALUE );
|
|
931 |
return;
|
|
932 |
}
|
|
933 |
RemoteFunctionCallData rfcData;
|
|
934 |
OpenGlES11RFC call( rfcData );
|
|
935 |
call.Init( OpenGlES11RFC::EglGenTextures );
|
|
936 |
call.AppendParam( n );
|
|
937 |
call.AppendVector( textures, n, RemoteFunctionCallData::EOut );
|
|
938 |
ExecuteCommand(call);
|
|
939 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGenTextures <-\n");
|
|
940 |
}
|
|
941 |
|
|
942 |
EXPORT_C void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params)
|
|
943 |
{
|
|
944 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetBooleanv ->\n");
|
|
945 |
TInt32 vectorsize = 1;
|
|
946 |
if( pname == GL_COLOR_WRITEMASK )
|
|
947 |
vectorsize = 4;
|
|
948 |
RemoteFunctionCallData rfcData;
|
|
949 |
OpenGlES11RFC call( rfcData );
|
|
950 |
call.Init( OpenGlES11RFC::EglGetBooleanv );
|
|
951 |
call.AppendParam( pname );
|
|
952 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
953 |
ExecuteCommand(call);
|
|
954 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetBooleanv <-\n");
|
|
955 |
}
|
|
956 |
|
|
957 |
EXPORT_C void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params)
|
|
958 |
{
|
|
959 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetBufferParameteriv ->\n");
|
|
960 |
RemoteFunctionCallData rfcData;
|
|
961 |
OpenGlES11RFC call( rfcData );
|
|
962 |
call.Init( OpenGlES11RFC::EglGetBufferParameteriv );
|
|
963 |
call.AppendParam( target );
|
|
964 |
call.AppendParam( pname );
|
|
965 |
call.AppendVector( params, 1, RemoteFunctionCallData::EOut );
|
|
966 |
ExecuteCommand(call);
|
|
967 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetBufferParameteriv <-\n");
|
|
968 |
}
|
|
969 |
|
|
970 |
EXPORT_C void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4])
|
|
971 |
{
|
|
972 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetClipPlanef ->\n");
|
|
973 |
RemoteFunctionCallData rfcData;
|
|
974 |
OpenGlES11RFC call( rfcData );
|
|
975 |
call.Init( OpenGlES11RFC::EglGetClipPlanef );
|
|
976 |
call.AppendParam( pname );
|
|
977 |
call.AppendVector( eqn, 4, RemoteFunctionCallData::EOut );
|
|
978 |
ExecuteCommand(call);
|
|
979 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetClipPlanef <-\n");
|
|
980 |
}
|
|
981 |
|
|
982 |
EXPORT_C void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4])
|
|
983 |
{
|
|
984 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetClipPlanex ->\n");
|
|
985 |
RemoteFunctionCallData rfcData;
|
|
986 |
OpenGlES11RFC call( rfcData );
|
|
987 |
call.Init( OpenGlES11RFC::EglGetClipPlanex );
|
|
988 |
call.AppendParam( pname );
|
|
989 |
call.AppendVector( eqn, 4, RemoteFunctionCallData::EOut );
|
|
990 |
ExecuteCommand(call);
|
|
991 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetClipPlanex <-\n");
|
|
992 |
}
|
|
993 |
|
|
994 |
EXPORT_C GLenum GL_APIENTRY glGetError (void)
|
|
995 |
{
|
|
996 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetError ->\n");
|
|
997 |
GLenum gles11Error = GL_NO_ERROR;
|
|
998 |
MGlesContext* glesContext = CVghwUtils::GlesContext();
|
|
999 |
if (glesContext)
|
|
1000 |
{
|
|
1001 |
gles11Error = glesContext->GlesError();
|
|
1002 |
}
|
|
1003 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetError <- %x\n", gles11Error);
|
|
1004 |
return gles11Error;
|
|
1005 |
}
|
|
1006 |
|
|
1007 |
inline TInt32 getGetterVectorSize(GLenum pname)
|
|
1008 |
{
|
|
1009 |
// oglGetterData.inl, s_getterInfos struct
|
|
1010 |
TInt32 vectorsize;
|
|
1011 |
switch( pname )
|
|
1012 |
{
|
|
1013 |
case GL_SMOOTH_POINT_SIZE_RANGE:
|
|
1014 |
case GL_SMOOTH_LINE_WIDTH_RANGE:
|
|
1015 |
case GL_DEPTH_RANGE:
|
|
1016 |
case GL_MAX_VIEWPORT_DIMS:
|
|
1017 |
case GL_ALIASED_POINT_SIZE_RANGE:
|
|
1018 |
case GL_ALIASED_LINE_WIDTH_RANGE:
|
|
1019 |
vectorsize = 2;
|
|
1020 |
break;
|
|
1021 |
case GL_CURRENT_NORMAL:
|
|
1022 |
case GL_POINT_DISTANCE_ATTENUATION:
|
|
1023 |
vectorsize = 3;
|
|
1024 |
break;
|
|
1025 |
case GL_CURRENT_COLOR:
|
|
1026 |
case GL_CURRENT_TEXTURE_COORDS:
|
|
1027 |
case GL_LIGHT_MODEL_AMBIENT:
|
|
1028 |
case GL_FOG_COLOR:
|
|
1029 |
case GL_VIEWPORT:
|
|
1030 |
case GL_SCISSOR_BOX:
|
|
1031 |
case GL_COLOR_CLEAR_VALUE:
|
|
1032 |
case GL_COLOR_WRITEMASK:
|
|
1033 |
vectorsize = 4;
|
|
1034 |
break;
|
|
1035 |
case GL_COMPRESSED_TEXTURE_FORMATS:
|
|
1036 |
vectorsize = 10;
|
|
1037 |
break;
|
|
1038 |
case GL_MODELVIEW_MATRIX:
|
|
1039 |
case GL_PROJECTION_MATRIX:
|
|
1040 |
case GL_TEXTURE_MATRIX:
|
|
1041 |
vectorsize = 16;
|
|
1042 |
break;
|
|
1043 |
default:
|
|
1044 |
vectorsize = 1;
|
|
1045 |
break;
|
|
1046 |
}
|
|
1047 |
return vectorsize;
|
|
1048 |
}
|
|
1049 |
|
|
1050 |
EXPORT_C void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params)
|
|
1051 |
{
|
|
1052 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetFixedv ->\n");
|
|
1053 |
TInt32 vectorsize = getGetterVectorSize(pname);
|
|
1054 |
RemoteFunctionCallData rfcData;
|
|
1055 |
OpenGlES11RFC call( rfcData );
|
|
1056 |
call.Init( OpenGlES11RFC::EglGetFixedv );
|
|
1057 |
call.AppendParam( pname );
|
|
1058 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1059 |
ExecuteCommand(call);
|
|
1060 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetFixedv <-\n");
|
|
1061 |
}
|
|
1062 |
|
|
1063 |
EXPORT_C void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params)
|
|
1064 |
{
|
|
1065 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetFloatv ->\n");
|
|
1066 |
TInt32 vectorsize = getGetterVectorSize(pname);
|
|
1067 |
RemoteFunctionCallData rfcData;
|
|
1068 |
OpenGlES11RFC call( rfcData );
|
|
1069 |
call.Init( OpenGlES11RFC::EglGetFloatv );
|
|
1070 |
call.AppendParam( pname );
|
|
1071 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1072 |
ExecuteCommand(call);
|
|
1073 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetFloatv <-\n");
|
|
1074 |
}
|
|
1075 |
|
|
1076 |
EXPORT_C void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params)
|
|
1077 |
{
|
|
1078 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetIntegerv ->\n");
|
|
1079 |
TInt32 vectorsize = getGetterVectorSize(pname);
|
|
1080 |
RemoteFunctionCallData rfcData;
|
|
1081 |
OpenGlES11RFC call( rfcData );
|
|
1082 |
call.Init( OpenGlES11RFC::EglGetIntegerv );
|
|
1083 |
call.AppendParam( pname );
|
|
1084 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1085 |
ExecuteCommand(call);
|
|
1086 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetIntegerv <-\n");
|
|
1087 |
}
|
|
1088 |
|
|
1089 |
inline TInt32 getLightVectorSize(GLenum pname)
|
|
1090 |
{
|
|
1091 |
// oglApi.inl, oglGetLightInternal()
|
|
1092 |
TInt32 vectorsize;
|
|
1093 |
switch( pname )
|
|
1094 |
{
|
|
1095 |
case GL_SPOT_DIRECTION:
|
|
1096 |
vectorsize = 3;
|
|
1097 |
break;
|
|
1098 |
case GL_AMBIENT:
|
|
1099 |
case GL_DIFFUSE:
|
|
1100 |
case GL_SPECULAR:
|
|
1101 |
case GL_POSITION:
|
|
1102 |
vectorsize = 4;
|
|
1103 |
break;
|
|
1104 |
default:
|
|
1105 |
vectorsize = 1;
|
|
1106 |
break;
|
|
1107 |
}
|
|
1108 |
return vectorsize;
|
|
1109 |
}
|
|
1110 |
|
|
1111 |
EXPORT_C void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params)
|
|
1112 |
{
|
|
1113 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetLightfv ->\n");
|
|
1114 |
TInt32 vectorsize = getLightVectorSize(pname);
|
|
1115 |
RemoteFunctionCallData rfcData;
|
|
1116 |
OpenGlES11RFC call( rfcData );
|
|
1117 |
call.Init( OpenGlES11RFC::EglGetLightfv );
|
|
1118 |
call.AppendParam( light );
|
|
1119 |
call.AppendParam( pname );
|
|
1120 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1121 |
ExecuteCommand(call);
|
|
1122 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetLightfv <-\n");
|
|
1123 |
}
|
|
1124 |
|
|
1125 |
EXPORT_C void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params)
|
|
1126 |
{
|
|
1127 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetLightxv ->\n");
|
|
1128 |
TInt32 vectorsize = getLightVectorSize(pname);
|
|
1129 |
RemoteFunctionCallData rfcData;
|
|
1130 |
OpenGlES11RFC call( rfcData );
|
|
1131 |
call.Init( OpenGlES11RFC::EglGetLightxv );
|
|
1132 |
call.AppendParam( light );
|
|
1133 |
call.AppendParam( pname );
|
|
1134 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1135 |
ExecuteCommand(call);
|
|
1136 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetLightxv <-\n");
|
|
1137 |
}
|
|
1138 |
|
|
1139 |
inline TInt32 getMaterialVectorSize(GLenum pname)
|
|
1140 |
{
|
|
1141 |
// oglApi.inl, oglGetMaterialInternal()
|
|
1142 |
TInt32 vectorsize;
|
|
1143 |
switch( pname )
|
|
1144 |
{
|
|
1145 |
case GL_AMBIENT:
|
|
1146 |
case GL_DIFFUSE:
|
|
1147 |
case GL_SPECULAR:
|
|
1148 |
case GL_EMISSION:
|
|
1149 |
vectorsize = 4;
|
|
1150 |
break;
|
|
1151 |
default:
|
|
1152 |
vectorsize = 1;
|
|
1153 |
break;
|
|
1154 |
}
|
|
1155 |
return vectorsize;
|
|
1156 |
}
|
|
1157 |
|
|
1158 |
EXPORT_C void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params)
|
|
1159 |
{
|
|
1160 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetMaterialfv ->\n");
|
|
1161 |
TInt32 vectorsize = getMaterialVectorSize(pname);
|
|
1162 |
RemoteFunctionCallData rfcData;
|
|
1163 |
OpenGlES11RFC call( rfcData );
|
|
1164 |
call.Init( OpenGlES11RFC::EglGetMaterialfv );
|
|
1165 |
call.AppendParam( face );
|
|
1166 |
call.AppendParam( pname );
|
|
1167 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1168 |
ExecuteCommand(call);
|
|
1169 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetMaterialfv <-\n");
|
|
1170 |
}
|
|
1171 |
|
|
1172 |
EXPORT_C void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params)
|
|
1173 |
{
|
|
1174 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetMaterialxv ->\n");
|
|
1175 |
TInt32 vectorsize = getMaterialVectorSize(pname);
|
|
1176 |
RemoteFunctionCallData rfcData;
|
|
1177 |
OpenGlES11RFC call( rfcData );
|
|
1178 |
call.Init( OpenGlES11RFC::EglGetMaterialxv );
|
|
1179 |
call.AppendParam( face );
|
|
1180 |
call.AppendParam( pname );
|
|
1181 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1182 |
ExecuteCommand(call);
|
|
1183 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetMaterialxv <-\n");
|
|
1184 |
}
|
|
1185 |
|
|
1186 |
EXPORT_C void GL_APIENTRY glGetPointerv (GLenum pname, void **params)
|
|
1187 |
{
|
|
1188 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetPointerv ->\n");
|
|
1189 |
const GLvoid *pointer;
|
|
1190 |
switch( pname )
|
|
1191 |
{
|
|
1192 |
case GL_COLOR_ARRAY_POINTER:
|
|
1193 |
pointer = vertexArrays[COLOR_ARRAY].pointer;
|
|
1194 |
break;
|
|
1195 |
case GL_NORMAL_ARRAY_POINTER:
|
|
1196 |
pointer = vertexArrays[NORMAL_ARRAY].pointer;
|
|
1197 |
break;
|
|
1198 |
case GL_POINT_SIZE_ARRAY_POINTER_OES:
|
|
1199 |
pointer = vertexArrays[POINT_SIZE_ARRAY].pointer;
|
|
1200 |
break;
|
|
1201 |
case GL_TEXTURE_COORD_ARRAY_POINTER:
|
|
1202 |
pointer = vertexArrays[TEX_COORD_ARRAY].pointer;
|
|
1203 |
break;
|
|
1204 |
case GL_VERTEX_ARRAY_POINTER:
|
|
1205 |
pointer = vertexArrays[VERTEX_ARRAY].pointer;
|
|
1206 |
break;
|
|
1207 |
case GL_MATRIX_INDEX_ARRAY_POINTER_OES:
|
|
1208 |
pointer = vertexArrays[MATRIX_INDEX_ARRAY].pointer;
|
|
1209 |
break;
|
|
1210 |
case GL_WEIGHT_ARRAY_POINTER_OES:
|
|
1211 |
pointer = vertexArrays[WEIGHT_ARRAY].pointer;
|
|
1212 |
break;
|
|
1213 |
default:
|
|
1214 |
pointer = NULL;
|
|
1215 |
break;
|
|
1216 |
}
|
|
1217 |
*params = (void*)pointer;
|
|
1218 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetPointerv <-\n");
|
|
1219 |
}
|
|
1220 |
|
|
1221 |
EXPORT_C const GLubyte * GL_APIENTRY glGetString (GLenum name)
|
|
1222 |
{
|
|
1223 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetString ->\n");
|
|
1224 |
if(name < GL_VENDOR || name > GL_EXTENSIONS)
|
|
1225 |
{
|
|
1226 |
SetError( GL_INVALID_ENUM );
|
|
1227 |
return NULL;
|
|
1228 |
}
|
|
1229 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetString <-\n");
|
|
1230 |
return (const GLubyte*) g_strings[name - GL_VENDOR];
|
|
1231 |
}
|
|
1232 |
|
|
1233 |
EXPORT_C void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params)
|
|
1234 |
{
|
|
1235 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexEnvfv ->\n");
|
|
1236 |
TInt32 vectorsize = 1;
|
|
1237 |
if( pname == GL_TEXTURE_ENV_COLOR )
|
|
1238 |
vectorsize = 4;
|
|
1239 |
RemoteFunctionCallData rfcData;
|
|
1240 |
OpenGlES11RFC call( rfcData );
|
|
1241 |
call.Init( OpenGlES11RFC::EglGetTexEnvfv );
|
|
1242 |
call.AppendParam( env );
|
|
1243 |
call.AppendParam( pname );
|
|
1244 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1245 |
ExecuteCommand(call);
|
|
1246 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexEnvfv <-\n");
|
|
1247 |
}
|
|
1248 |
|
|
1249 |
EXPORT_C void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params)
|
|
1250 |
{
|
|
1251 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexEnviv ->\n");
|
|
1252 |
TInt32 vectorsize = 1;
|
|
1253 |
if( pname == GL_TEXTURE_ENV_COLOR )
|
|
1254 |
vectorsize = 4;
|
|
1255 |
RemoteFunctionCallData rfcData;
|
|
1256 |
OpenGlES11RFC call( rfcData );
|
|
1257 |
call.Init( OpenGlES11RFC::EglGetTexEnviv );
|
|
1258 |
call.AppendParam( env );
|
|
1259 |
call.AppendParam( pname );
|
|
1260 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1261 |
ExecuteCommand(call);
|
|
1262 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexEnviv <-\n");
|
|
1263 |
}
|
|
1264 |
|
|
1265 |
EXPORT_C void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params)
|
|
1266 |
{
|
|
1267 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexEnvxv ->\n");
|
|
1268 |
TInt32 vectorsize = 1;
|
|
1269 |
if( pname == GL_TEXTURE_ENV_COLOR )
|
|
1270 |
vectorsize = 4;
|
|
1271 |
RemoteFunctionCallData rfcData;
|
|
1272 |
OpenGlES11RFC call( rfcData );
|
|
1273 |
call.Init( OpenGlES11RFC::EglGetTexEnvxv );
|
|
1274 |
call.AppendParam( env );
|
|
1275 |
call.AppendParam( pname );
|
|
1276 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1277 |
ExecuteCommand(call);
|
|
1278 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexEnvxv <-\n");
|
|
1279 |
}
|
|
1280 |
|
|
1281 |
EXPORT_C void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params)
|
|
1282 |
{
|
|
1283 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexParameterfv ->\n");
|
|
1284 |
TInt32 vectorsize = 1;
|
|
1285 |
if( pname == GL_TEXTURE_CROP_RECT_OES )
|
|
1286 |
vectorsize = 4;
|
|
1287 |
RemoteFunctionCallData rfcData;
|
|
1288 |
OpenGlES11RFC call( rfcData );
|
|
1289 |
call.Init( OpenGlES11RFC::EglGetTexParameterfv );
|
|
1290 |
call.AppendParam( target );
|
|
1291 |
call.AppendParam( pname );
|
|
1292 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1293 |
ExecuteCommand(call);
|
|
1294 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexParameterfv <-\n");
|
|
1295 |
}
|
|
1296 |
|
|
1297 |
EXPORT_C void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params)
|
|
1298 |
{
|
|
1299 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexParameteriv ->\n");
|
|
1300 |
TInt32 vectorsize = 1;
|
|
1301 |
if( pname == GL_TEXTURE_CROP_RECT_OES )
|
|
1302 |
vectorsize = 4;
|
|
1303 |
RemoteFunctionCallData rfcData;
|
|
1304 |
OpenGlES11RFC call( rfcData );
|
|
1305 |
call.Init( OpenGlES11RFC::EglGetTexParameteriv );
|
|
1306 |
call.AppendParam( target );
|
|
1307 |
call.AppendParam( pname );
|
|
1308 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1309 |
ExecuteCommand(call);
|
|
1310 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexParameteriv <-\n");
|
|
1311 |
}
|
|
1312 |
|
|
1313 |
EXPORT_C void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params)
|
|
1314 |
{
|
|
1315 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexParameterxv ->\n");
|
|
1316 |
TInt32 vectorsize = 1;
|
|
1317 |
if( pname == GL_TEXTURE_CROP_RECT_OES )
|
|
1318 |
vectorsize = 4;
|
|
1319 |
RemoteFunctionCallData rfcData;
|
|
1320 |
OpenGlES11RFC call( rfcData );
|
|
1321 |
call.Init( OpenGlES11RFC::EglGetTexParameterxv );
|
|
1322 |
call.AppendParam( target );
|
|
1323 |
call.AppendParam( pname );
|
|
1324 |
call.AppendVector( params, vectorsize, RemoteFunctionCallData::EOut );
|
|
1325 |
ExecuteCommand(call);
|
|
1326 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glGetTexParameterxv <-\n");
|
|
1327 |
}
|
|
1328 |
|
|
1329 |
EXPORT_C void GL_APIENTRY glHint (GLenum target, GLenum mode)
|
|
1330 |
{
|
|
1331 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glHint ->\n");
|
|
1332 |
RemoteFunctionCallData rfcData;
|
|
1333 |
OpenGlES11RFC call( rfcData );
|
|
1334 |
call.Init( OpenGlES11RFC::EglHint, RemoteFunctionCallData::EOpRequest );
|
|
1335 |
call.AppendParam( target );
|
|
1336 |
call.AppendParam( mode );
|
|
1337 |
ExecuteCommand(call);
|
|
1338 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glHint <-\n");
|
|
1339 |
}
|
|
1340 |
|
|
1341 |
EXPORT_C GLboolean GL_APIENTRY glIsBuffer (GLuint buffer)
|
|
1342 |
{
|
|
1343 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glIsBuffer ->\n");
|
|
1344 |
RemoteFunctionCallData rfcData;
|
|
1345 |
OpenGlES11RFC call( rfcData );
|
|
1346 |
call.Init( OpenGlES11RFC::EglIsBuffer );
|
|
1347 |
call.AppendParam( buffer );
|
|
1348 |
GLboolean result = (GLboolean)ExecuteFunction(call);
|
|
1349 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glIsBuffer <-\n");
|
|
1350 |
return result;
|
|
1351 |
}
|
|
1352 |
|
|
1353 |
EXPORT_C GLboolean GL_APIENTRY glIsEnabled (GLenum cap)
|
|
1354 |
{
|
|
1355 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glIsEnabled ->\n");
|
|
1356 |
RemoteFunctionCallData rfcData;
|
|
1357 |
OpenGlES11RFC call( rfcData );
|
|
1358 |
call.Init( OpenGlES11RFC::EglIsEnabled );
|
|
1359 |
call.AppendParam( cap );
|
|
1360 |
GLboolean result = (GLboolean)ExecuteFunction(call);
|
|
1361 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glIsEnabled <-\n");
|
|
1362 |
return result;
|
|
1363 |
}
|
|
1364 |
|
|
1365 |
EXPORT_C GLboolean GL_APIENTRY glIsTexture (GLuint texture)
|
|
1366 |
{
|
|
1367 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glIsTexture ->\n");
|
|
1368 |
RemoteFunctionCallData rfcData;
|
|
1369 |
OpenGlES11RFC call( rfcData );
|
|
1370 |
call.Init( OpenGlES11RFC::EglIsTexture );
|
|
1371 |
call.AppendParam( texture );
|
|
1372 |
GLboolean result = (GLboolean)ExecuteFunction(call);
|
|
1373 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glIsTexture <-\n");
|
|
1374 |
return result;
|
|
1375 |
}
|
|
1376 |
|
|
1377 |
EXPORT_C void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param) __SOFTFP
|
|
1378 |
{
|
|
1379 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightf ->\n");
|
|
1380 |
RemoteFunctionCallData rfcData;
|
|
1381 |
OpenGlES11RFC call( rfcData );
|
|
1382 |
call.Init( OpenGlES11RFC::EglLightf, RemoteFunctionCallData::EOpRequest );
|
|
1383 |
call.AppendParam( light );
|
|
1384 |
call.AppendParam( pname );
|
|
1385 |
call.AppendParam( param );
|
|
1386 |
ExecuteCommand(call);
|
|
1387 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightf <-\n");
|
|
1388 |
}
|
|
1389 |
|
|
1390 |
EXPORT_C void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params)
|
|
1391 |
{
|
|
1392 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightfv ->\n");
|
|
1393 |
TInt32 vectorsize = getLightVectorSize( pname );
|
|
1394 |
RemoteFunctionCallData rfcData;
|
|
1395 |
OpenGlES11RFC call( rfcData );
|
|
1396 |
call.Init( OpenGlES11RFC::EglLightfv, RemoteFunctionCallData::EOpRequest );
|
|
1397 |
call.AppendParam( light );
|
|
1398 |
call.AppendParam( pname );
|
|
1399 |
call.AppendVector( params, vectorsize );
|
|
1400 |
ExecuteCommand(call);
|
|
1401 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightfv <-\n");
|
|
1402 |
}
|
|
1403 |
|
|
1404 |
EXPORT_C void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param)
|
|
1405 |
{
|
|
1406 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightx ->\n");
|
|
1407 |
RemoteFunctionCallData rfcData;
|
|
1408 |
OpenGlES11RFC call( rfcData );
|
|
1409 |
call.Init( OpenGlES11RFC::EglLightx, RemoteFunctionCallData::EOpRequest );
|
|
1410 |
call.AppendParam( light );
|
|
1411 |
call.AppendParam( pname );
|
|
1412 |
call.AppendParam( param );
|
|
1413 |
ExecuteCommand(call);
|
|
1414 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightx <-\n");
|
|
1415 |
}
|
|
1416 |
|
|
1417 |
EXPORT_C void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params)
|
|
1418 |
{
|
|
1419 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightxv ->\n");
|
|
1420 |
TInt32 vectorsize = getLightVectorSize( pname );
|
|
1421 |
RemoteFunctionCallData rfcData;
|
|
1422 |
OpenGlES11RFC call( rfcData );
|
|
1423 |
call.Init( OpenGlES11RFC::EglLightxv, RemoteFunctionCallData::EOpRequest );
|
|
1424 |
call.AppendParam( light );
|
|
1425 |
call.AppendParam( pname );
|
|
1426 |
call.AppendVector( params, vectorsize );
|
|
1427 |
ExecuteCommand(call);
|
|
1428 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightxv <-\n");
|
|
1429 |
}
|
|
1430 |
|
|
1431 |
EXPORT_C void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param) __SOFTFP
|
|
1432 |
{
|
|
1433 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightModelf ->\n");
|
|
1434 |
RemoteFunctionCallData rfcData;
|
|
1435 |
OpenGlES11RFC call( rfcData );
|
|
1436 |
call.Init( OpenGlES11RFC::EglLightModelf, RemoteFunctionCallData::EOpRequest );
|
|
1437 |
call.AppendParam( pname );
|
|
1438 |
call.AppendParam( param );
|
|
1439 |
ExecuteCommand(call);
|
|
1440 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightModelf <-\n");
|
|
1441 |
}
|
|
1442 |
|
|
1443 |
EXPORT_C void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params)
|
|
1444 |
{
|
|
1445 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightModelfv ->\n");
|
|
1446 |
TInt32 vectorsize = 1;
|
|
1447 |
if( pname == GL_LIGHT_MODEL_AMBIENT )
|
|
1448 |
vectorsize = 4;
|
|
1449 |
RemoteFunctionCallData rfcData;
|
|
1450 |
OpenGlES11RFC call( rfcData );
|
|
1451 |
call.Init( OpenGlES11RFC::EglLightModelfv, RemoteFunctionCallData::EOpRequest );
|
|
1452 |
call.AppendParam( pname );
|
|
1453 |
call.AppendVector( params, vectorsize );
|
|
1454 |
ExecuteCommand(call);
|
|
1455 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightModelfv <-\n");
|
|
1456 |
}
|
|
1457 |
|
|
1458 |
EXPORT_C void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param)
|
|
1459 |
{
|
|
1460 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightModelx ->\n");
|
|
1461 |
RemoteFunctionCallData rfcData;
|
|
1462 |
OpenGlES11RFC call( rfcData );
|
|
1463 |
call.Init( OpenGlES11RFC::EglLightModelx, RemoteFunctionCallData::EOpRequest );
|
|
1464 |
call.AppendParam( pname );
|
|
1465 |
call.AppendParam( param );
|
|
1466 |
ExecuteCommand(call);
|
|
1467 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightModelx <-\n");
|
|
1468 |
}
|
|
1469 |
|
|
1470 |
EXPORT_C void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params)
|
|
1471 |
{
|
|
1472 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightModelxv ->\n");
|
|
1473 |
TInt32 vectorsize = 1;
|
|
1474 |
if( pname == GL_LIGHT_MODEL_AMBIENT )
|
|
1475 |
vectorsize = 4;
|
|
1476 |
RemoteFunctionCallData rfcData;
|
|
1477 |
OpenGlES11RFC call( rfcData );
|
|
1478 |
call.Init( OpenGlES11RFC::EglLightModelxv, RemoteFunctionCallData::EOpRequest );
|
|
1479 |
call.AppendParam( pname );
|
|
1480 |
call.AppendVector( params, vectorsize );
|
|
1481 |
ExecuteCommand(call);
|
|
1482 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLightModelxv <-\n");
|
|
1483 |
}
|
|
1484 |
|
|
1485 |
EXPORT_C void GL_APIENTRY glLineWidth (GLfloat width) __SOFTFP
|
|
1486 |
{
|
|
1487 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLineWidth ->\n");
|
|
1488 |
RemoteFunctionCallData rfcData;
|
|
1489 |
OpenGlES11RFC call( rfcData );
|
|
1490 |
call.Init( OpenGlES11RFC::EglLineWidth, RemoteFunctionCallData::EOpRequest );
|
|
1491 |
call.AppendParam( width );
|
|
1492 |
ExecuteCommand(call);
|
|
1493 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLineWidth <-\n");
|
|
1494 |
}
|
|
1495 |
|
|
1496 |
EXPORT_C void GL_APIENTRY glLineWidthx (GLfixed width)
|
|
1497 |
{
|
|
1498 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLineWidthx ->\n");
|
|
1499 |
RemoteFunctionCallData rfcData;
|
|
1500 |
OpenGlES11RFC call( rfcData );
|
|
1501 |
call.Init( OpenGlES11RFC::EglLineWidthx, RemoteFunctionCallData::EOpRequest );
|
|
1502 |
call.AppendParam( width );
|
|
1503 |
ExecuteCommand(call);
|
|
1504 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLineWidthx <-\n");
|
|
1505 |
}
|
|
1506 |
|
|
1507 |
EXPORT_C void GL_APIENTRY glLoadIdentity (void)
|
|
1508 |
{
|
|
1509 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLoadIdentity ->\n");
|
|
1510 |
RemoteFunctionCallData rfcData;
|
|
1511 |
OpenGlES11RFC call( rfcData );
|
|
1512 |
call.Init( OpenGlES11RFC::EglLoadIdentity, RemoteFunctionCallData::EOpRequest );
|
|
1513 |
ExecuteCommand(call);
|
|
1514 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLoadIdentity <-\n");
|
|
1515 |
}
|
|
1516 |
|
|
1517 |
EXPORT_C void GL_APIENTRY glLoadMatrixf (const GLfloat *m)
|
|
1518 |
{
|
|
1519 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLoadMatrixf ->\n");
|
|
1520 |
RemoteFunctionCallData rfcData;
|
|
1521 |
OpenGlES11RFC call( rfcData );
|
|
1522 |
call.Init( OpenGlES11RFC::EglLoadMatrixf, RemoteFunctionCallData::EOpRequest );
|
|
1523 |
call.AppendVector( m, 16 );
|
|
1524 |
ExecuteCommand(call);
|
|
1525 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLoadMatrixf <-\n");
|
|
1526 |
}
|
|
1527 |
|
|
1528 |
EXPORT_C void GL_APIENTRY glLoadMatrixx (const GLfixed *m)
|
|
1529 |
{
|
|
1530 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLoadMatrixx ->\n");
|
|
1531 |
RemoteFunctionCallData rfcData;
|
|
1532 |
OpenGlES11RFC call( rfcData );
|
|
1533 |
call.Init( OpenGlES11RFC::EglLoadMatrixx, RemoteFunctionCallData::EOpRequest );
|
|
1534 |
call.AppendVector( m, 16 );
|
|
1535 |
ExecuteCommand(call);
|
|
1536 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLoadMatrixx <-\n");
|
|
1537 |
}
|
|
1538 |
|
|
1539 |
EXPORT_C void GL_APIENTRY glLogicOp (GLenum opcode)
|
|
1540 |
{
|
|
1541 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLogicOp ->\n");
|
|
1542 |
RemoteFunctionCallData rfcData;
|
|
1543 |
OpenGlES11RFC call( rfcData );
|
|
1544 |
call.Init( OpenGlES11RFC::EglLogicOp, RemoteFunctionCallData::EOpRequest );
|
|
1545 |
call.AppendParam( opcode );
|
|
1546 |
ExecuteCommand(call);
|
|
1547 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLogicOp <-\n");
|
|
1548 |
}
|
|
1549 |
|
|
1550 |
EXPORT_C void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param) __SOFTFP
|
|
1551 |
{
|
|
1552 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMaterialf ->\n");
|
|
1553 |
RemoteFunctionCallData rfcData;
|
|
1554 |
OpenGlES11RFC call( rfcData );
|
|
1555 |
call.Init( OpenGlES11RFC::EglMaterialf, RemoteFunctionCallData::EOpRequest );
|
|
1556 |
call.AppendParam( face );
|
|
1557 |
call.AppendParam( pname );
|
|
1558 |
call.AppendParam( param );
|
|
1559 |
ExecuteCommand(call);
|
|
1560 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMaterialf <-\n");
|
|
1561 |
}
|
|
1562 |
|
|
1563 |
EXPORT_C void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params)
|
|
1564 |
{
|
|
1565 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMaterialfv ->\n");
|
|
1566 |
TInt32 vectorsize = getMaterialVectorSize( pname );
|
|
1567 |
RemoteFunctionCallData rfcData;
|
|
1568 |
OpenGlES11RFC call( rfcData );
|
|
1569 |
call.Init( OpenGlES11RFC::EglMaterialfv, RemoteFunctionCallData::EOpRequest );
|
|
1570 |
call.AppendParam( face );
|
|
1571 |
call.AppendParam( pname );
|
|
1572 |
call.AppendVector( params, vectorsize );
|
|
1573 |
ExecuteCommand(call);
|
|
1574 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMaterialfv <-\n");
|
|
1575 |
}
|
|
1576 |
|
|
1577 |
EXPORT_C void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param)
|
|
1578 |
{
|
|
1579 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMaterialx ->\n");
|
|
1580 |
RemoteFunctionCallData rfcData;
|
|
1581 |
OpenGlES11RFC call( rfcData );
|
|
1582 |
call.Init( OpenGlES11RFC::EglMaterialx, RemoteFunctionCallData::EOpRequest );
|
|
1583 |
call.AppendParam( face );
|
|
1584 |
call.AppendParam( pname );
|
|
1585 |
call.AppendParam( param );
|
|
1586 |
ExecuteCommand(call);
|
|
1587 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMaterialx <-\n");
|
|
1588 |
}
|
|
1589 |
|
|
1590 |
EXPORT_C void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params)
|
|
1591 |
{
|
|
1592 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMaterialxv ->\n");
|
|
1593 |
TInt32 vectorsize = getMaterialVectorSize( pname );
|
|
1594 |
RemoteFunctionCallData rfcData;
|
|
1595 |
OpenGlES11RFC call( rfcData );
|
|
1596 |
call.Init( OpenGlES11RFC::EglMaterialxv, RemoteFunctionCallData::EOpRequest );
|
|
1597 |
call.AppendParam( face );
|
|
1598 |
call.AppendParam( pname );
|
|
1599 |
call.AppendVector( params, vectorsize );
|
|
1600 |
ExecuteCommand(call);
|
|
1601 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMaterialxv <-\n");
|
|
1602 |
}
|
|
1603 |
|
|
1604 |
EXPORT_C void GL_APIENTRY glMatrixMode (GLenum mode)
|
|
1605 |
{
|
|
1606 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMatrixMode ->\n");
|
|
1607 |
RemoteFunctionCallData rfcData;
|
|
1608 |
OpenGlES11RFC call( rfcData );
|
|
1609 |
call.Init( OpenGlES11RFC::EglMatrixMode, RemoteFunctionCallData::EOpRequest );
|
|
1610 |
call.AppendParam( mode );
|
|
1611 |
ExecuteCommand(call);
|
|
1612 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMatrixMode <-\n");
|
|
1613 |
}
|
|
1614 |
|
|
1615 |
EXPORT_C void GL_APIENTRY glMultMatrixf (const GLfloat *m)
|
|
1616 |
{
|
|
1617 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMultMatrixf ->\n");
|
|
1618 |
RemoteFunctionCallData rfcData;
|
|
1619 |
OpenGlES11RFC call( rfcData );
|
|
1620 |
call.Init( OpenGlES11RFC::EglMultMatrixf, RemoteFunctionCallData::EOpRequest );
|
|
1621 |
call.AppendVector( m, 16 );
|
|
1622 |
ExecuteCommand(call);
|
|
1623 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMultMatrixf <-\n");
|
|
1624 |
}
|
|
1625 |
|
|
1626 |
EXPORT_C void GL_APIENTRY glMultMatrixx (const GLfixed *m)
|
|
1627 |
{
|
|
1628 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMultMatrixx ->\n");
|
|
1629 |
RemoteFunctionCallData rfcData;
|
|
1630 |
OpenGlES11RFC call( rfcData );
|
|
1631 |
call.Init( OpenGlES11RFC::EglMultMatrixx, RemoteFunctionCallData::EOpRequest );
|
|
1632 |
call.AppendVector( m, 16 );
|
|
1633 |
ExecuteCommand(call);
|
|
1634 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMultMatrixx <-\n");
|
|
1635 |
}
|
|
1636 |
|
|
1637 |
EXPORT_C void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) __SOFTFP
|
|
1638 |
{
|
|
1639 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMultiTexCoord4f ->\n");
|
|
1640 |
RemoteFunctionCallData rfcData;
|
|
1641 |
OpenGlES11RFC call( rfcData );
|
|
1642 |
call.Init( OpenGlES11RFC::EglMultiTexCoord4f, RemoteFunctionCallData::EOpRequest );
|
|
1643 |
call.AppendParam( target );
|
|
1644 |
call.AppendParam( s );
|
|
1645 |
call.AppendParam( t );
|
|
1646 |
call.AppendParam( r );
|
|
1647 |
call.AppendParam( q );
|
|
1648 |
ExecuteCommand(call);
|
|
1649 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMultiTexCoord4f <-\n");
|
|
1650 |
}
|
|
1651 |
|
|
1652 |
EXPORT_C void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
|
|
1653 |
{
|
|
1654 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMultiTexCoord4x ->\n");
|
|
1655 |
RemoteFunctionCallData rfcData;
|
|
1656 |
OpenGlES11RFC call( rfcData );
|
|
1657 |
call.Init( OpenGlES11RFC::EglMultiTexCoord4x, RemoteFunctionCallData::EOpRequest );
|
|
1658 |
call.AppendParam( target );
|
|
1659 |
call.AppendParam( s );
|
|
1660 |
call.AppendParam( t );
|
|
1661 |
call.AppendParam( r );
|
|
1662 |
call.AppendParam( q );
|
|
1663 |
ExecuteCommand(call);
|
|
1664 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMultiTexCoord4x <-\n");
|
|
1665 |
}
|
|
1666 |
|
|
1667 |
EXPORT_C void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz) __SOFTFP
|
|
1668 |
{
|
|
1669 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glNormal3f ->\n");
|
|
1670 |
RemoteFunctionCallData rfcData;
|
|
1671 |
OpenGlES11RFC call( rfcData );
|
|
1672 |
call.Init( OpenGlES11RFC::EglNormal3f, RemoteFunctionCallData::EOpRequest );
|
|
1673 |
call.AppendParam( nx );
|
|
1674 |
call.AppendParam( ny );
|
|
1675 |
call.AppendParam( nz );
|
|
1676 |
ExecuteCommand(call);
|
|
1677 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glNormal3f <-\n");
|
|
1678 |
}
|
|
1679 |
|
|
1680 |
EXPORT_C void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz)
|
|
1681 |
{
|
|
1682 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glNormal3x ->\n");
|
|
1683 |
RemoteFunctionCallData rfcData;
|
|
1684 |
OpenGlES11RFC call( rfcData );
|
|
1685 |
call.Init( OpenGlES11RFC::EglNormal3x, RemoteFunctionCallData::EOpRequest );
|
|
1686 |
call.AppendParam( nx );
|
|
1687 |
call.AppendParam( ny );
|
|
1688 |
call.AppendParam( nz );
|
|
1689 |
ExecuteCommand(call);
|
|
1690 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glNormal3x <-\n");
|
|
1691 |
}
|
|
1692 |
|
|
1693 |
EXPORT_C void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer)
|
|
1694 |
{
|
|
1695 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glNormalPointer ->\n");
|
|
1696 |
vertexArrays[NORMAL_ARRAY].size = 3;
|
|
1697 |
vertexArrays[NORMAL_ARRAY].type = type;
|
|
1698 |
vertexArrays[NORMAL_ARRAY].stride = stride;
|
|
1699 |
vertexArrays[NORMAL_ARRAY].pointer = pointer;
|
|
1700 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glNormalPointer <-\n");
|
|
1701 |
}
|
|
1702 |
|
|
1703 |
EXPORT_C void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) __SOFTFP
|
|
1704 |
{
|
|
1705 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glOrthof ->\n");
|
|
1706 |
RemoteFunctionCallData rfcData;
|
|
1707 |
OpenGlES11RFC call( rfcData );
|
|
1708 |
call.Init( OpenGlES11RFC::EglOrthof, RemoteFunctionCallData::EOpRequest );
|
|
1709 |
call.AppendParam( left );
|
|
1710 |
call.AppendParam( right );
|
|
1711 |
call.AppendParam( bottom );
|
|
1712 |
call.AppendParam( top );
|
|
1713 |
call.AppendParam( zNear );
|
|
1714 |
call.AppendParam( zFar );
|
|
1715 |
ExecuteCommand(call);
|
|
1716 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glOrthof <-\n");
|
|
1717 |
}
|
|
1718 |
|
|
1719 |
EXPORT_C void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar)
|
|
1720 |
{
|
|
1721 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glOrthox ->\n");
|
|
1722 |
RemoteFunctionCallData rfcData;
|
|
1723 |
OpenGlES11RFC call( rfcData );
|
|
1724 |
call.Init( OpenGlES11RFC::EglOrthox, RemoteFunctionCallData::EOpRequest );
|
|
1725 |
call.AppendParam( left );
|
|
1726 |
call.AppendParam( right );
|
|
1727 |
call.AppendParam( bottom );
|
|
1728 |
call.AppendParam( top );
|
|
1729 |
call.AppendParam( zNear );
|
|
1730 |
call.AppendParam( zFar );
|
|
1731 |
ExecuteCommand(call);
|
|
1732 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glOrthox <-\n");
|
|
1733 |
}
|
|
1734 |
|
|
1735 |
EXPORT_C void GL_APIENTRY glPixelStorei (GLenum pname, GLint param)
|
|
1736 |
{
|
|
1737 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPixelStorei ->\n");
|
|
1738 |
RemoteFunctionCallData rfcData;
|
|
1739 |
OpenGlES11RFC call( rfcData );
|
|
1740 |
call.Init( OpenGlES11RFC::EglPixelStorei, RemoteFunctionCallData::EOpRequest );
|
|
1741 |
call.AppendParam( pname );
|
|
1742 |
call.AppendParam( param );
|
|
1743 |
ExecuteCommand(call);
|
|
1744 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPixelStorei <-\n");
|
|
1745 |
}
|
|
1746 |
|
|
1747 |
EXPORT_C void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param) __SOFTFP
|
|
1748 |
{
|
|
1749 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointParameterf ->\n");
|
|
1750 |
RemoteFunctionCallData rfcData;
|
|
1751 |
OpenGlES11RFC call( rfcData );
|
|
1752 |
call.Init( OpenGlES11RFC::EglPointParameterf, RemoteFunctionCallData::EOpRequest );
|
|
1753 |
call.AppendParam( pname );
|
|
1754 |
call.AppendParam( param );
|
|
1755 |
ExecuteCommand(call);
|
|
1756 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointParameterf <-\n");
|
|
1757 |
}
|
|
1758 |
|
|
1759 |
EXPORT_C void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params)
|
|
1760 |
{
|
|
1761 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointParameterfv ->\n");
|
|
1762 |
TInt32 vectorsize = 1;
|
|
1763 |
if( pname == GL_POINT_DISTANCE_ATTENUATION )
|
|
1764 |
vectorsize = 3;
|
|
1765 |
RemoteFunctionCallData rfcData;
|
|
1766 |
OpenGlES11RFC call( rfcData );
|
|
1767 |
call.Init( OpenGlES11RFC::EglPointParameterfv, RemoteFunctionCallData::EOpRequest );
|
|
1768 |
call.AppendParam( pname );
|
|
1769 |
call.AppendVector( params, vectorsize );
|
|
1770 |
ExecuteCommand(call);
|
|
1771 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointParameterfv <-\n");
|
|
1772 |
}
|
|
1773 |
|
|
1774 |
EXPORT_C void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param)
|
|
1775 |
{
|
|
1776 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointParameterx ->\n");
|
|
1777 |
RemoteFunctionCallData rfcData;
|
|
1778 |
OpenGlES11RFC call( rfcData );
|
|
1779 |
call.Init( OpenGlES11RFC::EglPointParameterx, RemoteFunctionCallData::EOpRequest );
|
|
1780 |
call.AppendParam( pname );
|
|
1781 |
call.AppendParam( param );
|
|
1782 |
ExecuteCommand(call);
|
|
1783 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointParameterx <-\n");
|
|
1784 |
}
|
|
1785 |
|
|
1786 |
EXPORT_C void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params)
|
|
1787 |
{
|
|
1788 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointParameterxv ->\n");
|
|
1789 |
TInt32 vectorsize = 1;
|
|
1790 |
if( pname == GL_POINT_DISTANCE_ATTENUATION )
|
|
1791 |
vectorsize = 3;
|
|
1792 |
RemoteFunctionCallData rfcData;
|
|
1793 |
OpenGlES11RFC call( rfcData );
|
|
1794 |
call.Init( OpenGlES11RFC::EglPointParameterxv, RemoteFunctionCallData::EOpRequest );
|
|
1795 |
call.AppendParam( pname );
|
|
1796 |
call.AppendVector( params, vectorsize );
|
|
1797 |
ExecuteCommand(call);
|
|
1798 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointParameterxv <-\n");
|
|
1799 |
}
|
|
1800 |
|
|
1801 |
EXPORT_C void GL_APIENTRY glPointSize (GLfloat size) __SOFTFP
|
|
1802 |
{
|
|
1803 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointSize ->\n");
|
|
1804 |
RemoteFunctionCallData rfcData;
|
|
1805 |
OpenGlES11RFC call( rfcData );
|
|
1806 |
call.Init( OpenGlES11RFC::EglPointSize, RemoteFunctionCallData::EOpRequest );
|
|
1807 |
call.AppendParam( size );
|
|
1808 |
ExecuteCommand(call);
|
|
1809 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointSize <-\n");
|
|
1810 |
}
|
|
1811 |
|
|
1812 |
EXPORT_C void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer)
|
|
1813 |
{
|
|
1814 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointSizePointerOES ->\n");
|
|
1815 |
vertexArrays[POINT_SIZE_ARRAY].size = 1;
|
|
1816 |
vertexArrays[POINT_SIZE_ARRAY].type = type;
|
|
1817 |
vertexArrays[POINT_SIZE_ARRAY].stride = stride;
|
|
1818 |
vertexArrays[POINT_SIZE_ARRAY].pointer = pointer;
|
|
1819 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointSizePointerOES <-\n");
|
|
1820 |
}
|
|
1821 |
|
|
1822 |
EXPORT_C void GL_APIENTRY glPointSizex (GLfixed size)
|
|
1823 |
{
|
|
1824 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointSizex ->\n");
|
|
1825 |
RemoteFunctionCallData rfcData;
|
|
1826 |
OpenGlES11RFC call( rfcData );
|
|
1827 |
call.Init( OpenGlES11RFC::EglPointSizex, RemoteFunctionCallData::EOpRequest );
|
|
1828 |
call.AppendParam( size );
|
|
1829 |
ExecuteCommand(call);
|
|
1830 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPointSizex <-\n");
|
|
1831 |
}
|
|
1832 |
|
|
1833 |
EXPORT_C void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units) __SOFTFP
|
|
1834 |
{
|
|
1835 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPolygonOffset ->\n");
|
|
1836 |
RemoteFunctionCallData rfcData;
|
|
1837 |
OpenGlES11RFC call( rfcData );
|
|
1838 |
call.Init( OpenGlES11RFC::EglPolygonOffset, RemoteFunctionCallData::EOpRequest );
|
|
1839 |
call.AppendParam( factor );
|
|
1840 |
call.AppendParam( units );
|
|
1841 |
ExecuteCommand(call);
|
|
1842 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPolygonOffset <-\n");
|
|
1843 |
}
|
|
1844 |
|
|
1845 |
EXPORT_C void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units)
|
|
1846 |
{
|
|
1847 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPolygonOffsetx ->\n");
|
|
1848 |
RemoteFunctionCallData rfcData;
|
|
1849 |
OpenGlES11RFC call( rfcData );
|
|
1850 |
call.Init( OpenGlES11RFC::EglPolygonOffsetx, RemoteFunctionCallData::EOpRequest );
|
|
1851 |
call.AppendParam( factor );
|
|
1852 |
call.AppendParam( units );
|
|
1853 |
ExecuteCommand(call);
|
|
1854 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPolygonOffsetx <-\n");
|
|
1855 |
}
|
|
1856 |
|
|
1857 |
EXPORT_C void GL_APIENTRY glPopMatrix (void)
|
|
1858 |
{
|
|
1859 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPopMatrix ->\n");
|
|
1860 |
RemoteFunctionCallData rfcData;
|
|
1861 |
OpenGlES11RFC call( rfcData );
|
|
1862 |
call.Init( OpenGlES11RFC::EglPopMatrix, RemoteFunctionCallData::EOpRequest );
|
|
1863 |
ExecuteCommand(call);
|
|
1864 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPopMatrix <-\n");
|
|
1865 |
}
|
|
1866 |
|
|
1867 |
EXPORT_C void GL_APIENTRY glPushMatrix (void)
|
|
1868 |
{
|
|
1869 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPushMatrix ->\n");
|
|
1870 |
RemoteFunctionCallData rfcData;
|
|
1871 |
OpenGlES11RFC call( rfcData );
|
|
1872 |
call.Init( OpenGlES11RFC::EglPushMatrix, RemoteFunctionCallData::EOpRequest );
|
|
1873 |
ExecuteCommand(call);
|
|
1874 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glPushMatrix <-\n");
|
|
1875 |
}
|
|
1876 |
|
|
1877 |
inline TInt32 getPixelSizeInBytes(GLenum format, GLenum type)
|
|
1878 |
{
|
|
1879 |
TInt32 size = 0;
|
|
1880 |
if( format == GL_RGBA && type == GL_UNSIGNED_BYTE )
|
|
1881 |
{
|
|
1882 |
size = 4;
|
|
1883 |
}
|
|
1884 |
else if( format == GL_RGB && type == GL_UNSIGNED_BYTE )
|
|
1885 |
{
|
|
1886 |
size = 3;
|
|
1887 |
}
|
|
1888 |
else if( format == GL_RGBA && type == GL_UNSIGNED_SHORT_4_4_4_4
|
|
1889 |
|| format == GL_RGBA && type == GL_UNSIGNED_SHORT_5_5_5_1
|
|
1890 |
|| format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5
|
|
1891 |
|| format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE )
|
|
1892 |
{
|
|
1893 |
size = 2;
|
|
1894 |
}
|
|
1895 |
return size;
|
|
1896 |
}
|
|
1897 |
|
|
1898 |
EXPORT_C void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
|
|
1899 |
{
|
|
1900 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glReadPixels ->\n");
|
|
1901 |
TInt32 vectorsize = width * height * getPixelSizeInBytes( format, type );
|
|
1902 |
if(vectorsize < 0) // cannot serialize vector with size < 0
|
|
1903 |
{
|
|
1904 |
SetError( GL_INVALID_VALUE );
|
|
1905 |
return;
|
|
1906 |
}
|
|
1907 |
RemoteFunctionCallData rfcData;
|
|
1908 |
OpenGlES11RFC call( rfcData );
|
|
1909 |
call.Init( OpenGlES11RFC::EglReadPixels );
|
|
1910 |
call.AppendParam( x );
|
|
1911 |
call.AppendParam( y );
|
|
1912 |
call.AppendParam( width );
|
|
1913 |
call.AppendParam( height );
|
|
1914 |
call.AppendParam( format );
|
|
1915 |
call.AppendParam( type );
|
|
1916 |
call.AppendVector( pixels, vectorsize, RemoteFunctionCallData::EOut );
|
|
1917 |
ExecuteCommand(call);
|
|
1918 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glReadPixels <-\n");
|
|
1919 |
}
|
|
1920 |
|
|
1921 |
EXPORT_C void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z) __SOFTFP
|
|
1922 |
{
|
|
1923 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glRotatef ->\n");
|
|
1924 |
RemoteFunctionCallData rfcData;
|
|
1925 |
OpenGlES11RFC call( rfcData );
|
|
1926 |
call.Init( OpenGlES11RFC::EglRotatef, RemoteFunctionCallData::EOpRequest );
|
|
1927 |
call.AppendParam( angle );
|
|
1928 |
call.AppendParam( x );
|
|
1929 |
call.AppendParam( y );
|
|
1930 |
call.AppendParam( z );
|
|
1931 |
ExecuteCommand(call);
|
|
1932 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glRotatef <-\n");
|
|
1933 |
}
|
|
1934 |
|
|
1935 |
EXPORT_C void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
|
|
1936 |
{
|
|
1937 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glRotatex ->\n");
|
|
1938 |
RemoteFunctionCallData rfcData;
|
|
1939 |
OpenGlES11RFC call( rfcData );
|
|
1940 |
call.Init( OpenGlES11RFC::EglRotatex, RemoteFunctionCallData::EOpRequest );
|
|
1941 |
call.AppendParam( angle );
|
|
1942 |
call.AppendParam( x );
|
|
1943 |
call.AppendParam( y );
|
|
1944 |
call.AppendParam( z );
|
|
1945 |
ExecuteCommand(call);
|
|
1946 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glRotatex <-\n");
|
|
1947 |
}
|
|
1948 |
|
|
1949 |
EXPORT_C void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert) __SOFTFP
|
|
1950 |
{
|
|
1951 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glSampleCoverage ->\n");
|
|
1952 |
RemoteFunctionCallData rfcData;
|
|
1953 |
OpenGlES11RFC call( rfcData );
|
|
1954 |
call.Init( OpenGlES11RFC::EglSampleCoverage, RemoteFunctionCallData::EOpRequest );
|
|
1955 |
call.AppendParam( value );
|
|
1956 |
call.AppendParam( invert );
|
|
1957 |
ExecuteCommand(call);
|
|
1958 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glSampleCoverage <-\n");
|
|
1959 |
}
|
|
1960 |
|
|
1961 |
EXPORT_C void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert)
|
|
1962 |
{
|
|
1963 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glSampleCoveragex ->\n");
|
|
1964 |
RemoteFunctionCallData rfcData;
|
|
1965 |
OpenGlES11RFC call( rfcData );
|
|
1966 |
call.Init( OpenGlES11RFC::EglSampleCoveragex, RemoteFunctionCallData::EOpRequest );
|
|
1967 |
call.AppendParam( value );
|
|
1968 |
call.AppendParam( invert );
|
|
1969 |
ExecuteCommand(call);
|
|
1970 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glSampleCoveragex <-\n");
|
|
1971 |
}
|
|
1972 |
|
|
1973 |
EXPORT_C void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z) __SOFTFP
|
|
1974 |
{
|
|
1975 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glScalef ->\n");
|
|
1976 |
RemoteFunctionCallData rfcData;
|
|
1977 |
OpenGlES11RFC call( rfcData );
|
|
1978 |
call.Init( OpenGlES11RFC::EglScalef, RemoteFunctionCallData::EOpRequest );
|
|
1979 |
call.AppendParam( x );
|
|
1980 |
call.AppendParam( y );
|
|
1981 |
call.AppendParam( z );
|
|
1982 |
ExecuteCommand(call);
|
|
1983 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glScalef <-\n");
|
|
1984 |
}
|
|
1985 |
|
|
1986 |
EXPORT_C void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z)
|
|
1987 |
{
|
|
1988 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glScalex ->\n");
|
|
1989 |
RemoteFunctionCallData rfcData;
|
|
1990 |
OpenGlES11RFC call( rfcData );
|
|
1991 |
call.Init( OpenGlES11RFC::EglScalex, RemoteFunctionCallData::EOpRequest );
|
|
1992 |
call.AppendParam( x );
|
|
1993 |
call.AppendParam( y );
|
|
1994 |
call.AppendParam( z );
|
|
1995 |
ExecuteCommand(call);
|
|
1996 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glScalex <-\n");
|
|
1997 |
}
|
|
1998 |
|
|
1999 |
EXPORT_C void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height)
|
|
2000 |
{
|
|
2001 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glScissor ->\n");
|
|
2002 |
RemoteFunctionCallData rfcData;
|
|
2003 |
OpenGlES11RFC call( rfcData );
|
|
2004 |
call.Init( OpenGlES11RFC::EglScissor, RemoteFunctionCallData::EOpRequest );
|
|
2005 |
call.AppendParam( x );
|
|
2006 |
call.AppendParam( y );
|
|
2007 |
call.AppendParam( width );
|
|
2008 |
call.AppendParam( height );
|
|
2009 |
ExecuteCommand(call);
|
|
2010 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glScissor <-\n");
|
|
2011 |
}
|
|
2012 |
|
|
2013 |
EXPORT_C void GL_APIENTRY glShadeModel (GLenum mode)
|
|
2014 |
{
|
|
2015 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glShadeModel ->\n");
|
|
2016 |
RemoteFunctionCallData rfcData;
|
|
2017 |
OpenGlES11RFC call( rfcData );
|
|
2018 |
call.Init( OpenGlES11RFC::EglShadeModel, RemoteFunctionCallData::EOpRequest );
|
|
2019 |
call.AppendParam( mode );
|
|
2020 |
ExecuteCommand(call);
|
|
2021 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glShadeModel <-\n");
|
|
2022 |
}
|
|
2023 |
|
|
2024 |
EXPORT_C void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask)
|
|
2025 |
{
|
|
2026 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glStencilFunc ->\n");
|
|
2027 |
RemoteFunctionCallData rfcData;
|
|
2028 |
OpenGlES11RFC call( rfcData );
|
|
2029 |
call.Init( OpenGlES11RFC::EglStencilFunc, RemoteFunctionCallData::EOpRequest );
|
|
2030 |
call.AppendParam( func );
|
|
2031 |
call.AppendParam( ref );
|
|
2032 |
call.AppendParam( mask );
|
|
2033 |
ExecuteCommand(call);
|
|
2034 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glStencilFunc <-\n");
|
|
2035 |
}
|
|
2036 |
|
|
2037 |
EXPORT_C void GL_APIENTRY glStencilMask (GLuint mask)
|
|
2038 |
{
|
|
2039 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glStencilMask ->\n");
|
|
2040 |
RemoteFunctionCallData rfcData;
|
|
2041 |
OpenGlES11RFC call( rfcData );
|
|
2042 |
call.Init( OpenGlES11RFC::EglStencilMask, RemoteFunctionCallData::EOpRequest );
|
|
2043 |
call.AppendParam( mask );
|
|
2044 |
ExecuteCommand(call);
|
|
2045 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glStencilMask <-\n");
|
|
2046 |
}
|
|
2047 |
|
|
2048 |
EXPORT_C void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass)
|
|
2049 |
{
|
|
2050 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glStencilOp ->\n");
|
|
2051 |
RemoteFunctionCallData rfcData;
|
|
2052 |
OpenGlES11RFC call( rfcData );
|
|
2053 |
call.Init( OpenGlES11RFC::EglStencilOp, RemoteFunctionCallData::EOpRequest );
|
|
2054 |
call.AppendParam( fail );
|
|
2055 |
call.AppendParam( zfail );
|
|
2056 |
call.AppendParam( zpass );
|
|
2057 |
ExecuteCommand(call);
|
|
2058 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glStencilOp <-\n");
|
|
2059 |
}
|
|
2060 |
|
|
2061 |
EXPORT_C void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
|
2062 |
{
|
|
2063 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexCoordPointer ->\n");
|
|
2064 |
vertexArrays[TEX_COORD_ARRAY].size = size;
|
|
2065 |
vertexArrays[TEX_COORD_ARRAY].type = type;
|
|
2066 |
vertexArrays[TEX_COORD_ARRAY].stride = stride;
|
|
2067 |
vertexArrays[TEX_COORD_ARRAY].pointer = pointer;
|
|
2068 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexCoordPointer <-\n");
|
|
2069 |
}
|
|
2070 |
|
|
2071 |
EXPORT_C void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param) __SOFTFP
|
|
2072 |
{
|
|
2073 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvf ->\n");
|
|
2074 |
RemoteFunctionCallData rfcData;
|
|
2075 |
OpenGlES11RFC call( rfcData );
|
|
2076 |
call.Init( OpenGlES11RFC::EglTexEnvf, RemoteFunctionCallData::EOpRequest );
|
|
2077 |
call.AppendParam( target );
|
|
2078 |
call.AppendParam( pname );
|
|
2079 |
call.AppendParam( param );
|
|
2080 |
ExecuteCommand(call);
|
|
2081 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvf <-\n");
|
|
2082 |
}
|
|
2083 |
|
|
2084 |
EXPORT_C void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params)
|
|
2085 |
{
|
|
2086 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvfv ->\n");
|
|
2087 |
TInt32 vectorsize = 1;
|
|
2088 |
if( pname == GL_TEXTURE_ENV_COLOR )
|
|
2089 |
vectorsize = 4;
|
|
2090 |
RemoteFunctionCallData rfcData;
|
|
2091 |
OpenGlES11RFC call( rfcData );
|
|
2092 |
call.Init( OpenGlES11RFC::EglTexEnvfv, RemoteFunctionCallData::EOpRequest );
|
|
2093 |
call.AppendParam( target );
|
|
2094 |
call.AppendParam( pname );
|
|
2095 |
call.AppendVector( params, vectorsize );
|
|
2096 |
ExecuteCommand(call);
|
|
2097 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvfv <-\n");
|
|
2098 |
}
|
|
2099 |
|
|
2100 |
EXPORT_C void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param)
|
|
2101 |
{
|
|
2102 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvi ->\n");
|
|
2103 |
RemoteFunctionCallData rfcData;
|
|
2104 |
OpenGlES11RFC call( rfcData );
|
|
2105 |
call.Init( OpenGlES11RFC::EglTexEnvi, RemoteFunctionCallData::EOpRequest );
|
|
2106 |
call.AppendParam( target );
|
|
2107 |
call.AppendParam( pname );
|
|
2108 |
call.AppendParam( param );
|
|
2109 |
ExecuteCommand(call);
|
|
2110 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvi <-\n");
|
|
2111 |
}
|
|
2112 |
|
|
2113 |
EXPORT_C void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params)
|
|
2114 |
{
|
|
2115 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnviv ->\n");
|
|
2116 |
TInt32 vectorsize = 1;
|
|
2117 |
if( pname == GL_TEXTURE_ENV_COLOR )
|
|
2118 |
vectorsize = 4;
|
|
2119 |
RemoteFunctionCallData rfcData;
|
|
2120 |
OpenGlES11RFC call( rfcData );
|
|
2121 |
call.Init( OpenGlES11RFC::EglTexEnviv, RemoteFunctionCallData::EOpRequest );
|
|
2122 |
call.AppendParam( target );
|
|
2123 |
call.AppendParam( pname );
|
|
2124 |
call.AppendVector( params, vectorsize );
|
|
2125 |
ExecuteCommand(call);
|
|
2126 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnviv <-\n");
|
|
2127 |
}
|
|
2128 |
|
|
2129 |
EXPORT_C void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param)
|
|
2130 |
{
|
|
2131 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvx ->\n");
|
|
2132 |
RemoteFunctionCallData rfcData;
|
|
2133 |
OpenGlES11RFC call( rfcData );
|
|
2134 |
call.Init( OpenGlES11RFC::EglTexEnvx, RemoteFunctionCallData::EOpRequest );
|
|
2135 |
call.AppendParam( target );
|
|
2136 |
call.AppendParam( pname );
|
|
2137 |
call.AppendParam( param );
|
|
2138 |
ExecuteCommand(call);
|
|
2139 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvx <-\n");
|
|
2140 |
}
|
|
2141 |
|
|
2142 |
EXPORT_C void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params)
|
|
2143 |
{
|
|
2144 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvxv ->\n");
|
|
2145 |
TInt32 vectorsize = 1;
|
|
2146 |
if( pname == GL_TEXTURE_ENV_COLOR )
|
|
2147 |
vectorsize = 4;
|
|
2148 |
RemoteFunctionCallData rfcData;
|
|
2149 |
OpenGlES11RFC call( rfcData );
|
|
2150 |
call.Init( OpenGlES11RFC::EglTexEnvxv, RemoteFunctionCallData::EOpRequest );
|
|
2151 |
call.AppendParam( target );
|
|
2152 |
call.AppendParam( pname );
|
|
2153 |
call.AppendVector( params, vectorsize );
|
|
2154 |
ExecuteCommand(call);
|
|
2155 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexEnvxv <-\n");
|
|
2156 |
}
|
|
2157 |
|
|
2158 |
EXPORT_C void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
|
|
2159 |
{
|
|
2160 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexImage2D ->\n");
|
|
2161 |
TInt32 vectorsize = width * height * getPixelSizeInBytes( format, type );
|
|
2162 |
if(vectorsize < 0) // cannot serialize vector with size < 0
|
|
2163 |
{
|
|
2164 |
SetError( GL_INVALID_VALUE );
|
|
2165 |
return;
|
|
2166 |
}
|
|
2167 |
RemoteFunctionCallData rfcData;
|
|
2168 |
OpenGlES11RFC call( rfcData );
|
|
2169 |
call.Init( OpenGlES11RFC::EglTexImage2D, RemoteFunctionCallData::EOpRequest );
|
|
2170 |
call.AppendParam( target );
|
|
2171 |
call.AppendParam( level );
|
|
2172 |
call.AppendParam( internalformat );
|
|
2173 |
call.AppendParam( width );
|
|
2174 |
call.AppendParam( height );
|
|
2175 |
call.AppendParam( border );
|
|
2176 |
call.AppendParam( format );
|
|
2177 |
call.AppendParam( type );
|
|
2178 |
call.AppendVector( pixels, vectorsize );
|
|
2179 |
ExecuteCommand(call);
|
|
2180 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexImage2D <-\n");
|
|
2181 |
}
|
|
2182 |
|
|
2183 |
EXPORT_C void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param) __SOFTFP
|
|
2184 |
{
|
|
2185 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameterf ->\n");
|
|
2186 |
RemoteFunctionCallData rfcData;
|
|
2187 |
OpenGlES11RFC call( rfcData );
|
|
2188 |
call.Init( OpenGlES11RFC::EglTexParameterf, RemoteFunctionCallData::EOpRequest );
|
|
2189 |
call.AppendParam( target );
|
|
2190 |
call.AppendParam( pname );
|
|
2191 |
call.AppendParam( param );
|
|
2192 |
ExecuteCommand(call);
|
|
2193 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameterf <-\n");
|
|
2194 |
}
|
|
2195 |
|
|
2196 |
EXPORT_C void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params)
|
|
2197 |
{
|
|
2198 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameterfv ->\n");
|
|
2199 |
TInt32 vectorsize = 1;
|
|
2200 |
if( pname == GL_TEXTURE_CROP_RECT_OES )
|
|
2201 |
vectorsize = 4;
|
|
2202 |
RemoteFunctionCallData rfcData;
|
|
2203 |
OpenGlES11RFC call( rfcData );
|
|
2204 |
call.Init( OpenGlES11RFC::EglTexParameterfv, RemoteFunctionCallData::EOpRequest );
|
|
2205 |
call.AppendParam( target );
|
|
2206 |
call.AppendParam( pname );
|
|
2207 |
call.AppendVector( params, vectorsize );
|
|
2208 |
ExecuteCommand(call);
|
|
2209 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameterfv <-\n");
|
|
2210 |
}
|
|
2211 |
|
|
2212 |
EXPORT_C void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param)
|
|
2213 |
{
|
|
2214 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameteri ->\n");
|
|
2215 |
RemoteFunctionCallData rfcData;
|
|
2216 |
OpenGlES11RFC call( rfcData );
|
|
2217 |
call.Init( OpenGlES11RFC::EglTexParameteri, RemoteFunctionCallData::EOpRequest );
|
|
2218 |
call.AppendParam( target );
|
|
2219 |
call.AppendParam( pname );
|
|
2220 |
call.AppendParam( param );
|
|
2221 |
ExecuteCommand(call);
|
|
2222 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameteri <-\n");
|
|
2223 |
}
|
|
2224 |
|
|
2225 |
EXPORT_C void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params)
|
|
2226 |
{
|
|
2227 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameteriv ->\n");
|
|
2228 |
TInt32 vectorsize = 1;
|
|
2229 |
if( pname == GL_TEXTURE_CROP_RECT_OES )
|
|
2230 |
vectorsize = 4;
|
|
2231 |
RemoteFunctionCallData rfcData;
|
|
2232 |
OpenGlES11RFC call( rfcData );
|
|
2233 |
call.Init( OpenGlES11RFC::EglTexParameteriv, RemoteFunctionCallData::EOpRequest );
|
|
2234 |
call.AppendParam( target );
|
|
2235 |
call.AppendParam( pname );
|
|
2236 |
call.AppendVector( params, vectorsize );
|
|
2237 |
ExecuteCommand(call);
|
|
2238 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameteriv <-\n");
|
|
2239 |
}
|
|
2240 |
|
|
2241 |
EXPORT_C void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param)
|
|
2242 |
{
|
|
2243 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameterx ->\n");
|
|
2244 |
RemoteFunctionCallData rfcData;
|
|
2245 |
OpenGlES11RFC call( rfcData );
|
|
2246 |
call.Init( OpenGlES11RFC::EglTexParameterx, RemoteFunctionCallData::EOpRequest );
|
|
2247 |
call.AppendParam( target );
|
|
2248 |
call.AppendParam( pname );
|
|
2249 |
call.AppendParam( param );
|
|
2250 |
ExecuteCommand(call);
|
|
2251 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameterx <-\n");
|
|
2252 |
}
|
|
2253 |
|
|
2254 |
EXPORT_C void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params)
|
|
2255 |
{
|
|
2256 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameterxv ->\n");
|
|
2257 |
TInt32 vectorsize = 1;
|
|
2258 |
if( pname == GL_TEXTURE_CROP_RECT_OES )
|
|
2259 |
vectorsize = 4;
|
|
2260 |
RemoteFunctionCallData rfcData;
|
|
2261 |
OpenGlES11RFC call( rfcData );
|
|
2262 |
call.Init( OpenGlES11RFC::EglTexParameterxv, RemoteFunctionCallData::EOpRequest );
|
|
2263 |
call.AppendParam( target );
|
|
2264 |
call.AppendParam( pname );
|
|
2265 |
call.AppendVector( params, vectorsize );
|
|
2266 |
ExecuteCommand(call);
|
|
2267 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexParameterxv <-\n");
|
|
2268 |
}
|
|
2269 |
|
|
2270 |
EXPORT_C void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
|
|
2271 |
{
|
|
2272 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexSubImage2D ->\n");
|
|
2273 |
TInt32 vectorsize = width * height * getPixelSizeInBytes( format, type );
|
|
2274 |
if(vectorsize < 0) // cannot serialize vector with size < 0
|
|
2275 |
{
|
|
2276 |
SetError( GL_INVALID_VALUE );
|
|
2277 |
return;
|
|
2278 |
}
|
|
2279 |
RemoteFunctionCallData rfcData;
|
|
2280 |
OpenGlES11RFC call( rfcData );
|
|
2281 |
call.Init( OpenGlES11RFC::EglTexSubImage2D, RemoteFunctionCallData::EOpRequest );
|
|
2282 |
call.AppendParam( target );
|
|
2283 |
call.AppendParam( level );
|
|
2284 |
call.AppendParam( xoffset );
|
|
2285 |
call.AppendParam( yoffset );
|
|
2286 |
call.AppendParam( width );
|
|
2287 |
call.AppendParam( height );
|
|
2288 |
call.AppendParam( format );
|
|
2289 |
call.AppendParam( type );
|
|
2290 |
call.AppendVector( pixels, vectorsize );
|
|
2291 |
ExecuteCommand(call);
|
|
2292 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTexSubImage2D <-\n");
|
|
2293 |
}
|
|
2294 |
|
|
2295 |
EXPORT_C void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z) __SOFTFP
|
|
2296 |
{
|
|
2297 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTranslatef ->\n");
|
|
2298 |
RemoteFunctionCallData rfcData;
|
|
2299 |
OpenGlES11RFC call( rfcData );
|
|
2300 |
call.Init( OpenGlES11RFC::EglTranslatef, RemoteFunctionCallData::EOpRequest );
|
|
2301 |
call.AppendParam( x );
|
|
2302 |
call.AppendParam( y );
|
|
2303 |
call.AppendParam( z );
|
|
2304 |
ExecuteCommand(call);
|
|
2305 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTranslatef <-\n");
|
|
2306 |
}
|
|
2307 |
|
|
2308 |
EXPORT_C void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z)
|
|
2309 |
{
|
|
2310 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTranslatex ->\n");
|
|
2311 |
RemoteFunctionCallData rfcData;
|
|
2312 |
OpenGlES11RFC call( rfcData );
|
|
2313 |
call.Init( OpenGlES11RFC::EglTranslatex, RemoteFunctionCallData::EOpRequest );
|
|
2314 |
call.AppendParam( x );
|
|
2315 |
call.AppendParam( y );
|
|
2316 |
call.AppendParam( z );
|
|
2317 |
ExecuteCommand(call);
|
|
2318 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glTranslatex <-\n");
|
|
2319 |
}
|
|
2320 |
|
|
2321 |
EXPORT_C void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
|
2322 |
{
|
|
2323 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glVertexPointer ->\n");
|
|
2324 |
vertexArrays[VERTEX_ARRAY].size = size;
|
|
2325 |
vertexArrays[VERTEX_ARRAY].type = type;
|
|
2326 |
vertexArrays[VERTEX_ARRAY].stride = stride;
|
|
2327 |
vertexArrays[VERTEX_ARRAY].pointer = pointer;
|
|
2328 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glVertexPointer <-\n");
|
|
2329 |
}
|
|
2330 |
|
|
2331 |
EXPORT_C void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height)
|
|
2332 |
{
|
|
2333 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glViewport ->\n");
|
|
2334 |
RemoteFunctionCallData rfcData;
|
|
2335 |
OpenGlES11RFC call( rfcData );
|
|
2336 |
call.Init( OpenGlES11RFC::EglViewport, RemoteFunctionCallData::EOpRequest );
|
|
2337 |
call.AppendParam( x );
|
|
2338 |
call.AppendParam( y );
|
|
2339 |
call.AppendParam( width );
|
|
2340 |
call.AppendParam( height );
|
|
2341 |
ExecuteCommand(call);
|
|
2342 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glViewport <-\n");
|
|
2343 |
}
|
|
2344 |
|
|
2345 |
// Guest Open GL ES extension export support for eglGetProcAddress
|
|
2346 |
typedef struct
|
|
2347 |
{
|
|
2348 |
const char* extnName; // procedure or extension name
|
|
2349 |
ExtensionProcPointer procAddr;
|
|
2350 |
} TGlExtnInfo;
|
|
2351 |
|
|
2352 |
// GL ES extension functions
|
|
2353 |
static const TGlExtnInfo glesProcedures[] =
|
|
2354 |
{ // all the functions below the "from glextplatform.h" comment
|
|
2355 |
{ "glCurrentPaletteMatrixOES", (ExtensionProcPointer)glCurrentPaletteMatrixOES },
|
|
2356 |
{ "glDrawTexfOES", (ExtensionProcPointer)glDrawTexfOES },
|
|
2357 |
{ "glDrawTexfvOES", (ExtensionProcPointer)glDrawTexfvOES },
|
|
2358 |
{ "glDrawTexiOES", (ExtensionProcPointer)glDrawTexiOES },
|
|
2359 |
{ "glDrawTexivOES", (ExtensionProcPointer)glDrawTexivOES },
|
|
2360 |
{ "glDrawTexsOES", (ExtensionProcPointer)glDrawTexsOES },
|
|
2361 |
{ "glDrawTexsvOES", (ExtensionProcPointer)glDrawTexsvOES },
|
|
2362 |
{ "glDrawTexxOES", (ExtensionProcPointer)glDrawTexxOES },
|
|
2363 |
{ "glDrawTexxvOES", (ExtensionProcPointer)glDrawTexxvOES },
|
|
2364 |
{ "glLoadPaletteFromModelViewMatrixOES", (ExtensionProcPointer)glLoadPaletteFromModelViewMatrixOES },
|
|
2365 |
{ "glMatrixIndexPointerOES", (ExtensionProcPointer)glMatrixIndexPointerOES },
|
|
2366 |
{ "glQueryMatrixxOES", (ExtensionProcPointer)glQueryMatrixxOES },
|
|
2367 |
{ "glWeightPointerOES", (ExtensionProcPointer)glWeightPointerOES },
|
|
2368 |
};
|
|
2369 |
|
|
2370 |
const TInt glesProcCount = sizeof(glesProcedures) / sizeof(TGlExtnInfo);
|
|
2371 |
|
|
2372 |
|
|
2373 |
TGles11ApiForEgl::TGles11ApiForEgl()
|
|
2374 |
{
|
|
2375 |
// DLL has loaded - publish vtable for MGles11ApiForEgl
|
|
2376 |
CVghwUtils::SetGles11ApiForEgl(this);
|
|
2377 |
}
|
|
2378 |
|
|
2379 |
|
|
2380 |
TGles11ApiForEgl::~TGles11ApiForEgl()
|
|
2381 |
{
|
|
2382 |
// DLL is unloading - unpublish vtable for MGles11ApiForEgl
|
|
2383 |
CVghwUtils::SetGles11ApiForEgl(NULL);
|
|
2384 |
}
|
|
2385 |
|
|
2386 |
|
|
2387 |
ExtensionProcPointer TGles11ApiForEgl::guestGetGles11ProcAddress (const char *aProcName)
|
|
2388 |
{
|
|
2389 |
// exhaustive search, for now. (We should consider a sorted list if the number of functions grows.)
|
|
2390 |
for (TInt idx = 0; idx < glesProcCount; idx++)
|
|
2391 |
{
|
|
2392 |
if (!strcmp(aProcName, glesProcedures[idx].extnName))
|
|
2393 |
return glesProcedures[idx].procAddr;
|
|
2394 |
}
|
|
2395 |
return NULL;
|
|
2396 |
}
|
|
2397 |
|
|
2398 |
|
|
2399 |
EXPORT_C void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex)
|
|
2400 |
{
|
|
2401 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCurrentPaletteMatrixOES ->\n");
|
|
2402 |
RemoteFunctionCallData rfcData;
|
|
2403 |
OpenGlES11RFC call( rfcData );
|
|
2404 |
call.Init( OpenGlES11RFC::EglCurrentPaletteMatrixOES, RemoteFunctionCallData::EOpRequest );
|
|
2405 |
call.AppendParam( matrixpaletteindex );
|
|
2406 |
ExecuteCommand(call);
|
|
2407 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glCurrentPaletteMatrixOES <-\n");
|
|
2408 |
}
|
|
2409 |
|
|
2410 |
EXPORT_C void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) __SOFTFP
|
|
2411 |
{
|
|
2412 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexfOES ->\n");
|
|
2413 |
RemoteFunctionCallData rfcData;
|
|
2414 |
OpenGlES11RFC call( rfcData );
|
|
2415 |
call.Init( OpenGlES11RFC::EglDrawTexfOES, RemoteFunctionCallData::EOpRequest );
|
|
2416 |
call.AppendParam( x );
|
|
2417 |
call.AppendParam( y );
|
|
2418 |
call.AppendParam( width );
|
|
2419 |
call.AppendParam( height );
|
|
2420 |
ExecuteCommand(call);
|
|
2421 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexfOES <-\n");
|
|
2422 |
}
|
|
2423 |
|
|
2424 |
EXPORT_C void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords)
|
|
2425 |
{
|
|
2426 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexfvOES ->\n");
|
|
2427 |
RemoteFunctionCallData rfcData;
|
|
2428 |
OpenGlES11RFC call( rfcData );
|
|
2429 |
call.Init( OpenGlES11RFC::EglDrawTexfvOES, RemoteFunctionCallData::EOpRequest );
|
|
2430 |
call.AppendVector( coords, 5 ); // oglFast.c
|
|
2431 |
ExecuteCommand(call);
|
|
2432 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexfvOES <-\n");
|
|
2433 |
}
|
|
2434 |
|
|
2435 |
EXPORT_C void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height)
|
|
2436 |
{
|
|
2437 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexiOES ->\n");
|
|
2438 |
RemoteFunctionCallData rfcData;
|
|
2439 |
OpenGlES11RFC call( rfcData );
|
|
2440 |
call.Init( OpenGlES11RFC::EglDrawTexiOES, RemoteFunctionCallData::EOpRequest );
|
|
2441 |
call.AppendParam( x );
|
|
2442 |
call.AppendParam( y );
|
|
2443 |
call.AppendParam( width );
|
|
2444 |
call.AppendParam( height );
|
|
2445 |
ExecuteCommand(call);
|
|
2446 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexiOES <-\n");
|
|
2447 |
}
|
|
2448 |
|
|
2449 |
EXPORT_C void GL_APIENTRY glDrawTexivOES (const GLint *coords)
|
|
2450 |
{
|
|
2451 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexivOES ->\n");
|
|
2452 |
RemoteFunctionCallData rfcData;
|
|
2453 |
OpenGlES11RFC call( rfcData );
|
|
2454 |
call.Init( OpenGlES11RFC::EglDrawTexivOES, RemoteFunctionCallData::EOpRequest );
|
|
2455 |
call.AppendVector( coords, 5 ); // oglFast.c
|
|
2456 |
ExecuteCommand(call);
|
|
2457 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexivOES <-\n");
|
|
2458 |
}
|
|
2459 |
|
|
2460 |
EXPORT_C void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
|
|
2461 |
{
|
|
2462 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexsOES ->\n");
|
|
2463 |
RemoteFunctionCallData rfcData;
|
|
2464 |
OpenGlES11RFC call( rfcData );
|
|
2465 |
call.Init( OpenGlES11RFC::EglDrawTexsOES, RemoteFunctionCallData::EOpRequest );
|
|
2466 |
call.AppendParam( x );
|
|
2467 |
call.AppendParam( y );
|
|
2468 |
call.AppendParam( width );
|
|
2469 |
call.AppendParam( height );
|
|
2470 |
ExecuteCommand(call);
|
|
2471 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexsOES <-\n");
|
|
2472 |
}
|
|
2473 |
|
|
2474 |
EXPORT_C void GL_APIENTRY glDrawTexsvOES (const GLshort *coords)
|
|
2475 |
{
|
|
2476 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexsvOES ->\n");
|
|
2477 |
RemoteFunctionCallData rfcData;
|
|
2478 |
OpenGlES11RFC call( rfcData );
|
|
2479 |
call.Init( OpenGlES11RFC::EglDrawTexsvOES, RemoteFunctionCallData::EOpRequest );
|
|
2480 |
call.AppendVector( coords, 5 ); // oglFast.c
|
|
2481 |
ExecuteCommand(call);
|
|
2482 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexsvOES <-\n");
|
|
2483 |
}
|
|
2484 |
|
|
2485 |
EXPORT_C void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
|
|
2486 |
{
|
|
2487 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexxOES ->\n");
|
|
2488 |
RemoteFunctionCallData rfcData;
|
|
2489 |
OpenGlES11RFC call( rfcData );
|
|
2490 |
call.Init( OpenGlES11RFC::EglDrawTexxOES, RemoteFunctionCallData::EOpRequest );
|
|
2491 |
call.AppendParam( x );
|
|
2492 |
call.AppendParam( y );
|
|
2493 |
call.AppendParam( width );
|
|
2494 |
call.AppendParam( height );
|
|
2495 |
ExecuteCommand(call);
|
|
2496 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexxOES <-\n");
|
|
2497 |
}
|
|
2498 |
|
|
2499 |
EXPORT_C void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords)
|
|
2500 |
{
|
|
2501 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexxvOES ->\n");
|
|
2502 |
RemoteFunctionCallData rfcData;
|
|
2503 |
OpenGlES11RFC call( rfcData );
|
|
2504 |
call.Init( OpenGlES11RFC::EglDrawTexxvOES, RemoteFunctionCallData::EOpRequest );
|
|
2505 |
call.AppendVector( coords, 5 ); // oglFast.c
|
|
2506 |
ExecuteCommand(call);
|
|
2507 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glDrawTexxvOES <-\n");
|
|
2508 |
}
|
|
2509 |
|
|
2510 |
EXPORT_C void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void)
|
|
2511 |
{
|
|
2512 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLoadPaletteFromModelViewMatrixOES ->\n");
|
|
2513 |
RemoteFunctionCallData rfcData;
|
|
2514 |
OpenGlES11RFC call( rfcData );
|
|
2515 |
call.Init( OpenGlES11RFC::EglLoadPaletteFromModelViewMatrixOES, RemoteFunctionCallData::EOpRequest );
|
|
2516 |
ExecuteCommand(call);
|
|
2517 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glLoadPaletteFromModelViewMatrixOES <-\n");
|
|
2518 |
}
|
|
2519 |
|
|
2520 |
EXPORT_C void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
|
2521 |
{
|
|
2522 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMatrixIndexPointerOES ->\n");
|
|
2523 |
vertexArrays[MATRIX_INDEX_ARRAY].size = size;
|
|
2524 |
vertexArrays[MATRIX_INDEX_ARRAY].type = type;
|
|
2525 |
vertexArrays[MATRIX_INDEX_ARRAY].stride = stride;
|
|
2526 |
vertexArrays[MATRIX_INDEX_ARRAY].pointer = pointer;
|
|
2527 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glMatrixIndexPointerOES <-\n");
|
|
2528 |
}
|
|
2529 |
|
|
2530 |
GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16])
|
|
2531 |
{
|
|
2532 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glQueryMatrixxOES ->\n");
|
|
2533 |
RemoteFunctionCallData rfcData;
|
|
2534 |
OpenGlES11RFC call( rfcData );
|
|
2535 |
call.Init( OpenGlES11RFC::EglQueryMatrixxOES );
|
|
2536 |
call.AppendVector( mantissa, 16, RemoteFunctionCallData::EOut );
|
|
2537 |
call.AppendVector( exponent, 16, RemoteFunctionCallData::EOut );
|
|
2538 |
GLbitfield result = (GLbitfield)ExecuteFunction(call);
|
|
2539 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glQueryMatrixxOES <-\n");
|
|
2540 |
return result;
|
|
2541 |
}
|
|
2542 |
|
|
2543 |
EXPORT_C void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
|
|
2544 |
{
|
|
2545 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glWeightPointerOES ->\n");
|
|
2546 |
vertexArrays[WEIGHT_ARRAY].size = size;
|
|
2547 |
vertexArrays[WEIGHT_ARRAY].type = type;
|
|
2548 |
vertexArrays[WEIGHT_ARRAY].stride = stride;
|
|
2549 |
vertexArrays[WEIGHT_ARRAY].pointer = pointer;
|
|
2550 |
OPENGL_TRACE(_APICALL_, "OpenGL client side: glWeightPointerOES <-\n");
|
|
2551 |
}
|
|
2552 |
|
|
2553 |
} /* extern "C" */
|