DXGL r669 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r668‎ | r669 | r670 >
Date:23:30, 21 July 2016
Author:admin
Status:new
Tags:
Comment:
Fix release build
Modified paths:
  • /ddraw/glTexture.cpp (modified) (history)
  • /ddraw/glTexture.h (modified) (history)

Diff [purge]

Index: ddraw/glTexture.cpp
@@ -480,11 +480,11 @@
481481 This->levels[level].dirty &= ~2;
482482 }
483483
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)
485485 {
486486 GLenum error;
487487 void *data;
488 - if (realloc)
 488+ if (dorealloc)
489489 {
490490 This->levels[level].ddsd.dwWidth = width;
491491 This->levels[level].ddsd.dwHeight = height;
@@ -510,7 +510,7 @@
511511 ClearError();
512512 if (This->renderer->ext->GLEXT_EXT_direct_state_access)
513513 {
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,
515515 This->internalformats[0], width, height, 0, This->format, This->type, data);
516516 else This->renderer->ext->glTextureSubImage2DEXT(This->id, GL_TEXTURE_2D, level,
517517 0, 0, width, height, This->format, This->type, data);
@@ -519,7 +519,7 @@
520520 {
521521 glUtil_SetActiveTexture(util, 0);
522522 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);
524524 else glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, width, height, This->format, This->type, data);
525525 }
526526 error = glGetError();
@@ -540,7 +540,7 @@
541541 {
542542 if (This->renderer->ext->GLEXT_EXT_direct_state_access)
543543 {
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],
545545 width, height, 0, This->format, This->type, data);
546546 else This->renderer->ext->glTextureSubImage2DEXT(This->id, GL_TEXTURE_2D, level,
547547 0, 0, width, height, This->format, This->type, data);
@@ -552,7 +552,7 @@
553553 {
554554 glUtil_SetActiveTexture(util, 0);
555555 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);
557557 else glTexSubImage2D(GL_TEXTURE_2D, level, 0, 0, width, height, This->format, This->type, data);
558558 }
559559 }
Index: ddraw/glTexture.h
@@ -47,7 +47,7 @@
4848 HRESULT glTexture__SetSurfaceDesc(glTexture *This, LPDDSURFACEDESC2 ddsd);
4949 void glTexture__Download(glTexture *This, GLint level);
5050 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);
5252 BOOL glTexture__Repair(glTexture *This, BOOL preserve);
5353 void glTexture__FinishCreate(glTexture *This);
5454 void glTexture__Destroy(glTexture *This);