| Index: ddraw/glRenderer.cpp |
| — | — | @@ -135,7 +135,6 @@ |
| 136 | 136 | }
|
| 137 | 137 | glTexImage2D(GL_TEXTURE_2D,0,texformat3,bigx,bigy,0,texformat,texformat2,bigbuffer);
|
| 138 | 138 | }
|
| 139 | | - return 0;
|
| 140 | 139 | }
|
| 141 | 140 |
|
| 142 | 141 | /**
|
| — | — | @@ -191,7 +190,6 @@ |
| 192 | 191 | break;
|
| 193 | 192 | }
|
| 194 | 193 | }
|
| 195 | | - return 0;
|
| 196 | 194 | }
|
| 197 | 195 |
|
| 198 | 196 | /**
|
| — | — | @@ -343,7 +341,7 @@ |
| 344 | 342 | * @param texformat3
|
| 345 | 343 | * OpenGL internalformat parameter for glTexImage2D
|
| 346 | 344 | */
|
| 347 | | -int glRenderer::UploadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y,
|
| | 345 | +void glRenderer::UploadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y,
|
| 348 | 346 | int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2, int texformat3)
|
| 349 | 347 | {
|
| 350 | 348 | EnterCriticalSection(&cs);
|
| — | — | @@ -373,7 +371,6 @@ |
| 374 | 372 | Sleep(0);
|
| 375 | 373 | }
|
| 376 | 374 | LeaveCriticalSection(&cs);
|
| 377 | | - return (int)outputs[0];
|
| 378 | 375 | }
|
| 379 | 376 |
|
| 380 | 377 | /**
|
| — | — | @@ -400,7 +397,7 @@ |
| 401 | 398 | * @param texformat2
|
| 402 | 399 | * OpenGL type parameter for glGetTexImage
|
| 403 | 400 | */
|
| 404 | | -int glRenderer::DownloadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y,
|
| | 401 | +void glRenderer::DownloadTexture(char *buffer, char *bigbuffer, GLuint texture, int x, int y,
|
| 405 | 402 | int bigx, int bigy, int pitch, int bigpitch, int bpp, int texformat, int texformat2)
|
| 406 | 403 | {
|
| 407 | 404 | EnterCriticalSection(&cs);
|
| — | — | @@ -429,7 +426,6 @@ |
| 430 | 427 | Sleep(0);
|
| 431 | 428 | }
|
| 432 | 429 | LeaveCriticalSection(&cs);
|
| 433 | | - return (int)outputs[0];
|
| 434 | 430 | }
|
| 435 | 431 |
|
| 436 | 432 | /**
|
| — | — | @@ -1560,13 +1556,13 @@ |
| 1561 | 1557 | (DWORD)inputs[4],(DWORD)inputs[5],(GLint)inputs[6],(GLint)inputs[7],(GLint)inputs[8]);
|
| 1562 | 1558 | return 0;
|
| 1563 | 1559 | case GLEVENT_UPLOAD:
|
| 1564 | | - outputs[0] = (void*)_UploadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
|
| | 1560 | + _UploadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
|
| 1565 | 1561 | (int)inputs[4],(int)inputs[5],(int)inputs[6],(int)inputs[7],(int)inputs[8],(int)inputs[9],
|
| 1566 | 1562 | (int)inputs[10],(int)inputs[11],(int)inputs[12]);
|
| 1567 | 1563 | wndbusy = false;
|
| 1568 | 1564 | return 0;
|
| 1569 | 1565 | case GLEVENT_DOWNLOAD:
|
| 1570 | | - outputs[0] = (void*)_DownloadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
|
| | 1566 | + _DownloadTexture((char*)inputs[0],(char*)inputs[1],(GLuint)inputs[2],(int)inputs[3],
|
| 1571 | 1567 | (int)inputs[4],(int)inputs[5],(int)inputs[6],(int)inputs[7],(int)inputs[8],(int)inputs[9],
|
| 1572 | 1568 | (int)inputs[10],(int)inputs[11]);
|
| 1573 | 1569 | wndbusy = false;
|
| Index: ddraw/glRenderer.h |
| — | — | @@ -79,8 +79,8 @@ |
| 80 | 80 | glRenderer(int width, int height, int bpp, bool fullscreen, HWND hwnd, glDirectDraw7 *glDD7);
|
| 81 | 81 | ~glRenderer();
|
| 82 | 82 | static DWORD WINAPI ThreadEntry(void *entry);
|
| 83 | | - int 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);
|
| 84 | | - int 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);
|
| | 83 | + 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);
|
| | 84 | + 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);
|
| 85 | 85 | HRESULT Blt(LPRECT lpDestRect, glDirectDrawSurface7 *src,
|
| 86 | 86 | glDirectDrawSurface7 *dest, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx);
|
| 87 | 87 | GLuint MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3);
|
| — | — | @@ -98,8 +98,8 @@ |
| 99 | 99 | // In-thread APIs
|
| 100 | 100 | DWORD _Entry();
|
| 101 | 101 | BOOL _InitGL(int width, int height, int bpp, int fullscreen, HWND hWnd, glDirectDraw7 *glDD7);
|
| 102 | | - int _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);
|
| 103 | | - int _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);
|
| | 102 | + 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);
|
| | 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 | 106 | GLuint _MakeTexture(GLint min, GLint mag, GLint wraps, GLint wrapt, DWORD width, DWORD height, GLint texformat1, GLint texformat2, GLint texformat3);
|