diff --git a/nanoWrap.cpp b/nanoWrap.cpp
index 8749bfbf3a98a7e00858124d1cb075625638e46f..9cf8c7c2055bc96645be154220b88f2da5c6119c 100644 (file)
--- a/nanoWrap.cpp
+++ b/nanoWrap.cpp
GLboolean scissor_test;
GLboolean stencil_test;
GLboolean depthmask;
GLboolean scissor_test;
GLboolean stencil_test;
GLboolean depthmask;
- GLclampf depth_range_near;
- GLclampf depth_range_far;
+ GLclampd depth_range_near;
+ GLclampd depth_range_far;
GLenum depth_func;
GLenum cullface;
GLenum shademodel;
GLenum depth_func;
GLenum cullface;
GLenum shademodel;
}
case GL_STENCIL_TEST:
{
}
case GL_STENCIL_TEST:
{
- return;
if (!nanoglState.stencil_test)
if (!nanoglState.stencil_test)
- {
- nanoglState.stencil_test = GL_TRUE;
- statechanged = GL_TRUE;
- }
+ {
+ nanoglState.stencil_test = GL_TRUE;
+ statechanged = GL_TRUE;
+ }
break;
}
case GL_TEXTURE_2D:
break;
}
case GL_TEXTURE_2D:
}
case GL_STENCIL_TEST:
{
}
case GL_STENCIL_TEST:
{
- return;
if (nanoglState.stencil_test)
if (nanoglState.stencil_test)
- {
- nanoglState.stencil_test = GL_FALSE;
- statechanged = GL_TRUE;
- }
+ {
+ nanoglState.stencil_test = GL_FALSE;
+ statechanged = GL_TRUE;
+ }
break;
}
case GL_TEXTURE_2D:
break;
}
case GL_TEXTURE_2D:
currentVertexAttrib.alpha = (unsigned char)ClampTo255( alpha * 255.0f );
}
currentVertexAttrib.alpha = (unsigned char)ClampTo255( alpha * 255.0f );
}
-void glOrtho( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar )
+void glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar )
{
FlushOnStateChange( );
#ifdef USE_CORE_PROFILE
{
FlushOnStateChange( );
#ifdef USE_CORE_PROFILE
@@ -1281,7 +1279,7 @@ void glTexImage2D( GLenum target, GLint level, GLint internalformat, GLsizei wid
{
unsigned char *data = (unsigned char*)pixels;
{
unsigned char *data = (unsigned char*)pixels;
- if( internalformat == GL_RGB && format == GL_RGBA ) // strip alpha from texture
+ if( pixels && internalformat == GL_RGB && format == GL_RGBA ) // strip alpha from texture
{
unsigned char *in = data, *out;
int i = 0, size = width * height * 4;
{
unsigned char *in = data, *out;
int i = 0, size = width * height * 4;
glEsImpl->glScalef( x, y, z );
}
glEsImpl->glScalef( x, y, z );
}
-void glDepthRange( GLclampf zNear, GLclampf zFar )
+void glDepthRange( GLclampd zNear, GLclampd zFar )
{
if ( ( nanoglState.depth_range_near == zNear ) && ( nanoglState.depth_range_far == zFar ) )
{
{
if ( ( nanoglState.depth_range_near == zNear ) && ( nanoglState.depth_range_far == zFar ) )
{
glEsImpl->glCullFace( mode );
}
glEsImpl->glCullFace( mode );
}
-void glFrustum( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar )
+void glFrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar )
{
FlushOnStateChange( );
glEsImpl->glFrustumf( left, right, bottom, top, zNear, zFar );
{
FlushOnStateChange( );
glEsImpl->glFrustumf( left, right, bottom, top, zNear, zFar );
activetmu = texture;
}
activetmu = texture;
}
+void glActiveTextureARB( GLenum texture )
+{
+ if( skipnanogl )
+ {
+ glEsImpl->glActiveTexture( texture );
+ return;
+ }
+ if ( activetmu == texture )
+ {
+ return;
+ }
+ if ( delayedttmuchange )
+ {
+ delayedttmuchange = GL_FALSE;
+ }
+ else
+ {
+ delayedttmuchange = GL_TRUE;
+ delayedtmutarget = texture;
+ }
+ if ( texture == GL_TEXTURE0 )
+ {
+ activetmuState = &tmuState0;
+ }
+ else
+ {
+ activetmuState = &tmuState1;
+ }
+ activetmu = texture;
+}
+
void glClientActiveTexture( GLenum texture )
{
if( skipnanogl )
void glClientActiveTexture( GLenum texture )
{
if( skipnanogl )
}
clientactivetmu = texture;
}
}
clientactivetmu = texture;
}
+void glClientActiveTextureARB( GLenum texture )
+{
+ if( skipnanogl )
+ {
+ glEsImpl->glClientActiveTexture( texture );
+ return;
+ }
+ clientactivetmu = texture;
+}
+
void glPolygonMode( GLenum face, GLenum mode )
{
void glPolygonMode( GLenum face, GLenum mode )
{
glEsImpl->glDeleteTextures( n, textures );
}
glEsImpl->glDeleteTextures( n, textures );
}
-void glClearDepth( GLclampf depth )
+void glClearDepth( GLclampd depth )
{
FlushOnStateChange( );
glEsImpl->glClearDepthf( depth );
{
FlushOnStateChange( );
glEsImpl->glClearDepthf( depth );
}
void glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha )
{
}
void glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha )
{
+ FlushOnStateChange( );
+ glEsImpl->glColorMask( red, green, blue, alpha );
}
void glStencilFunc( GLenum func, GLint ref, GLuint mask )
{
}
void glStencilFunc( GLenum func, GLint ref, GLuint mask )
{
+ FlushOnStateChange( );
+ glEsImpl->glStencilFunc( func, ref, mask );
}
void glStencilOp( GLenum fail, GLenum zfail, GLenum zpass )
{
}
void glStencilOp( GLenum fail, GLenum zfail, GLenum zpass )
{
+ FlushOnStateChange( );
+ glEsImpl->glStencilOp( fail, zfail, zpass );
}
struct ptrstate vertex_array;
}
struct ptrstate vertex_array;
@@ -1872,6 +1917,9 @@ void glDrawElements( GLenum mode, GLsizei count, GLenum type, const GLvoid *indi
else
{
glEsImpl->glDisableClientState( GL_COLOR_ARRAY );
else
{
glEsImpl->glDisableClientState( GL_COLOR_ARRAY );
+ glEsImpl->glColor4f( currentVertexAttrib.red/255.0f, currentVertexAttrib.green/255.0f,
+ currentVertexAttrib.blue/255.0f, currentVertexAttrib.alpha/255.0f );
+
}
glEsImpl->glColorPointer( tmuState0.color_array.size,
tmuState0.color_array.type,
}
glEsImpl->glColorPointer( tmuState0.color_array.size,
tmuState0.color_array.type,
}
void glStencilMask( GLuint mask )
{
}
void glStencilMask( GLuint mask )
{
+ FlushOnStateChange( );
+ glEsImpl->glStencilMask( mask );
}
void glClearStencil( GLint s )
{
}
void glClearStencil( GLint s )
{
+ FlushOnStateChange( );
+ glEsImpl->glClearStencil( s );
}
#if defined( __MULTITEXTURE_SUPPORT__ )
}
#if defined( __MULTITEXTURE_SUPPORT__ )
glEsImpl->glPixelStorei( pname, param );
}
glEsImpl->glPixelStorei( pname, param );
}
+void glFogi( GLenum pname, GLint param )
+{
+ FlushOnStateChange( );
+ glEsImpl->glFogf( pname, param );
+}
+
void glFogf( GLenum pname, GLfloat param )
{
FlushOnStateChange( );
void glFogf( GLenum pname, GLfloat param )
{
FlushOnStateChange( );
else
{
glEsImpl->glDisableClientState( GL_COLOR_ARRAY );
else
{
glEsImpl->glDisableClientState( GL_COLOR_ARRAY );
+ glEsImpl->glColor4f( currentVertexAttrib.red/255.0f, currentVertexAttrib.green/255.0f,
+ currentVertexAttrib.blue/255.0f, currentVertexAttrib.alpha/255.0f );
+
}
glEsImpl->glColorPointer( tmuState0.color_array.size,
tmuState0.color_array.type,
}
glEsImpl->glColorPointer( tmuState0.color_array.size,
tmuState0.color_array.type,