mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-22 17:47:20 +03:00
Fix
This commit is contained in:
parent
d2fbcccd01
commit
e938d48607
2 changed files with 4 additions and 37 deletions
39
vendor/librw/src/gl/gl3render.cpp
vendored
39
vendor/librw/src/gl/gl3render.cpp
vendored
|
|
@ -26,50 +26,15 @@ void
|
|||
drawInst_simple(InstanceDataHeader *header, InstanceData *inst)
|
||||
{
|
||||
draw++;
|
||||
flushCache();
|
||||
glDrawElements(header->primType, inst->numIndex,
|
||||
GL_UNSIGNED_SHORT, ((uint8*) header->indexBuffer) + inst->offset);
|
||||
}
|
||||
|
||||
// Emulate PS2 GS alpha test FB_ONLY case: failed alpha writes to frame- but not to depth buffer
|
||||
void
|
||||
drawInst_GSemu(InstanceDataHeader *header, InstanceData *inst)
|
||||
{
|
||||
uint32 hasAlpha;
|
||||
int alphafunc, alpharef, gsalpharef;
|
||||
int zwrite;
|
||||
hasAlpha = getAlphaBlend();
|
||||
if(hasAlpha){
|
||||
zwrite = rw::GetRenderState(rw::ZWRITEENABLE);
|
||||
alphafunc = rw::GetRenderState(rw::ALPHATESTFUNC);
|
||||
if(zwrite){
|
||||
alpharef = rw::GetRenderState(rw::ALPHATESTREF);
|
||||
gsalpharef = rw::GetRenderState(rw::GSALPHATESTREF);
|
||||
|
||||
SetRenderState(rw::ALPHATESTFUNC, rw::ALPHAGREATEREQUAL);
|
||||
SetRenderState(rw::ALPHATESTREF, gsalpharef);
|
||||
drawInst_simple(header, inst);
|
||||
SetRenderState(rw::ALPHATESTFUNC, rw::ALPHALESS);
|
||||
SetRenderState(rw::ZWRITEENABLE, 0);
|
||||
drawInst_simple(header, inst);
|
||||
SetRenderState(rw::ZWRITEENABLE, 1);
|
||||
SetRenderState(rw::ALPHATESTFUNC, alphafunc);
|
||||
SetRenderState(rw::ALPHATESTREF, alpharef);
|
||||
}else{
|
||||
SetRenderState(rw::ALPHATESTFUNC, rw::ALPHAALWAYS);
|
||||
drawInst_simple(header, inst);
|
||||
SetRenderState(rw::ALPHATESTFUNC, alphafunc);
|
||||
}
|
||||
}else
|
||||
drawInst_simple(header, inst);
|
||||
}
|
||||
|
||||
void
|
||||
drawInst(InstanceDataHeader *header, InstanceData *inst)
|
||||
{
|
||||
// if(rw::GetRenderState(rw::GSALPHATEST))
|
||||
// drawInst_GSemu(header, inst);
|
||||
// else
|
||||
drawInst_simple(header, inst);
|
||||
drawInst_simple(header, inst);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue