DXGL r621 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r620‎ | r621 | r622 >
Date:21:50, 28 September 2015
Author:admin
Status:new
Tags:
Comment:
Flip FBO objects when flipping a texture.
Clear FBO state when flipping a texture.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -3110,15 +3110,16 @@
31113111 int i, j, k;
31123112 int vsync = 0;
31133113 GLuint tmp;
3114 - //MIPMAP tmp2[15];
 3114+ FBO tmp2[15];
31153115 int mipcount = fliplist[0]->ddsd.dwMipMapCount;
3116 - //memcpy(&tmp2, &fliplist[0]->mipmaps, mipcount*sizeof(MIPMAP));
31173116 if (!mipcount) mipcount = 1;
 3117+ glUtil_SetFBO(This->util, NULL);
31183118 for (k = 0; k < mipcount; k++)
31193119 {
31203120 if (fliplist[0]->mipmaps[k].dirty & 1)
31213121 glTexture__Upload(fliplist[0], k, FALSE, FALSE);
31223122 fliplist[0]->mipmaps[k].dirty |= 2;
 3123+ tmp2[k] = fliplist[0]->mipmaps[k].fbo;
31233124 }
31243125 for (i = 0; i < flips; i++)
31253126 {
@@ -3130,8 +3131,8 @@
31313132 if (fliplist[j]->mipmaps[k].dirty & 1)
31323133 glTexture__Upload(fliplist[j], k, FALSE, FALSE);
31333134 fliplist[j]->mipmaps[k].dirty |= 2;
 3135+ fliplist[j]->mipmaps[k].fbo = fliplist[j + 1]->mipmaps[k].fbo;
31343136 }
3135 - //memcpy(&fliplist[j]->mipmaps, &fliplist[j + 1]->mipmaps, mipcount*sizeof(MIPMAP));
31363137 fliplist[j]->id = fliplist[j + 1]->id;
31373138 }
31383139 for (k = 0; k < mipcount; k++)
@@ -3139,9 +3140,9 @@
31403141 if (fliplist[count - 1]->mipmaps[k].dirty & 1)
31413142 glTexture__Upload(fliplist[count - 1], k, FALSE, FALSE);
31423143 fliplist[count - 1]->mipmaps[k].dirty |= 2;
 3144+ fliplist[count - 1]->mipmaps[k].fbo = tmp2[k];
31433145 }
31443146 fliplist[count - 1]->id = tmp;
3145 - //memcpy(&fliplist[count - 1]->mipmaps, &tmp2, mipcount*sizeof(MIPMAP));
31463147 }
31473148 if (framebuffer)
31483149 {