Undo changes to glEnable/Disable

This commit is contained in:
Joshua Granick
2013-12-26 20:26:49 -08:00
parent 9274a784c7
commit 870449e3ff
2 changed files with 12 additions and 12 deletions

View File

@@ -57,9 +57,9 @@ DEFINE_PRIM(lime_gl_version,0);
value lime_gl_enable(value inCap)
{
#ifndef LIME_FORCE_GLES2
//#ifndef LIME_FORCE_GLES2
glEnable(val_int(inCap));
#endif
//#endif
return alloc_null();
}
DEFINE_PRIM(lime_gl_enable,1);
@@ -67,9 +67,9 @@ DEFINE_PRIM(lime_gl_enable,1);
value lime_gl_disable(value inCap)
{
#ifndef LIME_FORCE_GLES2
//#ifndef LIME_FORCE_GLES2
glDisable(val_int(inCap));
#endif
//#endif
return alloc_null();
}
DEFINE_PRIM(lime_gl_disable,1);

View File

@@ -92,9 +92,9 @@ namespace lime {
mViewport.w = -1;
SetViewport (inRect);
#ifndef LIME_FORCE_GLES2
//#ifndef LIME_FORCE_GLES2
glEnable (GL_BLEND);
#endif
//#endif
if (mAlphaMode == amPremultiplied)
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
@@ -240,12 +240,12 @@ namespace lime {
void OpenGLContext::FinishBitmapRender () {
#ifndef LIME_FORCE_GLES2
//#ifndef LIME_FORCE_GLES2
glDisable (GL_TEXTURE_2D);
#ifdef LIME_DITHER
glEnable (GL_DITHER);
#endif
#endif
//#endif
}
@@ -329,9 +329,9 @@ namespace lime {
void OpenGLContext::Render (const RenderState &inState, const HardwareCalls &inCalls) {
#ifndef LIME_FORCE_GLES2
//#ifndef LIME_FORCE_GLES2
glEnable (GL_BLEND);
#endif
//#endif
SetViewport (inState.mClipRect);
if (mModelView != *inState.mTransform.mMatrix) {
@@ -531,12 +531,12 @@ namespace lime {
sgDrawCount++;
glDrawArrays (sgOpenglType[draw.mPrimType], draw.mFirst, draw.mCount);
#ifndef LIME_FORCE_GLES2
//#ifndef LIME_FORCE_GLES2
#ifdef LIME_DITHER
if (boundTexture && !draw.mBitmapSmooth)
glEnable (GL_DITHER);
#endif
#endif
//#endif
}