- fixed alpha texture generation for OpenGL rendering.
The old logic used a translation table that does not work with color images, it was designed to handle 8 bit grayscale images. So now, it creates a true color buffer and then turns it into a texture with R,G,B = 255 and the alpha channel set to the grayscale value. This was also the reason why crosshairs made from 32 bit PNGs did not show correctly.
This commit is contained in:
parent
5466e2c7c5
commit
0a07f4c144
3 changed files with 28 additions and 28 deletions
|
|
@ -126,7 +126,6 @@ FTexture * PCXTexture_TryCreate(FileReader & file, int lumpnum)
|
|||
if (hdr.version != 0 && hdr.version != 2 && hdr.version != 3 && hdr.version != 4 && hdr.version != 5) return NULL;
|
||||
if (hdr.bitsPerPixel != 1 && hdr.bitsPerPixel != 8 && hdr.bitsPerPixel != 4) return NULL;
|
||||
if (hdr.bitsPerPixel == 1 && hdr.numColorPlanes !=1 && hdr.numColorPlanes != 4) return NULL;
|
||||
if (hdr.bitsPerPixel == 4 && hdr.numColorPlanes != 1) return NULL;
|
||||
if (hdr.bitsPerPixel == 8 && hdr.bytesPerScanLine != ((hdr.xmax - hdr.xmin + 2)&~1)) return NULL;
|
||||
|
||||
for (int i = 0; i < 54; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue