notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gpu-gles: schtruck/fpse merge: additional calls
[pcsx_rearmed.git]
/
plugins
/
gpu-gles
/
gpuPrim.c
diff --git
a/plugins/gpu-gles/gpuPrim.c
b/plugins/gpu-gles/gpuPrim.c
index
37db052
..
5d17f2d
100644
(file)
--- a/
plugins/gpu-gles/gpuPrim.c
+++ b/
plugins/gpu-gles/gpuPrim.c
@@
-661,7
+661,7
@@
void SetSemiTrans(void)
if(!DrawSemiTrans) // no semi trans at all?
\r
{
\r
if(bBlendEnable)
\r
if(!DrawSemiTrans) // no semi trans at all?
\r
{
\r
if(bBlendEnable)
\r
- {glDisable(GL_BLEND);
bBlendEnable=FALSE;}
// -> don't wanna blend
\r
+ {glDisable(GL_BLEND);
glError();bBlendEnable=FALSE;}
// -> don't wanna blend
\r
ubGloAlpha=ubGloColAlpha=255; // -> full alpha
\r
return; // -> and bye
\r
}
\r
ubGloAlpha=ubGloColAlpha=255; // -> full alpha
\r
return; // -> and bye
\r
}
\r
@@
-669,7
+669,7
@@
void SetSemiTrans(void)
ubGloAlpha=ubGloColAlpha=TransSets[GlobalTextABR].alpha;
\r
\r
if(!bBlendEnable)
\r
ubGloAlpha=ubGloColAlpha=TransSets[GlobalTextABR].alpha;
\r
\r
if(!bBlendEnable)
\r
- {glEnable(GL_BLEND);
bBlendEnable=TRUE;}
// wanna blend
\r
+ {glEnable(GL_BLEND);
glError();bBlendEnable=TRUE;}
// wanna blend
\r
\r
if(TransSets[GlobalTextABR].srcFac!=obm1 ||
\r
TransSets[GlobalTextABR].dstFac!=obm2)
\r
\r
if(TransSets[GlobalTextABR].srcFac!=obm1 ||
\r
TransSets[GlobalTextABR].dstFac!=obm2)
\r
@@
-678,7
+678,7
@@
void SetSemiTrans(void)
{
\r
obm1=TransSets[GlobalTextABR].srcFac;
\r
obm2=TransSets[GlobalTextABR].dstFac;
\r
{
\r
obm1=TransSets[GlobalTextABR].srcFac;
\r
obm2=TransSets[GlobalTextABR].dstFac;
\r
- glBlendFunc(obm1,obm2);
// set blend func
\r
+ glBlendFunc(obm1,obm2);
glError();
// set blend func
\r
}
\r
/*else
\r
if(TransSets[GlobalTextABR].dstFac !=GL_ONE_MINUS_SRC_COLOR)
\r
}
\r
/*else
\r
if(TransSets[GlobalTextABR].dstFac !=GL_ONE_MINUS_SRC_COLOR)
\r
@@
-709,7
+709,7
@@
void SetScanTrans(void) // blending for scan line
*/
\r
obm1=TransSets[0].srcFac;
\r
obm2=TransSets[0].dstFac;
\r
*/
\r
obm1=TransSets[0].srcFac;
\r
obm2=TransSets[0].dstFac;
\r
- glBlendFunc(obm1,obm2);
// set blend func
\r
+ glBlendFunc(obm1,obm2);
glError();
// set blend func
\r
}
\r
\r
void SetScanTexTrans(void) // blending for scan mask texture
\r
}
\r
\r
void SetScanTexTrans(void) // blending for scan mask texture
\r
@@
-722,7
+722,7
@@
void SetScanTexTrans(void) // blending for scan mask
*/
\r
obm1=TransSets[2].srcFac;
\r
obm2=TransSets[2].dstFac;
\r
*/
\r
obm1=TransSets[2].srcFac;
\r
obm2=TransSets[2].dstFac;
\r
- glBlendFunc(obm1,obm2);
// set blend func
\r
+ glBlendFunc(obm1,obm2);
glError();
// set blend func
\r
}
\r
\r
////////////////////////////////////////////////////////////////////////
\r
}
\r
\r
////////////////////////////////////////////////////////////////////////
\r
@@
-802,11
+802,11
@@
void SetSemiTransMulti(int Pass)
}
\r
\r
if(!bBlendEnable)
\r
}
\r
\r
if(!bBlendEnable)
\r
- {glEnable(GL_BLEND);
bBlendEnable=TRUE;}
// wanna blend
\r
+ {glEnable(GL_BLEND);
glError();bBlendEnable=TRUE;}
// wanna blend
\r
\r
if(bm1!=obm1 || bm2!=obm2)
\r
{
\r
\r
if(bm1!=obm1 || bm2!=obm2)
\r
{
\r
- glBlendFunc(bm1,bm2);
// set blend func
\r
+ glBlendFunc(bm1,bm2);
glError();
// set blend func
\r
obm1=bm1;obm2=bm2;
\r
}
\r
}
\r
obm1=bm1;obm2=bm2;
\r
}
\r
}
\r
@@
-947,14
+947,14
@@
void SetRenderMode(unsigned long DrawAttributes,BOOL bSCol)
else currTex=SelectSubTextureS(GlobalTextTP,ulClutID);
\r
\r
if(gTexName!=currTex)
\r
else currTex=SelectSubTextureS(GlobalTextTP,ulClutID);
\r
\r
if(gTexName!=currTex)
\r
- {gTexName=currTex;glBindTexture(GL_TEXTURE_2D,currTex);}
\r
+ {gTexName=currTex;glBindTexture(GL_TEXTURE_2D,currTex);
glError();
}
\r
\r
if(!bTexEnabled) // -> turn texturing on
\r
\r
if(!bTexEnabled) // -> turn texturing on
\r
- {bTexEnabled=TRUE;glEnable(GL_TEXTURE_2D);}
\r
+ {bTexEnabled=TRUE;glEnable(GL_TEXTURE_2D);
glError();
}
\r
}
\r
else // no texture ?
\r
if(bTexEnabled)
\r
}
\r
else // no texture ?
\r
if(bTexEnabled)
\r
- {bTexEnabled=FALSE;glDisable(GL_TEXTURE_2D);
}
// -> turn texturing off
\r
+ {bTexEnabled=FALSE;glDisable(GL_TEXTURE_2D);
glError();}
// -> turn texturing off
\r
\r
if(bSCol) // also set color ?
\r
{
\r
\r
if(bSCol) // also set color ?
\r
{
\r
@@
-980,6
+980,7
@@
void SetRenderMode(unsigned long DrawAttributes,BOOL bSCol)
{
\r
if(bDrawSmoothShaded) glShadeModel(GL_SMOOTH); // -> set actual shading
\r
else glShadeModel(GL_FLAT);
\r
{
\r
if(bDrawSmoothShaded) glShadeModel(GL_SMOOTH); // -> set actual shading
\r
else glShadeModel(GL_FLAT);
\r
+ glError();
\r
bOldSmoothShaded=bDrawSmoothShaded;
\r
}
\r
}
\r
bOldSmoothShaded=bDrawSmoothShaded;
\r
}
\r
}
\r
@@
-1452,14
+1453,14
@@
void UploadScreenEx(long Position)
if(!PSXDisplay.DisplayMode.x) return;
\r
if(!PSXDisplay.DisplayMode.y) return;
\r
\r
if(!PSXDisplay.DisplayMode.x) return;
\r
if(!PSXDisplay.DisplayMode.y) return;
\r
\r
- glDisable(GL_SCISSOR_TEST);
\r
- glShadeModel(GL_FLAT);
\r
+ glDisable(GL_SCISSOR_TEST);
glError();
\r
+ glShadeModel(GL_FLAT);
glError();
\r
bOldSmoothShaded=FALSE;
\r
bOldSmoothShaded=FALSE;
\r
- glDisable(GL_BLEND);
\r
+ glDisable(GL_BLEND);
glError();
\r
bBlendEnable=FALSE;
\r
bBlendEnable=FALSE;
\r
- glDisable(GL_TEXTURE_2D);
\r
+ glDisable(GL_TEXTURE_2D);
glError();
\r
bTexEnabled=FALSE;
\r
bTexEnabled=FALSE;
\r
- glDisable(GL_ALPHA_TEST);
\r
+ glDisable(GL_ALPHA_TEST);
glError();
\r
\r
//glPixelZoom(((float)rRatioRect.right)/((float)PSXDisplay.DisplayMode.x),
\r
// -1.0f*(((float)rRatioRect.bottom)/((float)PSXDisplay.DisplayMode.y)));
\r
\r
//glPixelZoom(((float)rRatioRect.right)/((float)PSXDisplay.DisplayMode.x),
\r
// -1.0f*(((float)rRatioRect.bottom)/((float)PSXDisplay.DisplayMode.y)));
\r
@@
-1523,8
+1524,8
@@
void UploadScreenEx(long Position)
\r
// glPixelZoom(1.0F,1.0F);
\r
\r
\r
// glPixelZoom(1.0F,1.0F);
\r
\r
- glEnable(GL_ALPHA_TEST);
\r
- glEnable(GL_SCISSOR_TEST);
\r
+ glEnable(GL_ALPHA_TEST);
glError();
\r
+ glEnable(GL_SCISSOR_TEST);
glError();
\r
}
\r
\r
////////////////////////////////////////////////////////////////////////
\r
}
\r
\r
////////////////////////////////////////////////////////////////////////
\r
@@
-1692,13
+1693,13
@@
void cmdSTP(unsigned char * baseAddr)
bCheckMask=TRUE;
\r
if(iDepthFunc==0) return;
\r
iDepthFunc=0;
\r
bCheckMask=TRUE;
\r
if(iDepthFunc==0) return;
\r
iDepthFunc=0;
\r
- glDepthFunc(GL_LESS);
\r
+ glDepthFunc(GL_LESS);
glError();
\r
}
\r
else
\r
{
\r
bCheckMask=FALSE;
\r
if(iDepthFunc==1) return;
\r
}
\r
else
\r
{
\r
bCheckMask=FALSE;
\r
if(iDepthFunc==1) return;
\r
- glDepthFunc(GL_ALWAYS);
\r
+ glDepthFunc(GL_ALWAYS);
glError();
\r
iDepthFunc=1;
\r
}
\r
}
\r
iDepthFunc=1;
\r
}
\r
}
\r
@@
-2245,9
+2246,9
@@
void primBlkFill(unsigned char * baseAddr)
b=((GLclampf)BLUE(gpuData[0]))/255.0f;
\r
r=((GLclampf)RED(gpuData[0]))/255.0f;
\r
\r
b=((GLclampf)BLUE(gpuData[0]))/255.0f;
\r
r=((GLclampf)RED(gpuData[0]))/255.0f;
\r
\r
- glDisable(GL_SCISSOR_TEST);
\r
- glClearColor(r,g,b,1.0f);
\r
- glClear(uiBufferBits);
\r
+ glDisable(GL_SCISSOR_TEST);
glError();
\r
+ glClearColor(r,g,b,1.0f);
glError();
\r
+ glClear(uiBufferBits);
glError();
\r
gl_z=0.0f;
\r
\r
if(gpuData[0]!=0x02000000 &&
\r
gl_z=0.0f;
\r
\r
if(gpuData[0]!=0x02000000 &&
\r
@@
-2278,7
+2279,7
@@
void primBlkFill(unsigned char * baseAddr)
}
\r
}
\r
\r
}
\r
}
\r
\r
- glEnable(GL_SCISSOR_TEST);
\r
+ glEnable(GL_SCISSOR_TEST);
glError();
\r
}
\r
else
\r
{
\r
}
\r
else
\r
{
\r
@@
-2288,9
+2289,9
@@
void primBlkFill(unsigned char * baseAddr)
SetRenderMode((unsigned long)0x01000000, FALSE);
\r
vertex[0].c.lcol=gpuData[0]|0xff000000;
\r
SETCOL(vertex[0]);
\r
SetRenderMode((unsigned long)0x01000000, FALSE);
\r
vertex[0].c.lcol=gpuData[0]|0xff000000;
\r
SETCOL(vertex[0]);
\r
- glDisable(GL_SCISSOR_TEST);
\r
+ glDisable(GL_SCISSOR_TEST);
glError();
\r
PRIMdrawQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]);
\r
PRIMdrawQuad(&vertex[0], &vertex[1], &vertex[2], &vertex[3]);
\r
- glEnable(GL_SCISSOR_TEST);
\r
+ glEnable(GL_SCISSOR_TEST);
glError();
\r
}
\r
}
\r
\r
}
\r
}
\r
\r