History

Use the FBO dimensions, which may differ from the widget dimensions (as with the Oculus).

Andrzej Kapolka committed 12 years ago

Commit 34ccc2a1 parent b3283042 files · +7 −8Browse files

Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 2 files). Show all

Unified · Split

interface/src/MetavoxelSystem.cpp+2−3
@@ -186,9 +186,8 @@ void MetavoxelSystem::render() { · 185 unmodified lines
186186 glGetIntegerv(GL_VIEWPORT, viewport);
187187 const int VIEWPORT_X_INDEX = 0;
188188 const int VIEWPORT_WIDTH_INDEX = 2;
189− QSize widgetSize = Application::getInstance()->getGLWidget()->getDeviceSize();
190− float sMin = viewport[VIEWPORT_X_INDEX] / (float)widgetSize.width();
191− float sWidth = viewport[VIEWPORT_WIDTH_INDEX] / (float)widgetSize.width();
189+ float sMin = viewport[VIEWPORT_X_INDEX] / (float)primaryFBO->width();
190+ float sWidth = viewport[VIEWPORT_WIDTH_INDEX] / (float)primaryFBO->width();
192191
193192 if (Menu::getInstance()->getShadowsEnabled()) {
194193 glActiveTexture(GL_TEXTURE2);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t