os/graphics/opengles/openglesinterface/group/opengles_stub/opengles_defgen_stub.cpp
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/opengles/openglesinterface/group/opengles_stub/opengles_defgen_stub.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,264 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// Provide dummy implementations for functions of the variety of OpenGL ES versions.
1.18 +// Currently supporting OpenGL ES version 1.0 and 1.1 (Common Profile & Common Profile v1)
1.19 +//
1.20 +//
1.21 +
1.22 +#include <EGL/egl.h>
1.23 +#include <EGL/egltypes.h>
1.24 +#include <GLES/gl.h>
1.25 +
1.26 +#include <e32def.h>
1.27 +#include <e32uid.h>
1.28 +
1.29 +#ifdef __cplusplus
1.30 +extern "C" {
1.31 +#endif
1.32 +
1.33 +
1.34 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.35 +// START: OpenGLES Version 1.0 Base set
1.36 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.37 +
1.38 +#if !defined(__SYMBIAN_USING_OPENGL_ES_1_1_v1__)
1.39 +
1.40 +// OpenGLES EGL functions
1.41 +EXPORT_C EGLint eglGetError (void){ return 0; }
1.42 +EXPORT_C EGLDisplay eglGetDisplay (NativeDisplayType display){ return 0; }
1.43 +EXPORT_C EGLBoolean eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor){ return GL_FALSE; }
1.44 +EXPORT_C EGLBoolean eglTerminate (EGLDisplay dpy){ return GL_FALSE; }
1.45 +EXPORT_C const char * eglQueryString (EGLDisplay dpy, EGLint name){ return NULL; }
1.46 +
1.47 +#ifdef __cplusplus
1.48 +EXPORT_C void (* eglGetProcAddress (const char *procname))(...){ return NULL; }
1.49 +#else
1.50 +EXPORT_C void (* eglGetProcAddress (const char *procname))(){ return NULL; }
1.51 +#endif
1.52 +
1.53 +EXPORT_C EGLBoolean eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config){ return GL_FALSE; }
1.54 +EXPORT_C EGLBoolean eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config){ return GL_FALSE; }
1.55 +EXPORT_C EGLBoolean eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value){ return GL_FALSE; }
1.56 +
1.57 +EXPORT_C EGLSurface eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list){ return 0; }
1.58 +EXPORT_C EGLSurface eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list){ return 0; }
1.59 +EXPORT_C EGLSurface eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list){ return 0; }
1.60 +EXPORT_C EGLBoolean eglDestroySurface (EGLDisplay dpy, EGLSurface surface){ return GL_FALSE; }
1.61 +EXPORT_C EGLBoolean eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value){ return GL_FALSE; }
1.62 +
1.63 +EXPORT_C EGLContext eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list){ return 0; }
1.64 +EXPORT_C EGLBoolean eglDestroyContext (EGLDisplay dpy, EGLContext ctx){ return GL_FALSE; }
1.65 +EXPORT_C EGLBoolean eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx){ return GL_FALSE; }
1.66 +EXPORT_C EGLContext eglGetCurrentContext (void){ return 0; }
1.67 +EXPORT_C EGLSurface eglGetCurrentSurface (EGLint readdraw){ return 0; }
1.68 +EXPORT_C EGLDisplay eglGetCurrentDisplay (void){ return 0; }
1.69 +EXPORT_C EGLBoolean eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value){ return GL_FALSE; }
1.70 +
1.71 +EXPORT_C EGLBoolean eglWaitGL (void){ return GL_FALSE; }
1.72 +EXPORT_C EGLBoolean eglWaitNative (EGLint engine){ return GL_FALSE; }
1.73 +EXPORT_C EGLBoolean eglSwapBuffers (EGLDisplay dpy, EGLSurface draw){ return GL_FALSE; }
1.74 +EXPORT_C EGLBoolean eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, NativePixmapType target){ return GL_FALSE; }
1.75 +
1.76 +#endif // !defined(__SYMBIAN_USING_OPENGL_ES_1_1_v1__)
1.77 +
1.78 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.79 +// OpenGLES GL functions
1.80 +EXPORT_C void glActiveTexture (GLenum texture){ }
1.81 +EXPORT_C void glAlphaFunc (GLenum func, GLclampf ref){ }
1.82 +EXPORT_C void glAlphaFuncx (GLenum func, GLclampx ref){ }
1.83 +EXPORT_C void glBindTexture (GLenum target, GLuint texture){ }
1.84 +EXPORT_C void glBlendFunc (GLenum sfactor, GLenum dfactor){ }
1.85 +EXPORT_C void glClear (GLbitfield mask){ }
1.86 +EXPORT_C void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha){ }
1.87 +EXPORT_C void glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha){ }
1.88 +EXPORT_C void glClearDepthf (GLclampf depth){ }
1.89 +EXPORT_C void glClearDepthx (GLclampx depth){ }
1.90 +EXPORT_C void glClearStencil (GLint s){ }
1.91 +EXPORT_C void glClientActiveTexture (GLenum texture){ }
1.92 +EXPORT_C void glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha){ }
1.93 +EXPORT_C void glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha){ }
1.94 +EXPORT_C void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha){ }
1.95 +EXPORT_C void glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer){ }
1.96 +EXPORT_C void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data){ }
1.97 +EXPORT_C void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data){ }
1.98 +EXPORT_C void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border){ }
1.99 +EXPORT_C void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height){ }
1.100 +EXPORT_C void glCullFace (GLenum mode){ }
1.101 +EXPORT_C void glDeleteTextures (GLsizei n, const GLuint *textures){ }
1.102 +EXPORT_C void glDepthFunc (GLenum func){ }
1.103 +EXPORT_C void glDepthMask (GLboolean flag){ }
1.104 +EXPORT_C void glDepthRangef (GLclampf zNear, GLclampf zFar){ }
1.105 +EXPORT_C void glDepthRangex (GLclampx zNear, GLclampx zFar){ }
1.106 +EXPORT_C void glDisable (GLenum cap){ }
1.107 +EXPORT_C void glDisableClientState (GLenum array){ }
1.108 +EXPORT_C void glDrawArrays (GLenum mode, GLint first, GLsizei count){ }
1.109 +EXPORT_C void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices){ }
1.110 +EXPORT_C void glEnable (GLenum cap){ }
1.111 +EXPORT_C void glEnableClientState (GLenum array){ }
1.112 +EXPORT_C void glFinish (void){ }
1.113 +EXPORT_C void glFlush (void){ }
1.114 +EXPORT_C void glFogf (GLenum pname, GLfloat param){ }
1.115 +EXPORT_C void glFogfv (GLenum pname, const GLfloat *params){ }
1.116 +EXPORT_C void glFogx (GLenum pname, GLfixed param){ }
1.117 +EXPORT_C void glFogxv (GLenum pname, const GLfixed *params){ }
1.118 +EXPORT_C void glFrontFace (GLenum mode){ }
1.119 +EXPORT_C void glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar){ }
1.120 +EXPORT_C void glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar){ }
1.121 +EXPORT_C void glGenTextures (GLsizei n, GLuint *textures){ }
1.122 +EXPORT_C GLenum glGetError (void){ return 0; }
1.123 +EXPORT_C void glGetIntegerv (GLenum pname, GLint *params){ }
1.124 +EXPORT_C const GLubyte * glGetString (GLenum name){ return 0; }
1.125 +EXPORT_C void glHint (GLenum target, GLenum mode){ }
1.126 +EXPORT_C void glLightModelf (GLenum pname, GLfloat param){ }
1.127 +EXPORT_C void glLightModelfv (GLenum pname, const GLfloat *params){ }
1.128 +EXPORT_C void glLightModelx (GLenum pname, GLfixed param){ }
1.129 +EXPORT_C void glLightModelxv (GLenum pname, const GLfixed *params){ }
1.130 +EXPORT_C void glLightf (GLenum light, GLenum pname, GLfloat param){ }
1.131 +EXPORT_C void glLightfv (GLenum light, GLenum pname, const GLfloat *params){ }
1.132 +EXPORT_C void glLightx (GLenum light, GLenum pname, GLfixed param){ }
1.133 +EXPORT_C void glLightxv (GLenum light, GLenum pname, const GLfixed *params){ }
1.134 +EXPORT_C void glLineWidth (GLfloat width){ }
1.135 +EXPORT_C void glLineWidthx (GLfixed width){ }
1.136 +EXPORT_C void glLoadIdentity (void){ }
1.137 +EXPORT_C void glLoadMatrixf (const GLfloat *m){ }
1.138 +EXPORT_C void glLoadMatrixx (const GLfixed *m){ }
1.139 +EXPORT_C void glLogicOp (GLenum opcode){ }
1.140 +EXPORT_C void glMaterialf (GLenum face, GLenum pname, GLfloat param){ }
1.141 +EXPORT_C void glMaterialfv (GLenum face, GLenum pname, const GLfloat *params){ }
1.142 +EXPORT_C void glMaterialx (GLenum face, GLenum pname, GLfixed param){ }
1.143 +EXPORT_C void glMaterialxv (GLenum face, GLenum pname, const GLfixed *params){ }
1.144 +EXPORT_C void glMatrixMode (GLenum mode){ }
1.145 +EXPORT_C void glMultMatrixf (const GLfloat *m){ }
1.146 +EXPORT_C void glMultMatrixx (const GLfixed *m){ }
1.147 +EXPORT_C void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q){ }
1.148 +EXPORT_C void glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q){ }
1.149 +EXPORT_C void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz){ }
1.150 +EXPORT_C void glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz){ }
1.151 +EXPORT_C void glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer){ }
1.152 +EXPORT_C void glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar){ }
1.153 +EXPORT_C void glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar){ }
1.154 +EXPORT_C void glPixelStorei (GLenum pname, GLint param){ }
1.155 +EXPORT_C void glPointSize (GLfloat size){ }
1.156 +EXPORT_C void glPointSizex (GLfixed size){ }
1.157 +EXPORT_C void glPolygonOffset (GLfloat factor, GLfloat units){ }
1.158 +EXPORT_C void glPolygonOffsetx (GLfixed factor, GLfixed units){ }
1.159 +EXPORT_C void glPopMatrix (void){ }
1.160 +EXPORT_C void glPushMatrix (void){ }
1.161 +EXPORT_C void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels){ }
1.162 +EXPORT_C void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z){ }
1.163 +EXPORT_C void glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z){ }
1.164 +EXPORT_C void glSampleCoverage (GLclampf value, GLboolean invert){ }
1.165 +EXPORT_C void glSampleCoveragex (GLclampx value, GLboolean invert){ }
1.166 +EXPORT_C void glScalef (GLfloat x, GLfloat y, GLfloat z){ }
1.167 +EXPORT_C void glScalex (GLfixed x, GLfixed y, GLfixed z){ }
1.168 +EXPORT_C void glScissor (GLint x, GLint y, GLsizei width, GLsizei height){ }
1.169 +EXPORT_C void glShadeModel (GLenum mode){ }
1.170 +EXPORT_C void glStencilFunc (GLenum func, GLint ref, GLuint mask){ }
1.171 +EXPORT_C void glStencilMask (GLuint mask){ }
1.172 +EXPORT_C void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass){ }
1.173 +EXPORT_C void glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer){ }
1.174 +EXPORT_C void glTexEnvf (GLenum target, GLenum pname, GLfloat param){ }
1.175 +EXPORT_C void glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params){ }
1.176 +EXPORT_C void glTexEnvx (GLenum target, GLenum pname, GLfixed param){ }
1.177 +EXPORT_C void glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params){ }
1.178 +EXPORT_C void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels){ }
1.179 +EXPORT_C void glTexParameterf (GLenum target, GLenum pname, GLfloat param){ }
1.180 +EXPORT_C void glTexParameterx (GLenum target, GLenum pname, GLfixed param){ }
1.181 +EXPORT_C void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels){ }
1.182 +EXPORT_C void glTranslatef (GLfloat x, GLfloat y, GLfloat z){ }
1.183 +EXPORT_C void glTranslatex (GLfixed x, GLfixed y, GLfixed z){ }
1.184 +EXPORT_C void glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer){ }
1.185 +EXPORT_C void glViewport (GLint x, GLint y, GLsizei width, GLsizei height){ }
1.186 +EXPORT_C GLbitfield glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]){ return 0; }
1.187 +
1.188 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.189 +// END: OpenGLES Version 1.0
1.190 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.191 +
1.192 +
1.193 +
1.194 +
1.195 +
1.196 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.197 +// START: OpenGLES Version 1.1 Super set
1.198 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.199 +
1.200 +#if defined(__SYMBIAN_USING_OPENGL_ES_1_1__) && !defined(__SYMBIAN_USING_OPENGL_ES_1_1_v1__)
1.201 +
1.202 +// OpenGLES EGL functions
1.203 +/* EGL 1.1 swap control API */
1.204 +EXPORT_C EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval){ return GL_FALSE; }
1.205 +EXPORT_C EGLBoolean eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value){ return GL_FALSE; }
1.206 +EXPORT_C EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer){ return GL_FALSE; }
1.207 +EXPORT_C EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer){ return GL_FALSE; }
1.208 +
1.209 +#endif // defined(__SYMBIAN_USING_OPENGL_ES_1_1__) && !defined(__SYMBIAN_USING_OPENGL_ES_1_1_v1__)
1.210 +
1.211 +#if defined(__SYMBIAN_USING_OPENGL_ES_1_1__) || defined(__SYMBIAN_USING_OPENGL_ES_1_1_v1__)
1.212 +
1.213 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.214 +// OpenGLES GL functions
1.215 +EXPORT_C void glBindBuffer (GLenum target, GLuint buffer){ }
1.216 +EXPORT_C void glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage){ }
1.217 +EXPORT_C void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data){ }
1.218 +EXPORT_C void glClipPlanex (GLenum plane, const GLfixed *equation){ }
1.219 +EXPORT_C void glClipPlanef (GLenum plane, const GLfloat *equation){ }
1.220 +EXPORT_C void glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha){ }
1.221 +EXPORT_C void glDeleteBuffers (GLsizei n, const GLuint *buffers){ }
1.222 +EXPORT_C void glGenBuffers (GLsizei n, GLuint *buffers){ }
1.223 +EXPORT_C void glGetBooleanv (GLenum pname, GLboolean *params){ }
1.224 +EXPORT_C void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params){ }
1.225 +EXPORT_C void glGetClipPlanef (GLenum pname, GLfloat eqn[4]){ }
1.226 +EXPORT_C void glGetClipPlanex (GLenum pname, GLfixed eqn[4]){ }
1.227 +EXPORT_C void glGetFixedv (GLenum pname, GLfixed *params){ }
1.228 +EXPORT_C void glGetFloatv (GLenum pname, GLfloat *params){ }
1.229 +EXPORT_C void glGetPointerv (GLenum pname, void **params){ }
1.230 +EXPORT_C void glTexEnviv (GLenum target, GLenum pname, const GLint *params){ }
1.231 +EXPORT_C void glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params){ }
1.232 +EXPORT_C void glTexParameteriv (GLenum target, GLenum pname, const GLint *params){ }
1.233 +EXPORT_C void glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params){ }
1.234 +EXPORT_C GLboolean glIsBuffer (GLuint buffer){ return GL_FALSE; }
1.235 +EXPORT_C GLboolean glIsEnabled (GLenum cap){ return GL_FALSE; }
1.236 +EXPORT_C GLboolean glIsTexture (GLuint texture){ return GL_FALSE; }
1.237 +EXPORT_C void glPointParameterf (GLenum pname, GLfloat param){ }
1.238 +EXPORT_C void glPointParameterfv (GLenum pname, const GLfloat *params){ }
1.239 +EXPORT_C void glPointParameterx (GLenum pname, GLfixed param){ }
1.240 +EXPORT_C void glPointParameterxv (GLenum pname, const GLfixed *params){ }
1.241 +EXPORT_C void glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer){ }
1.242 +EXPORT_C void glTexEnvi (GLenum target, GLenum pname, GLint param){ }
1.243 +EXPORT_C void glTexParameteri (GLenum target, GLenum pname, GLint param){ }
1.244 +EXPORT_C void glGetLightfv (GLenum light, GLenum pname, GLfloat *params){ }
1.245 +EXPORT_C void glGetLightxv (GLenum light, GLenum pname, GLfixed *params){ }
1.246 +EXPORT_C void glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params){ }
1.247 +EXPORT_C void glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params){ }
1.248 +EXPORT_C void glGetTexEnviv (GLenum env, GLenum pname, GLint *params){ }
1.249 +EXPORT_C void glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params){ }
1.250 +EXPORT_C void glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params){ }
1.251 +EXPORT_C void glGetTexParameteriv (GLenum target, GLenum pname, GLint *params){ }
1.252 +EXPORT_C void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params){ }
1.253 +EXPORT_C void glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params){ }
1.254 +
1.255 +#endif // defined(__SYMBIAN_USING_OPENGL_ES_1_1__) || defined(__SYMBIAN_USING_OPENGL_ES_1_1_v1__)
1.256 +
1.257 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.258 +// END: OpenGLES Version 1.1
1.259 +// --------------------------------------------------------------------------------------------------------------------------------------------
1.260 +
1.261 +
1.262 +
1.263 +
1.264 +#ifdef __cplusplus
1.265 +}
1.266 +#endif
1.267 +