Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.cpp
Show First 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | case 4: | ||||
break; | break; | ||||
// [vmem] no longer reduce bpp | // [vmem] no longer reduce bpp | ||||
case SANE_TEX_QUALITY_DEFAULT: | case SANE_TEX_QUALITY_DEFAULT: | ||||
q_flags = OGL_TEX_FULL_QUALITY; | q_flags = OGL_TEX_FULL_QUALITY; | ||||
filter = GL_LINEAR_MIPMAP_LINEAR; | filter = GL_LINEAR_MIPMAP_LINEAR; | ||||
break; | break; | ||||
// [perf] add anisotropy | // [perf] add anisotropy | ||||
case 6: | case 6: | ||||
// TODO: add anisotropic filtering | |||||
q_flags = OGL_TEX_FULL_QUALITY; | q_flags = OGL_TEX_FULL_QUALITY; | ||||
filter = GL_LINEAR_MIPMAP_LINEAR; | filter = ogl_tex_has_anisotropy() ? GL_EXT_texture_filter_anisotropic : GL_LINEAR_MIPMAP_LINEAR; | ||||
break; | break; | ||||
// invalid | // invalid | ||||
default: | default: | ||||
debug_warn(L"SetTextureQuality: invalid quality"); | debug_warn(L"SetTextureQuality: invalid quality"); | ||||
quality = SANE_TEX_QUALITY_DEFAULT; | quality = SANE_TEX_QUALITY_DEFAULT; | ||||
// careful: recursion doesn't work and we don't want to duplicate | // careful: recursion doesn't work and we don't want to duplicate | ||||
// the "sane" default values. | // the "sane" default values. | ||||
goto retry; | goto retry; | ||||
▲ Show 20 Lines • Show All 796 Lines • ▼ Show 20 Lines | if(setup_vmode) | ||||
InitSDL(); | InitSDL(); | ||||
if (!g_VideoMode.InitSDL()) | if (!g_VideoMode.InitSDL()) | ||||
throw PSERROR_System_VmodeFailed(); // abort startup | throw PSERROR_System_VmodeFailed(); // abort startup | ||||
} | } | ||||
RunHardwareDetection(); | RunHardwareDetection(); | ||||
const int quality = SANE_TEX_QUALITY_DEFAULT; // TODO: set value from config file | if (g_AtlasGameLoop && g_AtlasGameLoop->view) | ||||
SetTextureQuality(quality); | SetTextureQuality(SANE_TEX_QUALITY_DEFAULT); | ||||
else | |||||
{ | |||||
int textureQuality = SANE_TEX_QUALITY_DEFAULT; | |||||
CFG_GET_VAL("texturequality", textureQuality); | |||||
SetTextureQuality(textureQuality); | |||||
} | |||||
ogl_WarnIfError(); | ogl_WarnIfError(); | ||||
// Optionally start profiler GPU timings automatically | // Optionally start profiler GPU timings automatically | ||||
// (By default it's only enabled by a hotkey, for performance/compatibility) | // (By default it's only enabled by a hotkey, for performance/compatibility) | ||||
bool profilerGPUEnable = false; | bool profilerGPUEnable = false; | ||||
CFG_GET_VAL("profiler2.autoenable", profilerGPUEnable); | CFG_GET_VAL("profiler2.autoenable", profilerGPUEnable); | ||||
if (profilerGPUEnable) | if (profilerGPUEnable) | ||||
▲ Show 20 Lines • Show All 656 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator