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