2D matrix

M

Mike

Hi
how would i draw/access x/y?
------
void createMatrix(void) //random x/y points
{
for(i=0;i<25;i++)
{
int temp1 = rand()%25;
matrix[temp1][j]=temp1;

for(j=0;j<80;j++)
{
int temp2 = rand()%80;
matrix[temp2]=temp2;
}
}
}

draw those random points:
for?
draw x? y?
glTexCoord2f(1, 1.0f); glVertex2f(i+15+PanelLeft, i-15+PanelLeft); //
Bottom Right Of The Texture and Quad
glTexCoord2f(0, 1.0f); glVertex2f(i+PanelLeft, i-15+PanelLeft); //
Bottom Left Of The Texture and Quad
glTexCoord2f(0, 0.0f); glVertex2f(i+PanelLeft, i+PanelLeft); // Top
Left Of The Texture and Quad
glTexCoord2f(1, 0.0f); glVertex2f(i+15+PanelLeft, i+PanelLeft); // Top
Right Of The Texture and Quad

Thanks
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top