Gawain: append XXX to PRIM_QUADS to make it scary
Quads are not part of modern GL or Vulkan, so we should avoid them. XXX makes coders think "hmm how could I draw this without using quads?" Quads will be removed during the transition to core profile. Part of T49043
This commit is contained in:
@@ -19,7 +19,7 @@ typedef enum {
|
||||
PRIM_TRIANGLES = GL_TRIANGLES,
|
||||
|
||||
#ifdef WITH_GL_PROFILE_COMPAT
|
||||
PRIM_QUADS = GL_QUADS, // legacy GL has this, modern GL & Vulkan do not
|
||||
PRIM_QUADS_XXX = GL_QUADS, // legacy GL has this, modern GL & Vulkan do not
|
||||
#endif
|
||||
|
||||
PRIM_LINE_STRIP = GL_LINE_STRIP,
|
||||
|
@@ -168,7 +168,7 @@ static bool vertex_count_makes_sense_for_primitive(unsigned vertex_ct, Primitive
|
||||
case PRIM_TRIANGLE_FAN:
|
||||
return vertex_ct >= 3;
|
||||
#ifdef WITH_GL_PROFILE_COMPAT
|
||||
case PRIM_QUADS:
|
||||
case PRIM_QUADS_XXX:
|
||||
return vertex_ct % 4 == 0;
|
||||
#endif
|
||||
default:
|
||||
|
@@ -25,7 +25,7 @@ PrimitiveClass prim_class_of_type(PrimitiveType prim_type)
|
||||
[PRIM_TRIANGLE_FAN] = PRIM_CLASS_SURFACE,
|
||||
|
||||
#ifdef WITH_GL_PROFILE_COMPAT
|
||||
[PRIM_QUADS] = PRIM_CLASS_SURFACE,
|
||||
[PRIM_QUADS_XXX] = PRIM_CLASS_SURFACE,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user