Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
fc2611d4
Commit
fc2611d4
authored
Jul 07, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Jul 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Only link and use GLSL program if at least one GLSL shader is available.
parent
ea0a102d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
device.c
dlls/wined3d/device.c
+0
-6
drawprim.c
dlls/wined3d/drawprim.c
+10
-5
No files found.
dlls/wined3d/device.c
View file @
fc2611d4
...
...
@@ -282,12 +282,6 @@ void set_glsl_shader_program(IWineD3DDevice *iface) {
struct
list
*
ptr
=
NULL
;
GLhandleARB
programId
=
0
;
if
(
NULL
==
vshader
&&
NULL
==
pshader
)
{
/* No pixel or vertex shader specified */
This
->
stateBlock
->
shaderPrgId
=
0
;
return
;
}
ptr
=
list_head
(
&
This
->
glsl_shader_progs
);
while
(
ptr
)
{
/* At least one program exists - see if it matches our ps/vs combination */
...
...
dlls/wined3d/drawprim.c
View file @
fc2611d4
...
...
@@ -1926,13 +1926,18 @@ inline static void drawPrimitiveDrawStrided(
useDrawStridedSlow
=
TRUE
;
}
/* Bind the correct GLSL shader program based on the currently set vertex & pixel shaders. */
if
(
wined3d_settings
.
vs_selected_mode
==
SHADER_GLSL
||
/* If GLSL is used for either pixel or vertex shaders, make a GLSL program
* Otherwise set 0, which restores fixed function */
if
((
wined3d_settings
.
vs_selected_mode
==
SHADER_GLSL
&&
useVertexShaderFunction
)
||
(
wined3d_settings
.
ps_selected_mode
==
SHADER_GLSL
&&
usePixelShaderFunction
))
set_glsl_shader_program
(
iface
);
else
This
->
stateBlock
->
shaderPrgId
=
0
;
/* If GLSL is used now, or might have been used before, (re)set the program */
if
(
wined3d_settings
.
vs_selected_mode
==
SHADER_GLSL
||
wined3d_settings
.
ps_selected_mode
==
SHADER_GLSL
)
{
set_glsl_shader_program
(
iface
);
/* Start using this program ID (if it's 0, there is no shader program to use, so
* glUseProgramObjectARB(0) will disable the use of any shaders) */
if
(
This
->
stateBlock
->
shaderPrgId
)
TRACE_
(
d3d_shader
)(
"Using GLSL program %u
\n
"
,
This
->
stateBlock
->
shaderPrgId
);
GL_EXTCALL
(
glUseProgramObjectARB
(
This
->
stateBlock
->
shaderPrgId
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment