wined3d: Get rid of last_device.

This commit is contained in:
Henri Verbeet 2009-07-23 10:54:34 +02:00 committed by Alexandre Julliard
parent 401e99b0c0
commit 9253bbcb05
3 changed files with 0 additions and 17 deletions

View File

@ -29,19 +29,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
#define GLINFO_LOCATION (*gl_info)
/* The last used device.
*
* If the application creates multiple devices and switches between them, ActivateContext has to
* change the opengl context. This flag allows to keep track which device is active
*/
static IWineD3DDeviceImpl *last_device;
static DWORD wined3d_context_tls_idx;
void context_set_last_device(IWineD3DDeviceImpl *device)
{
last_device = device;
}
/* FBO helper functions */
/* GL locking is done by the caller */
@ -1193,7 +1182,6 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
}
LEAVE_GL();
context_set_last_device(This);
This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE);
return ret;
@ -1283,8 +1271,6 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context)
context_destroy_gl_resources(context);
destroy = TRUE;
context_set_last_device(NULL);
if (This->activeContext == context)
{
This->activeContext = NULL;
@ -1840,7 +1826,6 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
}
}
This->activeContext = context;
context_set_last_device(This);
switch (usage) {
case CTXUSAGE_CLEAR:

View File

@ -284,7 +284,6 @@ static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx)
ERR_(d3d_caps)("Failed to make fake GL context current.\n");
goto fail;
}
context_set_last_device(NULL);
return TRUE;

View File

@ -1271,7 +1271,6 @@ void context_attach_depth_stencil_fbo(struct WineD3DContext *context,
GLenum fbo_target, IWineD3DSurface *depth_stencil, BOOL use_render_buffer);
void context_attach_surface_fbo(const struct WineD3DContext *context,
GLenum fbo_target, DWORD idx, IWineD3DSurface *surface);
void context_set_last_device(IWineD3DDeviceImpl *device);
struct WineD3DContext *context_get_current(void);
DWORD context_get_tls_idx(void);
BOOL context_set_current(struct WineD3DContext *ctx);