mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-27 22:22:08 +00:00
This commit is contained in:
commit
3548f17f01
3 changed files with 13 additions and 6 deletions
|
@ -167,8 +167,8 @@ void gl_LoadExtensions()
|
|||
gl.flags |= RFL_SAMPLER_OBJECTS;
|
||||
}
|
||||
|
||||
// The minimum requirement for the modern render path are GL 3.0 + uniform buffers
|
||||
if (gl_version < 3.0f || (gl_version < 3.1f && !CheckExtension("GL_ARB_uniform_buffer_object") && strstr(gl.vendorstring, "X.Org") == nullptr))
|
||||
// The minimum requirement for the modern render path are GL 3.0 + uniform buffers. Also exclude the Linux Mesa driver at GL 3.0 because it errors out on shader compilation.
|
||||
if (gl_version < 3.0f || (gl_version < 3.1f && (!CheckExtension("GL_ARB_uniform_buffer_object") || strstr(gl.vendorstring, "X.Org") != nullptr)))
|
||||
{
|
||||
gl.legacyMode = true;
|
||||
gl.lightmethod = LM_LEGACY;
|
||||
|
@ -294,10 +294,10 @@ void gl_PrintStartupLog()
|
|||
Printf ("GL_RENDERER: %s\n", glGetString(GL_RENDERER));
|
||||
Printf ("GL_VERSION: %s (%s profile)\n", glGetString(GL_VERSION), (v & GL_CONTEXT_CORE_PROFILE_BIT)? "Core" : "Compatibility");
|
||||
Printf ("GL_SHADING_LANGUAGE_VERSION: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||
Printf ("GL_EXTENSIONS:");
|
||||
Printf (PRINT_LOG, "GL_EXTENSIONS:");
|
||||
for (unsigned i = 0; i < m_Extensions.Size(); i++)
|
||||
{
|
||||
Printf(" %s", m_Extensions[i].GetChars());
|
||||
Printf(PRINT_LOG, " %s", m_Extensions[i].GetChars());
|
||||
}
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &v);
|
||||
|
|
|
@ -491,6 +491,7 @@ void R_InterpolateView (player_t *player, double Frac, InterpolationViewer *ivie
|
|||
if (ViewPos.Z > viewsector->GetPortalPlaneZ(sector_t::ceiling))
|
||||
{
|
||||
ViewPos += viewsector->GetPortalDisplacement(sector_t::ceiling);
|
||||
ViewActorPos += viewsector->GetPortalDisplacement(sector_t::ceiling);
|
||||
viewsector = R_PointInSubsector(ViewPos)->sector;
|
||||
moved = true;
|
||||
}
|
||||
|
@ -503,6 +504,7 @@ void R_InterpolateView (player_t *player, double Frac, InterpolationViewer *ivie
|
|||
if (ViewPos.Z < viewsector->GetPortalPlaneZ(sector_t::floor))
|
||||
{
|
||||
ViewPos += viewsector->GetPortalDisplacement(sector_t::floor);
|
||||
ViewActorPos += viewsector->GetPortalDisplacement(sector_t::floor);
|
||||
viewsector = R_PointInSubsector(ViewPos)->sector;
|
||||
moved = true;
|
||||
}
|
||||
|
|
|
@ -8926,15 +8926,20 @@ ExpEmit FxSwitchStatement::Emit(VMFunctionBuilder *build)
|
|||
|
||||
bool FxSwitchStatement::CheckReturn()
|
||||
{
|
||||
//A switch statement returns when it contains no breaks and ends with a return
|
||||
bool founddefault = false;
|
||||
//A switch statement returns when it contains a no breaks, a default case, and ends with a return
|
||||
for (auto line : Content)
|
||||
{
|
||||
if (line->ExprType == EFX_JumpStatement)
|
||||
{
|
||||
return false; // Break means that the end of the statement will be reached, Continue cannot happen in the last statement of the last block.
|
||||
}
|
||||
else if (line->ExprType == EFX_CaseStatement)
|
||||
{
|
||||
if (static_cast<FxCaseStatement*>(line)->Condition == nullptr) founddefault = true;
|
||||
}
|
||||
}
|
||||
return Content.Size() > 0 && Content.Last()->CheckReturn();
|
||||
return founddefault && Content.Size() > 0 && Content.Last()->CheckReturn();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue