Skip to content

Commit

Permalink
fix indent, warnings, tga tests and add ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Daniel committed Dec 19, 2023
1 parent 779b99a commit 1eecf05
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 84 deletions.
100 changes: 100 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,103 @@ build/
*~
*.swp
*.swo
CMakeCache.txt
cmake_install.cmake
test/cmake_install.cmake
test/core/cmake_install.cmake
install_manifest.txt
CTestTestfile.cmake
test/CTestTestfile.cmake
test/core/CTestTestfile.cmake
Makefile
test/Makefile
test/core/Makefile
test/bug/Makefile
gli/Makefile
gliConfig.cmake
gliTargets.cmake
gliVersion.cmake
CMakeFiles/
gli/CMakeFiles/
gli/gli_dummy
test/bug/CMakeFiles/
test/bug/test-bug
test/core/CMakeFiles/
test/core/test-core_sample
test/core/test-core_convert
test/core/test-texture_lod_sampler2d_array
test/core/test-texture_lod_sampler_cube
test/core/test-texture_lod_sampler2d
test/core/test-texture_lod_sampler_cube_array
test/core/test-texture_lod_sampler3d
test/core/test-texture_lod_sampler1d_array
test/core/test-texture_lod_sampler1d
test/core/test-core_sampler_texel
test/core/test-core_texture
test/core/test-generate_mipmaps_sampler2d_array
test/core/test-generate_mipmaps_sampler2d
test/core/test-generate_mipmaps_sampler_cube
test/core/test-generate_mipmaps_sampler3d
test/core/test-generate_mipmaps_sampler1d_array
test/core/test-generate_mipmaps_sampler1d
test/core/test-generate_mipmaps_sampler_cube_array
test/core/test-core_sampler_clear
test/core/test-core_filter_2d
test/core/test-core_filter_3d
test/core/test-core_sampler_wrap
test/core/test-core_filter_1d
test/core/test-convert_sampler2d_array
test/core/test-convert_sampler1d
test/core/test-convert_sampler1d_array
test/core/test-convert_sampler_cube_array
test/core/test-convert_sampler2d
test/core/test-convert_sampler3d
test/core/test-convert_sampler_cube
test/core/test-core_texture_cube_array
test/core/test-core_texture_2d_array
test/core/test-core_texture_2d
test/core/test-core_texture_cube
test/core/test-core_texture_3d
test/core/test-core_texture_1d_array
test/core/test-core_texture_1d
test/core/test-core_clear
test/core/test-core_fetch
test/core/test-core_comparison
test/core/test-core_load
test/core/test-test_view
test/core/test-core_save
test/core/test-test_duplicate
test/core/test-core_convert_access
test/core/test-core_load_dds
test/core/test-core_load_gen_1d
test/core/test-core_load_gen_1d_array
test/core/test-core_load_gen_rect
test/core/test-core_load_gen_3d
test/core/test-core_load_gen_2d_array
test/core/test-core_load_gen_cube_array
test/core/test-core_load_gen_2d
test/core/test-core_load_gen_cube
test/core/test-core_load_ktx
test/core/test-test_copy
test/core/test-transform
test/core/test-core_flip
test/core/test-reduce
test/core/test-test_make_texture
test/core/test-core_swizzle
test/core/test-test_copy_sub
test/core/test-core
test/core/test-gl
test/core/test-test_size
test/core/test-core_addressing
test/core/test-core_image
test/core/test-core_storage
test/core/test-core_format
test/core/test2d.dds
test/core/test2d.kmg
test/core/test2d.ktx
test/core/test2d_array.dds
test/core/test2d_array.kmg
test/core/test2d_array.ktx
test/core/test3d.dds
test/core/test3d.kmg
test/core/test3d.ktx
68 changes: 34 additions & 34 deletions gli/core/load_dds.inl
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ namespace detail

enum dds_cubemap_flag
{
DDSCAPS2_CUBEMAP = 0x00000200,
DDSCAPS2_CUBEMAP_POSITIVEX = 0x00000400,
DDSCAPS2_CUBEMAP_NEGATIVEX = 0x00000800,
DDSCAPS2_CUBEMAP_POSITIVEY = 0x00001000,
DDSCAPS2_CUBEMAP_NEGATIVEY = 0x00002000,
DDSCAPS2_CUBEMAP_POSITIVEZ = 0x00004000,
DDSCAPS2_CUBEMAP_NEGATIVEZ = 0x00008000,
DDSCAPS2_VOLUME = 0x00200000
DDSCAPS2_CUBEMAP = 0x00000200,
DDSCAPS2_CUBEMAP_POSITIVEX = 0x00000400,
DDSCAPS2_CUBEMAP_NEGATIVEX = 0x00000800,
DDSCAPS2_CUBEMAP_POSITIVEY = 0x00001000,
DDSCAPS2_CUBEMAP_NEGATIVEY = 0x00002000,
DDSCAPS2_CUBEMAP_POSITIVEZ = 0x00004000,
DDSCAPS2_CUBEMAP_NEGATIVEZ = 0x00008000,
DDSCAPS2_VOLUME = 0x00200000
};

enum
Expand All @@ -27,21 +27,21 @@ namespace detail

enum dds_flag
{
DDSD_CAPS = 0x00000001,
DDSD_HEIGHT = 0x00000002,
DDSD_WIDTH = 0x00000004,
DDSD_PITCH = 0x00000008,
DDSD_PIXELFORMAT = 0x00001000,
DDSD_MIPMAPCOUNT = 0x00020000,
DDSD_LINEARSIZE = 0x00080000,
DDSD_DEPTH = 0x00800000
DDSD_CAPS = 0x00000001,
DDSD_HEIGHT = 0x00000002,
DDSD_WIDTH = 0x00000004,
DDSD_PITCH = 0x00000008,
DDSD_PIXELFORMAT = 0x00001000,
DDSD_MIPMAPCOUNT = 0x00020000,
DDSD_LINEARSIZE = 0x00080000,
DDSD_DEPTH = 0x00800000
};

enum dds_surface_flag
{
DDSCAPS_COMPLEX = 0x00000008,
DDSCAPS_MIPMAP = 0x00400000,
DDSCAPS_TEXTURE = 0x00001000
DDSCAPS_COMPLEX = 0x00000008,
DDSCAPS_MIPMAP = 0x00400000,
DDSCAPS_TEXTURE = 0x00001000
};

struct dds_pixel_format
Expand Down Expand Up @@ -73,29 +73,29 @@ namespace detail

enum d3d10_resource_dimension
{
D3D10_RESOURCE_DIMENSION_UNKNOWN = 0,
D3D10_RESOURCE_DIMENSION_BUFFER = 1,
D3D10_RESOURCE_DIMENSION_TEXTURE1D = 2,
D3D10_RESOURCE_DIMENSION_TEXTURE2D = 3,
D3D10_RESOURCE_DIMENSION_TEXTURE3D = 4
D3D10_RESOURCE_DIMENSION_UNKNOWN = 0,
D3D10_RESOURCE_DIMENSION_BUFFER = 1,
D3D10_RESOURCE_DIMENSION_TEXTURE1D = 2,
D3D10_RESOURCE_DIMENSION_TEXTURE2D = 3,
D3D10_RESOURCE_DIMENSION_TEXTURE3D = 4
};

enum d3d10_resource_misc_flag
{
D3D10_RESOURCE_MISC_GENERATE_MIPS = 0x01,
D3D10_RESOURCE_MISC_SHARED = 0x02,
D3D10_RESOURCE_MISC_TEXTURECUBE = 0x04,
D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x10,
D3D10_RESOURCE_MISC_GDI_COMPATIBLE = 0x20,
D3D10_RESOURCE_MISC_GENERATE_MIPS2 = 0x01,
D3D10_RESOURCE_MISC_SHARED = 0x02,
D3D10_RESOURCE_MISC_TEXTURECUBE = 0x04,
D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX = 0x10,
D3D10_RESOURCE_MISC_GDI_COMPATIBLE = 0x20,
};

enum dds_alpha_mode
{
DDS_ALPHA_MODE_UNKNOWN = 0x0,
DDS_ALPHA_MODE_STRAIGHT = 0x1,
DDS_ALPHA_MODE_PREMULTIPLIED = 0x2,
DDS_ALPHA_MODE_OPAQUE = 0x3,
DDS_ALPHA_MODE_CUSTOM = 0x4
DDS_ALPHA_MODE_UNKNOWN = 0x0,
DDS_ALPHA_MODE_STRAIGHT = 0x1,
DDS_ALPHA_MODE_PREMULTIPLIED = 0x2,
DDS_ALPHA_MODE_OPAQUE = 0x3,
DDS_ALPHA_MODE_CUSTOM = 0x4
};

struct dds_header10
Expand Down
12 changes: 6 additions & 6 deletions test/core/core_convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ namespace rgba_dxt1unorm

// Test converting through the convertFunc interface
// sampling at the corners of each level
for(int Level = 0; Level < TextureDecompressed.levels(); ++Level)
for(gli::texture::size_type Level = 0; Level < TextureDecompressed.levels(); ++Level)
{
gli::extent2d TexelCoord;
gli::extent2d LevelExtent = TextureDecompressed.extent(Level);
Expand Down Expand Up @@ -425,7 +425,7 @@ namespace rgba_dxt3unorm

// Test converting through the convertFunc interface
// sampling at the corners of each level
for(int Level = 0; Level < TextureDecompressed.levels(); ++Level)
for(gli::texture::size_type Level = 0; Level < TextureDecompressed.levels(); ++Level)
{
gli::extent2d TexelCoord;
gli::extent2d LevelExtent = TextureDecompressed.extent(Level);
Expand Down Expand Up @@ -518,7 +518,7 @@ namespace rgba_dxt5unorm

// Test converting through the convertFunc interface
// sampling at the corners of each level
for(int Level = 0; Level < TextureDecompressed.levels(); ++Level)
for(gli::texture::size_type Level = 0; Level < TextureDecompressed.levels(); ++Level)
{
gli::extent2d TexelCoord;
gli::extent2d LevelExtent = TextureDecompressed.extent(Level);
Expand Down Expand Up @@ -612,7 +612,7 @@ namespace r_bc4unorm

// Test converting through the convertFunc interface
// sampling at the corners of each level
for(int Level = 0; Level < TextureDecompressed.levels(); ++Level)
for(gli::texture::size_type Level = 0; Level < TextureDecompressed.levels(); ++Level)
{
gli::extent2d TexelCoord;
gli::extent2d LevelExtent = TextureDecompressed.extent(Level);
Expand Down Expand Up @@ -680,7 +680,7 @@ namespace rg_bc5unorm
uint32_t offByAlot = 0;
uint32_t onPoint = 0;

for(size_t Level = 0; Level < TextureCompressed.levels(); ++Level)
for(gli::texture::size_type Level = 0; Level < TextureCompressed.levels(); ++Level)
{
gli::extent2d TexelCoord;
gli::extent2d BlockCoord;
Expand Down Expand Up @@ -724,7 +724,7 @@ namespace rg_bc5unorm

// Test converting through the convertFunc interface
// sampling at the corners of each level
for(int Level = 0; Level < TextureDecompressed.levels(); ++Level)
for(gli::texture::size_type Level = 0; Level < TextureDecompressed.levels(); ++Level)
{
gli::extent2d TexelCoord;
gli::extent2d LevelExtent = TextureDecompressed.extent(Level);
Expand Down
Loading

0 comments on commit 1eecf05

Please sign in to comment.