diff --git a/nanoWrap.cpp b/nanoWrap.cpp
index 27daf14cd5a1c048a61cdf4b50390fbc2c6e7286..c13aea311d72a7f902275de277d4f156227a7039 100644 (file)
--- a/nanoWrap.cpp
+++ b/nanoWrap.cpp
#include "gl.h"
#include "glesinterface.h"
+#include "nanogl.h"
#define GL_TEXTURE0_ARB 0x84C0
#define GL_TEXTURE1_ARB 0x84C1
if (delayedttmuchange)
{
delayedttmuchange = GL_FALSE;
+#ifndef USE_CORE_PROFILE
glEsImpl->glActiveTexture(delayedtmutarget);
+#endif
}
if (!vertexCount)
ptrIndexArray = indexArray;
useTexCoordArray = GL_FALSE;
}
-
+void nanoGL_Flush()
+ {
+ FlushOnStateChange();
+ }
+void nanoGL_Reset()
+{
+ ResetNanoState();
+}
void glBegin(GLenum mode)
{
wrapperPrimitiveMode = mode;
void glOrtho (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar)
{
FlushOnStateChange();
+#ifdef USE_CORE_PROFILE
+ glEsImpl->glOrtho(left,right,bottom,top, zNear,zFar);
+#else
glEsImpl->glOrthof(left,right,bottom,top, zNear,zFar);
+#endif
}
void glMatrixMode (GLenum mode)
nanoglState.depth_range_far = zFar;
}
FlushOnStateChange();
+#ifdef USE_CORE_PROFILE
+ glEsImpl->glDepthRange(zNear, zFar);
+#else
glEsImpl->glDepthRangef(zNear, zFar);
+#endif
}
void glDepthFunc (GLenum func)
@@ -1412,7 +1430,7 @@ void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
GLenum glGetError (void)
{
- FlushOnStateChange();
+ //FlushOnStateChange();
return GL_NO_ERROR;//glEsImpl->glGetError();
}