From 7ada7e117cbcad13a25759dd476f1c2dcac05aaa Mon Sep 17 00:00:00 2001 From: hyzboy Date: Mon, 20 May 2019 21:34:36 +0800 Subject: [PATCH] =?UTF-8?q?TGATexture.cpp=E8=BD=ACBGR565=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=BD=ACRGB565?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/Vulkan/TGATexture.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/example/Vulkan/TGATexture.cpp b/example/Vulkan/TGATexture.cpp index 42f2c8a8..6e3fcbb3 100644 --- a/example/Vulkan/TGATexture.cpp +++ b/example/Vulkan/TGATexture.cpp @@ -47,9 +47,9 @@ namespace for(uint i=0;i>3); + *target=((src[2]<<8)&0xF800) + |((src[1]<<3)&0x7E0) + | (src[0]>>3); ++target; src+=3; @@ -100,9 +100,9 @@ Texture2D *LoadTGATexture(const OSString &filename,Device *device) { if(header->bit==24) { - RGB8to565(pixel_data,header->width*header->height); + RGB8to565(pixel_data,header->width*header->height); - format=FMT_BGR565; + format=FMT_RGB565; line_size=header->width*2; } else if(header->bit==32)