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
7d31ab95
Commit
7d31ab95
authored
Jun 21, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add support for VBOs to the drawing code.
parent
a796b8a3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
10 deletions
+34
-10
device.c
dlls/wined3d/device.c
+1
-5
drawprim.c
dlls/wined3d/drawprim.c
+0
-0
vertexbuffer.c
dlls/wined3d/vertexbuffer.c
+2
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+30
-4
wined3d_types.h
include/wine/wined3d_types.h
+1
-0
No files found.
dlls/wined3d/device.c
View file @
7d31ab95
...
...
@@ -5107,14 +5107,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DVertexBufferImpl
*
SrcImpl
=
(
IWineD3DVertexBufferImpl
*
)
pVertexDecl
;
WineDirect3DVertexStridedData
strided
;
HRESULT
hr
;
TRACE
(
"(%p)->(%d,%d,%d,%p,%p,%ld
\n
"
,
This
,
SrcStartIndex
,
DestIndex
,
VertexCount
,
pDestBuffer
,
pVertexDecl
,
Flags
);
hr
=
IWineD3DDevice_SetFVF
(
iface
,
SrcImpl
->
fvf
);
hr
=
IWineD3DDevice_SetStreamSource
(
iface
,
0
,
pVertexDecl
,
get_flexible_vertex_size
(
SrcImpl
->
fvf
)
*
SrcStartIndex
,
get_flexible_vertex_size
(
SrcImpl
->
fvf
));
memset
(
&
strided
,
0
,
sizeof
(
strided
));
primitiveConvert
ToStridedData
(
iface
,
&
strided
,
0
);
primitiveConvert
FVFtoOffset
(
SrcImpl
->
fvf
,
get_flexible_vertex_size
(
SrcImpl
->
fvf
),
SrcImpl
->
resource
.
allocatedMemory
+
get_flexible_vertex_size
(
SrcImpl
->
fvf
)
*
SrcStartIndex
,
&
strided
,
0
);
return
process_vertices_strided
(
This
,
DestIndex
,
VertexCount
,
&
strided
,
SrcImpl
->
fvf
,
(
IWineD3DVertexBufferImpl
*
)
pDestBuffer
,
Flags
);
}
...
...
dlls/wined3d/drawprim.c
View file @
7d31ab95
This diff is collapsed.
Click to expand it.
dlls/wined3d/vertexbuffer.c
View file @
7d31ab95
...
...
@@ -152,8 +152,9 @@ const IWineD3DVertexBufferVtbl IWineD3DVertexBuffer_Vtbl =
IWineD3DVertexBufferImpl_GetDesc
};
BYTE
*
WINAPI
IWineD3DVertexBufferImpl_GetMemory
(
IWineD3DVertexBuffer
*
iface
,
DWORD
iOffset
)
{
BYTE
*
WINAPI
IWineD3DVertexBufferImpl_GetMemory
(
IWineD3DVertexBuffer
*
iface
,
DWORD
iOffset
,
GLint
*
vbo
)
{
IWineD3DVertexBufferImpl
*
This
=
(
IWineD3DVertexBufferImpl
*
)
iface
;
*
vbo
=
0
;
return
This
->
resource
.
allocatedMemory
+
iOffset
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
7d31ab95
...
...
@@ -357,9 +357,21 @@ void drawPrimitive(IWineD3DDevice *iface,
int
minIndex
,
WineDirect3DVertexStridedData
*
DrawPrimStrideData
);
void
primitiveConvertToStridedData
(
IWineD3DDevice
*
iface
,
WineDirect3DVertexStridedData
*
strided
,
LONG
BaseVertexIndex
);
void
primitiveConvertToStridedData
(
IWineD3DDevice
*
iface
,
WineDirect3DVertexStridedData
*
strided
,
LONG
BaseVertexIndex
,
BOOL
*
fixup
);
void
primitiveDeclarationConvertToStridedData
(
IWineD3DDevice
*
iface
,
BOOL
useVertexShaderFunction
,
WineDirect3DVertexStridedData
*
strided
,
LONG
BaseVertexIndex
,
DWORD
*
fvf
,
BOOL
*
fixup
);
void
primitiveConvertFVFtoOffset
(
DWORD
thisFVF
,
DWORD
stride
,
BYTE
*
data
,
WineDirect3DVertexStridedData
*
strided
,
GLint
streamVBO
);
DWORD
get_flexible_vertex_size
(
DWORD
d3dvtVertexType
);
...
...
@@ -615,10 +627,24 @@ typedef struct IWineD3DVertexBufferImpl
/* WineD3DVertexBuffer specifics */
DWORD
fvf
;
/* Vertex buffer object support */
GLuint
vbo
;
BYTE
Flags
;
UINT
stream
;
UINT
dirtystart
,
dirtyend
;
/* Last description of the buffer */
WineDirect3DVertexStridedData
strided
;
}
IWineD3DVertexBufferImpl
;
extern
const
IWineD3DVertexBufferVtbl
IWineD3DVertexBuffer_Vtbl
;
#define VBFLAG_LOAD 0x01
/* Data is written from allocatedMemory to the VBO */
#define VBFLAG_OPTIMIZED 0x02
/* Optimize has been called for the VB */
#define VBFLAG_DIRTY 0x04
/* Buffer data has been modified */
#define VBFLAG_STREAM 0x08
/* The vertex buffer is in a stream */
#define VBFLAG_HASDESC 0x10
/* A vertex description has been found */
/*****************************************************************************
* IWineD3DIndexBuffer implementation structure (extends IWineD3DResourceImpl)
...
...
@@ -1220,7 +1246,7 @@ void multiply_matrix(D3DMATRIX *dest, D3DMATRIX *src1, D3DMATRIX *src2);
extern
BOOL
WINAPI
IWineD3DBaseTextureImpl_SetDirty
(
IWineD3DBaseTexture
*
iface
,
BOOL
);
extern
BOOL
WINAPI
IWineD3DBaseTextureImpl_GetDirty
(
IWineD3DBaseTexture
*
iface
);
extern
BYTE
*
WINAPI
IWineD3DVertexBufferImpl_GetMemory
(
IWineD3DVertexBuffer
*
iface
,
DWORD
iOffset
);
extern
BYTE
*
WINAPI
IWineD3DVertexBufferImpl_GetMemory
(
IWineD3DVertexBuffer
*
iface
,
DWORD
iOffset
,
GLint
*
vbo
);
extern
HRESULT
WINAPI
IWineD3DVertexBufferImpl_ReleaseMemory
(
IWineD3DVertexBuffer
*
iface
);
extern
HRESULT
WINAPI
IWineD3DBaseTextureImpl_BindTexture
(
IWineD3DBaseTexture
*
iface
);
extern
HRESULT
WINAPI
IWineD3DBaseTextureImpl_UnBindTexture
(
IWineD3DBaseTexture
*
iface
);
...
...
include/wine/wined3d_types.h
View file @
7d31ab95
...
...
@@ -898,6 +898,7 @@ typedef struct WineDirect3DStridedData {
BYTE
*
lpData
;
/* Pointer to start of data */
DWORD
dwStride
;
/* Stride between occurances of this data */
DWORD
dwType
;
/* Type (as in D3DVSDT_TYPE) */
int
VBO
;
/* Vertex buffer object this data is in */
}
WineDirect3DStridedData
;
typedef
struct
WineDirect3DVertexStridedData
{
...
...
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