DXGL r478 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r477‎ | r478 | r479 >
Date:01:49, 4 August 2014
Author:admin
Status:new
Tags:
Comment:
Remove RGB8 fallback format from RGB555 to prevent test failure in FNDDRAW utility.
Add a fallback format for RGBA1555.
Modified paths:
  • /ddraw/TextureManager.c (modified) (history)

Diff [purge]

Index: ddraw/TextureManager.c
@@ -155,8 +155,7 @@
156156 break;
157157 case 2: // 16-bit RGB555
158158 texture->internalformats[0] = GL_RGB5_A1;
159 - texture->internalformats[1] = GL_RGB8;
160 - texture->internalformats[2] = GL_RGBA8;
 159+ texture->internalformats[1] = GL_RGBA8;
161160 texture->format = GL_BGRA;
162161 texture->type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
163162 break;
@@ -194,6 +193,7 @@
195194 break;
196195 case 9: // 16-bit RGBA1555
197196 texture->internalformats[0] = GL_RGB5_A1;
 197+ texture->internalformats[1] = GL_RGBA8;
198198 texture->format = GL_BGRA;
199199 texture->type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
200200 break;