mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 11:33:44 +02:00
Don't sync by default
This commit is contained in:
parent
e5aa696dda
commit
20ff43e29a
4 changed files with 4 additions and 21 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -510,7 +510,7 @@ void EntityTreeRenderer::render(RenderArgs::RenderMode renderMode,
|
|||
_tree->unlock();
|
||||
|
||||
glPushMatrix();
|
||||
gpu::GLBackend::renderBatch(batch);
|
||||
gpu::GLBackend::renderBatch(batch, true);
|
||||
glPopMatrix();
|
||||
|
||||
// stats...
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue