wined3d: Make it clear that glFlush and glFinish are WGL functions.

This commit is contained in:
Stefan Dösinger 2009-08-26 11:44:34 +02:00 committed by Alexandre Julliard
parent 21f4e42a98
commit 52731a80c8
4 changed files with 15 additions and 12 deletions

View File

@ -4854,7 +4854,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_EndScene(IWineD3DDevice *iface) {
ActivateContext(This, NULL, CTXUSAGE_RESOURCELOAD);
/* We only have to do this if we need to read the, swapbuffers performs a flush for us */
glFlush();
wglFlush();
/* No checkGLcall here to avoid locking the lock just for checking a call that hardly ever
* fails
*/
@ -5067,7 +5067,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfa
if (SUCCEEDED(IWineD3DSurface_GetContainer((IWineD3DSurface *)target, &IID_IWineD3DSwapChain, (void **)&swapchain))) {
if (target == (IWineD3DSurfaceImpl*) swapchain->frontBuffer) {
glFlush();
wglFlush();
}
IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
}

View File

@ -576,7 +576,7 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info)
checkGLcall("Loading the PBO test texture");
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
glFinish(); /* just to be sure */
wglFinish(); /* just to be sure */
memset(check, 0, sizeof(check));
glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, check);
@ -4646,11 +4646,11 @@ BOOL InitAdapters(IWineD3DImpl *This)
* otherwise because we have to use winex11.drv's override
*/
#ifdef USE_WIN32_OPENGL
glFinish = (void*)GetProcAddress(mod_gl, "glFinish");
glFlush = (void*)GetProcAddress(mod_gl, "glFlush");
wglFinish = (void*)GetProcAddress(mod_gl, "glFinish");
wglFlush = (void*)GetProcAddress(mod_gl, "glFlush");
#else
glFinish = (void*)pwglGetProcAddress("wglFinish");
glFlush = (void*)pwglGetProcAddress("wglFlush");
wglFinish = (void*)pwglGetProcAddress("wglFinish");
wglFlush = (void*)pwglGetProcAddress("wglFlush");
#endif
glEnableWINE = glEnable;

View File

@ -3814,7 +3814,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
/* Flush in case the drawable is used by multiple GL contexts */
if(dstSwapchain && (This == (IWineD3DSurfaceImpl *) dstSwapchain->frontBuffer || dstSwapchain->num_contexts >= 2))
glFlush();
wglFlush();
/* TODO: If the surface is locked often, perform the Blt in software on the memory instead */
/* The surface is now in the drawable. On onscreen surfaces or without fbos the texture
@ -4680,7 +4680,7 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
/* Make sure to flush the buffers. This is needed in apps like Red Alert II and Tiberian SUN that use multiple WGL contexts. */
if(((IWineD3DSwapChainImpl*)swapchain)->frontBuffer == (IWineD3DSurface*)This ||
((IWineD3DSwapChainImpl*)swapchain)->num_contexts >= 2)
glFlush();
wglFlush();
IWineD3DSwapChain_Release(swapchain);
} else {

View File

@ -1141,10 +1141,13 @@ void (WINE_GLAPI *glViewport) (GLint x, GLint y, GLsizei width, GLsizei height);
void (WINE_GLAPI *glPointParameterfv) (GLenum pname, const GLfloat *params);
/* glFinish and glFlush are always loaded from opengl32.dll, thus they always have
* __stdcall calling convention
* __stdcall calling convention.
*
* They are wgl functions and must not be called inside the gl lock, give them a
* name that makes this clear
*/
void (__stdcall *glFinish) ();
void (__stdcall *glFlush) ();
void (__stdcall *wglFinish) ();
void (__stdcall *wglFlush) ();
/* WGL functions */
HGLRC (WINAPI *pwglCreateContext)(HDC);