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
5d94fe20
Commit
5d94fe20
authored
Mar 18, 2010
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a function for deleting the GL buffer.
parent
f2fe2f7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
buffer.c
dlls/wined3d/buffer.c
+14
-12
No files found.
dlls/wined3d/buffer.c
View file @
5d94fe20
...
...
@@ -97,6 +97,18 @@ static inline BOOL buffer_is_fully_dirty(struct wined3d_buffer *This)
return
FALSE
;
}
/* Context activation is done by the caller */
static
void
delete_gl_buffer
(
struct
wined3d_buffer
*
This
)
{
if
(
!
This
->
buffer_object
)
return
;
ENTER_GL
();
GL_EXTCALL
(
glDeleteBuffersARB
(
1
,
&
This
->
buffer_object
));
checkGLcall
(
"glDeleteBuffersARB"
);
LEAVE_GL
();
This
->
buffer_object
=
0
;
}
/* Context activation is done by the caller. */
static
void
buffer_create_buffer_object
(
struct
wined3d_buffer
*
This
)
{
...
...
@@ -203,13 +215,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This)
fail:
/* Clean up all vbo init, but continue because we can work without a vbo :-) */
ERR
(
"Failed to create a vertex buffer object. Continuing, but performance issues may occur
\n
"
);
if
(
This
->
buffer_object
)
{
ENTER_GL
();
GL_EXTCALL
(
glDeleteBuffersARB
(
1
,
&
This
->
buffer_object
));
LEAVE_GL
();
}
This
->
buffer_object
=
0
;
delete_gl_buffer
(
This
);
buffer_clear_dirty_areas
(
This
);
}
...
...
@@ -691,11 +697,7 @@ static void STDMETHODCALLTYPE buffer_UnLoad(IWineD3DBuffer *iface)
This
->
flags
&=
~
WINED3D_BUFFER_DOUBLEBUFFER
;
}
ENTER_GL
();
GL_EXTCALL
(
glDeleteBuffersARB
(
1
,
&
This
->
buffer_object
));
checkGLcall
(
"glDeleteBuffersARB"
);
LEAVE_GL
();
This
->
buffer_object
=
0
;
delete_gl_buffer
(
This
);
This
->
flags
|=
WINED3D_BUFFER_CREATEBO
;
/* Recreate the buffer object next load */
buffer_clear_dirty_areas
(
This
);
...
...
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