From ab8264a86dea793dc7adde97b619253a7c1a1f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 28 Sep 2006 00:12:34 +0200 Subject: [PATCH] wined3d: Tell gl about the surface alignment. --- dlls/wined3d/device.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 943a616b879..9d3b5a0193b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1865,6 +1865,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic glXMakeCurrent(object->display, oldDrawable, oldContext); } + /* Set the surface alignment. This never changes, so we are safe to set it once per context*/ + glPixelStorei(GL_PACK_ALIGNMENT, 4); + checkGLcall("glPixelStorei(GL_PACK_ALIGNMENT, 4);"); + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + checkGLcall("glPixelStorei(GL_UNPACK_ALIGNMENT, 4);"); + LEAVE_GL(); TRACE("Set swapchain to %p\n", object);