Gawain: append XXX to PRIM_QUADS to make it scary
authorMike Erwin <significant.bit@gmail.com>
Fri, 7 Apr 2017 18:21:10 +0000 (14:21 -0400)
committerMike Erwin <significant.bit@gmail.com>
Fri, 7 Apr 2017 18:21:10 +0000 (14:21 -0400)
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

intern/gawain/gawain/primitive.h
intern/gawain/src/immediate.c
intern/gawain/src/primitive.c

index 55333be6c9e04839fc0c32697fb5c1f44fcbb7a2..214902e9a2b2f674e7dfaf29ad30638a3ce10d7f 100644 (file)
@@ -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,
index 4e584dcb3cb06a51021f763c815cf6cd9467fe2d..e6d338afbc1685280881af429aa91f62823ce98f 100644 (file)
@@ -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:
index 95472c289e89c17264ac4254449073158b7d8bd0..7fee06021b8c50c77d13bce763940034a168e578 100644 (file)
@@ -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
                };