mirror of
https://github.com/lubosz/overte.git
synced 2025-08-11 08:52:09 +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;
|
gpu::Batch batch;
|
||||||
model::Skybox::render(batch, _viewFrustum, *skybox);
|
model::Skybox::render(batch, _viewFrustum, *skybox);
|
||||||
|
|
||||||
gpu::GLBackend::renderBatch(batch);
|
gpu::GLBackend::renderBatch(batch, true);
|
||||||
glUseProgram(0);
|
glUseProgram(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -510,7 +510,7 @@ void EntityTreeRenderer::render(RenderArgs::RenderMode renderMode,
|
||||||
_tree->unlock();
|
_tree->unlock();
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
gpu::GLBackend::renderBatch(batch);
|
gpu::GLBackend::renderBatch(batch, true);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
// stats...
|
// stats...
|
||||||
|
|
|
@ -37,7 +37,7 @@ public:
|
||||||
// If you know you don't rely on any state changed by naked gl calls then
|
// If you know you don't rely on any state changed by naked gl calls then
|
||||||
// leave to false where it belongs
|
// leave to false where it belongs
|
||||||
// if true, the needed resync IS EXPENSIVE
|
// 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);
|
static bool checkGLError(const char* name = nullptr);
|
||||||
|
|
||||||
|
@ -318,7 +318,6 @@ protected:
|
||||||
|
|
||||||
GLState* _state;
|
GLState* _state;
|
||||||
bool _invalidState = false;
|
bool _invalidState = false;
|
||||||
// bool _needStateSync = true;
|
|
||||||
|
|
||||||
PipelineStageState() :
|
PipelineStageState() :
|
||||||
_pipeline(),
|
_pipeline(),
|
||||||
|
@ -327,8 +326,7 @@ protected:
|
||||||
_stateCache(State::DEFAULT),
|
_stateCache(State::DEFAULT),
|
||||||
_stateSignatureCache(0),
|
_stateSignatureCache(0),
|
||||||
_state(nullptr),
|
_state(nullptr),
|
||||||
_invalidState(false)//,
|
_invalidState(false)
|
||||||
// _needStateSync(true)
|
|
||||||
{}
|
{}
|
||||||
} _pipeline;
|
} _pipeline;
|
||||||
|
|
||||||
|
|
|
@ -63,11 +63,6 @@ void GLBackend::do_setPipeline(Batch& batch, uint32 paramOffset) {
|
||||||
if (_pipeline._pipeline == pipeline) {
|
if (_pipeline._pipeline == pipeline) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (_pipeline._needStateSync) {
|
|
||||||
syncPipelineStateCache();
|
|
||||||
_pipeline._needStateSync = false;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// null pipeline == reset
|
// null pipeline == reset
|
||||||
if (!pipeline) {
|
if (!pipeline) {
|
||||||
|
@ -108,17 +103,7 @@ void GLBackend::do_setPipeline(Batch& batch, uint32 paramOffset) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEBUG_GLSTATE
|
|
||||||
void GLBackend::updatePipeline() {
|
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) {
|
if (_pipeline._invalidProgram) {
|
||||||
// doing it here is aproblem for calls to glUniform.... so will do it on assing...
|
// doing it here is aproblem for calls to glUniform.... so will do it on assing...
|
||||||
glUseProgram(_pipeline._program);
|
glUseProgram(_pipeline._program);
|
||||||
|
|
Loading…
Reference in a new issue