diff --git a/basegraph.cpp b/basegraph.cpp index 7e6b50fe..6e066928 100644 --- a/basegraph.cpp +++ b/basegraph.cpp @@ -27,7 +27,7 @@ namespace stereo { ld lr_eyewidth, anaglyph_eyewidth; ld fov, tanfov; - GLfloat scrdist, scrdist_text; + GLfloat scrdist; } bool display_data::in_anaglyph() { return vid.stereo_mode == sAnaglyph; } @@ -252,7 +252,6 @@ void display_data::set_projection(int ed) { if(DIM == 3 && apply_models) { glhr::projection_multiply(glhr::ortho(cd->xsize/2, -cd->ysize/2, 1)); glhr::id_modelview(); - current_display->scrdist_text = 0; } else { glhr::projection_multiply(glhr::ortho(cd->xsize/2, -cd->ysize/2, abs(current_display->scrdist) + 30000)); @@ -280,7 +279,6 @@ void display_data::set_projection(int ed) { if(pers3) { glhr::projection_multiply(glhr::frustum(current_display->tanfov, current_display->tanfov * cd->ysize / cd->xsize)); glhr::projection_multiply(glhr::scale(1, -1, -1)); - current_display->scrdist_text = cd->ysize; } else if(DIM == 3) { glhr::glmatrix M = glhr::ortho(cd->xsize/current_display->radius/2, -cd->ysize/current_display->radius/2, 1); @@ -289,13 +287,11 @@ void display_data::set_projection(int ed) { M[2][2] = 2 / (clip_max - clip_min); M[3][2] = (clip_min + clip_max) / (clip_max - clip_min); glhr::projection_multiply(M); - current_display->scrdist_text = 0; } else { glhr::projection_multiply(glhr::frustum(cd->xsize / cd->ysize, 1)); GLfloat sc = current_display->radius / (cd->ysize/2.); glhr::projection_multiply(glhr::scale(sc, -sc, -1)); - current_display->scrdist_text = cd->ysize * sc / 2; } diff --git a/graph.cpp b/graph.cpp index 03c64162..242fc0da 100644 --- a/graph.cpp +++ b/graph.cpp @@ -6356,7 +6356,6 @@ void calcparam() { cd->scrdist = vid.xres / 2 / cd->tanfov; else cd->scrdist = cd->radius; - cd->scrdist_text = cd->scrdist; callhooks(hooks_calcparam); reset_projection(); diff --git a/polygons.cpp b/polygons.cpp index 9fba8e11..03ac01e2 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -191,7 +191,7 @@ void glflush() { glhr::color2(text_color); glhr::set_depthtest(false); for(int ed = (current_display->stereo_active() && text_shift)?-1:0; ed<2; ed+=2) { - glhr::set_modelview(glhr::translate(-ed*text_shift-current_display->xcenter,-current_display->ycenter, current_display->scrdist_text)); + glhr::set_modelview(glhr::translate(-ed*text_shift-current_display->xcenter,-current_display->ycenter, current_display->scrdist)); current_display->set_mask(ed); glhr::current_vertices = NULL;