mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 15:32:57 +00:00
Bug fixes
This commit is contained in:
parent
fabac78ea8
commit
0108ff89d7
3 changed files with 39 additions and 6 deletions
|
@ -181,10 +181,10 @@ bool PolyCull::CheckBBox(float *bspcoord)
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
int j = i < 3 ? i + 1 : 0;
|
int j = i < 3 ? i + 1 : 0;
|
||||||
int x1 = bspcoord[lines[i][0]];
|
float x1 = bspcoord[lines[i][0]];
|
||||||
int y1 = bspcoord[lines[i][1]];
|
float y1 = bspcoord[lines[i][1]];
|
||||||
int x2 = bspcoord[lines[i][2]];
|
float x2 = bspcoord[lines[i][2]];
|
||||||
int y2 = bspcoord[lines[i][3]];
|
float y2 = bspcoord[lines[i][3]];
|
||||||
int sx1, sx2;
|
int sx1, sx2;
|
||||||
if (GetSegmentRangeForLine(x1, y1, x2, y2, sx1, sx2))
|
if (GetSegmentRangeForLine(x1, y1, x2, y2, sx1, sx2))
|
||||||
{
|
{
|
||||||
|
|
|
@ -190,7 +190,7 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, AActor *thing, subse
|
||||||
else if (thing->RenderStyle == LegacyRenderStyles[STYLE_AddStencil])
|
else if (thing->RenderStyle == LegacyRenderStyles[STYLE_AddStencil])
|
||||||
{
|
{
|
||||||
args.uniforms.destalpha = 256;
|
args.uniforms.destalpha = 256;
|
||||||
args.uniforms.srcalpha = (uint32_t)(thing->Alpha * 256) * 2; // Don't know this needs to be multiplied by two..
|
args.uniforms.srcalpha = (uint32_t)(thing->Alpha * 256);
|
||||||
args.uniforms.color = 0xff000000 | thing->fillcolor;
|
args.uniforms.color = 0xff000000 | thing->fillcolor;
|
||||||
blendmode = TriBlendMode::Stencil;
|
blendmode = TriBlendMode::Stencil;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,7 +339,40 @@ void DrawPolyTrianglesCommand::Execute(DrawerThread *thread)
|
||||||
|
|
||||||
FString DrawPolyTrianglesCommand::DebugInfo()
|
FString DrawPolyTrianglesCommand::DebugInfo()
|
||||||
{
|
{
|
||||||
return "DrawPolyTriangles";
|
FString variantstr;
|
||||||
|
switch (variant)
|
||||||
|
{
|
||||||
|
default: variantstr = "Unknown"; break;
|
||||||
|
case TriDrawVariant::DrawNormal: variantstr = "DrawNormal"; break;
|
||||||
|
case TriDrawVariant::FillNormal: variantstr = "FillNormal"; break;
|
||||||
|
case TriDrawVariant::DrawSubsector: variantstr = "DrawSubsector"; break;
|
||||||
|
case TriDrawVariant::FillSubsector: variantstr = "FillSubsector"; break;
|
||||||
|
case TriDrawVariant::FuzzSubsector: variantstr = "FuzzSubsector"; break;
|
||||||
|
case TriDrawVariant::Stencil: variantstr = "Stencil"; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
FString blendmodestr;
|
||||||
|
switch (blendmode)
|
||||||
|
{
|
||||||
|
default: blendmodestr = "Unknown"; break;
|
||||||
|
case TriBlendMode::Copy: blendmodestr = "Copy"; break;
|
||||||
|
case TriBlendMode::AlphaBlend: blendmodestr = "AlphaBlend"; break;
|
||||||
|
case TriBlendMode::AddSolid: blendmodestr = "AddSolid"; break;
|
||||||
|
case TriBlendMode::Add: blendmodestr = "Add"; break;
|
||||||
|
case TriBlendMode::Sub: blendmodestr = "Sub"; break;
|
||||||
|
case TriBlendMode::RevSub: blendmodestr = "RevSub"; break;
|
||||||
|
case TriBlendMode::Stencil: blendmodestr = "Stencil"; break;
|
||||||
|
case TriBlendMode::Shaded: blendmodestr = "Shaded"; break;
|
||||||
|
case TriBlendMode::TranslateCopy: blendmodestr = "TranslateCopy"; break;
|
||||||
|
case TriBlendMode::TranslateAlphaBlend: blendmodestr = "TranslateAlphaBlend"; break;
|
||||||
|
case TriBlendMode::TranslateAdd: blendmodestr = "TranslateAdd"; break;
|
||||||
|
case TriBlendMode::TranslateSub: blendmodestr = "TranslateSub"; break;
|
||||||
|
case TriBlendMode::TranslateRevSub: blendmodestr = "TranslateRevSub"; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
FString info;
|
||||||
|
info.Format("DrawPolyTriangles: variant = %s, blend mode = %s, color = %d", variantstr.GetChars(), blendmodestr.GetChars(), args.uniforms.color);
|
||||||
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in a new issue