X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fgtkutil%2Fxorrectangle.cpp;h=13b9ba2bc8f826d1c508dbef7aa66af4d0c5e549;hb=54a2bda443aace9c00a1615af10cc1dc8b1f0cd1;hp=e7012328d104a9df2c68916465cfbed088f85496;hpb=146d231d90b19e2a0edcabff1c4eb9ca44e053e7;p=xonotic%2Fnetradiant.git diff --git a/libs/gtkutil/xorrectangle.cpp b/libs/gtkutil/xorrectangle.cpp index e7012328..13b9ba2b 100644 --- a/libs/gtkutil/xorrectangle.cpp +++ b/libs/gtkutil/xorrectangle.cpp @@ -63,6 +63,10 @@ void XORRectangle::set(rectangle_t rectangle) glMatrixMode( GL_PROJECTION ); glLoadIdentity(); glOrtho( 0, width, 0, height, -100, 100 ); + + glMatrixMode( GL_MODELVIEW ); + glLoadIdentity(); + glPolygonMode( GL_FRONT_AND_BACK, GL_FILL ); glDisable( GL_DEPTH_TEST ); @@ -88,6 +92,7 @@ void XORRectangle::set(rectangle_t rectangle) glVertex2f( rectangle.x, rectangle.y ); glEnd(); + glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); glDrawBuffer( GL_BACK ); GlobalOpenGL_debugAssertNoErrors(); //glwidget_swap_buffers( m_widget );