mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 11:37:58 +02:00
Fixed compilation error with GLES backend on Android
This commit is contained in:
parent
37fdf81f1b
commit
65f3408458
2 changed files with 7 additions and 3 deletions
|
@ -749,9 +749,13 @@ void GLBackend::recycle() const {
|
||||||
Texture::KtxStorage::releaseOpenKtxFiles();
|
Texture::KtxStorage::releaseOpenKtxFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::setCameraCorrection(const Mat4& correction) {
|
void GLBackend::setCameraCorrection(const Mat4& correction, const Mat4& prevRenderView) {
|
||||||
|
auto invCorrection = glm::inverse(correction);
|
||||||
|
auto invPrevView = glm::inverse(prevRenderView);
|
||||||
|
_transform._correction.prevView = (reset ? Mat4() : prevRenderView);
|
||||||
|
_transform._correction.prevViewInverse = (reset ? Mat4() : invPrevView);
|
||||||
_transform._correction.correction = correction;
|
_transform._correction.correction = correction;
|
||||||
_transform._correction.correctionInverse = glm::inverse(correction);
|
_transform._correction.correctionInverse = invCorrection;
|
||||||
_pipeline._cameraCorrectionBuffer._buffer->setSubData(0, _transform._correction);
|
_pipeline._cameraCorrectionBuffer._buffer->setSubData(0, _transform._correction);
|
||||||
_pipeline._cameraCorrectionBuffer._buffer->flush();
|
_pipeline._cameraCorrectionBuffer._buffer->flush();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ public:
|
||||||
|
|
||||||
virtual ~GLBackend();
|
virtual ~GLBackend();
|
||||||
|
|
||||||
void setCameraCorrection(const Mat4& correction);
|
void setCameraCorrection(const Mat4& correction, const Mat4& prevRenderView, bool reset = false);
|
||||||
void render(const Batch& batch) final override;
|
void render(const Batch& batch) final override;
|
||||||
|
|
||||||
// This call synchronize the Full Backend cache with the current GLState
|
// This call synchronize the Full Backend cache with the current GLState
|
||||||
|
|
Loading…
Reference in a new issue