LWJGL Forum

Programming => OpenGL => Topic started by: QuestingCordiial on December 09, 2008, 02:31:00

Title: gluLookAt Behaves Erratically With Large Numbers
Post by: QuestingCordiial on December 09, 2008, 02:31:00
Hello everyone,

When you put very large numbers into gluLookAt as the arguments for eye position and center position ( numbers like 10,000,000 ) , it causes everything to jump around and flicker.

It is only noticeable if the eye position or the center position is moving.

Does anyone know what causes this and how to fix it?

Thanks in advance. : )
Title: Re: gluLookAt Behaves Erratically With Large Numbers
Post by: tomb on December 09, 2008, 19:46:21
Grab the code and do the calculations using doubles instead of floats.

...or rewrite you code to use smaller numbers.
Title: Re: gluLookAt Behaves Erratically With Large Numbers
Post by: QuestingCordiial on December 10, 2008, 23:36:09
Thanks for the suggestions. : )