Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into archive_split
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed Sep 12, 2017
2 parents 6d2c55f + ac566f4 commit fc3ff97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/gl/system/gl_interface.cpp
Expand Up @@ -43,6 +43,7 @@ static TArray<FString> m_Extensions;
RenderContext gl;

EXTERN_CVAR(Bool, gl_legacy_mode)
extern int currentrenderer;

//==========================================================================
//
Expand Down Expand Up @@ -207,7 +208,8 @@ void gl_LoadExtensions()

// The minimum requirement for the modern render path is GL 3.3.
// Although some GL 3.1 or 3.2 solutions may theoretically work they are usually too broken or too slow.
if (gl_version < 3.3f)
// unless, of course, we're simply using this as a software backend...
if ((gl_version < 3.3f && (currentrenderer==1)) || gl_version < 3.0f)
{
gl.legacyMode = true;
gl.lightmethod = LM_LEGACY;
Expand Down
10 changes: 0 additions & 10 deletions src/gl/system/gl_swframebuffer.cpp
Expand Up @@ -93,7 +93,6 @@ EXTERN_CVAR(Float, Gamma)
EXTERN_CVAR(Bool, vid_vsync)
EXTERN_CVAR(Float, transsouls)
EXTERN_CVAR(Int, vid_refreshrate)
EXTERN_CVAR(Bool, gl_legacy_mode)

#ifdef WIN32
extern cycle_t BlitCycles;
Expand Down Expand Up @@ -199,15 +198,6 @@ OpenGLSWFrameBuffer::OpenGLSWFrameBuffer(void *hMonitor, int width, int height,
const char *glversion = (const char*)glGetString(GL_VERSION);
bool isGLES = (glversion && strlen(glversion) > 10 && memcmp(glversion, "OpenGL ES ", 10) == 0);

UCVarValue value;
// GL 3.0 is mostly broken on MESA drivers which really are the only relevant case here that doesn't fulfill the requirements based on version number alone.
#ifdef _WIN32
value.Bool = !ogl_IsVersionGEQ(3, 0);
#else
value.Bool = !ogl_IsVersionGEQ(3, 1);
#endif
gl_legacy_mode.ForceSet (value, CVAR_Bool);

if (!isGLES && ogl_IsVersionGEQ(3, 0) == 0)
{
Printf("OpenGL acceleration requires at least OpenGL 3.0. No Acceleration will be used.\n");
Expand Down
2 changes: 1 addition & 1 deletion src/polyrenderer/scene/poly_playersprite.cpp
Expand Up @@ -242,7 +242,7 @@ void RenderPolyPlayerSprites::RenderSprite(PolyRenderThread *thread, DPSprite *p
sy += wy;
}

double yaspectMul = 1.2;// 320.0 * SCREENHEIGHT / (r_Yaspect * SCREENWIDTH);
double yaspectMul = 1.2 * ((double)SCREENHEIGHT / SCREENWIDTH) * r_viewwindow.WidescreenRatio;

double pspritexscale = viewwindow.centerxwide / 160.0;
double pspriteyscale = pspritexscale * yaspectMul;
Expand Down

0 comments on commit fc3ff97

Please sign in to comment.