fixed TGA about codes.
This commit is contained in:
parent
f4d19fc898
commit
9ed3f1b6c3
@ -6,6 +6,13 @@ namespace hgl
|
|||||||
{
|
{
|
||||||
namespace util
|
namespace util
|
||||||
{
|
{
|
||||||
|
constexpr const uint TGA_IMAGE_TYPE_COLOR_MAP =1;
|
||||||
|
constexpr const uint TGA_IMAGE_TYPE_TRUE_COLOR =2;
|
||||||
|
constexpr const uint TGA_IMAGE_TYPE_GRAYSCALE =3;
|
||||||
|
|
||||||
|
constexpr const uint TGA_DIRECTION_LOWER_LEFT =0;
|
||||||
|
constexpr const uint TGA_DIRECTION_UPPER_LEFT =1;
|
||||||
|
|
||||||
#pragma pack(push,1)
|
#pragma pack(push,1)
|
||||||
struct TGAHeader
|
struct TGAHeader
|
||||||
{
|
{
|
||||||
|
@ -15,6 +15,9 @@ namespace hgl
|
|||||||
|
|
||||||
memset(header,0,sizeof(TGAHeader));
|
memset(header,0,sizeof(TGAHeader));
|
||||||
|
|
||||||
|
header->width=width;
|
||||||
|
header->height=height;
|
||||||
|
|
||||||
TGAImageDesc desc;
|
TGAImageDesc desc;
|
||||||
|
|
||||||
desc.image_desc=0;
|
desc.image_desc=0;
|
||||||
@ -33,6 +36,8 @@ namespace hgl
|
|||||||
desc.alpha_depth=8;
|
desc.alpha_depth=8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
desc.direction=TGA_DIRECTION_UPPER_LEFT;
|
||||||
|
|
||||||
header->image_desc=desc.image_desc;
|
header->image_desc=desc.image_desc;
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user