wined3d: Default to GLSL. This is safe because we now have proper ps2.0/vs2.0 detection.

This commit is contained in:
Roderick Colenbrander 2007-10-28 00:28:53 +02:00 committed by Alexandre Julliard
parent efc18d79af
commit 59eba5cb41
2 changed files with 10 additions and 8 deletions

View File

@ -335,7 +335,13 @@ static void select_shader_mode(
if (wined3d_settings.vs_mode == VS_NONE) {
*vs_selected = SHADER_NONE;
} else if (gl_info->supported[ARB_VERTEX_SHADER] && wined3d_settings.glslRequested) {
*vs_selected = SHADER_GLSL;
/* Geforce4 cards support GLSL but for vertex shaders only. Further its reported GLSL caps are
* wrong. This combined with the fact that glsl won't offer more features or performance, use ARB
* shaders only on this card. */
if(gl_info->vs_nv_version < VS_VERSION_20)
*vs_selected = SHADER_ARB;
else
*vs_selected = SHADER_GLSL;
} else if (gl_info->supported[ARB_VERTEX_PROGRAM]) {
*vs_selected = SHADER_ARB;
} else {

View File

@ -39,7 +39,7 @@ wined3d_settings_t wined3d_settings =
VS_HW, /* Hardware by default */
PS_HW, /* Hardware by default */
VBO_HW, /* Hardware by default */
FALSE, /* Use of GLSL disabled by default */
TRUE, /* Use of GLSL enabled by default */
ORM_BACKBUFFER, /* Use the backbuffer to do offscreen rendering */
RTL_AUTO, /* Automatically determine best locking method */
0, /* The default of memory is set in FillGLCaps */
@ -184,14 +184,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
}
if ( !get_config_key( hkey, appkey, "UseGLSL", buffer, size) )
{
if (!strcmp(buffer,"enabled"))
{
TRACE("Use of GL Shading Language enabled for systems that support it\n");
wined3d_settings.glslRequested = TRUE;
}
else
if (!strcmp(buffer,"disabled"))
{
TRACE("Use of GL Shading Language disabled\n");
wined3d_settings.glslRequested = FALSE;
}
}
if ( !get_config_key( hkey, appkey, "OffscreenRenderingMode", buffer, size) )