Index: ddraw/glExtensions.cpp |
— | — | @@ -151,6 +151,7 @@ |
152 | 152 | if(GLEXT_ARB_framebuffer_object)
|
153 | 153 | {
|
154 | 154 | glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)wglGetProcAddress("glGenFramebuffers");
|
| 155 | + if(!glGenFramebuffers) GLEXT_ARB_framebuffer_object = 0;
|
155 | 156 | glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)wglGetProcAddress("glBindFramebuffer");
|
156 | 157 | glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)wglGetProcAddress("glGenRenderbuffers");
|
157 | 158 | glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)wglGetProcAddress("glBindRenderbuffer");
|
— | — | @@ -161,6 +162,7 @@ |
162 | 163 | if(GLEXT_EXT_framebuffer_object)
|
163 | 164 | {
|
164 | 165 | glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)wglGetProcAddress("glGenFramebuffersEXT");
|
| 166 | + if(!glGenFramebuffersEXT) GLEXT_EXT_framebuffer_object = 0;
|
165 | 167 | glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)wglGetProcAddress("glBindFramebufferEXT");
|
166 | 168 | glGenRenderbuffersEXT = (PFNGLGENRENDERBUFFERSEXTPROC)wglGetProcAddress("glGenRenderbuffersEXT");
|
167 | 169 | glBindRenderbufferEXT = (PFNGLBINDRENDERBUFFEREXTPROC)wglGetProcAddress("glBindRenderbufferEXT");
|
Index: ddraw/glRenderer.cpp |
— | — | @@ -493,7 +493,6 @@ |
494 | 494 | hasHWnd = false;
|
495 | 495 | }
|
496 | 496 | SetWindowPos(hRenderWnd,HWND_TOP,0,0,rectRender.right,rectRender.bottom,SWP_SHOWWINDOW);
|
497 | | - wndbusy = false;
|
498 | 497 | if(hRC)
|
499 | 498 | {
|
500 | 499 | wglMakeCurrent(NULL,NULL);
|
— | — | @@ -546,6 +545,7 @@ |
547 | 546 | gllock = false;
|
548 | 547 | return FALSE;
|
549 | 548 | }
|
| 549 | + wndbusy = false;
|
550 | 550 | gllock = false;
|
551 | 551 | InitGLExt();
|
552 | 552 | SetSwap(1);
|
— | — | @@ -642,7 +642,7 @@ |
643 | 643 | bltvertices[0].s = bltvertices[2].s = (GLfloat)srcrect.right / (GLfloat)ddsdSrc.dwWidth;
|
644 | 644 | bltvertices[0].t = bltvertices[1].t = (GLfloat)srcrect.top / (GLfloat)ddsdSrc.dwHeight;
|
645 | 645 | bltvertices[2].t = bltvertices[3].t = (GLfloat)srcrect.bottom / (GLfloat)ddsdSrc.dwHeight;
|
646 | | - glClear(GL_DEPTH_BUFFER_BIT);
|
| 646 | + if(dest->zbuffer) glClear(GL_DEPTH_BUFFER_BIT);
|
647 | 647 | if(dwFlags & DDBLT_COLORFILL)
|
648 | 648 | {
|
649 | 649 | SetShader(PROG_FILL,NULL,true);
|
— | — | @@ -1353,7 +1353,6 @@ |
1354 | 1354 | case GLEVENT_BLT:
|
1355 | 1355 | outputs[0] = (void*)_Blt((LPRECT)inputs[0],(glDirectDrawSurface7*)inputs[1],(glDirectDrawSurface7*)inputs[2],
|
1356 | 1356 | (LPRECT)inputs[3],(DWORD)inputs[4],(LPDDBLTFX)inputs[5]);
|
1357 | | - wndbusy = false;
|
1358 | 1357 | return 0;
|
1359 | 1358 | case GLEVENT_DRAWSCREEN:
|
1360 | 1359 | _DrawScreen((GLuint)inputs[0],(GLuint)inputs[1],(glDirectDrawSurface7*)inputs[2],(glDirectDrawSurface7*)inputs[3]);
|
— | — | @@ -1374,8 +1373,10 @@ |
1375 | 1374 | _DrawIndexedPrimitive((glDirect3DDevice7*)inputs[0],d3dpt,(DWORD)inputs[2],(LPVOID)inputs[3],
|
1376 | 1375 | (DWORD)inputs[4],(LPWORD)inputs[5],(DWORD)inputs[6],(DWORD)inputs[7]);
|
1377 | 1376 | return 0;
|
| 1377 | + default:
|
| 1378 | + return DefWindowProc(hwnd,msg,wParam,lParam);
|
1378 | 1379 | }
|
1379 | | - return DefWindowProc(hwnd,msg,wParam,lParam);
|
| 1380 | + return 0;
|
1380 | 1381 | }
|
1381 | 1382 |
|
1382 | 1383 |
|