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
186 glGetIntegerv(GL_VIEWPORT, viewport);186 glGetIntegerv(GL_VIEWPORT, viewport);
187 const int VIEWPORT_X_INDEX = 0;187 const int VIEWPORT_X_INDEX = 0;
188 const int VIEWPORT_WIDTH_INDEX = 2;188 const int VIEWPORT_WIDTH_INDEX = 2;
189 QSize widgetSize = Application::getInstance()->getGLWidget()->getDeviceSize();189 float sMin = viewport[VIEWPORT_X_INDEX] / (float)primaryFBO->width();
190 float sMin = viewport[VIEWPORT_X_INDEX] / (float)widgetSize.width();190 float sWidth = viewport[VIEWPORT_WIDTH_INDEX] / (float)primaryFBO->width();
191 float sWidth = viewport[VIEWPORT_WIDTH_INDEX] / (float)widgetSize.width();
192 191
193 if (Menu::getInstance()->getShadowsEnabled()) {192 if (Menu::getInstance()->getShadowsEnabled()) {
194 glActiveTexture(GL_TEXTURE2);193 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