Skip to content

Commit

Permalink
Test GL formats of DXT1/5 textures
Browse files Browse the repository at this point in the history
Use the new getGLFormat() method to ensure that we have the appropriate GL
format for the DXT1 and DXT5 test images.
  • Loading branch information
Matthew Mott committed Aug 3, 2021
1 parent 3eba251 commit 519439a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/ImageLoading.cpp
Expand Up @@ -176,6 +176,7 @@ TEST_F(ImageLoadingTest, LoadDDSCompressedDXT1)

// Must be compressed
EXPECT_TRUE(img->isPrecompressed());
EXPECT_EQ(img->getGLFormat(), GL_COMPRESSED_RGBA_S3TC_DXT1_EXT);
}

TEST_F(ImageLoadingTest, LoadDDSCompressedDXT5NPOT)
Expand All @@ -190,6 +191,7 @@ TEST_F(ImageLoadingTest, LoadDDSCompressedDXT5NPOT)

// Must be compressed
EXPECT_TRUE(img->isPrecompressed());
EXPECT_EQ(img->getGLFormat(), GL_COMPRESSED_RGBA_S3TC_DXT5_EXT);
}

TEST_F(ImageLoadingTest, LoadDDSCompressedDXT5MipMapsNPOT)
Expand All @@ -204,6 +206,7 @@ TEST_F(ImageLoadingTest, LoadDDSCompressedDXT5MipMapsNPOT)

// Must be compressed
EXPECT_TRUE(img->isPrecompressed());
EXPECT_EQ(img->getGLFormat(), GL_COMPRESSED_RGBA_S3TC_DXT5_EXT);

// Check mipmap size sequence
EXPECT_EQ(img->getWidth(1), 30);
Expand Down

0 comments on commit 519439a

Please sign in to comment.