1

I have an OpenGL program which works when I call this:

gluLookAt(0.1,0.1,0.1, 0,0,0, 0,0.1,0);

... but not when I call this:

gluLookAt(0.01,0.01,0.01, 0,0,0, 0,0.01,0);

(In the latter case, a blank screen occurs.)

Does gluLookAt have a minimum/maximum floating point argument size?

Drawing is done about the origin, within a radius of ~10-6.

FreelanceConsultant
  • 13,167
  • 27
  • 115
  • 225

2 Answers2

0

Check your value of gluPerspective's minimum draw distance:

gluPerspective(45.0, (double)window.GetWidth() / (double)window.GetHeight(), 0.1d, 2000.0d);

This will not work because everything is in-front of 0.1.

FreelanceConsultant
  • 13,167
  • 27
  • 115
  • 225
0

gluLookAt should work fine with your arguments. However, you are changing the camera position (as @sftrabbit says). Your new position might be too close to the object to see it.

You should check what is the near-plane distance in your perspective matrix setup (possibly your gluPerspective() call?).

Liosan
  • 7,520
  • 2
  • 17
  • 16