How to set a booleon variable to true within a GLfloat array?

Hey all Trying to work out how to set a booleon variable to true within an float/glfloat array any ideas on how to do this.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
       

bool test = false;
 //GUI Cordinates x y z w - NEEDS TEX CORDS
                static const GLfloat GUIVertices[] = { 
                        
                             ///////////////////////////////////////////////////////////////////////////
                           
                             //ToolBar
                             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, 

                              test = true;

                };
                




I'm getting weird errors about a while keyword.

I think this should be doable even if the array is a memory storage right? or is there another way that actually works that would not require me to change the format of the array?.

The reason I want to do this is to put data within the array when I want too rather then automatically :) so I can enable and disable parts of my quads on the frustum in OpenGL at the further end.
Last edited on
Don't understand, ¿when do you want to set the flag? ¿why can't just wrote it in the next line?
right after the last row of values in the array where it says test = true; thats where I want to set the flag.
Last edited on
Topic archived. No new replies allowed.