GLUT: confused about gluLookAt

Hello,

I am trying to use gluLookAt with perspective projection to “view” a 2d array of square polygons of different colors that I have drawn. The problem is I can only see a few of these. I believe that I need to adjust the first 3 args to gluLookAt but am not sure if I need to adjust the others as well. I currently have:

gluLookAt(0, 0, 350, 0, 0, 0, 0, 1, 0);

in my display function.

I read thru:
http://www.opengl.org/developers/gaqs/techinical/viewing.htm

but am still confused about this.

Any suggestions are appreciated.

Thanks.

The problem also could be in your perspective setup post it also.

Originally posted by cg-hci_novice:
[b]Hello,

I am trying to use gluLookAt with perspective projection to “view” a 2d array of square polygons of different colors that I have drawn. The problem is I can only see a few of these. I believe that I need to adjust the first 3 args to gluLookAt but am not sure if I need to adjust the others as well. I currently have:

gluLookAt(0, 0, 350, 0, 0, 0, 0, 1, 0);

in my display function.

I read thru:
http://www.opengl.org/developers/gaqs/techinical/viewing.htm

but am still confused about this.

Any suggestions are appreciated.

Thanks.[/b]

Here it is:

gluPerspective(60, 1, 1, 10000);

Try making the 350(z) in the look at to a -350.
If that does not work, try increaseing the value.

Originally posted by cg-hci_novice:
[b]Here it is:

gluPerspective(60, 1, 1, 10000);[/b]

I tried what was suggested (altering z value in both directions). However, it still doesnt’t seem like the polygons are covering more than 30% of the screen. (I am expecting that they should cover the entire screen with many gaps). Maybe the problem is actually with how they have been drawn?

I would appreciate any other suggestions/references?

Thanks.

Have you also tried moveing your object out or scaling them down.

Originally posted by cg-hci_novice:
[b]I tried what was suggested (altering z value in both directions). However, it still doesnt’t seem like the polygons are covering more than 30% of the screen. (I am expecting that they should cover the entire screen with many gaps). Maybe the problem is actually with how they have been drawn?

I would appreciate any other suggestions/references?

Thanks.[/b]

Thanks for your help.

I understand the gluLookAt a little better now and it seems like the problems could be as related to my logical x and y coordinates as they are to the args passed to gluLookAt. So, I’m going to try to work on figuring out the logical x, y values I need to use for a while and then hopefully, it will be easier to set reasonable args for gluLookAt too.

Thanks again.

Hi,

I’ve resolved this problem so this topic maybe closed by the adminstrator.

Thank you.