1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-07-03 14:34:34 +00:00

Add RenderState to be passed through the scene graph

This will eventually handle all mutable state during rendering
This commit is contained in:
fgenesis 2022-05-20 01:04:19 +02:00
parent b6c5d90d3a
commit 68b3c61852
57 changed files with 201 additions and 150 deletions

View file

@ -1761,6 +1761,8 @@ void Core::render(int startLayer, int endLayer, bool useFrameBufferIfAvail)
processedRenderObjectCount = 0;
totalRenderObjectCount = 0;
CombinedRenderAndGPUState rgstate;
glBindTexture(GL_TEXTURE_2D, 0);
glLoadIdentity(); // Reset The View
@ -1818,13 +1820,13 @@ void Core::render(int startLayer, int endLayer, bool useFrameBufferIfAvail)
{
if (r->startPass == r->endPass)
{
r->renderPass(RenderObject::RENDER_ALL);
r->renderPass(rgstate, RenderObject::RENDER_ALL);
}
else
{
for (int pass = r->startPass; pass <= r->endPass; pass++)
{
r->renderPass(pass);
r->renderPass(rgstate, pass);
}
}
}