Index: ddraw/glRenderer.cpp |
— | — | @@ -675,7 +675,8 @@ |
676 | 676 | break;
|
677 | 677 | case OP_CREATE:
|
678 | 678 | outputs[0] = (void*)_MakeTexture((GLint)inputs[0],(GLint)inputs[1],(GLint)inputs[2],(GLint)inputs[3],
|
679 | | - (DWORD)inputs[4],(DWORD)inputs[5],(GLint)inputs[6],(GLint)inputs[7],(GLint)inputs[8],true);
|
| 679 | + (DWORD)inputs[4],(DWORD)inputs[5],(GLint)inputs[6],(GLint)inputs[7],(GLint)inputs[8]);
|
| 680 | + SetEvent(busy);
|
680 | 681 | break;
|
681 | 682 | case OP_UPLOAD:
|
682 | 683 | _UploadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
|
— | — | @@ -693,7 +694,7 @@ |
694 | 695 | _DeleteTexture((GLuint)inputs[0]);
|
695 | 696 | break;
|
696 | 697 | case OP_BLT:
|
697 | | - outputs[0] = (void*)_Blt((LPRECT)inputs[0],(glDirectDrawSurface7*)inputs[1],(glDirectDrawSurface7*)inputs[2],
|
| 698 | + _Blt((LPRECT)inputs[0],(glDirectDrawSurface7*)inputs[1],(glDirectDrawSurface7*)inputs[2],
|
698 | 699 | (LPRECT)inputs[3],(DWORD)inputs[4],(LPDDBLTFX)inputs[5]);
|
699 | 700 | break;
|
700 | 701 | case OP_DRAWSCREEN:
|
— | — | @@ -830,7 +831,7 @@ |
831 | 832 | return TRUE;
|
832 | 833 | }
|
833 | 834 |
|
834 | | -HRESULT glRenderer::_Blt(LPRECT lpDestRect, glDirectDrawSurface7 *src,
|
| 835 | +void glRenderer::_Blt(LPRECT lpDestRect, glDirectDrawSurface7 *src,
|
835 | 836 | glDirectDrawSurface7 *dest, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx)
|
836 | 837 | {
|
837 | 838 | LONG sizes[6];
|
— | — | @@ -974,11 +975,11 @@ |
975 | 976 | (ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)) ||
|
976 | 977 | ((ddsd.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) &&
|
977 | 978 | !(ddsd.ddsCaps.dwCaps & DDSCAPS_FLIP)))_DrawScreen(dest->texture,dest->paltex,dest,dest,false);
|
| 979 | + outputs[0] = DD_OK;
|
978 | 980 | SetEvent(busy);
|
979 | | - return DD_OK;
|
980 | 981 | }
|
981 | 982 |
|
982 | | -GLuint glRenderer::_MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3, bool setsync)
|
| 983 | +GLuint glRenderer::_MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3)
|
983 | 984 | {
|
984 | 985 | GLuint texture;
|
985 | 986 | glGenTextures(1,&texture);
|
— | — | @@ -988,7 +989,6 @@ |
989 | 990 | glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,(GLfloat)wraps);
|
990 | 991 | glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,(GLfloat)wrapt);
|
991 | 992 | glTexImage2D(GL_TEXTURE_2D,0,texformat3,width,height,0,texformat1,texformat2,NULL);
|
992 | | - if(setsync) SetEvent(busy);
|
993 | 993 | return texture;
|
994 | 994 | }
|
995 | 995 |
|
— | — | @@ -998,7 +998,7 @@ |
999 | 999 | SetActiveTexture(0);
|
1000 | 1000 | if(!backbuffer)
|
1001 | 1001 | {
|
1002 | | - backbuffer = _MakeTexture(GL_LINEAR,GL_LINEAR,GL_CLAMP_TO_EDGE,GL_CLAMP_TO_EDGE,x,y,GL_BGRA,GL_UNSIGNED_BYTE,GL_RGBA8,false);
|
| 1002 | + backbuffer = _MakeTexture(GL_LINEAR,GL_LINEAR,GL_CLAMP_TO_EDGE,GL_CLAMP_TO_EDGE,x,y,GL_BGRA,GL_UNSIGNED_BYTE,GL_RGBA8);
|
1003 | 1003 | backx = x;
|
1004 | 1004 | backy = y;
|
1005 | 1005 | }
|
Index: ddraw/glRenderer.h |
— | — | @@ -105,9 +105,9 @@ |
106 | 106 | BOOL _InitGL(int width, int height, int bpp, int fullscreen, HWND hWnd, glDirectDraw7 *glDD7);
|
107 | 107 | void _UploadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2, int texformat3);
|
108 | 108 | void _DownloadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y, int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2);
|
109 | | - HRESULT _Blt(LPRECT lpDestRect, glDirectDrawSurface7 *src,
|
| 109 | + void _Blt(LPRECT lpDestRect, glDirectDrawSurface7 *src,
|
110 | 110 | glDirectDrawSurface7 *dest, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx);
|
111 | | - GLuint _MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3, bool setsync);
|
| 111 | + GLuint _MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3);
|
112 | 112 | void _DrawScreen(GLuint texture, GLuint paltex, glDirectDrawSurface7 *dest, glDirectDrawSurface7 *src, bool setsync);
|
113 | 113 | void _DeleteTexture(GLuint texture);
|
114 | 114 | void _DrawBackbuffer(GLuint *texture, int x, int y);
|