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
4d09cba5
Commit
4d09cba5
authored
Feb 12, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Feb 12, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle the COLORVERTEX render state.
parent
db9b5f74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+6
-3
mesa.c
dlls/ddraw/mesa.c
+4
-0
No files found.
dlls/ddraw/d3ddevice/mesa.c
View file @
4d09cba5
...
...
@@ -773,7 +773,8 @@ static void draw_primitive_handle_GL_state(IDirect3DDeviceImpl *This,
/* Handle the code for pre-vertex material properties */
if
(
vertex_transformed
==
FALSE
)
{
if
(
This
->
state_block
.
render_state
[
D3DRENDERSTATE_LIGHTING
-
1
]
==
TRUE
)
{
if
((
This
->
state_block
.
render_state
[
D3DRENDERSTATE_LIGHTING
-
1
]
==
TRUE
)
&&
(
This
->
state_block
.
render_state
[
D3DRENDERSTATE_COLORVERTEX
-
1
]
==
TRUE
))
{
if
((
This
->
state_block
.
render_state
[
D3DRENDERSTATE_DIFFUSEMATERIALSOURCE
-
1
]
!=
D3DMCS_MATERIAL
)
||
(
This
->
state_block
.
render_state
[
D3DRENDERSTATE_AMBIENTMATERIALSOURCE
-
1
]
!=
D3DMCS_MATERIAL
)
||
(
This
->
state_block
.
render_state
[
D3DRENDERSTATE_EMISSIVEMATERIALSOURCE
-
1
]
!=
D3DMCS_MATERIAL
)
||
...
...
@@ -935,7 +936,8 @@ inline static void handle_specular_base(STATEBLOCK *sb, DWORD *color) {
inline
static
void
handle_diffuse
(
STATEBLOCK
*
sb
,
DWORD
*
color
,
BOOLEAN
lighted
)
{
if
((
lighted
==
FALSE
)
&&
(
sb
->
render_state
[
D3DRENDERSTATE_LIGHTING
-
1
]
==
TRUE
))
{
(
sb
->
render_state
[
D3DRENDERSTATE_LIGHTING
-
1
]
==
TRUE
)
&&
(
sb
->
render_state
[
D3DRENDERSTATE_COLORVERTEX
-
1
]
==
TRUE
))
{
if
(
sb
->
render_state
[
D3DRENDERSTATE_DIFFUSEMATERIALSOURCE
-
1
]
==
D3DMCS_COLOR1
)
{
glColorMaterial
(
GL_FRONT_AND_BACK
,
GL_DIFFUSE
);
handle_diffuse_base
(
sb
,
color
);
...
...
@@ -960,7 +962,8 @@ inline static void handle_diffuse(STATEBLOCK *sb, DWORD *color, BOOLEAN lighted)
inline
static
void
handle_specular
(
STATEBLOCK
*
sb
,
DWORD
*
color
,
BOOLEAN
lighted
)
{
if
((
lighted
==
FALSE
)
&&
(
sb
->
render_state
[
D3DRENDERSTATE_LIGHTING
-
1
]
==
TRUE
))
{
(
sb
->
render_state
[
D3DRENDERSTATE_LIGHTING
-
1
]
==
TRUE
)
&&
(
sb
->
render_state
[
D3DRENDERSTATE_COLORVERTEX
-
1
]
==
TRUE
))
{
if
(
sb
->
render_state
[
D3DRENDERSTATE_DIFFUSEMATERIALSOURCE
-
1
]
==
D3DMCS_COLOR2
)
{
glColorMaterial
(
GL_FRONT_AND_BACK
,
GL_DIFFUSE
);
handle_specular_base
(
sb
,
color
);
...
...
dlls/ddraw/mesa.c
View file @
4d09cba5
...
...
@@ -432,6 +432,10 @@ void set_render_state(IDirect3DDeviceImpl* This,
glLightModelfv
(
GL_LIGHT_MODEL_AMBIENT
,
(
float
*
)
light
);
}
break
;
case
D3DRENDERSTATE_COLORVERTEX
:
/* 141 */
/* Nothing to do here.. Only storage matters */
break
;
case
D3DRENDERSTATE_LOCALVIEWER
:
/* 142 */
if
(
dwRenderState
)
glLightModeli
(
GL_LIGHT_MODEL_LOCAL_VIEWER
,
GL_TRUE
);
...
...
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