Fixed compilation error with GLES backend on Android

This commit is contained in:
Olivier Prat 2018-02-23 20:19:55 +01:00
parent 37fdf81f1b
commit 65f3408458
2 changed files with 7 additions and 3 deletions

View file

@ -749,9 +749,13 @@ void GLBackend::recycle() const {
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.correctionInverse = glm::inverse(correction);
_transform._correction.correctionInverse = invCorrection;
_pipeline._cameraCorrectionBuffer._buffer->setSubData(0, _transform._correction);
_pipeline._cameraCorrectionBuffer._buffer->flush();
}

View file

@ -65,7 +65,7 @@ public:
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;
// This call synchronize the Full Backend cache with the current GLState