vghwinterface/vghwserialiser/inc/opengles11rfc.h
branchbug235_bringup_0
changeset 51 4f400a6ea71f
parent 1 d8d95053303a
equal deleted inserted replaced
49:3b4f7e9d873f 51:4f400a6ea71f
       
     1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 
       
    15 #ifndef OPENGLES11REMOTEFUNCTIONCALL_H_
       
    16 #define OPENGLES11REMOTEFUNCTIONCALL_H_
       
    17 
       
    18 #include "remotefunctioncall.h"
       
    19 
       
    20 #ifdef __SYMBIAN32__
       
    21 	#include <GLES/gl.h>
       
    22 #else
       
    23 	#include "GLES/gl.h"
       
    24 	#include "GLES/glextplatform.h"
       
    25 #endif
       
    26 
       
    27 //OpenGlES11 remote function call
       
    28 // Represents a function call and contains information about 
       
    29 // parameters but does not serialize the data
       
    30 NONSHARABLE_CLASS(OpenGlES11RFC): public RemoteFunctionCall
       
    31     {
       
    32 public:
       
    33 
       
    34     //OpenEglES11 operation code
       
    35     enum TOperationCode
       
    36     {
       
    37         EglActiveTexture,
       
    38         EglAlphaFunc,
       
    39         EglAlphaFuncx,
       
    40         EglBindBuffer,
       
    41         EglBindTexture,
       
    42         EglBlendFunc,
       
    43         EglBufferData,
       
    44         EglBufferSubData,
       
    45         EglClear,
       
    46         EglClearColor,
       
    47         EglClearColorx, // 10
       
    48         EglClearDepthf,
       
    49         EglClearDepthx,
       
    50         EglClearStencil,
       
    51         EglClientActiveTexture,
       
    52         EglClipPlanef,
       
    53         EglClipPlanex,
       
    54         EglColor4f,
       
    55         EglColor4ub,
       
    56         EglColor4x,
       
    57         EglColorMask, // 20
       
    58         EglColorPointer,
       
    59         EglCompressedTexImage2D,
       
    60         EglCompressedTexSubImage2D,
       
    61         EglCopyTexImage2D,
       
    62         EglCopyTexSubImage2D,
       
    63         EglCullFace,
       
    64         EglDeleteBuffers,
       
    65         EglDeleteTextures,
       
    66         EglDepthFunc,
       
    67         EglDepthMask, // 30
       
    68         EglDepthRangef,
       
    69         EglDepthRangex,
       
    70         EglDisable,
       
    71         EglDisableClientState,
       
    72         EglDrawArrays,
       
    73         EglDrawElements,
       
    74         EglEnable,
       
    75         EglEnableClientState,
       
    76         EglFinish,
       
    77         EglFlush, // 40
       
    78         EglFogf,
       
    79         EglFogfv,
       
    80         EglFogx,
       
    81         EglFogxv,
       
    82         EglFrontFace,
       
    83         EglFrustumf,
       
    84         EglFrustumx,
       
    85         EglGenBuffers,
       
    86         EglGenTextures,
       
    87         EglGetBooleanv, // 50
       
    88         EglGetBufferParameteriv,
       
    89         EglGetClipPlanef,
       
    90         EglGetClipPlanex,
       
    91         EglGetError,
       
    92         EglGetFixedv,
       
    93         EglGetFloatv,
       
    94         EglGetIntegerv,
       
    95         EglGetLightfv,
       
    96         EglGetLightxv,
       
    97         EglGetMaterialfv, // 60
       
    98         EglGetMaterialxv,
       
    99         EglGetPointerv,
       
   100         EglGetString,
       
   101         EglGetTexEnvfv,
       
   102         EglGetTexEnviv,
       
   103         EglGetTexEnvxv,
       
   104         EglGetTexParameterfv,
       
   105         EglGetTexParameteriv,
       
   106         EglGetTexParameterxv,
       
   107         EglHint, // 70
       
   108         EglIsBuffer,
       
   109         EglIsEnabled,
       
   110         EglIsTexture,
       
   111         EglLightModelf,
       
   112         EglLightModelfv,
       
   113         EglLightModelx,
       
   114         EglLightModelxv,
       
   115         EglLightf,
       
   116         EglLightfv,
       
   117         EglLightx, // 80
       
   118         EglLightxv,
       
   119         EglLineWidth,
       
   120         EglLineWidthx,
       
   121         EglLoadIdentity,
       
   122         EglLoadMatrixf,
       
   123         EglLoadMatrixx,
       
   124         EglLogicOp,
       
   125         EglMaterialf,
       
   126         EglMaterialfv,
       
   127         EglMaterialx, // 90
       
   128         EglMaterialxv,
       
   129         EglMatrixMode,
       
   130         EglMultMatrixf,
       
   131         EglMultMatrixx,
       
   132         EglMultiTexCoord4f,
       
   133         EglMultiTexCoord4x,
       
   134         EglNormal3f,
       
   135         EglNormal3x,
       
   136         EglNormalPointer,
       
   137         EglOrthof, // 100
       
   138         EglOrthox,
       
   139         EglPixelStorei,
       
   140         EglPointParameterf,
       
   141         EglPointParameterfv,
       
   142         EglPointParameterx,
       
   143         EglPointParameterxv,
       
   144         EglPointSize,
       
   145         EglPointSizex,
       
   146         EglPolygonOffset,
       
   147         EglPolygonOffsetx, // 110
       
   148         EglPopMatrix,
       
   149         EglPushMatrix,
       
   150         EglReadPixels,
       
   151         EglRotatef,
       
   152         EglRotatex,
       
   153         EglSampleCoverage,
       
   154         EglSampleCoveragex,
       
   155         EglScalef,
       
   156         EglScalex,
       
   157         EglScissor, // 120
       
   158         EglShadeModel,
       
   159         EglStencilFunc,
       
   160         EglStencilMask,
       
   161         EglStencilOp,
       
   162         EglTexCoordPointer,
       
   163         EglTexEnvf,
       
   164         EglTexEnvfv,
       
   165         EglTexEnvi,
       
   166         EglTexEnviv,
       
   167         EglTexEnvx, // 130
       
   168         EglTexEnvxv,
       
   169         EglTexImage2D,
       
   170         EglTexParameterf,
       
   171         EglTexParameterfv,
       
   172         EglTexParameteri,
       
   173         EglTexParameteriv,
       
   174         EglTexParameterx,
       
   175         EglTexParameterxv,
       
   176         EglTexSubImage2D,
       
   177         EglTranslatef, // 140
       
   178         EglTranslatex,
       
   179         EglVertexPointer,
       
   180         EglViewport,
       
   181         // from Eglextplatform.h
       
   182         EglCurrentPaletteMatrixOES,
       
   183         EglDrawTexfOES,
       
   184         EglDrawTexfvOES,
       
   185         EglDrawTexiOES,
       
   186         EglDrawTexivOES,
       
   187         EglDrawTexsOES,
       
   188         EglDrawTexsvOES, // 150
       
   189         EglDrawTexxOES,
       
   190         EglDrawTexxvOES,
       
   191         EglLoadPaletteFromModelViewMatrixOES,
       
   192         EglMatrixIndexPointerOES,
       
   193         EglQueryMatrixxOES,
       
   194         EglWeightPointerOES,
       
   195         // client shutdown
       
   196         EClientShutdown
       
   197 
       
   198     };
       
   199 
       
   200     //Parameter data type
       
   201     enum TParamType
       
   202     {
       
   203         EGLbyte,
       
   204         EGLubyte,
       
   205         EGLshort,
       
   206         EGLushort,
       
   207         EGLint,
       
   208         EGLuint,
       
   209         EGLfloat,
       
   210         EGLvoid,
       
   211         // the following parameters are typedeffed to same types as the previous ones
       
   212         EGLboolean,
       
   213         EGLbitfield,
       
   214         EGLclampf,
       
   215         EGLclampx,
       
   216         EGLenum,
       
   217         EGLfixed,
       
   218         EGLintptr,
       
   219         EGLsizei,
       
   220         EGLsizeiptr
       
   221     };
       
   222 
       
   223     OpenGlES11RFC( RemoteFunctionCallData& aData );
       
   224     
       
   225     //Appends a simple parameter to the parameter array
       
   226     // Does not serialize any data
       
   227     inline void AppendParam( const GLbyte& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   228     inline void AppendParam( const GLubyte& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   229     inline void AppendParam( const GLshort& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   230     inline void AppendParam( const GLushort& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   231     inline void AppendParam( const GLint& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   232     inline void AppendParam( const GLuint& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   233     inline void AppendParam( const GLfloat& aParam, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   234         
       
   235     //Gets a simple parameter value from parameter array
       
   236     inline void GetParamValue( GLbyte& aParam, TInt aIndex );
       
   237     inline void GetParamValue( GLubyte& aParam, TInt aIndex );
       
   238     inline void GetParamValue( GLshort& aParam, TInt aIndex );
       
   239     inline void GetParamValue( GLushort& aParam, TInt aIndex );
       
   240     inline void GetParamValue( GLint& aParam, TInt aIndex );
       
   241     inline void GetParamValue( GLuint& aParam, TInt aIndex );
       
   242     inline void GetParamValue( GLfloat& aParam, TInt aIndex );
       
   243     
       
   244     //Gets a pointer to an array parameter from parameter array
       
   245     inline void GetVectorData( GLint* &aData, TInt& aSize, TInt aIndex );
       
   246     inline void GetVectorData( GLuint* &aData, TInt& aSize, TInt aIndex );
       
   247     inline void GetVectorData( GLshort* &aData, TInt& aSize, TInt aIndex );
       
   248     inline void GetVectorData( GLfloat* &aData, TInt& aSize, TInt aIndex );
       
   249     inline void GetVectorData( GLboolean* &aData, TInt& aSize, TInt aIndex );
       
   250     inline void GetVectorData( void* &aData, TInt& aSize, TInt aIndex );
       
   251 
       
   252     //Sets a pointer to the data of an array parameter
       
   253     inline void SetVectorData( const GLint* aData, TInt aLength, TInt aIndex );
       
   254     inline void SetVectorData( const GLuint* aData, TInt aLength, TInt aIndex );
       
   255     inline void SetVectorData( const GLshort* aData, TInt aLength, TInt aIndex );
       
   256     inline void SetVectorData( const GLfloat* aData, TInt aLength, TInt aIndex );
       
   257     inline void SetVectorData( const GLboolean* aData, TInt aLength, TInt aIndex );
       
   258     inline void SetVectorData( const void* aData, TInt aLength, TInt aIndex );
       
   259 
       
   260     //Appends an array parameter to the parameter array
       
   261     // Does not serialize any data
       
   262     inline void AppendVector( const GLint* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   263     inline void AppendVector( const GLuint* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   264     inline void AppendVector( const GLshort* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   265     inline void AppendVector( const GLfloat* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   266     inline void AppendVector( const GLboolean* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   267     inline void AppendVector( const void* aData, TInt aLength, RemoteFunctionCallData::TParamDirection iDir = RemoteFunctionCallData::EIn );
       
   268     
       
   269     //Size of type aType
       
   270     TInt GetTypeSize( TInt32 aParamType ) const;
       
   271 
       
   272     //Alignemnt of type aType
       
   273 	TInt GetTypeAlignment( TInt32 aParamType ) const;
       
   274 
       
   275     //Alignemnt of type aType
       
   276 	TUint32 GetAPIUid() const;
       
   277     };
       
   278 
       
   279 #include "opengles11rfc.inl"
       
   280 #endif