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
997e670e
Commit
997e670e
authored
Oct 24, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Oct 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add D3DTADDRESS to the WINED3D namespace.
parent
74cd90a1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
18 deletions
+28
-18
basetexture.c
dlls/wined3d/basetexture.c
+5
-5
device.c
dlls/wined3d/device.c
+1
-1
directx.c
dlls/wined3d/directx.c
+8
-8
stateblock.c
dlls/wined3d/stateblock.c
+4
-4
wined3d_types.h
include/wine/wined3d_types.h
+10
-0
No files found.
dlls/wined3d/basetexture.c
View file @
997e670e
...
...
@@ -256,9 +256,9 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) {
}
/* Initialise the state of the texture object
to the openGL defaults, not the directx defaults */
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSU
]
=
D3DTADDRESS_WRAP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSV
]
=
D3DTADDRESS_WRAP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSW
]
=
D3DTADDRESS_WRAP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSU
]
=
WINE
D3DTADDRESS_WRAP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSV
]
=
WINE
D3DTADDRESS_WRAP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ADDRESSW
]
=
WINE
D3DTADDRESS_WRAP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_BORDERCOLOR
]
=
0
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_MAGFILTER
]
=
WINED3DTEXF_LINEAR
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_MINFILTER
]
=
WINED3DTEXF_POINT
;
/* GL_NEAREST_MIPMAP_LINEAR */
...
...
@@ -268,7 +268,7 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) {
This
->
baseTexture
.
states
[
WINED3DTEXSTA_SRGBTEXTURE
]
=
0
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_ELEMENTINDEX
]
=
0
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_DMAPOFFSET
]
=
0
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_TSSADDRESSW
]
=
D3DTADDRESS_WRAP
;
This
->
baseTexture
.
states
[
WINED3DTEXSTA_TSSADDRESSW
]
=
WINE
D3DTADDRESS_WRAP
;
IWineD3DBaseTexture_SetDirty
(
iface
,
TRUE
);
isNewTexture
=
TRUE
;
}
...
...
@@ -358,7 +358,7 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface
case
WINED3DSAMP_ADDRESSW
:
/* fall through */
*
state
=
samplerStates
[
textureObjectSamplerStates
[
i
].
state
];
if
(
*
state
<
minLookup
[
WINELOOKUP_WARPPARAM
]
||
*
state
>
maxLookup
[
WINELOOKUP_WARPPARAM
])
{
FIXME
(
"Unrecognized or unsupported D3DTADDRESS_* value %d, state %d
\n
"
,
*
state
,
textureObjectSamplerStates
[
i
].
function
);
FIXME
(
"Unrecognized or unsupported
WINE
D3DTADDRESS_* value %d, state %d
\n
"
,
*
state
,
textureObjectSamplerStates
[
i
].
function
);
}
else
{
GLint
wrapParm
=
stateLookup
[
WINELOOKUP_WARPPARAM
][
*
state
-
minLookup
[
WINELOOKUP_WARPPARAM
]];
TRACE
(
"Setting WRAP_R to %d for %x
\n
"
,
wrapParm
,
textureDimensions
);
...
...
dlls/wined3d/device.c
View file @
997e670e
...
...
@@ -5510,7 +5510,7 @@ static void WINAPI IWineD3DDeviceImpl_ApplyTextureUnitState(IWineD3DDevice *ifac
case
WINED3DTSS_ADDRESSW
:
#if 0 /* I'm not sure what D3D does about ADDRESSW appearing twice */
if (Value < minLookup[WINELOOKUP_WARPPARAM] || Value > maxLookup[WINELOOKUP_WARPPARAM]) {
FIXME("Unrecognized or unsupported D3DTADDRESS_* value %d, state %d\n", Value, Type);
FIXME("Unrecognized or unsupported
WINE
D3DTADDRESS_* value %d, state %d\n", Value, Type);
} else {
GLint wrapParm = stateLookup[WINELOOKUP_WARPPARAM][Value - minLookup[WINELOOKUP_WARPPARAM]];
...
...
dlls/wined3d/directx.c
View file @
997e670e
...
...
@@ -933,8 +933,8 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display) {
/* Load all the lookup tables
TODO: It may be a good idea to make minLookup and maxLookup const and populate them in wined3d_private.h where they are declared */
minLookup
[
WINELOOKUP_WARPPARAM
]
=
D3DTADDRESS_WRAP
;
maxLookup
[
WINELOOKUP_WARPPARAM
]
=
D3DTADDRESS_MIRRORONCE
;
minLookup
[
WINELOOKUP_WARPPARAM
]
=
WINE
D3DTADDRESS_WRAP
;
maxLookup
[
WINELOOKUP_WARPPARAM
]
=
WINE
D3DTADDRESS_MIRRORONCE
;
minLookup
[
WINELOOKUP_MAGFILTER
]
=
WINED3DTEXF_NONE
;
maxLookup
[
WINELOOKUP_MAGFILTER
]
=
WINED3DTEXF_ANISOTROPIC
;
...
...
@@ -944,15 +944,15 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display) {
stateLookup
[
i
]
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
stateLookup
[
i
])
*
(
1
+
maxLookup
[
i
]
-
minLookup
[
i
])
);
}
stateLookup
[
WINELOOKUP_WARPPARAM
][
D3DTADDRESS_WRAP
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
GL_REPEAT
;
stateLookup
[
WINELOOKUP_WARPPARAM
][
D3DTADDRESS_CLAMP
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
GL_CLAMP_TO_EDGE
;
stateLookup
[
WINELOOKUP_WARPPARAM
][
D3DTADDRESS_BORDER
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
stateLookup
[
WINELOOKUP_WARPPARAM
][
WINE
D3DTADDRESS_WRAP
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
GL_REPEAT
;
stateLookup
[
WINELOOKUP_WARPPARAM
][
WINE
D3DTADDRESS_CLAMP
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
GL_CLAMP_TO_EDGE
;
stateLookup
[
WINELOOKUP_WARPPARAM
][
WINE
D3DTADDRESS_BORDER
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
gl_info
->
supported
[
ARB_TEXTURE_BORDER_CLAMP
]
?
GL_CLAMP_TO_BORDER_ARB
:
GL_REPEAT
;
stateLookup
[
WINELOOKUP_WARPPARAM
][
D3DTADDRESS_BORDER
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
stateLookup
[
WINELOOKUP_WARPPARAM
][
WINE
D3DTADDRESS_BORDER
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
gl_info
->
supported
[
ARB_TEXTURE_BORDER_CLAMP
]
?
GL_CLAMP_TO_BORDER_ARB
:
GL_REPEAT
;
stateLookup
[
WINELOOKUP_WARPPARAM
][
D3DTADDRESS_MIRROR
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
stateLookup
[
WINELOOKUP_WARPPARAM
][
WINE
D3DTADDRESS_MIRROR
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
gl_info
->
supported
[
ARB_TEXTURE_MIRRORED_REPEAT
]
?
GL_MIRRORED_REPEAT_ARB
:
GL_REPEAT
;
stateLookup
[
WINELOOKUP_WARPPARAM
][
D3DTADDRESS_MIRRORONCE
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
stateLookup
[
WINELOOKUP_WARPPARAM
][
WINE
D3DTADDRESS_MIRRORONCE
-
minLookup
[
WINELOOKUP_WARPPARAM
]]
=
gl_info
->
supported
[
ATI_TEXTURE_MIRROR_ONCE
]
?
GL_MIRROR_CLAMP_TO_EDGE_ATI
:
GL_REPEAT
;
stateLookup
[
WINELOOKUP_MAGFILTER
][
WINED3DTEXF_NONE
-
minLookup
[
WINELOOKUP_MAGFILTER
]]
=
GL_NEAREST
;
...
...
dlls/wined3d/stateblock.c
View file @
997e670e
...
...
@@ -999,7 +999,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
This
->
textureState
[
i
][
WINED3DTSS_BUMPENVLSCALE
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINED3DTSS_BUMPENVLOFFSET
]
=
(
DWORD
)
0
.
0
;
This
->
textureState
[
i
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
]
=
WINED3DTTFF_DISABLE
;
This
->
textureState
[
i
][
WINED3DTSS_ADDRESSW
]
=
D3DTADDRESS_WRAP
;
This
->
textureState
[
i
][
WINED3DTSS_ADDRESSW
]
=
WINE
D3DTADDRESS_WRAP
;
This
->
textureState
[
i
][
WINED3DTSS_COLORARG0
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
WINED3DTSS_ALPHAARG0
]
=
D3DTA_CURRENT
;
This
->
textureState
[
i
][
WINED3DTSS_RESULTARG
]
=
D3DTA_CURRENT
;
...
...
@@ -1008,9 +1008,9 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
/* Sampler states*/
for
(
i
=
0
;
i
<
GL_LIMITS
(
sampler_stages
);
i
++
)
{
TRACE
(
"Setting up default samplers states for sampler %d
\n
"
,
i
);
This
->
samplerState
[
i
][
WINED3DSAMP_ADDRESSU
]
=
D3DTADDRESS_WRAP
;
This
->
samplerState
[
i
][
WINED3DSAMP_ADDRESSV
]
=
D3DTADDRESS_WRAP
;
This
->
samplerState
[
i
][
WINED3DSAMP_ADDRESSW
]
=
D3DTADDRESS_WRAP
;
This
->
samplerState
[
i
][
WINED3DSAMP_ADDRESSU
]
=
WINE
D3DTADDRESS_WRAP
;
This
->
samplerState
[
i
][
WINED3DSAMP_ADDRESSV
]
=
WINE
D3DTADDRESS_WRAP
;
This
->
samplerState
[
i
][
WINED3DSAMP_ADDRESSW
]
=
WINE
D3DTADDRESS_WRAP
;
This
->
samplerState
[
i
][
WINED3DSAMP_BORDERCOLOR
]
=
0x00
;
This
->
samplerState
[
i
][
WINED3DSAMP_MAGFILTER
]
=
WINED3DTEXF_POINT
;
This
->
samplerState
[
i
][
WINED3DSAMP_MINFILTER
]
=
WINED3DTEXF_POINT
;
...
...
include/wine/wined3d_types.h
View file @
997e670e
...
...
@@ -593,6 +593,16 @@ typedef enum _WINED3DTEXTUREOP {
WINED3DTOP_FORCE_DWORD
=
0x7fffffff
,
}
WINED3DTEXTUREOP
;
typedef
enum
_WINED3DTEXTUREADDRESS
{
WINED3DTADDRESS_WRAP
=
1
,
WINED3DTADDRESS_MIRROR
=
2
,
WINED3DTADDRESS_CLAMP
=
3
,
WINED3DTADDRESS_BORDER
=
4
,
WINED3DTADDRESS_MIRRORONCE
=
5
,
WINED3DTADDRESS_FORCE_DWORD
=
0x7fffffff
}
WINED3DTEXTUREADDRESS
;
typedef
enum
_WINED3DTRANSFORMSTATETYPE
{
WINED3DTS_VIEW
=
2
,
WINED3DTS_PROJECTION
=
3
,
...
...
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