what is the reason of texture mapping flickering

I build a wall with triangles then assign the brick texture on it, but when I move in the scene, the brick texture on the wall keep on flickering, I know this is a kind of alias, but how to deal with it?

use mipmapping.
checkout anisotropic filtering.
read the opengl specs.

I woldn’t advise anyone to read the OpenGL specs unless you are interested in something specific, it would certainly be tricky to discern the solution to a problem like this.

Get a good book, the “Red Book” is probably a good starting place. Don’t read the specs unless you enjoy your eyes bleeding.

I already use mipmap, maybe I didn’t discribe the error clearly, the flickering is when you moving the eye far away the wall, the brick texture on the wall keep on dithering, sometimes the wall under the brick texture can be seen, I try everything I can imagine, but can’t find the reason

Sounds like a z buffer problem to me. Try changing the viewport z parameters and increase z buffer precision (if possible)

koljaw,
how to increase the Z buffer precision?

koljaw,you are right, I changed the z_near and z_far values to make their distance smaller, so it is almost fine. thank you very much.

Just to be on the safe side, if you still notice some flickering, chek wether you have double buffering on, drawing to the back buffer, and swapping them after every frame.
2 (I didn’t put 1 on the beginning ), how are you drawing your wall? if you are using double buffering, and the texture/color of the wall is showing, you might be drawing tho distinct poligons one on top of the other on the same x,y,z coordinates wich would create the problem due to the z-buffer precision (or unprecision). if you are simply texturing a shaded poly this should not happen, also it should not happen if you are using multitexturing and blending one texture over the other on the same poly.