Commit 0161d6b6 authored by Jason Green's avatar Jason Green Committed by Alexandre Julliard

wined3d: Final move of the GLSL registry check (hopefully).

parent ab2349da
......@@ -1732,17 +1732,6 @@ HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPRESENT_P
IWineD3DDevice_SetViewport((IWineD3DDevice *)This, &vp);
}
/* 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;
......
......@@ -746,6 +746,17 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info, Display* display) {
GLX_EXT_FUNCS_GEN;
#undef USE_GL_FUNC
/* Determine shader mode to use based on GL caps */
if (gl_info->supported[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_info->supported[ARB_VERTEX_PROGRAM] && wined3d_settings.vs_mode == VS_HW) ||
(gl_info->supported[ARB_FRAGMENT_PROGRAM] && wined3d_settings.ps_mode == PS_HW))
wined3d_settings.shader_mode = SHADER_ARB;
else
wined3d_settings.shader_mode = SHADER_SW;
/* If we created a dummy context, throw it away */
if (NULL != fake_ctx) WineD3D_ReleaseFakeGLContext(fake_ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment