Extracted from counter-fighting, you can use the polygon offset method to solve this problem. The method is as follows: drawsomething (); // draw another thing in the same position: gl_polygon_offset_fill ); // This is the one we need... glpolygonoffset (g_offsetfactor, g_offsetunit); drawotherthing (); glpolygonoffset (0.0f, 0.0f: when gl_polygon_offset is enabled, each fragment's depthvalue will be offset after it is interpolated from the depthvalues of the appropriate vertices. the value of the offsetis factor * DZ + R * units, where DZ is a measurement ofthe change in depth relative to the screen area of thepolygon, and r is the smallest value that is guaranteed toproduce a resolvable offset for a given implementation. theoffset is added before the depth test is already med andbefore the value is written into the depth buffer. glpolygonoffset is useful for rendering hidden-line images, for applying decals to surfaces, and for rendering solidswith highlighted edges. this function may be used later. It is used to draw shadows in tutorial04, but the shadows are still ugly.