Force RTT usage even in basic mode.
This commit is contained in:
parent
a055d42829
commit
ef91bf9549
@ -695,7 +695,7 @@ public:
|
||||
void onLoadWorld();
|
||||
void onUnloadWorld();
|
||||
|
||||
void renderScene(scene::ICameraSceneNode * const camnode, std::vector<GlowData>& glows, float dt, bool hasShadows);
|
||||
void renderScene(scene::ICameraSceneNode * const camnode, std::vector<GlowData>& glows, float dt, bool hasShadows, bool forceRTT);
|
||||
void computeCameraMatrix(scene::ICameraSceneNode * const camnode, size_t width, size_t height);
|
||||
|
||||
// --------------------- RTT --------------------
|
||||
|
@ -144,7 +144,7 @@ void IrrDriver::renderGLSL(float dt)
|
||||
const core::recti &viewport = camera->getViewport();
|
||||
|
||||
computeCameraMatrix(camnode, viewport.LowerRightCorner.X - viewport.UpperLeftCorner.X, viewport.LowerRightCorner.Y - viewport.UpperLeftCorner.Y);
|
||||
renderScene(camnode, glows, dt, track->hasShadows());
|
||||
renderScene(camnode, glows, dt, track->hasShadows(), false);
|
||||
|
||||
// Debug physic
|
||||
// Note that drawAll must be called before rendering
|
||||
@ -260,7 +260,7 @@ void IrrDriver::renderGLSL(float dt)
|
||||
getPostProcessing()->update(dt);
|
||||
}
|
||||
|
||||
void IrrDriver::renderScene(scene::ICameraSceneNode * const camnode, std::vector<GlowData>& glows, float dt, bool hasShadow)
|
||||
void IrrDriver::renderScene(scene::ICameraSceneNode * const camnode, std::vector<GlowData>& glows, float dt, bool hasShadow, bool forceRTT)
|
||||
{
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 0, SharedObject::ViewProjectionMatrixesUBO);
|
||||
|
||||
@ -301,7 +301,7 @@ void IrrDriver::renderScene(scene::ICameraSceneNode * const camnode, std::vector
|
||||
}
|
||||
|
||||
PROFILER_PUSH_CPU_MARKER("- Solid Pass 2", 0x00, 0x00, 0xFF);
|
||||
if (!UserConfigParams::m_dynamic_lights)
|
||||
if (!UserConfigParams::m_dynamic_lights && ! forceRTT)
|
||||
{
|
||||
glEnable(GL_FRAMEBUFFER_SRGB);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
@ -374,7 +374,7 @@ void IrrDriver::renderScene(scene::ICameraSceneNode * const camnode, std::vector
|
||||
renderParticles();
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
}
|
||||
if (!UserConfigParams::m_dynamic_lights)
|
||||
if (!UserConfigParams::m_dynamic_lights && !forceRTT)
|
||||
return;
|
||||
|
||||
// Render displacement
|
||||
|
@ -179,7 +179,7 @@ void ModelViewWidget::update(float delta)
|
||||
|
||||
std::vector<IrrDriver::GlowData> glows;
|
||||
irr_driver->computeCameraMatrix(m_camera, 512, 512);
|
||||
irr_driver->renderScene(m_camera, glows, GUIEngine::getLatestDt(), false);
|
||||
irr_driver->renderScene(m_camera, glows, GUIEngine::getLatestDt(), false, true);
|
||||
m_frame_buffer = irr_driver->getPostProcessing()->render(m_camera);
|
||||
glViewport(0, 0, UserConfigParams::m_width, UserConfigParams::m_height);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user