mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 19:55:07 +02:00
Fix initial state of view correction, plus overkill
This commit is contained in:
parent
cbe1f6dbf5
commit
0396694715
3 changed files with 13 additions and 1 deletions
|
@ -105,6 +105,12 @@ public:
|
|||
|
||||
|
||||
virtual void run() override {
|
||||
// FIXME determine the best priority balance between this and the main thread...
|
||||
// It may be dependent on the display plugin being used, since VR plugins should
|
||||
// have higher priority on rendering (although we could say that the Oculus plugin
|
||||
// doesn't need that since it has async timewarp).
|
||||
// A higher priority here
|
||||
setPriority(QThread::HighPriority);
|
||||
OpenGLDisplayPlugin* currentPlugin{ nullptr };
|
||||
Q_ASSERT(_context);
|
||||
while (!_shutdown) {
|
||||
|
@ -302,6 +308,8 @@ void OpenGLDisplayPlugin::customizeContext() {
|
|||
Q_ASSERT(thread() == presentThread->thread());
|
||||
enableVsync();
|
||||
|
||||
getGLBackend()->setCameraCorrection(mat4());
|
||||
|
||||
for (auto& cursorValue : _cursorsData) {
|
||||
auto& cursorData = cursorValue.second;
|
||||
if (!cursorData.texture) {
|
||||
|
|
|
@ -118,7 +118,6 @@ void HmdDisplayPlugin::customizeContext() {
|
|||
|
||||
void HmdDisplayPlugin::uncustomizeContext() {
|
||||
_overlayRenderer = OverlayRenderer();
|
||||
getGLBackend()->setCameraCorrection(mat4());
|
||||
Parent::uncustomizeContext();
|
||||
}
|
||||
|
||||
|
|
|
@ -338,6 +338,11 @@ protected:
|
|||
|
||||
GLState* _state { nullptr };
|
||||
bool _invalidState { false };
|
||||
|
||||
PipelineStageState() {
|
||||
_cameraCorrectionBuffer.edit<CameraCorrection>() = CameraCorrection();
|
||||
_cameraCorrectionBuffer._buffer->flush();
|
||||
}
|
||||
} _pipeline;
|
||||
|
||||
// Synchronize the state cache of this Backend with the actual real state of the GL Context
|
||||
|
|
Loading…
Reference in a new issue