TGATexture.cpp转BGR565改为转RGB565
This commit is contained in:
parent
988562ea48
commit
7ada7e117c
@ -47,9 +47,9 @@ namespace
|
||||
|
||||
for(uint i=0;i<size;i++)
|
||||
{
|
||||
*target=(((src[0])<<8)&0xF800)
|
||||
|(((src[1])<<3)&0x7E0)
|
||||
| ((src[2])>>3);
|
||||
*target=((src[2]<<8)&0xF800)
|
||||
|((src[1]<<3)&0x7E0)
|
||||
| (src[0]>>3);
|
||||
|
||||
++target;
|
||||
src+=3;
|
||||
@ -102,7 +102,7 @@ Texture2D *LoadTGATexture(const OSString &filename,Device *device)
|
||||
{
|
||||
RGB8to565(pixel_data,header->width*header->height);
|
||||
|
||||
format=FMT_BGR565;
|
||||
format=FMT_RGB565;
|
||||
line_size=header->width*2;
|
||||
}
|
||||
else if(header->bit==32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user