]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/gtkutil/xorrectangle.cpp
Merge commit '461d008daa6328113ea4ccda37e5604d3df14ba3' into garux-merge
[xonotic/netradiant.git] / libs / gtkutil / xorrectangle.cpp
index e7012328d104a9df2c68916465cfbed088f85496..13b9ba2bc8f826d1c508dbef7aa66af4d0c5e549 100644 (file)
@@ -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 );