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
bcb05fd4
Commit
bcb05fd4
authored
Jan 14, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
Jan 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for some of the texture address states and border colour.
parent
6b03dd5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
5 deletions
+54
-5
device.c
dlls/d3d8/device.c
+53
-4
directx.c
dlls/d3d8/directx.c
+1
-1
No files found.
dlls/d3d8/device.c
View file @
bcb05fd4
...
...
@@ -3410,22 +3410,71 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
break
;
}
case
D3DTSS_ADDRESSU
:
case
D3DTSS_ADDRESSV
:
case
D3DTSS_ADDRESSW
:
{
GLint
wrapParm
=
GL_REPEAT
;
switch
(
Value
)
{
case
D3DTADDRESS_WRAP
:
wrapParm
=
GL_REPEAT
;
break
;
case
D3DTADDRESS_CLAMP
:
wrapParm
=
GL_CLAMP
;
break
;
case
D3DTADDRESS_BORDER
:
wrapParm
=
GL_CLAMP_TO_EDGE
;
break
;
case
D3DTADDRESS_MIRROR
:
/* Unsupported in OpenGL? */
case
D3DTADDRESS_MIRRORONCE
:
/* Unsupported in OpenGL? */
default:
FIXME
(
"Unrecognized or unsupported D3DTADDRESS_* value %ld, state %d
\n
"
,
Value
,
Type
);
wrapParm
=
GL_REPEAT
;
}
switch
(
Type
)
{
case
D3DTSS_ADDRESSU
:
TRACE
(
"Setting WRAP_S to %d for %x
\n
"
,
wrapParm
,
This
->
StateBlock
.
textureDimensions
[
Stage
]);
glTexParameteri
(
This
->
StateBlock
.
textureDimensions
[
Stage
],
GL_TEXTURE_WRAP_S
,
wrapParm
);
checkGLcall
(
"glTexParameteri(..., GL_TEXTURE_WRAP_S, wrapParm)"
);
break
;
case
D3DTSS_ADDRESSV
:
TRACE
(
"Setting WRAP_T to %d for %x
\n
"
,
wrapParm
,
This
->
StateBlock
.
textureDimensions
[
Stage
]);
glTexParameteri
(
This
->
StateBlock
.
textureDimensions
[
Stage
],
GL_TEXTURE_WRAP_T
,
wrapParm
);
checkGLcall
(
"glTexParameteri(..., GL_TEXTURE_WRAP_T, wrapParm)"
);
break
;
case
D3DTSS_ADDRESSW
:
TRACE
(
"Setting WRAP_R to %d for %x
\n
"
,
wrapParm
,
This
->
StateBlock
.
textureDimensions
[
Stage
]);
glTexParameteri
(
This
->
StateBlock
.
textureDimensions
[
Stage
],
GL_TEXTURE_WRAP_R
,
wrapParm
);
checkGLcall
(
"glTexParameteri(..., GL_TEXTURE_WRAP_R, wrapParm)"
);
break
;
default:
/* nop */
break
;
/** stupic compilator */
}
}
break
;
case
D3DTSS_BORDERCOLOR
:
{
float
col
[
4
];
col
[
0
]
=
((
Value
>>
16
)
&
0xFF
)
/
255
.
0
;
col
[
1
]
=
((
Value
>>
8
)
&
0xFF
)
/
255
.
0
;
col
[
2
]
=
((
Value
>>
0
)
&
0xFF
)
/
255
.
0
;
col
[
3
]
=
((
Value
>>
24
)
&
0xFF
)
/
255
.
0
;
TRACE
(
"Setting border color for %x to %lx
\n
"
,
This
->
StateBlock
.
textureDimensions
[
Stage
],
Value
);
glTexParameterfv
(
This
->
StateBlock
.
textureDimensions
[
Stage
],
GL_TEXTURE_BORDER_COLOR
,
&
col
[
0
]);
checkGLcall
(
"glTexParameteri(..., GL_TEXTURE_BORDER_COLOR, ...)"
);
}
break
;
/* Unhandled */
case
D3DTSS_BUMPENVMAT00
:
case
D3DTSS_BUMPENVMAT01
:
case
D3DTSS_BUMPENVMAT10
:
case
D3DTSS_BUMPENVMAT11
:
case
D3DTSS_TEXCOORDINDEX
:
case
D3DTSS_ADDRESSU
:
case
D3DTSS_ADDRESSV
:
case
D3DTSS_BORDERCOLOR
:
case
D3DTSS_MIPMAPLODBIAS
:
case
D3DTSS_MAXMIPLEVEL
:
case
D3DTSS_MAXANISOTROPY
:
case
D3DTSS_BUMPENVLSCALE
:
case
D3DTSS_BUMPENVLOFFSET
:
case
D3DTSS_TEXTURETRANSFORMFLAGS
:
case
D3DTSS_ADDRESSW
:
case
D3DTSS_RESULTARG
:
default:
/* Put back later: FIXME("(%p) : stub, Stage=%ld, Type=%d, Value =%ld\n", This, Stage, Type, Value); */
...
...
dlls/d3d8/directx.c
View file @
bcb05fd4
...
...
@@ -316,7 +316,7 @@ HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps (LPDIRECT3D8 iface,
pCaps
->
DestBlendCaps
=
0
;
pCaps
->
AlphaCmpCaps
=
0
;
pCaps
->
ShadeCaps
=
D3DPSHADECAPS_SPECULARGOURAUDRGB
|
D3DPSHADECAPS_COLORGOURAUDRGB
;
pCaps
->
TextureCaps
=
D3DPTEXTURECAPS_ALPHA
|
D3DPTEXTURECAPS_ALPHAPALETTE
|
D3DPTEXTURECAPS_CUBEMAP
|
D3DPTEXTURECAPS_POW2
|
D3DPTEXTURECAPS_VOLUMEMAP
;
pCaps
->
TextureCaps
=
D3DPTEXTURECAPS_ALPHA
|
D3DPTEXTURECAPS_ALPHAPALETTE
|
D3DPTEXTURECAPS_CUBEMAP
|
D3DPTEXTURECAPS_POW2
|
D3DPTEXTURECAPS_VOLUMEMAP
|
D3DPTEXTURECAPS_MIPMAP
;
pCaps
->
TextureFilterCaps
=
0
;
pCaps
->
CubeTextureFilterCaps
=
0
;
pCaps
->
VolumeTextureFilterCaps
=
0
;
...
...
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