Hi Deron,
To tell the truth, there is still something I cannot fully understand. Can you please try changing the following two funcs in you rtcDemo?
In practice we are loading a land in DXF format (frequently located very far from the world origin) and need to zoom close to some building details. Here is where the jitter start showing. The problem is that like we do in the code below, we have most of the land curves compiled in display lists with their big/large coordinates.
Can you please try to solve the Jitter issue using the model in the init() func below using your rtcDemo sample?
What is the best approach to get rid of jitter here?
Thanks,
Alberto
void init()
{
//
// State
//
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glDisable(GL_DEPTH_TEST);
//
// Box
//
gBox = glGenLists(1);
glNewList(gBox, GL_COMPILE);
glColor3f(1.0f, 1.0f, 1.0f);
// ADDED THESE LINES
glBegin(GL_TRIANGLES);
glVertex3d(gBoxCenter.x,gBoxCenter.x,gBoxCenter.x);
glVertex3d(gBoxCenter.x+2,gBoxCenter.y,gBoxCenter.z);
glVertex3d(gBoxCenter.x+2,gBoxCenter.y+2,gBoxCenter.z);
glEnd();
// COMMENTED THIS LINE
// glutWireCube(1.0);
glEndList();
//
// Set the eye position
//
setEye();
//
// Help
//
printf("press 'r' to toggle between OpenGL and RTC modelview matrix computation modes.
");
}
and:
if (!gUseRTC)
{
//
// OpenGL method
//
// This uses OpenGL to do the matrix math. While we are sending in
// double values, OpenGL is doing all the math in float precision.
// Because of that, we will get precision errors as float are only
// good for about 7 decimal digits of precision.
//
glLoadIdentity();
gluLookAt(gEye.x, gEye.y, gEye.z, gBoxCenter.x, gBoxCenter.y, gBoxCenter.z, gUp.x, gUp.y, gUp.z);
// COMMENTED THIS LINE
// glTranslated(gBoxCenter.x, gBoxCenter.y, gBoxCenter.z);
}