   White flickering line between textured objects
  Hello,Im somewhat new to opengl and have been playing around with placing textured objects in a scene and moving the camera around in that scene.I have the problem that between my textured boxes, a thin white line of flicker is appearing. I have tried to change the near/far clip-plane in case it was z-buffer fighting, but that does not seem to be the case. I have also tried to overlap the objects slightly but with the same result.I create each box this way:glBegin(GL_QUADS);glNormal3f( 0.0f, 0.0f, 0.5f);glTexCoord2f(0.0f, 0.0f); glVertex3f(-size, -0.5f, 0.51f);glTexCoord2f(size, 0.0f); glVertex3f( size, -0.5f, 0.51f);glTexCoord2f(size, 0.5f); glVertex3f( size,  0.5f, 0.51f);glTexCoord2f(0.0f, 0.5f); glVertex3f(-size,  0.5f, 0.51f);...glEnd();and draw them this way:glPushMatrix();glTranslatef(...);glRotatef(...);glCallList(...);glPopMatrix();The perspective is set the following way:gluPerspective (45.0f, (GLfloat)(width)/(GLfloat)(height),0.2f, 20.0f);Any ideas would be greatly appreciated :)/cha   
  screenshot? try looking up GL_CLAMP and GL_CLAMP_TO_EDGE   ;  first a normal of 0,0,0.5 aint normalized!also >>(size, 0.0f);<<are u sure u want to use size for the texture coordinate usually on a cube u use 0.0-1.0(edit) another thing u can try (perhaps if ure using sofware rendering) is is setting the perspective_correct_hint to good but most likely this will have no effect as all modern cards do this automatically eg riva128 didnt but the tnt did (and how old is that mother)   ;  Hi again,Thanks for the help, but I will just clarify the problem a little more :)Regarding GL_CLAMP - the thing is that i want the textures to repeat on some of the cube sides. Basically i create a map with texture numbers like this:0|0|0|0|01|E|E|E|11|1|1|1|1where 0,1 represents textured boxes and E represents an empty fieldI read the map-file horizontally (for now) and create a box for each connected set of identical numbers (e.g. the top row of zeros). This means that there will be at least one object per row, and the texture on that object should GL_REPEAT if the object occupies more than 1 field.Here is a screenshot of the flicker:I have not yet tried to normalize the size numbers - since i want each object to have the size 1 on the z-axis, it seemed easy to just make it 0.5 long in each z-direction to maintain the object coordinates at the center. I will however try this when i get home today :)Best regards,Christian[Edited by - cha on July 12, 2004 7:37:21 AM];  Are you drawing faces between your cubes? If so, then the face separating the 2 cubes is probably being rendered before the front face of your adjacent cube. If that is happening then it is very likely that the white lines are a result of z-test rejection of the front face of your adjacent cube along the line where the 2 faces meet. This is a depth-buffer precision problem and there are 2 ways of dealing with it:1.) give your depth buffer more precision ie. increase your near clip plane distance or reduce your far clip plane distance. Or try give yourself a 24-bit depth buffer (if you're using 16 bit)This may not even solve the problem2.) Don't draw the faces of the cube that are hidden by their neighbours. This may seem like a lot of work but in the end you will have a better looking wall and be drawing less faces. Preprocess your walls if you can for performance.Hope that helpsFReY;  Hi again :)I tried normalizing the cube and texture coordinates, which seemed to make the problem smaller, but still existing.I will try to remove faces that are hidden tomorrow. Problem is that the user will be able to move many of the walls, which means that hidden faces will not neccesarily be hidden foever. But i quess I can show the faces whenever the user performs such an action...Many thanks the for help :)/Christian   ;  Let us know how it goes :)   ;  Just as a sidenote...Im using the CCamera class from the Camera and World Collision tutorial on http://www.gametutorials.com.Now, without the class, just sliding past a scene using gluLookAt, everything is smooth (except the white lines between cubes :) ).But using the camera class which allows me to navigate with the mouse and keyboard in fps manner, everything seems to be updating slowly - almost to the point where i can see the update. The fps is well above 300 so that shouldn't be the problem.I have the same problem when i run e.g. this tutorial: http://www.gametutorials.com/download/OpenGL/HeightMap2_OGL.zipand like before - if i comment out the ccamera and just slide through the scenario with gluLookAt then everything is absolutly smooth. I have tried searching for anyone else having problems with the class, but have failed to find any, so perhaps something is wrong with some of my system settings. Has anyone else experienced this behaviour? :)/Christian   ;  Hi again,The flickering is gone when i make sure that only potentionally visible cube faces are drawn :) Thx for the help...Anyone have any comments on the gametutorials camera class problem i mentioned above? :)/Christian   