Index: ddraw/glTexture.cpp |
— | — | @@ -480,11 +480,11 @@ |
481 | 481 | This->levels[level].dirty &= ~2;
|
482 | 482 | }
|
483 | 483 |
|
484 | | -void glTexture__Upload2(glTexture *This, int level, int width, int height, BOOL checkerror, BOOL realloc, glUtil *util)
|
| 484 | +void glTexture__Upload2(glTexture *This, int level, int width, int height, BOOL checkerror, BOOL dorealloc, glUtil *util)
|
485 | 485 | {
|
486 | 486 | GLenum error;
|
487 | 487 | void *data;
|
488 | | - if (realloc)
|
| 488 | + if (dorealloc)
|
489 | 489 | {
|
490 | 490 | This->levels[level].ddsd.dwWidth = width;
|
491 | 491 | This->levels[level].ddsd.dwHeight = height;
|
— | — | @@ -510,7 +510,7 @@ |
511 | 511 | ClearError();
|
512 | 512 | if (This->renderer->ext->GLEXT_EXT_direct_state_access)
|
513 | 513 | {
|
514 | | - if (realloc)This->renderer->ext->glTextureImage2DEXT(This->id, GL_TEXTURE_2D, level,
|
| 514 | + if (dorealloc)This->renderer->ext->glTextureImage2DEXT(This->id, GL_TEXTURE_2D, level,
|
515 | 515 | This->internalformats[0], width, height, 0, This->format, This->type, data);
|
516 | 516 | else This->renderer->ext->glTextureSubImage2DEXT(This->id, GL_TEXTURE_2D, level,
|
517 | 517 | 0, 0, width, height, This->format, This->type, data);
|
— | — | @@ -519,7 +519,7 @@ |
520 | 520 | {
|
521 | 521 | glUtil_SetActiveTexture(util, 0);
|
522 | 522 | glUtil_SetTexture(util, 0, This);
|
523 | | - if (realloc) glTexImage2D(GL_TEXTURE_2D, level, This->internalformats[0], width, height, 0, This->format, This->type, data);
|
| 523 | + if (dorealloc) glTexImage2D(GL_TEXTURE_2D, level, This->internalformats[0], width, height, 0, This->format, This->type, data);
|
524 | 524 | else glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, width, height, This->format, This->type, data);
|
525 | 525 | }
|
526 | 526 | error = glGetError();
|
— | — | @@ -540,7 +540,7 @@ |
541 | 541 | {
|
542 | 542 | if (This->renderer->ext->GLEXT_EXT_direct_state_access)
|
543 | 543 | {
|
544 | | - if (realloc)This->renderer->ext->glTextureImage2DEXT(This->id, GL_TEXTURE_2D, level, This->internalformats[0],
|
| 544 | + if (dorealloc)This->renderer->ext->glTextureImage2DEXT(This->id, GL_TEXTURE_2D, level, This->internalformats[0],
|
545 | 545 | width, height, 0, This->format, This->type, data);
|
546 | 546 | else This->renderer->ext->glTextureSubImage2DEXT(This->id, GL_TEXTURE_2D, level,
|
547 | 547 | 0, 0, width, height, This->format, This->type, data);
|
— | — | @@ -552,7 +552,7 @@ |
553 | 553 | {
|
554 | 554 | glUtil_SetActiveTexture(util, 0);
|
555 | 555 | glUtil_SetTexture(util, 0, This);
|
556 | | - if (realloc)glTexImage2D(GL_TEXTURE_2D, level, This->internalformats[0], width, height, 0, This->format, This->type, data);
|
| 556 | + if (dorealloc)glTexImage2D(GL_TEXTURE_2D, level, This->internalformats[0], width, height, 0, This->format, This->type, data);
|
557 | 557 | else glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, width, height, This->format, This->type, data);
|
558 | 558 | }
|
559 | 559 | }
|
Index: ddraw/glTexture.h |
— | — | @@ -47,7 +47,7 @@ |
48 | 48 | HRESULT glTexture__SetSurfaceDesc(glTexture *This, LPDDSURFACEDESC2 ddsd);
|
49 | 49 | void glTexture__Download(glTexture *This, GLint level);
|
50 | 50 | void glTexture__Upload(glTexture *This, GLint level);
|
51 | | -void glTexture__Upload2(glTexture *This, int level, int width, int height, BOOL checkerror, BOOL realloc, glUtil *util);
|
| 51 | +void glTexture__Upload2(glTexture *This, int level, int width, int height, BOOL checkerror, BOOL dorealloc, glUtil *util);
|
52 | 52 | BOOL glTexture__Repair(glTexture *This, BOOL preserve);
|
53 | 53 | void glTexture__FinishCreate(glTexture *This);
|
54 | 54 | void glTexture__Destroy(glTexture *This);
|