X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_geometry.c;h=730606185e55a92350f4f5b0e6fb6c740045459e;hb=49df0cf2fb8f84ff03fcfc91f4e2b4c4e5774854;hp=eb96b923c92f19fe956076b6cadd77e7cbb50eb9;hpb=ea968d8d5368af635d7321d44251c3a76f4c8895;p=freeglut diff --git a/src/fg_geometry.c b/src/fg_geometry.c index eb96b92..7306061 100644 --- a/src/fg_geometry.c +++ b/src/fg_geometry.c @@ -72,7 +72,9 @@ static void fghDrawGeometryWire20(GLfloat *vertices, GLfloat *normals, GLsizei n { GLuint vbo_coords, vbo_normals; GLuint numVertices = numFaces * numEdgePerFace; - + + int i; + if (numVertices > 0 && attribute_v_coord != -1) { fghGenBuffers(1, &vbo_coords); fghBindBuffer(FGH_ARRAY_BUFFER, vbo_coords); @@ -113,9 +115,6 @@ static void fghDrawGeometryWire20(GLfloat *vertices, GLfloat *normals, GLsizei n ); } - - int i; - /* Draw per face (TODO: could use glMultiDrawArrays if available) */ for (i=0; i