diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index c0eb1a16f1..569c6c3564 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3291,7 +3291,7 @@ void Application::displaySide(Camera& theCamera, bool selfAvatarOnly, RenderArgs gpu::Batch batch; model::Skybox::render(batch, _viewFrustum, *skybox); - gpu::GLBackend::renderBatch(batch); + gpu::GLBackend::renderBatch(batch, true); glUseProgram(0); } } diff --git a/libraries/entities-renderer/src/EntityTreeRenderer.cpp b/libraries/entities-renderer/src/EntityTreeRenderer.cpp index 23160be045..86baacc8a8 100644 --- a/libraries/entities-renderer/src/EntityTreeRenderer.cpp +++ b/libraries/entities-renderer/src/EntityTreeRenderer.cpp @@ -510,7 +510,7 @@ void EntityTreeRenderer::render(RenderArgs::RenderMode renderMode, _tree->unlock(); glPushMatrix(); - gpu::GLBackend::renderBatch(batch); + gpu::GLBackend::renderBatch(batch, true); glPopMatrix(); // stats... diff --git a/libraries/gpu/src/gpu/GLBackend.h b/libraries/gpu/src/gpu/GLBackend.h index d898c9b6c6..006cf70bf9 100644 --- a/libraries/gpu/src/gpu/GLBackend.h +++ b/libraries/gpu/src/gpu/GLBackend.h @@ -37,7 +37,7 @@ public: // If you know you don't rely on any state changed by naked gl calls then // leave to false where it belongs // if true, the needed resync IS EXPENSIVE - static void renderBatch(Batch& batch, bool syncCache = true); + static void renderBatch(Batch& batch, bool syncCache = false); static bool checkGLError(const char* name = nullptr); @@ -318,7 +318,6 @@ protected: GLState* _state; bool _invalidState = false; - // bool _needStateSync = true; PipelineStageState() : _pipeline(), @@ -327,8 +326,7 @@ protected: _stateCache(State::DEFAULT), _stateSignatureCache(0), _state(nullptr), - _invalidState(false)//, - // _needStateSync(true) + _invalidState(false) {} } _pipeline; diff --git a/libraries/gpu/src/gpu/GLBackendPipeline.cpp b/libraries/gpu/src/gpu/GLBackendPipeline.cpp index f124770cfb..ec9be957ae 100755 --- a/libraries/gpu/src/gpu/GLBackendPipeline.cpp +++ b/libraries/gpu/src/gpu/GLBackendPipeline.cpp @@ -63,11 +63,6 @@ void GLBackend::do_setPipeline(Batch& batch, uint32 paramOffset) { if (_pipeline._pipeline == pipeline) { return; } - - /* if (_pipeline._needStateSync) { - syncPipelineStateCache(); - _pipeline._needStateSync = false; - }*/ // null pipeline == reset if (!pipeline) { @@ -108,17 +103,7 @@ void GLBackend::do_setPipeline(Batch& batch, uint32 paramOffset) { } } -#define DEBUG_GLSTATE void GLBackend::updatePipeline() { -#ifdef DEBUG_GLSTATE - /* if (_pipeline._needStateSync) { - State::Data state; - getCurrentGLState(state); - State::Signature signature = State::evalSignature(state); - (void) signature; // quiet compiler - }*/ -#endif - if (_pipeline._invalidProgram) { // doing it here is aproblem for calls to glUniform.... so will do it on assing... glUseProgram(_pipeline._program);