Undo changes to glEnable/Disable
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user