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
2bac4a02
Commit
2bac4a02
authored
Oct 12, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Oct 12, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Merge D3DPRIMITIVETYPE types into one type in WINED3D namespace.
parent
1cd7bcf4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
30 deletions
+37
-30
device.c
dlls/wined3d/device.c
+5
-5
drawprim.c
dlls/wined3d/drawprim.c
+7
-7
utils.c
dlls/wined3d/utils.c
+8
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
wined3d_interface.h
include/wine/wined3d_interface.h
+5
-9
wined3d_types.h
include/wine/wined3d_types.h
+11
-0
No files found.
dlls/wined3d/device.c
View file @
2bac4a02
...
...
@@ -6141,7 +6141,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
/*****
* Drawing functions
*****/
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawPrimitive
(
IWineD3DDevice
*
iface
,
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
StartVertex
,
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawPrimitive
(
IWineD3DDevice
*
iface
,
WINE
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
StartVertex
,
UINT
PrimitiveCount
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -6159,7 +6159,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitive(IWineD3DDevice *iface, D3
/* TODO: baseVIndex needs to be provided from This->stateBlock->baseVertexIndex when called from d3d8 */
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawIndexedPrimitive
(
IWineD3DDevice
*
iface
,
D3DPRIMITIVETYPE
PrimitiveType
,
WINE
D3DPRIMITIVETYPE
PrimitiveType
,
INT
baseVIndex
,
UINT
minIndex
,
UINT
NumVertices
,
UINT
startIndex
,
UINT
primCount
)
{
...
...
@@ -6188,7 +6188,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice *
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawPrimitiveUP
(
IWineD3DDevice
*
iface
,
D3DPRIMITIVETYPE
PrimitiveType
,
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawPrimitiveUP
(
IWineD3DDevice
*
iface
,
WINE
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
PrimitiveCount
,
CONST
void
*
pVertexStreamZeroData
,
UINT
VertexStreamZeroStride
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
...
...
@@ -6218,7 +6218,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface,
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawIndexedPrimitiveUP
(
IWineD3DDevice
*
iface
,
D3DPRIMITIVETYPE
PrimitiveType
,
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawIndexedPrimitiveUP
(
IWineD3DDevice
*
iface
,
WINE
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
MinVertexIndex
,
UINT
NumVertices
,
UINT
PrimitiveCount
,
CONST
void
*
pIndexData
,
WINED3DFORMAT
IndexDataFormat
,
CONST
void
*
pVertexStreamZeroData
,
...
...
@@ -6260,7 +6260,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawPrimitiveStrided
(
IWineD3DDevice
*
iface
,
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
PrimitiveCount
,
WineDirect3DVertexStridedData
*
DrawPrimStrideData
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawPrimitiveStrided
(
IWineD3DDevice
*
iface
,
WINE
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
PrimitiveCount
,
WineDirect3DVertexStridedData
*
DrawPrimStrideData
)
{
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
,
0
,
0
,
0
,
NULL
,
0
,
DrawPrimStrideData
);
return
WINED3D_OK
;
...
...
dlls/wined3d/drawprim.c
View file @
2bac4a02
...
...
@@ -39,44 +39,44 @@ extern IWineD3DPixelShaderImpl* PixelShaders[64];
#endif
/* Issues the glBegin call for gl given the primitive type and count */
static
DWORD
primitiveToGl
(
D3DPRIMITIVETYPE
PrimitiveType
,
static
DWORD
primitiveToGl
(
WINE
D3DPRIMITIVETYPE
PrimitiveType
,
DWORD
NumPrimitives
,
GLenum
*
primType
)
{
DWORD
NumVertexes
=
NumPrimitives
;
switch
(
PrimitiveType
)
{
case
D3DPT_POINTLIST
:
case
WINE
D3DPT_POINTLIST
:
TRACE
(
"POINTS
\n
"
);
*
primType
=
GL_POINTS
;
NumVertexes
=
NumPrimitives
;
break
;
case
D3DPT_LINELIST
:
case
WINE
D3DPT_LINELIST
:
TRACE
(
"LINES
\n
"
);
*
primType
=
GL_LINES
;
NumVertexes
=
NumPrimitives
*
2
;
break
;
case
D3DPT_LINESTRIP
:
case
WINE
D3DPT_LINESTRIP
:
TRACE
(
"LINE_STRIP
\n
"
);
*
primType
=
GL_LINE_STRIP
;
NumVertexes
=
NumPrimitives
+
1
;
break
;
case
D3DPT_TRIANGLELIST
:
case
WINE
D3DPT_TRIANGLELIST
:
TRACE
(
"TRIANGLES
\n
"
);
*
primType
=
GL_TRIANGLES
;
NumVertexes
=
NumPrimitives
*
3
;
break
;
case
D3DPT_TRIANGLESTRIP
:
case
WINE
D3DPT_TRIANGLESTRIP
:
TRACE
(
"TRIANGLE_STRIP
\n
"
);
*
primType
=
GL_TRIANGLE_STRIP
;
NumVertexes
=
NumPrimitives
+
2
;
break
;
case
D3DPT_TRIANGLEFAN
:
case
WINE
D3DPT_TRIANGLEFAN
:
TRACE
(
"TRIANGLE_FAN
\n
"
);
*
primType
=
GL_TRIANGLE_FAN
;
NumVertexes
=
NumPrimitives
+
2
;
...
...
dlls/wined3d/utils.c
View file @
2bac4a02
...
...
@@ -355,18 +355,18 @@ const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res) {
}
}
const
char
*
debug_d3dprimitivetype
(
D3DPRIMITIVETYPE
PrimitiveType
)
{
const
char
*
debug_d3dprimitivetype
(
WINE
D3DPRIMITIVETYPE
PrimitiveType
)
{
switch
(
PrimitiveType
)
{
#define PRIM_TO_STR(prim) case prim: return #prim;
PRIM_TO_STR
(
D3DPT_POINTLIST
);
PRIM_TO_STR
(
D3DPT_LINELIST
);
PRIM_TO_STR
(
D3DPT_LINESTRIP
);
PRIM_TO_STR
(
D3DPT_TRIANGLELIST
);
PRIM_TO_STR
(
D3DPT_TRIANGLESTRIP
);
PRIM_TO_STR
(
D3DPT_TRIANGLEFAN
);
PRIM_TO_STR
(
WINE
D3DPT_POINTLIST
);
PRIM_TO_STR
(
WINE
D3DPT_LINELIST
);
PRIM_TO_STR
(
WINE
D3DPT_LINESTRIP
);
PRIM_TO_STR
(
WINE
D3DPT_TRIANGLELIST
);
PRIM_TO_STR
(
WINE
D3DPT_TRIANGLESTRIP
);
PRIM_TO_STR
(
WINE
D3DPT_TRIANGLEFAN
);
#undef PRIM_TO_STR
default:
FIXME
(
"Unrecognized %u D3DPRIMITIVETYPE!
\n
"
,
PrimitiveType
);
FIXME
(
"Unrecognized %u
WINE
D3DPRIMITIVETYPE!
\n
"
,
PrimitiveType
);
return
"unrecognized"
;
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
2bac4a02
...
...
@@ -1252,7 +1252,7 @@ const char* debug_d3dusagequery(DWORD usagequery);
const
char
*
debug_d3ddeclmethod
(
WINED3DDECLMETHOD
method
);
const
char
*
debug_d3ddecltype
(
WINED3DDECLTYPE
type
);
const
char
*
debug_d3ddeclusage
(
BYTE
usage
);
const
char
*
debug_d3dprimitivetype
(
D3DPRIMITIVETYPE
PrimitiveType
);
const
char
*
debug_d3dprimitivetype
(
WINE
D3DPRIMITIVETYPE
PrimitiveType
);
const
char
*
debug_d3drenderstate
(
DWORD
state
);
const
char
*
debug_d3dsamplerstate
(
DWORD
state
);
const
char
*
debug_d3dtexturestate
(
DWORD
state
);
...
...
include/wine/wined3d_interface.h
View file @
2bac4a02
...
...
@@ -28,10 +28,6 @@
# error You must include config.h to use this header
#endif
#if !defined( __WINE_D3D_H ) && !defined( __WINE_D3D8_H ) && !defined( __WINE_D3D9_H )
# error You must include d3d.h, d3d8.h or d3d9.h header to use this header
#endif
#if !defined( __WINE_DDRAW_H)
#error You must include ddraw.h to use this header
#endif
...
...
@@ -448,11 +444,11 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
STDMETHOD
(
EndScene
)(
THIS
)
PURE
;
STDMETHOD
(
Present
)(
THIS_
CONST
RECT
*
pSourceRect
,
CONST
RECT
*
pDestRect
,
HWND
hDestWindowOverride
,
CONST
RGNDATA
*
pDirtyRegion
)
PURE
;
STDMETHOD
(
Clear
)(
THIS_
DWORD
Count
,
CONST
WINED3DRECT
*
pRects
,
DWORD
Flags
,
WINED3DCOLOR
Color
,
float
Z
,
DWORD
Stencil
)
PURE
;
STDMETHOD
(
DrawPrimitive
)(
THIS_
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
StartVertex
,
UINT
PrimitiveCount
)
PURE
;
STDMETHOD
(
DrawIndexedPrimitive
)(
THIS_
D3DPRIMITIVETYPE
PrimitiveType
,
INT
baseVIdx
,
UINT
minIndex
,
UINT
NumVertices
,
UINT
startIndex
,
UINT
primCount
)
PURE
;
STDMETHOD
(
DrawPrimitiveUP
)(
THIS_
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
PrimitiveCount
,
CONST
void
*
pVertexStreamZeroData
,
UINT
VertexStreamZeroStride
)
PURE
;
STDMETHOD
(
DrawIndexedPrimitiveUP
)(
THIS_
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
MinVertexIndex
,
UINT
NumVertexIndices
,
UINT
PrimitiveCount
,
CONST
void
*
pIndexData
,
WINED3DFORMAT
IndexDataFormat
,
CONST
void
*
pVertexStreamZeroData
,
UINT
VertexStreamZeroStride
)
PURE
;
STDMETHOD
(
DrawPrimitiveStrided
)(
THIS_
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
PrimitiveCount
,
WineDirect3DVertexStridedData
*
DrawPrimStrideData
)
PURE
;
STDMETHOD
(
DrawPrimitive
)(
THIS_
WINED3DPRIMITIVETYPE
PrimitiveType
,
UINT
StartVertex
,
UINT
PrimitiveCount
)
PURE
;
STDMETHOD
(
DrawIndexedPrimitive
)(
THIS_
WINED3DPRIMITIVETYPE
PrimitiveType
,
INT
baseVIdx
,
UINT
minIndex
,
UINT
NumVertices
,
UINT
startIndex
,
UINT
primCount
)
PURE
;
STDMETHOD
(
DrawPrimitiveUP
)(
THIS_
WINED3DPRIMITIVETYPE
PrimitiveType
,
UINT
PrimitiveCount
,
CONST
void
*
pVertexStreamZeroData
,
UINT
VertexStreamZeroStride
)
PURE
;
STDMETHOD
(
DrawIndexedPrimitiveUP
)(
THIS_
WINED3DPRIMITIVETYPE
PrimitiveType
,
UINT
MinVertexIndex
,
UINT
NumVertexIndices
,
UINT
PrimitiveCount
,
CONST
void
*
pIndexData
,
WINED3DFORMAT
IndexDataFormat
,
CONST
void
*
pVertexStreamZeroData
,
UINT
VertexStreamZeroStride
)
PURE
;
STDMETHOD
(
DrawPrimitiveStrided
)(
THIS_
WINE
D3DPRIMITIVETYPE
PrimitiveType
,
UINT
PrimitiveCount
,
WineDirect3DVertexStridedData
*
DrawPrimStrideData
)
PURE
;
STDMETHOD
(
DrawRectPatch
)(
THIS_
UINT
Handle
,
CONST
float
*
pNumSegs
,
CONST
WINED3DRECTPATCH_INFO
*
pRectPatchInfo
)
PURE
;
STDMETHOD
(
DrawTriPatch
)(
THIS_
UINT
Handle
,
CONST
float
*
pNumSegs
,
CONST
WINED3DTRIPATCH_INFO
*
pTriPatchInfo
)
PURE
;
STDMETHOD
(
DeletePatch
)(
THIS_
UINT
Handle
)
PURE
;
...
...
include/wine/wined3d_types.h
View file @
2bac4a02
...
...
@@ -41,6 +41,17 @@ typedef enum _WINED3DLIGHTTYPE {
WINED3DLIGHT_FORCE_DWORD
=
0x7fffffff
}
WINED3DLIGHTTYPE
;
typedef
enum
_WINED3DPRIMITIVETYPE
{
WINED3DPT_POINTLIST
=
1
,
WINED3DPT_LINELIST
=
2
,
WINED3DPT_LINESTRIP
=
3
,
WINED3DPT_TRIANGLELIST
=
4
,
WINED3DPT_TRIANGLESTRIP
=
5
,
WINED3DPT_TRIANGLEFAN
=
6
,
WINED3DPT_FORCE_DWORD
=
0x7fffffff
}
WINED3DPRIMITIVETYPE
;
typedef
struct
_WINED3DCOLORVALUE
{
float
r
;
float
g
;
...
...
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