Skip to content

Commit

Permalink
Merge pull request #763 from OfficialR3ido101/fix/add_more_GPU_mem_op…
Browse files Browse the repository at this point in the history
…tions

Add more ram Options
  • Loading branch information
ksuprynowicz authored Dec 8, 2023
2 parents 7123487 + cb1dccb commit 7f85b1f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 13 additions & 2 deletions interface/src/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ Menu::Menu() {
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture4096MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture6144MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture8192MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture10240MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture12288MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture16384MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture20480MB, 0, false));
connect(textureGroup, &QActionGroup::triggered, [textureGroup] {
auto checked = textureGroup->checkedAction();
auto text = checked->text();
Expand All @@ -465,8 +469,16 @@ Menu::Menu() {
newMaxTextureMemory = MB_TO_BYTES(4096);
} else if (MenuOption::RenderMaxTexture6144MB == text) {
newMaxTextureMemory = MB_TO_BYTES(6144);
} else if (MenuOption::RenderMaxTexture8192MB == text) {
} else if (MenuOption::RenderMaxTexture1024MB == text) {
newMaxTextureMemory = MB_TO_BYTES(8192);
} else if (MenuOption::RenderMaxTexture10240MB == text) {
newMaxTextureMemory = MB_TO_BYTES(10240);
} else if (MenuOption::RenderMaxTexture12288MB == text) {
newMaxTextureMemory = MB_TO_BYTES(12288);
} else if (MenuOption::RenderMaxTexture16384MB == text) {
newMaxTextureMemory = MB_TO_BYTES(16384);
} else if (MenuOption::RenderMaxTexture20480MB == text) {
newMaxTextureMemory = MB_TO_BYTES(20480);
}
gpu::Texture::setAllowedGPUMemoryUsage(newMaxTextureMemory);
});
Expand Down Expand Up @@ -775,7 +787,6 @@ Menu::Menu() {
addActionToQMenuAndActionHash(crashMenu, MenuOption::CrashOnShutdown, 0, qApp, SLOT(crashOnShutdown()));
}


// Developer > Show Statistics
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Stats, 0, true);

Expand Down
4 changes: 4 additions & 0 deletions interface/src/Menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ namespace MenuOption {
const QString RenderMaxTexture4096MB = "4096 MB";
const QString RenderMaxTexture6144MB = "6144 MB";
const QString RenderMaxTexture8192MB = "8192 MB";
const QString RenderMaxTexture10240MB = "10240 MB";
const QString RenderMaxTexture12288MB = "12288 MB";
const QString RenderMaxTexture16384MB = "16384 MB";
const QString RenderMaxTexture20480MB = "20480 MB";
const QString RenderSensorToWorldMatrix = "Show SensorToWorld Matrix";
const QString RenderIKTargets = "Show IK Targets";
const QString RenderIKConstraints = "Show IK Constraints";
Expand Down

0 comments on commit 7f85b1f

Please sign in to comment.