Hello all I have a bunch of aggregate elements within my array.

This array is for vertex positions in OpenGL.

and I need to make a switch without having to bind more data to OpenGL.

To do this I must put an if statement within the array or a booleon variable = true;

How would I go about doing this without it giving me weird errors

Here is my array


  //GUI Cordinates x y z w - NEEDS TEX CORDS
  static const GLfloat GUIVertices[] = { 

1.0f,  1.0f,  0.0f, 1.0f, 1.0f, 0.0f, 
-1.0f,  1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 
-1.0f,  0.94f, 0.0f, 1.0f, 0.0f, 1.0f, 
1.0f,   0.94f, 0.0f, 1.0f, 1.0f, 1.0f,   


//Main ToolBox
// x     y       z   w       X    Y
1.0f, -1.0f,   0.0f, 1.0f, 1.0f, 0.0f, 
-1.0f,-1.0f,   0.0f, 1.0f, 0.0f, 0.0f, 
-1.0f,-0.94f,  0.0f,1.0f, 0.0f, 1.0f, 
1.0f, -0.94f,  0.0f,1.0f, 1.0f, 1.0, 



that makes no sense at all -- you can't put if statements in arrays. Post an example of what you want to do.

If you want to avoid "weird" errors, then don't do anything weird. LOL. You can't put program code into arrays, but you can put pointers to program code (functions) into arrays. The functions pointed to can contain the if statements.