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
efc03f0a
Commit
efc03f0a
authored
Feb 20, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Index buffer fixes.
parent
6d66347c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
device.c
dlls/ddraw/device.c
+1
-1
direct3d.c
dlls/ddraw/direct3d.c
+1
-1
device.c
dlls/wined3d/device.c
+1
-1
indexbuffer.c
dlls/wined3d/indexbuffer.c
+7
-2
No files found.
dlls/ddraw/device.c
View file @
efc03f0a
...
...
@@ -3691,7 +3691,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
*/
hr
=
IWineD3DIndexBuffer_Lock
(
This
->
indexbuffer
,
0
/* OffSetToLock */
,
0
/* SizeToLock - doesn't matter */
,
IndexCount
*
sizeof
(
WORD
)
,
(
BYTE
**
)
&
LockedIndices
,
0
/* Flags */
);
assert
(
IndexCount
<
0x100000
);
...
...
dlls/ddraw/direct3d.c
View file @
efc03f0a
...
...
@@ -804,7 +804,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface,
*/
hr
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
wineD3DDevice
,
0x40000
,
/* Length. Don't know how long it should be */
0
,
/* Usage */
WINED3DUSAGE_DYNAMIC
,
/* Usage */
WINED3DFMT_INDEX16
,
/* Format. D3D7 uses WORDS */
WINED3DPOOL_DEFAULT
,
&
object
->
indexbuffer
,
...
...
dlls/wined3d/device.c
View file @
efc03f0a
...
...
@@ -4294,7 +4294,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice *
UINT
idxStride
=
2
;
IWineD3DIndexBuffer
*
pIB
;
WINED3DINDEXBUFFER_DESC
IdxBufDsc
;
GLint
vbo
;
GL
u
int
vbo
;
pIB
=
This
->
stateBlock
->
pIndexData
;
This
->
stateBlock
->
streamIsUP
=
FALSE
;
...
...
dlls/wined3d/indexbuffer.c
View file @
efc03f0a
...
...
@@ -60,8 +60,11 @@ static ULONG WINAPI IWineD3DIndexBufferImpl_Release(IWineD3DIndexBuffer *iface)
if
(
ref
==
0
)
{
if
(
This
->
vbo
)
{
ENTER_GL
();
GL_EXTCALL
(
glBindBufferARB
(
GL_ELEMENT_ARRAY_BUFFER_ARB
,
0
));
checkGLcall
(
"glBindBufferARB"
);
/* No need to manually unset the buffer. glDeleteBuffers unsets it for the current context,
* but not for other contexts. However, because the d3d buffer is destroyed the app has to
* unset it before doing the next draw, thus dirtifying the index buffer state and forcing
* binding a new buffer
*/
GL_EXTCALL
(
glDeleteBuffersARB
(
1
,
&
This
->
vbo
));
checkGLcall
(
"glDeleteBuffersARB"
);
LEAVE_GL
();
...
...
@@ -159,6 +162,8 @@ static HRESULT WINAPI IWineD3DIndexBufferImpl_Unlock(IWineD3DIndexBuffer *iface)
LEAVE_GL
();
This
->
dirtystart
=
0
;
This
->
dirtyend
=
0
;
/* TODO: Move loading into preload when the buffer is used, that avoids dirtifying the state */
IWineD3DDeviceImpl_MarkStateDirty
(
This
->
resource
.
wineD3DDevice
,
STATE_INDEXBUFFER
);
}
return
WINED3D_OK
;
}
...
...
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