From 36df5b3de2d46c286d8be21626926e4fbd5bed7f Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Thu, 28 Jun 2007 22:18:19 +0000 Subject: [PATCH] Made lines in typesetting controls antialiased. Originally committed to SVN as r1311. --- aegisub/gl_wrap.cpp | 9 +++------ aegisub/video_display_visual.cpp | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/aegisub/gl_wrap.cpp b/aegisub/gl_wrap.cpp index 1b180477c..9ffe75bb0 100644 --- a/aegisub/gl_wrap.cpp +++ b/aegisub/gl_wrap.cpp @@ -250,13 +250,10 @@ void OpenGLWrapper::SetFillColour(wxColour col,float alpha) { // Line void OpenGLWrapper::SetModeLine() { glColor4f(r1,g1,b1,a1); - if (a1 == 1.0f) glDisable(GL_BLEND); - else { - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); - } + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glLineWidth(lw); - //glEnable(GL_LINE_SMOOTH); + glEnable(GL_LINE_SMOOTH); } diff --git a/aegisub/video_display_visual.cpp b/aegisub/video_display_visual.cpp index ab02cb374..656b5900f 100644 --- a/aegisub/video_display_visual.cpp +++ b/aegisub/video_display_visual.cpp @@ -468,6 +468,7 @@ void VideoDisplayVisual::DrawOverlay() { // Current position info if (mode == 0 && x >= 0 && x < w && y >= 0 && y < h) { // Draw cross + glDisable(GL_LINE_SMOOTH); glEnable(GL_COLOR_LOGIC_OP); glLogicOp(GL_INVERT); glBegin(GL_LINES);