wined3d: Mark the draw buffer as dirty in context_create().
commitcd623036fc1b01517e789fe675675a9f94428dcd
authorHenri Verbeet <hverbeet@codeweavers.com>
Tue, 15 Dec 2009 16:51:37 +0000 (15 17:51 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 16 Dec 2009 11:22:29 +0000 (16 12:22 +0100)
treefecb4e7cb2d1c2a484ffedb65889f34df5bb29ce
parenta215d326a59415745fd6ba31deb2f2a0a0920788
wined3d: Mark the draw buffer as dirty in context_create().

Currently callers of this function are responsible for setting the draw buffer
correctly, but they don't do a very good job:
  - swapchain_init() sets the draw buffer to GL_BACK if there's a back buffer,
    even though the context's target is always the front buffer.
  - swapchain_create_context_for_thread() depends on (eventually) being called
    by FindContext().
  - create_primary_opengl_context() and
    IWineD3DSwapChainImpl_SetDestWindowOverride() don't bother setting a draw
    buffer at all.
Just marking the draw buffer dirty lets the context management sort it all
out, and is much simpler.
dlls/wined3d/context.c
dlls/wined3d/swapchain.c