mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 09:15:50 +02:00
start/stopNamedCall run in renderPassTransfer too
This commit is contained in:
parent
bd8f62504d
commit
6463136240
2 changed files with 18 additions and 12 deletions
|
@ -173,6 +173,8 @@ void GLBackend::renderPassTransfer(Batch& batch) {
|
|||
captureDrawCallInfo();
|
||||
break;
|
||||
|
||||
case Batch::COMMAND_startNamedCall:
|
||||
case Batch::COMMAND_stopNamedCall:
|
||||
case Batch::COMMAND_setModelTransform:
|
||||
case Batch::COMMAND_setViewportTransform:
|
||||
case Batch::COMMAND_setViewTransform:
|
||||
|
@ -258,6 +260,20 @@ void GLBackend::render(Batch& batch) {
|
|||
_stereo._enable = savedStereo;
|
||||
}
|
||||
|
||||
|
||||
GLBackend::DrawCallInfoBuffer& GLBackend::getDrawCallInfoBuffer() {
|
||||
if (_currentNamedCall.empty()) {
|
||||
return _drawCallInfos;
|
||||
} else {
|
||||
return _namedDrawCallInfos[_currentNamedCall];
|
||||
}
|
||||
}
|
||||
|
||||
void GLBackend::captureDrawCallInfo() {
|
||||
auto& drawCallInfos = getDrawCallInfoBuffer();
|
||||
drawCallInfos.push_back(_transform._objects.size() - 1);
|
||||
}
|
||||
|
||||
bool GLBackend::checkGLError(const char* name) {
|
||||
GLenum error = glGetError();
|
||||
if (!error) {
|
||||
|
|
|
@ -265,18 +265,8 @@ protected:
|
|||
|
||||
std::string _currentNamedCall;
|
||||
|
||||
DrawCallInfoBuffer& getDrawCallInfoBuffer() {
|
||||
if (_currentNamedCall.empty()) {
|
||||
return _drawCallInfos;
|
||||
} else {
|
||||
return _namedDrawCallInfos[_currentNamedCall];
|
||||
}
|
||||
}
|
||||
|
||||
void captureDrawCallInfo() {
|
||||
auto& drawCallInfos = getDrawCallInfoBuffer();
|
||||
drawCallInfos.push_back(_transform._objects.size() - 1);
|
||||
}
|
||||
DrawCallInfoBuffer& getDrawCallInfoBuffer();
|
||||
void captureDrawCallInfo();
|
||||
|
||||
Stats _stats;
|
||||
|
||||
|
|
Loading…
Reference in a new issue