Don't sync by default

This commit is contained in:
Atlante45 2015-05-22 20:28:32 +02:00
parent e5aa696dda
commit 20ff43e29a
4 changed files with 4 additions and 21 deletions

View file

@ -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);
}
}

View file

@ -510,7 +510,7 @@ void EntityTreeRenderer::render(RenderArgs::RenderMode renderMode,
_tree->unlock();
glPushMatrix();
gpu::GLBackend::renderBatch(batch);
gpu::GLBackend::renderBatch(batch, true);
glPopMatrix();
// stats...

View file

@ -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;

View file

@ -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);