c++ - OpenGL fixed spot map glitch -
i developed game using opengl , c++, works fine glitch need fix: when move camera around (using mouse) map not remain in fixed spot. square (gl_quad) draw in front of me. this example of glitch: video this drawing code of square if needed texture = scene->gettexture("map_papyrus.png"); glblendfunc(gl_src_alpha, gl_one_minus_src_alpha); glenable(gl_blend); gluseprogram(this->shader->getres()); glactivetexture(gl_texture0); glint texture_location = glgetuniformlocation(this->shader- >getfragment(), "color_texture"); gluniform1i(texture_location, texture_location); glbindtexture(gl_texture_2d, this->texture->getres()); glbegin(gl_quads); float size = .5f; float offsetx = 0.0f; float offsety = 0.0f; if (set->easymode) { size = .2f; offsetx = 0.8f; offsety = 0.35f; } gltexcoord2f(0,0); glvertex2f(-size + offsetx, -size + offsety); gltexcoord2f(1, 0); glvertex2f(size + offsetx, -size +offsety);...