mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 14:53:03 +00:00
driver-gl: re-indent misleading if-else statement
There was a very, very, very misleading if else statement using no braces for a single statement if block, followed by a blank line *and* followed by a comment before the else which was aligned to the 'if' column, all leading you to believe on first glance that there is no else block. The fact that Neil and I were both separately mislead by this, this week, is a pretty compelling reason to clarify this by deleting the blank line, and moving the comment inside the else block. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 96d9ea78eb56269c0de5283a5302ab095d8bdfce)
This commit is contained in:
parent
986ba3aa79
commit
de7416fd1d
@ -468,9 +468,11 @@ _cogl_driver_update_features (CoglContext *ctx,
|
||||
flags |= COGL_FEATURE_SHADERS_GLSL;
|
||||
COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_GLSL, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If all of the old GLSL extensions are available then we can fake
|
||||
* the GL 2.0 GLSL support by diverting to the old function names */
|
||||
else if (ctx->glCreateProgramObject && /* GL_ARB_shader_objects */
|
||||
if (ctx->glCreateProgramObject && /* GL_ARB_shader_objects */
|
||||
ctx->glVertexAttribPointer && /* GL_ARB_vertex_shader */
|
||||
_cogl_check_extension ("GL_ARB_fragment_shader", gl_extensions))
|
||||
{
|
||||
@ -495,6 +497,7 @@ _cogl_driver_update_features (CoglContext *ctx,
|
||||
flags |= COGL_FEATURE_SHADERS_GLSL;
|
||||
COGL_FLAGS_SET (ctx->features, COGL_FEATURE_ID_GLSL, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
if ((COGL_CHECK_GL_VERSION (gl_major, gl_minor, 2, 0) ||
|
||||
_cogl_check_extension ("GL_ARB_point_sprite", gl_extensions)) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user