Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
329670c7
Commit
329670c7
authored
Jan 10, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do not reset the material.
parent
2520e387
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
28 deletions
+0
-28
drawprim.c
dlls/wined3d/drawprim.c
+0
-28
No files found.
dlls/wined3d/drawprim.c
View file @
329670c7
...
...
@@ -93,8 +93,6 @@ static DWORD primitiveToGl(WINED3DPRIMITIVETYPE PrimitiveType,
/* Ensure the appropriate material states are set up - only change
state if really required */
static
void
init_materials
(
IWineD3DDevice
*
iface
,
BOOL
isDiffuseSupplied
)
{
BOOL
requires_material_reset
=
FALSE
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
if
(
This
->
tracking_color
==
NEEDS_TRACKING
&&
isDiffuseSupplied
)
{
...
...
@@ -107,45 +105,19 @@ static void init_materials(IWineD3DDevice *iface, BOOL isDiffuseSupplied) {
glEnable
(
GL_COLOR_MATERIAL
);
checkGLcall
(
"glEnable GL_COLOR_MATERIAL"
);
This
->
tracking_color
=
IS_TRACKING
;
requires_material_reset
=
TRUE
;
/* Restore material settings as will be used */
}
else
if
((
This
->
tracking_color
==
IS_TRACKING
&&
!
isDiffuseSupplied
)
||
(
This
->
tracking_color
==
NEEDS_TRACKING
&&
!
isDiffuseSupplied
))
{
/* If we are tracking the current color but one isn't supplied, don't! */
glDisable
(
GL_COLOR_MATERIAL
);
checkGLcall
(
"glDisable GL_COLOR_MATERIAL"
);
This
->
tracking_color
=
NEEDS_TRACKING
;
requires_material_reset
=
TRUE
;
/* Restore material settings as will be used */
}
else
if
(
This
->
tracking_color
==
IS_TRACKING
&&
isDiffuseSupplied
)
{
/* No need to reset material colors since no change to gl_color_material */
requires_material_reset
=
FALSE
;
}
else
if
(
This
->
tracking_color
==
NEEDS_DISABLE
)
{
glDisable
(
GL_COLOR_MATERIAL
);
checkGLcall
(
"glDisable GL_COLOR_MATERIAL"
);
This
->
tracking_color
=
DISABLED_TRACKING
;
requires_material_reset
=
TRUE
;
/* Restore material settings as will be used */
}
/* Reset the material colors which may have been tracking the color*/
if
(
requires_material_reset
)
{
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_AMBIENT
,
(
float
*
)
&
This
->
stateBlock
->
material
.
Ambient
);
checkGLcall
(
"glMaterialfv"
);
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_DIFFUSE
,
(
float
*
)
&
This
->
stateBlock
->
material
.
Diffuse
);
checkGLcall
(
"glMaterialfv"
);
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_SPECULARENABLE
])
{
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
(
float
*
)
&
This
->
stateBlock
->
material
.
Specular
);
checkGLcall
(
"glMaterialfv"
);
}
else
{
float
black
[
4
]
=
{
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
&
black
[
0
]);
checkGLcall
(
"glMaterialfv"
);
}
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_EMISSION
,
(
float
*
)
&
This
->
stateBlock
->
material
.
Emissive
);
checkGLcall
(
"glMaterialfv"
);
}
}
static
const
GLfloat
invymat
[
16
]
=
{
...
...
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