- GLfloat x_scale = cur_ortho.width()/((float)viewport_size.x);
- GLfloat y_scale = cur_ortho.height()/((float)viewport_size.y);
- GLfloat x_left = cur_ortho.left + (left*x_scale);
- GLfloat x_right = cur_ortho.left + (right * x_scale);
+ GLfloat x_left = viewportXtoWorldX(left);
+ GLfloat x_right = viewportXtoWorldX(right);cur_ortho.left;