mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17:35 +00:00
LibGL: Implement glScissor()
This commit is contained in:
parent
6dd2ebfe8e
commit
bb58f6ccab
9 changed files with 83 additions and 10 deletions
|
@ -33,4 +33,12 @@ void DepthBuffer::clear(float depth)
|
|||
}
|
||||
}
|
||||
|
||||
void DepthBuffer::clear(Gfx::IntRect bounds, float depth)
|
||||
{
|
||||
bounds.intersect({ 0, 0, m_size.width(), m_size.height() });
|
||||
for (int y = bounds.top(); y <= bounds.bottom(); ++y)
|
||||
for (int x = bounds.left(); x <= bounds.right(); ++x)
|
||||
m_data[y * m_size.width() + x] = depth;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue