Skip to content

Commit

Permalink
Remove ForceGL2 flag. Add comments... hm.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Nov 9, 2020
1 parent 766dbc5 commit 864cc54
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
9 changes: 0 additions & 9 deletions Common/GPU/OpenGL/GLFeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,15 +541,6 @@ void CheckGLExtensions() {
}
}

#ifdef __APPLE__
if (!gl_extensions.IsGLES && !gl_extensions.IsCoreContext) {
// Apple doesn't allow OpenGL 3.x+ in compatibility contexts.
// TODO: But are we still ever creating these on Apple? Would really
// like to kill this ForceGL2 flag.
gl_extensions.ForceGL2 = true;
}
#endif

ProcessGPUFeatures();

int error = glGetError();
Expand Down
1 change: 0 additions & 1 deletion Common/GPU/OpenGL/GLFeatures.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ struct GLExtensions {
bool IsGLES;
bool IsCoreContext;
bool GLES3; // true if the full OpenGL ES 3.0 is supported
bool ForceGL2;

// OES
bool OES_depth24;
Expand Down
4 changes: 3 additions & 1 deletion Common/GPU/OpenGL/thin3d_gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ OpenGLContext::OpenGLContext() {
}
}
} else {
if (!gl_extensions.ForceGL2 || gl_extensions.IsCoreContext) {
if (gl_extensions.IsCoreContext) {
if (gl_extensions.VersionGEThan(3, 3, 0)) {
shaderLanguageDesc_.shaderLanguage = ShaderLanguage::GLSL_3xx;
shaderLanguageDesc_.glslVersionNumber = 330;
Expand All @@ -645,12 +645,14 @@ OpenGLContext::OpenGLContext() {
shaderLanguageDesc_.varying_fs = "in";
shaderLanguageDesc_.attribute = "in";
} else if (gl_extensions.VersionGEThan(3, 0, 0)) {
// Hm, I think this is wrong. This should be outside "if (gl_extensions.IsCoreContext)".

This comment has been minimized.

Copy link
@unknownbrackets

unknownbrackets Dec 4, 2020

Collaborator

Is even the above core context specific? As long as they have 3.3.x, core shouldn't matter for the shader right?

-[Unknown]

shaderLanguageDesc_.shaderLanguage = ShaderLanguage::GLSL_1xx;
shaderLanguageDesc_.glslVersionNumber = 130;
shaderLanguageDesc_.fragColor0 = "fragColor0";
shaderLanguageDesc_.bitwiseOps = true;
shaderLanguageDesc_.texelFetch = "texelFetch";
} else {
// This too...
shaderLanguageDesc_.shaderLanguage = ShaderLanguage::GLSL_1xx;
shaderLanguageDesc_.glslVersionNumber = 110;
if (gl_extensions.EXT_gpu_shader4) {
Expand Down

0 comments on commit 864cc54

Please sign in to comment.