ecere/gfx/drivers/OpenGL: Added useVertTrans()
authorJerome St-Louis <jerome@ecere.com>
Thu, 18 Jun 2015 07:21:40 +0000 (03:21 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 15 Oct 2015 00:22:59 +0000 (20:22 -0400)
- To support types not supported by OpenGL ES by converting on the fly

ecere/src/gfx/drivers/OpenGLDisplayDriver.ec

index 53da947..bd4c473 100644 (file)
@@ -1378,6 +1378,16 @@ public struct GLAB
          case color:    glColorPointer(n, type, stride, pointer); break;
       }
    }
+
+   void useVertTrans(uint count, int n, int type, uint stride, void * pointer)
+   {
+      if(curArrayBuffer != ((this != null) ? buffer : 0))
+         GLBindBuffer(GL_ARRAY_BUFFER, ((this != null) ? buffer : 0));
+      if(type == GL_INT)
+         glVertexPointeri(n, stride, pointer, count);
+      else if(type == GL_DOUBLE)
+         glVertexPointerd(n, stride, pointer, count);
+   }
 };
 
 static uint curElementBuffer;