X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=mupen64plus-pandora.git;a=blobdiff_plain;f=source%2Fgles2rice%2Fsrc%2FOGLRender.cpp;fp=source%2Fgles2rice%2Fsrc%2FOGLRender.cpp;h=c63a86ec918b400548109a7be1875f29f603d903;hp=f11798eff509e93cf4b1e00b114d71ab2fdaf888;hb=6c7533683f3b805c127b433aa5a7c8b1ce0c775b;hpb=f8c31034f942f1361d0435c01fda7c0f4a7231a0 diff --git a/source/gles2rice/src/OGLRender.cpp b/source/gles2rice/src/OGLRender.cpp index f11798e..c63a86e 100755 --- a/source/gles2rice/src/OGLRender.cpp +++ b/source/gles2rice/src/OGLRender.cpp @@ -350,9 +350,14 @@ void OGLRender::SetZUpdate(BOOL bZUpdate) void OGLRender::ApplyZBias(int bias) { + static int old_bias; float f1 = bias > 0 ? -3.0f : 0.0f; // z offset = -3.0 * max(abs(dz/dx),abs(dz/dy)) per pixel delta z slope float f2 = bias > 0 ? -3.0f : 0.0f; // z offset += -3.0 * 1 bit + if (bias == old_bias) + return; + old_bias = bias; + #ifdef PAULSCODE // Android_JNI_GetPolygonOffset(hardwareType, bias, &f1, &f2); // glPolygonOffset(0.2f, 0.2f); @@ -986,6 +991,7 @@ void OGLRender::DrawSimpleRect(int nX0, int nY0, int nX1, int nY1, uint32 dwColo OPENGL_CHECK_ERRORS; } +#if 0 void OGLRender::InitCombinerBlenderForSimpleRectDraw(uint32 tile) { //glEnable(GL_CULL_FACE); @@ -997,6 +1003,7 @@ void OGLRender::InitCombinerBlenderForSimpleRectDraw(uint32 tile) OPENGL_CHECK_ERRORS; //glEnable(GL_ALPHA_TEST); } +#endif COLOR OGLRender::PostProcessDiffuseColor(COLOR curDiffuseColor) {