diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 37: Remove Mesh::make_cube implementation as it depends on GL_QUADS that doesn't exist in OpenGL ES 2.0

Message ID 20110721123632.17019.19242.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

Alexandros Frantzis July 21, 2011, 12:36 p.m. UTC
------------------------------------------------------------
revno: 37
committer: Alexandros Frantzis <alf82@freemail.gr>
timestamp: Mon 2010-07-12 10:57:21 +0300
message:
  Remove Mesh::make_cube implementation as it depends on GL_QUADS that doesn't exist in OpenGL ES 2.0
modified:
  mesh.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'mesh.cpp'
--- mesh.cpp	2010-07-09 10:13:39 +0000
+++ mesh.cpp	2010-07-12 07:57:21 +0000
@@ -15,7 +15,7 @@ 
 {
     mPolygonQty = 0;
     mVertexQty = 0;
-    mMode = GL_QUADS;
+    mMode = GL_TRIANGLES;
     mVertex = 0;
 }
 
@@ -27,52 +27,7 @@ 
 
 void Mesh::make_cube()
 {
-    mPolygonQty = 6;
-    mVertexQty = 4 * mPolygonQty;
-    mMode = GL_QUADS;
-    mVertex = new Vertex[mVertexQty];
-    
-    mVertex[0].v = Vector3f( 1.0f, 1.0f,-1.0f);
-    mVertex[1].v = Vector3f(-1.0f, 1.0f,-1.0f);
-    mVertex[2].v = Vector3f(-1.0f, 1.0f, 1.0f);
-    mVertex[3].v = Vector3f( 1.0f, 1.0f, 1.0f);
-
-    mVertex[4].v = Vector3f( 1.0f,-1.0f, 1.0f);
-    mVertex[5].v = Vector3f(-1.0f,-1.0f, 1.0f);
-    mVertex[6].v = Vector3f(-1.0f,-1.0f,-1.0f);
-    mVertex[7].v = Vector3f( 1.0f,-1.0f,-1.0f);
-    
-    mVertex[8].v =  Vector3f( 1.0f, 1.0f, 1.0f);
-    mVertex[9].v =  Vector3f(-1.0f, 1.0f, 1.0f);
-    mVertex[10].v = Vector3f(-1.0f,-1.0f, 1.0f);
-    mVertex[11].v = Vector3f( 1.0f,-1.0f, 1.0f);
-
-    mVertex[12].v = Vector3f( 1.0f,-1.0f,-1.0f);
-    mVertex[13].v = Vector3f(-1.0f,-1.0f,-1.0f);
-    mVertex[14].v = Vector3f(-1.0f, 1.0f,-1.0f);
-    mVertex[15].v = Vector3f( 1.0f, 1.0f,-1.0f);
-
-    mVertex[16].v = Vector3f(-1.0f, 1.0f, 1.0f);
-    mVertex[17].v = Vector3f(-1.0f, 1.0f,-1.0f);
-    mVertex[18].v = Vector3f(-1.0f,-1.0f,-1.0f);
-    mVertex[19].v = Vector3f(-1.0f,-1.0f, 1.0f);
-
-    mVertex[20].v = Vector3f(-1.0f, 1.0f, 1.0f);
-    mVertex[21].v = Vector3f(-1.0f, 1.0f,-1.0f);
-    mVertex[22].v = Vector3f(-1.0f,-1.0f,-1.0f);
-    mVertex[23].v = Vector3f(-1.0f,-1.0f, 1.0f);
-
-    for(unsigned i = 0; i < mVertexQty / 4; i += 4)
-    {
-        Vector3f n;
-        n = normal(mVertex[i].v, mVertex[i + 1].v, mVertex[i + 2].v);
-        for(unsigned j = 0; j < 4; j++)
-            mVertex[i + j].n = n;
-        mVertex[i + 0].t = Texel(0.0f, 0.0f);
-        mVertex[i + 1].t = Texel(1.0f, 0.0f);
-        mVertex[i + 2].t = Texel(1.0f, 1.0f);
-        mVertex[i + 3].t = Texel(0.0f, 1.0f);
-    }
+    fprintf(stderr, "Warning: %s: Not implemented\n", __FUNCTION__);
 }
 
 void Mesh::make_torus()