Ticket #556: minimap_clip_fix.patch
File minimap_clip_fix.patch, 1.0 KB (added by , 14 years ago) |
---|
-
source/gui/MiniMap.cpp
183 183 // Enable Scissoring as to restrict the rectangle 184 184 // to only the mini-map below by retrieving the mini-maps 185 185 // screen coords. 186 glScissor((int)m_CachedActualSize.left, 0, (int)m_CachedActualSize.right, (int)m_CachedActualSize.GetHeight()); 186 const float x = m_CachedActualSize.left, y = m_CachedActualSize.bottom; 187 glScissor((int)x, g_Renderer.GetHeight()-(int)y, (int)m_CachedActualSize.GetWidth(), (int)m_CachedActualSize.GetHeight()); 187 188 glEnable(GL_SCISSOR_TEST); 188 189 glEnable(GL_LINE_SMOOTH); 189 190 glLineWidth(2.0f); 190 191 glColor3f(1.0f, 0.3f, 0.3f); 191 192 192 193 // Draw the viewing rectangle with the ScEd's conversion algorithm 193 const float x = m_CachedActualSize.left, y = m_CachedActualSize.bottom;194 194 glBegin(GL_LINE_LOOP); 195 195 glVertex2f(x+ViewRect[0][0], y-ViewRect[0][1]); 196 196 glVertex2f(x+ViewRect[1][0], y-ViewRect[1][1]);