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
06fd1e25
Commit
06fd1e25
authored
Oct 03, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
Oct 03, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes - Remove light debug statements, handle disabled specular
material properly, release surfaces when debugging and clean up trace a little.
parent
9bb19ac2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
device.c
dlls/d3d8/device.c
+5
-4
drawprim.c
dlls/d3d8/drawprim.c
+10
-3
No files found.
dlls/d3d8/device.c
View file @
06fd1e25
...
...
@@ -1659,6 +1659,10 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetMaterial(LPDIRECT3DDEVICE8 iface, CONST
if
(
This
->
StateBlock
->
renderstate
[
D3DRS_SPECULARENABLE
])
{
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
(
float
*
)
&
This
->
UpdateStateBlock
->
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
->
UpdateStateBlock
->
material
.
Emissive
);
checkGLcall
(
"glMaterialfv"
);
...
...
@@ -1829,8 +1833,6 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetLight(LPDIRECT3DDEVICE8 iface, DWORD In
if
(
object
->
glIndex
!=
-
1
)
{
setup_light
(
iface
,
object
->
glIndex
,
object
);
}
DUMP_LIGHT_CHAIN
();
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DDevice8Impl_GetLight
(
LPDIRECT3DDEVICE8
iface
,
DWORD
Index
,
D3DLIGHT8
*
pLight
)
{
...
...
@@ -1886,7 +1888,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_LightEnable(LPDIRECT3DDEVICE8 iface, DWORD
D3DLIGHT8
lightParms
;
/* Warning - untested code :-) Prob safe to change fixme to a trace but
wait until someone confirms it seems to work! */
FIXM
E
(
"Light enabled requested but light not defined, so defining one!
\n
"
);
TRAC
E
(
"Light enabled requested but light not defined, so defining one!
\n
"
);
lightParms
.
Type
=
D3DLIGHT_DIRECTIONAL
;
lightParms
.
Diffuse
.
r
=
1
.
0
;
lightParms
.
Diffuse
.
g
=
1
.
0
;
...
...
@@ -2074,7 +2076,6 @@ HRESULT WINAPI IDirect3DDevice8Impl_LightEnable(LPDIRECT3DDEVICE8 iface, DWORD
}
}
}
DUMP_LIGHT_CHAIN
();
return
D3D_OK
;
}
HRESULT
WINAPI
IDirect3DDevice8Impl_GetLightEnable
(
LPDIRECT3DDEVICE8
iface
,
DWORD
Index
,
BOOL
*
pEnable
)
{
...
...
dlls/d3d8/drawprim.c
View file @
06fd1e25
...
...
@@ -203,8 +203,14 @@ void init_materials(LPDIRECT3DDEVICE8 iface, BOOL isDiffuseSupplied) {
checkGLcall
(
"glMaterialfv"
);
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_DIFFUSE
,
(
float
*
)
&
This
->
StateBlock
->
material
.
Diffuse
);
checkGLcall
(
"glMaterialfv"
);
glMaterialfv
(
GL_FRONT_AND_BACK
,
GL_SPECULAR
,
(
float
*
)
&
This
->
StateBlock
->
material
.
Specular
);
checkGLcall
(
"glMaterialfv"
);
if
(
This
->
StateBlock
->
renderstate
[
D3DRS_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"
);
}
...
...
@@ -1478,9 +1484,10 @@ void drawPrimitive(LPDIRECT3DDEVICE8 iface,
for
(
textureNo
=
0
;
textureNo
<
GL_LIMITS
(
textures
);
++
textureNo
)
{
if
(
This
->
StateBlock
->
textures
[
textureNo
]
!=
NULL
)
{
sprintf
(
buffer
,
"/tmp/texture_%ld_%d.ppm"
,
primCounter
,
textureNo
);
TRACE
(
"Saving texture %s
\n
"
,
buffer
);
TRACE
(
"Saving texture %s
(Format:%s)
\n
"
,
buffer
,
debug_d3dformat
(((
IDirect3DBaseTexture8Impl
*
)
This
->
StateBlock
->
textures
[
textureNo
])
->
format
)
);
IDirect3DTexture8Impl_GetSurfaceLevel
((
LPDIRECT3DTEXTURE8
)
This
->
StateBlock
->
textures
[
textureNo
],
0
,
&
pSur
);
IDirect3DSurface8Impl_SaveSnapshot
(
pSur
,
buffer
);
IDirect3DSurface8Impl_ReleaseRef
(
pSur
);
}
}
}
...
...
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