Index: ddraw/glRenderer.cpp |
— | — | @@ -683,7 +683,7 @@ |
684 | 684 | break;
|
685 | 685 | case OP_CREATE:
|
686 | 686 | outputs[0] = (void*)_MakeTexture((GLint)inputs[0],(GLint)inputs[1],(GLint)inputs[2],(GLint)inputs[3],
|
687 | | - (DWORD)inputs[4],(DWORD)inputs[5],(GLint)inputs[6],(GLint)inputs[7],(GLint)inputs[8]);
|
| 687 | + (DWORD)inputs[4],(DWORD)inputs[5],(GLint)inputs[6],(GLint)inputs[7],(GLint)inputs[8],true);
|
688 | 688 | break;
|
689 | 689 | case OP_UPLOAD:
|
690 | 690 | _UploadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
|
— | — | @@ -992,7 +992,7 @@ |
993 | 993 | return DD_OK;
|
994 | 994 | }
|
995 | 995 |
|
996 | | -GLuint glRenderer::_MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3)
|
| 996 | +GLuint glRenderer::_MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3, bool setsync)
|
997 | 997 | {
|
998 | 998 | GLuint texture;
|
999 | 999 | glGenTextures(1,&texture);
|
— | — | @@ -1002,7 +1002,7 @@ |
1003 | 1003 | glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,(GLfloat)wraps);
|
1004 | 1004 | glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,(GLfloat)wrapt);
|
1005 | 1005 | glTexImage2D(GL_TEXTURE_2D,0,texformat3,width,height,0,texformat1,texformat2,NULL);
|
1006 | | - SetEvent(busy);
|
| 1006 | + if(setsync) SetEvent(busy);
|
1007 | 1007 | return texture;
|
1008 | 1008 | }
|
1009 | 1009 |
|
— | — | @@ -1012,7 +1012,7 @@ |
1013 | 1013 | SetActiveTexture(0);
|
1014 | 1014 | if(!backbuffer)
|
1015 | 1015 | {
|
1016 | | - backbuffer = _MakeTexture(GL_LINEAR,GL_LINEAR,GL_CLAMP_TO_EDGE,GL_CLAMP_TO_EDGE,x,y,GL_BGRA,GL_UNSIGNED_BYTE,GL_RGBA8);
|
| 1016 | + backbuffer = _MakeTexture(GL_LINEAR,GL_LINEAR,GL_CLAMP_TO_EDGE,GL_CLAMP_TO_EDGE,x,y,GL_BGRA,GL_UNSIGNED_BYTE,GL_RGBA8,false);
|
1017 | 1017 | backx = x;
|
1018 | 1018 | backy = y;
|
1019 | 1019 | }
|
Index: ddraw/glRenderer.h |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | 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);
|
104 | 104 | HRESULT _Blt(LPRECT lpDestRect, glDirectDrawSurface7 *src,
|
105 | 105 | glDirectDrawSurface7 *dest, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx);
|
106 | | - GLuint _MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3);
|
| 106 | + GLuint _MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3, bool setsync);
|
107 | 107 | void _DrawScreen(GLuint texture, GLuint paltex, glDirectDrawSurface7 *dest, glDirectDrawSurface7 *src, bool setsync);
|
108 | 108 | void _DeleteTexture(GLuint texture);
|
109 | 109 | void _DrawBackbuffer(GLuint *texture, int x, int y);
|