Permalink
Browse files

video-gliden64: Update to commit 16e3af6.

gonetz/GLideN64@16e3af6

* 16e3af6 Add hack hack_VIUpdateOnCIChange for Quake II.
* d881701 Fix geometry clipping problem for GL ES.
* c50b3c8 Correct force texture clamp condition in OGLRender::drawTexturedRect.
  • Loading branch information...
Gillou68310
Gillou68310 committed Jul 3, 2015
1 parent 47b50ab commit 142570c080e00c3cac2558ea1fd7db57b2e47736
@@ -120,6 +120,7 @@ struct Config
#define hack_legoRacers (1<<7) //LEGO racers course map
#define hack_blastCorps (1<<8) //Blast Corps black polygons
#define hack_ignoreVIHeightChange (1<<9) //Do not reset FBO when VI height is changed. Space Invaders need it.
#define hack_VIUpdateOnCIChange (1<<10) //Update frame if color buffer changed. Needed for Quake II underwater.
extern Config config;
@@ -318,6 +318,15 @@ void OGLRender::addTriangle(int _v0, int _v1, int _v2)
vtx.z = gDP.primDepth.z * vtx.w;
}
}
#ifdef GLESX
if (GBI.isNoN() && gDP.otherMode.depthCompare == 0 && gDP.otherMode.depthUpdate == 0) {
for (u32 i = triangles.num - 3; i < triangles.num; ++i) {
SPVertex & vtx = triangles.vertices[triangles.elements[i]];
vtx.z = 0.0f;
}
}
#endif
}
void OGLRender::_setBlendMode() const
@@ -1063,10 +1072,10 @@ void OGLRender::drawTexturedRect(const TexturedRectParams & _params)
glActiveTexture(GL_TEXTURE0 + t);
if ((cache.current[t]->mirrorS == 0) && ((texST[t].s0 < texST[t].s1 && texST[t].s0 >= 0.0 && texST[t].s1 <= cache.current[t]->width) || (cache.current[t]->maskS == 0 && (texST[t].s0 < -1024.0f || texST[t].s1 > 1023.99f))))
if ((cache.current[t]->mirrorS == 0 && cache.current[t]->maskS == 0 && texST[t].s0 < texST[t].s1 && texST[t].s0 >= 0.0 && texST[t].s1 <= (float)cache.current[t]->width) || (cache.current[t]->maskS == 0 && (texST[t].s0 < -1024.0f || texST[t].s1 > 1023.99f)))
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
if (cache.current[t]->mirrorT == 0 && texST[t].t0 < texST[t].t1 && texST[t].t0 >= 0.0f && texST[t].t1 <= cache.current[t]->height)
if (cache.current[t]->mirrorT == 0 && cache.current[t]->maskT == 0 && texST[t].t0 < texST[t].t1 && texST[t].t0 >= 0.0f && texST[t].t1 <= (float)cache.current[t]->height)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
texST[t].s0 *= cache.current[t]->scaleS;
@@ -330,6 +330,8 @@ void RSP_Init()
config.generalEmulation.hacks |= hack_blastCorps;
else if (strstr(RSP.romname, (const char *)"SPACE INVADERS") != NULL)
config.generalEmulation.hacks |= hack_ignoreVIHeightChange;
else if (strstr(RSP.romname, (const char *)"QUAKE II") != NULL)
config.generalEmulation.hacks |= hack_VIUpdateOnCIChange;
api().FindPluginPath(RSP.pluginpath);
@@ -1 +1 @@
#define PLUGIN_REVISION "40da41d"
#define PLUGIN_REVISION "16e3af6"
@@ -110,7 +110,7 @@ void VI_UpdateScreen()
if (config.frameBufferEmulation.enable) {
const bool bCFB = (gDP.changed&CHANGED_CPU_FB_WRITE) == CHANGED_CPU_FB_WRITE;
const bool bNeedUpdate = gDP.colorImage.changed != 0 || (bCFB ? true : (*REG.VI_ORIGIN != VI.lastOrigin));
const bool bNeedUpdate = (bCFB ? true : (*REG.VI_ORIGIN != VI.lastOrigin)) || ((config.generalEmulation.hacks & hack_VIUpdateOnCIChange) != 0 && gDP.colorImage.changed != 0);
if (bNeedUpdate) {
if (bCFB) {

0 comments on commit 142570c

Please sign in to comment.