wined3d: Move the GLSL registry check again.

This commit is contained in:
Jason Green 2006-05-26 00:33:13 -04:00 committed by Alexandre Julliard
parent 1cf527c3a3
commit cef19b5769
2 changed files with 10 additions and 10 deletions

View File

@ -1733,6 +1733,16 @@ HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPRESENT_P
}
/* Determine shader mode to use based on GL caps */
if (GL_SUPPORT(ARB_SHADING_LANGUAGE_100) && wined3d_settings.glslRequested
&& (wined3d_settings.vs_mode == VS_HW || wined3d_settings.ps_mode == PS_HW))
wined3d_settings.shader_mode = SHADER_GLSL;
else if ((GL_SUPPORT(ARB_VERTEX_PROGRAM) && wined3d_settings.vs_mode == VS_HW) ||
(GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && wined3d_settings.ps_mode == PS_HW))
wined3d_settings.shader_mode = SHADER_ARB;
else
wined3d_settings.shader_mode = SHADER_SW;
/* Initialize the current view state */
This->modelview_valid = 1;
This->proj_valid = 0;

View File

@ -1696,16 +1696,6 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter, WINED3D
*pCaps->MaxStreams = MAX_STREAMS;
*pCaps->MaxStreamStride = 1024;
/* Determine shader mode to use based on GL caps */
if (GL_SUPPORT(ARB_SHADING_LANGUAGE_100) && wined3d_settings.glslRequested
&& (wined3d_settings.vs_mode == VS_HW || wined3d_settings.ps_mode == PS_HW))
wined3d_settings.shader_mode = SHADER_GLSL;
else if ((GL_SUPPORT(ARB_VERTEX_PROGRAM) && wined3d_settings.vs_mode == VS_HW) ||
(GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && wined3d_settings.ps_mode == PS_HW))
wined3d_settings.shader_mode = SHADER_ARB;
else
wined3d_settings.shader_mode = SHADER_SW;
if (wined3d_settings.vs_mode == VS_HW && wined3d_settings.shader_mode == SHADER_GLSL
&& DeviceType != WINED3DDEVTYPE_REF) {
*pCaps->VertexShaderVersion = D3DVS_VERSION(3,0);