problem viewing

I would like to make my display interactive by having the viewpoint shifted by mouse click (by using glutMouseFunc) but although everything is rendered correctly, some points which should show stuff dont , and u get a blank display.
At other points the drawing is partially visible.
I’d really appreciate some help!

could you be a bit more specific about your problem?
what do you mean with shifting your viewpoint? is that jumping from one point to another?
And you say everything renders correctly but sometimes you see nothing…

this could be a clipping problem if you say some things are partially visible, or you could be facing the wrong direction with your camera…

anyway, be clear about your problem

Originally posted by Delilah:
I would like to make my display interactive by having the viewpoint shifted by mouse click (by using glutMouseFunc) but although everything is rendered correctly, some points which should show stuff dont , and u get a blank display.
At other points the drawing is partially visible.
I’d really appreciate some help!

I’m basically taking the coordinates x,y (the position clicked by the mouse), and the using them in gluLookAt.I hope to achieve different viewpoints as clicked by the mouse. I’ve used gluLookAT in an idle function so that is getting updated. I dont think there should be clipping problems as the coordinate system is essentially a cube of dimension 250, while the entire display is in a cube of dimension 50. I have noticed that sometimes the view is actually changed by this technique but othertimes i just get a blank screen or partial rendering

thanks for ur interest!

It seems a little bit strange to me that you want to use 2d-screen coordinates directly in the gluLookAt()-function.

your mouseclick returns values between 0 and your windowsize so it can be only positive values and they are limited to the size of your screen, no matter where you look at.
And what do you do with your Z-coordinate?
What do you take as eye and as center?

Do you want to look at the place where you click? then you have to unproject your mousecoordinates with gluUnProject() to 3Dimensional coordinates and use those in the gluLookAt() function…

And yeah, to rerender your scene and make sure everything you did gets displayed, use glutPostRedisplay() after your changes.

dunnow if i helped