mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 14:53:01 +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();
|
captureDrawCallInfo();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Batch::COMMAND_startNamedCall:
|
||||||
|
case Batch::COMMAND_stopNamedCall:
|
||||||
case Batch::COMMAND_setModelTransform:
|
case Batch::COMMAND_setModelTransform:
|
||||||
case Batch::COMMAND_setViewportTransform:
|
case Batch::COMMAND_setViewportTransform:
|
||||||
case Batch::COMMAND_setViewTransform:
|
case Batch::COMMAND_setViewTransform:
|
||||||
|
@ -258,6 +260,20 @@ void GLBackend::render(Batch& batch) {
|
||||||
_stereo._enable = savedStereo;
|
_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) {
|
bool GLBackend::checkGLError(const char* name) {
|
||||||
GLenum error = glGetError();
|
GLenum error = glGetError();
|
||||||
if (!error) {
|
if (!error) {
|
||||||
|
|
|
@ -265,18 +265,8 @@ protected:
|
||||||
|
|
||||||
std::string _currentNamedCall;
|
std::string _currentNamedCall;
|
||||||
|
|
||||||
DrawCallInfoBuffer& getDrawCallInfoBuffer() {
|
DrawCallInfoBuffer& getDrawCallInfoBuffer();
|
||||||
if (_currentNamedCall.empty()) {
|
void captureDrawCallInfo();
|
||||||
return _drawCallInfos;
|
|
||||||
} else {
|
|
||||||
return _namedDrawCallInfos[_currentNamedCall];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void captureDrawCallInfo() {
|
|
||||||
auto& drawCallInfos = getDrawCallInfoBuffer();
|
|
||||||
drawCallInfos.push_back(_transform._objects.size() - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Stats _stats;
|
Stats _stats;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue