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
a07a8f79
Commit
a07a8f79
authored
Oct 10, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Oct 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: D3DDECLTYPE: Consistently use in WINED3D namespace.
parent
f0d5b35c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
33 deletions
+33
-33
drawprim.c
dlls/wined3d/drawprim.c
+14
-14
wined3d_private.h
dlls/wined3d/wined3d_private.h
+19
-19
No files found.
dlls/wined3d/drawprim.c
View file @
a07a8f79
...
...
@@ -494,12 +494,12 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
and if so using the fixed pipeline how do we handle it */
if
(
thisFVF
&
D3DFVF_POSITION_MASK
)
{
strided
->
u
.
s
.
position
.
lpData
=
data
;
strided
->
u
.
s
.
position
.
dwType
=
D3DDECLTYPE_FLOAT3
;
strided
->
u
.
s
.
position
.
dwType
=
WINE
D3DDECLTYPE_FLOAT3
;
strided
->
u
.
s
.
position
.
dwStride
=
stride
;
strided
->
u
.
s
.
position
.
VBO
=
streamVBO
;
data
+=
3
*
sizeof
(
float
);
if
(
thisFVF
&
D3DFVF_XYZRHW
)
{
strided
->
u
.
s
.
position
.
dwType
=
D3DDECLTYPE_FLOAT4
;
strided
->
u
.
s
.
position
.
dwType
=
WINE
D3DDECLTYPE_FLOAT4
;
strided
->
u
.
s
.
position_transformed
=
TRUE
;
data
+=
sizeof
(
float
);
}
else
...
...
@@ -514,14 +514,14 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
if
((
thisFVF
&
D3DFVF_XYZB5
)
>
D3DFVF_XYZRHW
)
{
TRACE
(
"Setting blend Weights to %p
\n
"
,
data
);
strided
->
u
.
s
.
blendWeights
.
lpData
=
data
;
strided
->
u
.
s
.
blendWeights
.
dwType
=
D3DDECLTYPE_FLOAT1
+
numBlends
-
1
;
strided
->
u
.
s
.
blendWeights
.
dwType
=
WINE
D3DDECLTYPE_FLOAT1
+
numBlends
-
1
;
strided
->
u
.
s
.
blendWeights
.
dwStride
=
stride
;
strided
->
u
.
s
.
blendWeights
.
VBO
=
streamVBO
;
data
+=
numBlends
*
sizeof
(
FLOAT
);
if
(
thisFVF
&
D3DFVF_LASTBETA_UBYTE4
)
{
strided
->
u
.
s
.
blendMatrixIndices
.
lpData
=
data
;
strided
->
u
.
s
.
blendMatrixIndices
.
dwType
=
D3DDECLTYPE_UBYTE4
;
strided
->
u
.
s
.
blendMatrixIndices
.
dwType
=
WINE
D3DDECLTYPE_UBYTE4
;
strided
->
u
.
s
.
blendMatrixIndices
.
dwStride
=
stride
;
strided
->
u
.
s
.
blendMatrixIndices
.
VBO
=
streamVBO
;
data
+=
sizeof
(
DWORD
);
...
...
@@ -531,7 +531,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
/* Normal is always 3 floats */
if
(
thisFVF
&
D3DFVF_NORMAL
)
{
strided
->
u
.
s
.
normal
.
lpData
=
data
;
strided
->
u
.
s
.
normal
.
dwType
=
D3DDECLTYPE_FLOAT3
;
strided
->
u
.
s
.
normal
.
dwType
=
WINE
D3DDECLTYPE_FLOAT3
;
strided
->
u
.
s
.
normal
.
dwStride
=
stride
;
strided
->
u
.
s
.
normal
.
VBO
=
streamVBO
;
data
+=
3
*
sizeof
(
FLOAT
);
...
...
@@ -540,7 +540,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
/* Pointsize is a single float */
if
(
thisFVF
&
D3DFVF_PSIZE
)
{
strided
->
u
.
s
.
pSize
.
lpData
=
data
;
strided
->
u
.
s
.
pSize
.
dwType
=
D3DDECLTYPE_FLOAT1
;
strided
->
u
.
s
.
pSize
.
dwType
=
WINE
D3DDECLTYPE_FLOAT1
;
strided
->
u
.
s
.
pSize
.
dwStride
=
stride
;
strided
->
u
.
s
.
pSize
.
VBO
=
streamVBO
;
data
+=
sizeof
(
FLOAT
);
...
...
@@ -549,7 +549,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
/* Diffuse is 4 unsigned bytes */
if
(
thisFVF
&
D3DFVF_DIFFUSE
)
{
strided
->
u
.
s
.
diffuse
.
lpData
=
data
;
strided
->
u
.
s
.
diffuse
.
dwType
=
D3DDECLTYPE_SHORT4
;
strided
->
u
.
s
.
diffuse
.
dwType
=
WINE
D3DDECLTYPE_SHORT4
;
strided
->
u
.
s
.
diffuse
.
dwStride
=
stride
;
strided
->
u
.
s
.
diffuse
.
VBO
=
streamVBO
;
data
+=
sizeof
(
DWORD
);
...
...
@@ -558,7 +558,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
/* Specular is 4 unsigned bytes */
if
(
thisFVF
&
D3DFVF_SPECULAR
)
{
strided
->
u
.
s
.
specular
.
lpData
=
data
;
strided
->
u
.
s
.
specular
.
dwType
=
D3DDECLTYPE_SHORT4
;
strided
->
u
.
s
.
specular
.
dwType
=
WINE
D3DDECLTYPE_SHORT4
;
strided
->
u
.
s
.
specular
.
dwStride
=
stride
;
strided
->
u
.
s
.
specular
.
VBO
=
streamVBO
;
data
+=
sizeof
(
DWORD
);
...
...
@@ -578,7 +578,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
for
(
textureNo
=
0
;
textureNo
<
numTextures
;
++
textureNo
)
{
strided
->
u
.
s
.
texCoords
[
textureNo
].
lpData
=
data
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwType
=
D3DDECLTYPE_FLOAT1
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwType
=
WINE
D3DDECLTYPE_FLOAT1
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwStride
=
stride
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
VBO
=
streamVBO
;
numCoords
[
textureNo
]
=
coordIdxInfo
&
0x03
;
...
...
@@ -586,13 +586,13 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
/* Always one set */
data
+=
sizeof
(
float
);
if
(
numCoords
[
textureNo
]
!=
D3DFVF_TEXTUREFORMAT1
)
{
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwType
=
D3DDECLTYPE_FLOAT2
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwType
=
WINE
D3DDECLTYPE_FLOAT2
;
data
+=
sizeof
(
float
);
if
(
numCoords
[
textureNo
]
!=
D3DFVF_TEXTUREFORMAT2
)
{
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwType
=
D3DDECLTYPE_FLOAT3
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwType
=
WINE
D3DDECLTYPE_FLOAT3
;
data
+=
sizeof
(
float
);
if
(
numCoords
[
textureNo
]
!=
D3DFVF_TEXTUREFORMAT3
)
{
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwType
=
D3DDECLTYPE_FLOAT4
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwType
=
WINE
D3DDECLTYPE_FLOAT4
;
data
+=
sizeof
(
float
);
}
}
...
...
@@ -1408,7 +1408,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
continue
;
}
else
{
int
coordsToUse
=
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwType
+
1
;
/* 0 == D3DDECLTYPE_FLOAT1 etc */
int
coordsToUse
=
sd
->
u
.
s
.
texCoords
[
coordIdx
].
dwType
+
1
;
/* 0 ==
WINE
D3DDECLTYPE_FLOAT1 etc */
/* The coords to supply depend completely on the fvf / vertex shader */
switch
(
coordsToUse
)
{
...
...
@@ -1508,7 +1508,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData
if
(
sd
->
u
.
s
.
specular
.
lpData
!=
NULL
)
{
/* special case where the fog density is stored in the diffuse alpha channel */
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGENABLE
]
&&
(
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGVERTEXMODE
]
==
D3DFOG_NONE
||
sd
->
u
.
s
.
position
.
dwType
==
D3DDECLTYPE_FLOAT4
)
&&
(
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGVERTEXMODE
]
==
D3DFOG_NONE
||
sd
->
u
.
s
.
position
.
dwType
==
WINE
D3DDECLTYPE_FLOAT4
)
&&
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGTABLEMODE
]
==
D3DFOG_NONE
)
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
GL_EXTCALL
(
glFogCoordfEXT
(
specularColor
>>
24
));
...
...
dlls/wined3d/wined3d_private.h
View file @
a07a8f79
...
...
@@ -92,25 +92,25 @@ typedef struct _WINED3DGLTYPE {
int
typesize
;
}
WINED3DGLTYPE
;
/* NOTE: Make sure these are in the correct numerical order. (see /include/
d3d9types.h typedef enum _D3DDECLTYPE
) */
static
WINED3DGLTYPE
const
glTypeLookup
[
D3DDECLTYPE_UNUSED
]
=
{
{
D3DDECLTYPE_FLOAT1
,
1
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
D3DDECLTYPE_FLOAT2
,
2
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
D3DDECLTYPE_FLOAT3
,
3
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
D3DDECLTYPE_FLOAT4
,
4
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
D3DDECLTYPE_D3DCOLOR
,
4
,
GL_UNSIGNED_BYTE
,
GL_TRUE
,
sizeof
(
BYTE
)},
{
D3DDECLTYPE_UBYTE4
,
4
,
GL_UNSIGNED_BYTE
,
GL_FALSE
,
sizeof
(
BYTE
)},
{
D3DDECLTYPE_SHORT2
,
2
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_SHORT4
,
4
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_UBYTE4N
,
4
,
GL_UNSIGNED_BYTE
,
GL_FALSE
,
sizeof
(
BYTE
)},
{
D3DDECLTYPE_SHORT2N
,
2
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_SHORT4N
,
4
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_USHORT2N
,
2
,
GL_UNSIGNED_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_USHORT4N
,
4
,
GL_UNSIGNED_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_UDEC3
,
3
,
GL_UNSIGNED_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_DEC3N
,
3
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_FLOAT16_2
,
2
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_FLOAT16_4
,
4
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
short
int
)}};
/* NOTE: Make sure these are in the correct numerical order. (see /include/
wined3d_types.h
) */
static
WINED3DGLTYPE
const
glTypeLookup
[
WINE
D3DDECLTYPE_UNUSED
]
=
{
{
WINE
D3DDECLTYPE_FLOAT1
,
1
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
WINE
D3DDECLTYPE_FLOAT2
,
2
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
WINE
D3DDECLTYPE_FLOAT3
,
3
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
WINE
D3DDECLTYPE_FLOAT4
,
4
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
WINE
D3DDECLTYPE_D3DCOLOR
,
4
,
GL_UNSIGNED_BYTE
,
GL_TRUE
,
sizeof
(
BYTE
)},
{
WINE
D3DDECLTYPE_UBYTE4
,
4
,
GL_UNSIGNED_BYTE
,
GL_FALSE
,
sizeof
(
BYTE
)},
{
WINE
D3DDECLTYPE_SHORT2
,
2
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
WINE
D3DDECLTYPE_SHORT4
,
4
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
WINE
D3DDECLTYPE_UBYTE4N
,
4
,
GL_UNSIGNED_BYTE
,
GL_FALSE
,
sizeof
(
BYTE
)},
{
WINE
D3DDECLTYPE_SHORT2N
,
2
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
WINE
D3DDECLTYPE_SHORT4N
,
4
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
WINE
D3DDECLTYPE_USHORT2N
,
2
,
GL_UNSIGNED_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
WINE
D3DDECLTYPE_USHORT4N
,
4
,
GL_UNSIGNED_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
WINE
D3DDECLTYPE_UDEC3
,
3
,
GL_UNSIGNED_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
WINE
D3DDECLTYPE_DEC3N
,
3
,
GL_SHORT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
WINE
D3DDECLTYPE_FLOAT16_2
,
2
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
WINE
D3DDECLTYPE_FLOAT16_4
,
4
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
short
int
)}};
#define WINED3D_ATR_TYPE(type) glTypeLookup[type].d3dType
#define WINED3D_ATR_SIZE(type) glTypeLookup[type].size
...
...
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