I am a rather new programmer in OpenGl. I want to draw an nxn grid wherein, each cell of the grid is a wire cube. I need to write random numbers in each of these cubes and, access them independently. All that I could do was
glutWireCube(1) where, I knew the argument is length of the cube. But, what is the unit? Is it 1cm?
I used 2 for loops to construct the cube grid as follows:
for(i=0; i<n; i++)
for(j=0; j<n; j++)
But this gives me only 1 cube for any value of n- the size of the grid.
Please help me solve this.
I also have to insert a randomly generated number in each of these cubes, and so, i used,
But, I get nothing but a blank screen for this.
Thanks a lot, in advance.