[mutter] cogl: Remove stray references to gl*Pointer, which we're never calling



commit abd094d1356ad806494e17485547ba8a6356ff7e
Author: Adam Jackson <ajax redhat com>
Date:   Wed Dec 18 16:54:58 2019 -0500

    cogl: Remove stray references to gl*Pointer, which we're never calling
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/995

 cogl/cogl/cogl-attribute.c              | 33 ++++-----------------------------
 cogl/cogl/cogl-journal.c                |  4 +---
 cogl/cogl/driver/gl/cogl-attribute-gl.c |  1 -
 3 files changed, 5 insertions(+), 33 deletions(-)
---
diff --git a/cogl/cogl/cogl-attribute.c b/cogl/cogl/cogl-attribute.c
index 72084f790..6c1842e17 100644
--- a/cogl/cogl/cogl-attribute.c
+++ b/cogl/cogl/cogl-attribute.c
@@ -168,35 +168,6 @@ validate_n_components (const CoglAttributeNameState *name_state,
 {
   switch (name_state->name_id)
     {
-    case COGL_ATTRIBUTE_NAME_ID_POSITION_ARRAY:
-      if (G_UNLIKELY (n_components == 1))
-        {
-          g_critical ("glVertexPointer doesn't allow 1 component vertex "
-                      "positions so we currently only support \"cogl_vertex\" "
-                      "attributes where n_components == 2, 3 or 4");
-          return FALSE;
-        }
-      break;
-    case COGL_ATTRIBUTE_NAME_ID_COLOR_ARRAY:
-      if (G_UNLIKELY (n_components != 3 && n_components != 4))
-        {
-          g_critical ("glColorPointer expects 3 or 4 component colors so we "
-                      "currently only support \"cogl_color\" attributes where "
-                      "n_components == 3 or 4");
-          return FALSE;
-        }
-      break;
-    case COGL_ATTRIBUTE_NAME_ID_TEXTURE_COORD_ARRAY:
-      break;
-    case COGL_ATTRIBUTE_NAME_ID_NORMAL_ARRAY:
-      if (G_UNLIKELY (n_components != 3))
-        {
-          g_critical ("glNormalPointer expects 3 component normals so we "
-                      "currently only support \"cogl_normal\" attributes "
-                      "where n_components == 3");
-          return FALSE;
-        }
-      break;
     case COGL_ATTRIBUTE_NAME_ID_POINT_SIZE_ARRAY:
       if (G_UNLIKELY (n_components != 1))
         {
@@ -205,6 +176,10 @@ validate_n_components (const CoglAttributeNameState *name_state,
           return FALSE;
         }
       break;
+    case COGL_ATTRIBUTE_NAME_ID_POSITION_ARRAY:
+    case COGL_ATTRIBUTE_NAME_ID_COLOR_ARRAY:
+    case COGL_ATTRIBUTE_NAME_ID_TEXTURE_COORD_ARRAY:
+    case COGL_ATTRIBUTE_NAME_ID_NORMAL_ARRAY:
     case COGL_ATTRIBUTE_NAME_ID_CUSTOM_ARRAY:
       return TRUE;
     }
diff --git a/cogl/cogl/cogl-journal.c b/cogl/cogl/cogl-journal.c
index 8d41dc0e1..b7eb3c709 100644
--- a/cogl/cogl/cogl-journal.c
+++ b/cogl/cogl/cogl-journal.c
@@ -1453,9 +1453,7 @@ _cogl_journal_flush (CoglJournal *journal)
    *      is the number of pipeline layers.
    * 3) We split the entries explicitly by the number of pipeline layers:
    *      We pad our vertex data when the number of layers is < 2 so that we
-   *      can minimize changes in stride. Each time the number of layers
-   *      changes we need to call glTexCoordPointer to inform GL of new VBO
-   *      offsets.
+   *      can minimize changes in stride.
    * 4) We then split according to compatible Cogl pipelines:
    *      This is where we flush pipeline state
    * 5) Finally we split according to modelview matrix changes:
diff --git a/cogl/cogl/driver/gl/cogl-attribute-gl.c b/cogl/cogl/driver/gl/cogl-attribute-gl.c
index 30a6cd6ea..108a94c15 100644
--- a/cogl/cogl/driver/gl/cogl-attribute-gl.c
+++ b/cogl/cogl/driver/gl/cogl-attribute-gl.c
@@ -305,7 +305,6 @@ _cogl_gl_flush_attributes_state (CoglFramebuffer *framebuffer,
        *   {
        *     age = cogl_pipeline_get_age (pipeline);
        *     XXX: actually we also need to check for legacy_state
-       *     and blending overrides for use of glColorPointer...
        *     if (overrides->ags != age ||
        *         memcmp (&overrides->options, &options,
        *                 sizeof (options) != 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]