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
964f4b01
Commit
964f4b01
authored
Jun 25, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make sure we have an active GL context in buffer_PreLoad().
parent
11fd358c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
buffer.c
dlls/wined3d/buffer.c
+3
-4
drawprim.c
dlls/wined3d/drawprim.c
+5
-5
No files found.
dlls/wined3d/buffer.c
View file @
964f4b01
...
...
@@ -37,13 +37,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
static
void
buffer_create_buffer_object
(
struct
wined3d_buffer
*
This
)
{
GLenum
error
,
gl_usage
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
TRACE
(
"Creating an OpenGL vertex buffer object for IWineD3DVertexBuffer %p Usage(%s)
\n
"
,
This
,
debug_d3dusage
(
This
->
resource
.
usage
));
/* Make sure that a context is there. Needed in a multithreaded environment. Otherwise this call is a nop */
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
/* Make sure that the gl error is cleared. Do not use checkGLcall
...
...
@@ -689,6 +686,8 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
TRACE
(
"iface %p
\n
"
,
iface
);
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
if
(
!
This
->
buffer_object
)
{
/* TODO: Make converting independent from VBOs */
...
...
@@ -724,7 +723,7 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
if
(
This
->
conversion_count
>
VB_MAXDECLCHANGES
)
{
FIXME
(
"Too many declaration changes, stopping converting
\n
"
);
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
GL_EXTCALL
(
glDeleteBuffersARB
(
1
,
&
This
->
buffer_object
));
checkGLcall
(
"glDeleteBuffersARB"
);
...
...
dlls/wined3d/drawprim.c
View file @
964f4b01
...
...
@@ -756,6 +756,11 @@ HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This,
GLenum
feedback_type
;
GLfloat
*
feedbuffer
;
/* Simply activate the context for blitting. This disables all the things we don't want and
* takes care of dirtifying. Dirtifying is preferred over pushing / popping, since drawing the
* patch (as opposed to normal draws) will most likely need different changes anyway. */
ActivateContext
(
This
,
This
->
lastActiveRenderTarget
,
CTXUSAGE_BLIT
);
/* First, locate the position data. This is provided in a vertex buffer in the stateblock.
* Beware of vbos
*/
...
...
@@ -806,11 +811,6 @@ HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This,
patch
->
has_normals
=
TRUE
;
patch
->
has_texcoords
=
FALSE
;
/* Simply activate the context for blitting. This disables all the things we don't want and
* takes care of dirtifying. Dirtifying is preferred over pushing / popping, since drawing the
* patch (as opposed to normal draws) will most likely need different changes anyway
*/
ActivateContext
(
This
,
This
->
lastActiveRenderTarget
,
CTXUSAGE_BLIT
);
ENTER_GL
();
glMatrixMode
(
GL_PROJECTION
);
...
...
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