Ticket #556: minimap_clip_fix.patch

File minimap_clip_fix.patch, 1.0 KB (added by Jayschwa, 21 months ago)

Fixes camera outline clipping on minimap

  • source/gui/MiniMap.cpp

     
    183183    // Enable Scissoring as to restrict the rectangle 
    184184    // to only the mini-map below by retrieving the mini-maps 
    185185    // 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()); 
    187188    glEnable(GL_SCISSOR_TEST); 
    188189    glEnable(GL_LINE_SMOOTH); 
    189190    glLineWidth(2.0f); 
    190191    glColor3f(1.0f, 0.3f, 0.3f); 
    191192 
    192193    // Draw the viewing rectangle with the ScEd's conversion algorithm 
    193     const float x = m_CachedActualSize.left, y = m_CachedActualSize.bottom; 
    194194    glBegin(GL_LINE_LOOP); 
    195195    glVertex2f(x+ViewRect[0][0], y-ViewRect[0][1]); 
    196196    glVertex2f(x+ViewRect[1][0], y-ViewRect[1][1]);