1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Always use clip ratio 1 for rects and screen-space triangles.

This commit is contained in:
Sergey Lipskiy 2020-04-05 12:01:08 +07:00
parent 2ebfabaf8e
commit a73da69e10

View File

@ -794,6 +794,8 @@ void GraphicsDrawer::drawScreenSpaceTriangle(u32 _numVtx, graphics::DrawModePara
if (_numVtx == 0 || !_canDraw())
return;
ValueKeeper<u32> otherMode(gSP.clipRatio, 1U);
f32 maxY = 0;
for (u32 i = 0; i < _numVtx; ++i) {
SPVertex & vtx = m_dmaVertices[i];
@ -960,6 +962,7 @@ void GraphicsDrawer::drawLine(int _v0, int _v1, float _width)
void GraphicsDrawer::drawRect(int _ulx, int _uly, int _lrx, int _lry)
{
ValueKeeper<u32> otherMode(gSP.clipRatio, 1U);
m_texrectDrawer.draw();
if (!_canDraw())
@ -1163,6 +1166,7 @@ void GraphicsDrawer::drawTexturedRect(const TexturedRectParams & _params)
{
gSP.changed &= ~CHANGED_GEOMETRYMODE; // Don't update cull mode
m_drawingState = DrawingState::TexRect;
ValueKeeper<u32> otherMode(gSP.clipRatio, 1U);
if (m_texrectDrawer.canContinue()) {
CombinerInfo & cmbInfo = CombinerInfo::get();