How to Orthographic UI int view[4]; double model[16], proj[16]; glGetDoublev(GL_MODELVIEW_MATRIX, model); glGetDoublev(GL_PROJECTION_MATRIX, proj); glGetIntegerv(GL_VIEWPORT, view); double sx, sy, sz; // screen-space coordinates gluProject(pos.x, pos.y, pos.z, model, proj, view, &sx, &sy, &sz); // 2D drawing code using sx & sy // If sz > 1, the object is behind you!