Fixed frame scissor test
This commit is contained in:
@@ -132,7 +132,11 @@ public:
|
|||||||
Rectangle AbsoluteRectangle()
|
Rectangle AbsoluteRectangle()
|
||||||
{
|
{
|
||||||
int left = Left();
|
int left = Left();
|
||||||
|
if (m_Parent)
|
||||||
|
left = std::max(left, m_Parent->Left());
|
||||||
int top = Top();
|
int top = Top();
|
||||||
|
if (m_Parent)
|
||||||
|
top = std::max(top, m_Parent->Top());
|
||||||
int width = Right() - left;
|
int width = Right() - left;
|
||||||
int height = Bottom() - top;
|
int height = Bottom() - top;
|
||||||
return Rectangle(left, top, width, height);
|
return Rectangle(left, top, width, height);
|
||||||
|
|||||||
@@ -276,6 +276,7 @@ void Renderer::DrawFrame(RenderQueuePair &rq)
|
|||||||
//glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
//glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
//glClearColor(0.0f, 0.5f, 0.0f, 1.0f);
|
//glClearColor(0.0f, 0.5f, 0.0f, 1.0f);
|
||||||
|
|
||||||
|
glEnable(GL_SCISSOR_TEST);
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_DEPTH_TEST);
|
||||||
glEnable(GL_CULL_FACE);
|
glEnable(GL_CULL_FACE);
|
||||||
glCullFace(GL_BACK);
|
glCullFace(GL_BACK);
|
||||||
|
|||||||
Reference in New Issue
Block a user