DXGL r905 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r904‎ | r905 | r906 >
Date:23:10, 30 March 2019
Author:admin
Status:new
Tags:
Comment:
Define texture formats for YUY2/YUNV, RGBG, and GRGB.
Modified paths:
  • /ddraw/glTexture.cpp (modified) (history)

Diff [purge]

Index: ddraw/glTexture.cpp
@@ -1360,15 +1360,54 @@
13611361 break;
13621362 case DXGLPIXELFORMAT_FOURCC_YUY2:
13631363 case DXGLPIXELFORMAT_FOURCC_YUNV:
1364 - FIXME("Add YUY2/YUNV mode");
 1364+ This->blttype = 0x81;
 1365+ This->internalformats[0] = GL_RGBA8;
 1366+ This->format = GL_BGRA;
 1367+ This->type = GL_UNSIGNED_INT_8_8_8_8_REV;
 1368+ if (!This->target) This->target = GL_TEXTURE_RECTANGLE;
 1369+ This->colororder = 1;
 1370+ This->colorsizes[0] = 255;
 1371+ This->colorsizes[1] = 255;
 1372+ This->colorsizes[2] = 255;
 1373+ This->colorsizes[3] = 255;
 1374+ This->colorbits[0] = 8;
 1375+ This->colorbits[0] = 8;
 1376+ This->colorbits[0] = 8;
 1377+ This->colorbits[0] = 8;
13651378 This->packsize = 2;
13661379 break;
13671380 case DXGLPIXELFORMAT_FOURCC_RGBG:
1368 - FIXME("Add RGBG mode");
 1381+ This->blttype = 0x82;
 1382+ This->internalformats[0] = GL_RGBA8;
 1383+ This->format = GL_BGRA;
 1384+ This->type = GL_UNSIGNED_INT_8_8_8_8_REV;
 1385+ if (!This->target) This->target = GL_TEXTURE_RECTANGLE;
 1386+ This->colororder = 1;
 1387+ This->colorsizes[0] = 255;
 1388+ This->colorsizes[1] = 255;
 1389+ This->colorsizes[2] = 255;
 1390+ This->colorsizes[3] = 255;
 1391+ This->colorbits[0] = 8;
 1392+ This->colorbits[0] = 8;
 1393+ This->colorbits[0] = 8;
 1394+ This->colorbits[0] = 8;
13691395 This->packsize = 2;
13701396 break;
13711397 case DXGLPIXELFORMAT_FOURCC_GRGB:
1372 - FIXME("Add GRGB mode");
 1398+ This->blttype = 0x83;
 1399+ This->internalformats[0] = GL_RGBA8;
 1400+ This->format = GL_BGRA;
 1401+ This->type = GL_UNSIGNED_INT_8_8_8_8_REV;
 1402+ if (!This->target) This->target = GL_TEXTURE_RECTANGLE;
 1403+ This->colororder = 1;
 1404+ This->colorsizes[0] = 255;
 1405+ This->colorsizes[1] = 255;
 1406+ This->colorsizes[2] = 255;
 1407+ This->colorsizes[3] = 255;
 1408+ This->colorbits[0] = 8;
 1409+ This->colorbits[0] = 8;
 1410+ This->colorbits[0] = 8;
 1411+ This->colorbits[0] = 8;
13731412 This->packsize = 2;
13741413 break;
13751414 }