diff --git a/tests/test-cpp/Classes/Texture2dTest/Texture2dTest.cpp b/tests/test-cpp/Classes/Texture2dTest/Texture2dTest.cpp index fddc12ab41..1c554bd573 100644 --- a/tests/test-cpp/Classes/Texture2dTest/Texture2dTest.cpp +++ b/tests/test-cpp/Classes/Texture2dTest/Texture2dTest.cpp @@ -95,6 +95,7 @@ static std::function createFunctions[] = CL(TextureS3TCDxt1), CL(TextureS3TCDxt3), CL(TextureS3TCDxt5), + CL(TextureS3TCWithNoMipmaps), CL(TextureATITCRGB), CL(TextureATITCExplicit), @@ -2137,6 +2138,20 @@ std::string TextureS3TCDxt5::subtitle() const return "S3TC dxt5 decode"; } +//Implement of S3TC with no mipmaps +TextureS3TCWithNoMipmaps::TextureS3TCWithNoMipmaps() +{ + auto sprite = Sprite::create("Images/test_512x512_s3tc_dxt5_with_no_mipmaps.dds"); + auto size = Director::getInstance()->getWinSize(); + sprite->setPosition(Point(size.width / 2, size.height / 2)); + + addChild(sprite); +} +std::string TextureS3TCWithNoMipmaps::title() const +{ + return "S3TC with no mipmaps"; +} + //Implement of ATITC TextureATITCRGB::TextureATITCRGB() { diff --git a/tests/test-cpp/Classes/Texture2dTest/Texture2dTest.h b/tests/test-cpp/Classes/Texture2dTest/Texture2dTest.h index e65170675a..4c3caffc65 100644 --- a/tests/test-cpp/Classes/Texture2dTest/Texture2dTest.h +++ b/tests/test-cpp/Classes/Texture2dTest/Texture2dTest.h @@ -566,6 +566,17 @@ public: virtual std::string subtitle() const override; }; + +// S3TC texture with no mipmaps test +class TextureS3TCWithNoMipmaps : public TextureDemo +{ +public: + CREATE_FUNC(TextureS3TCWithNoMipmaps); + TextureS3TCWithNoMipmaps(); + + virtual std::string title() const override; +}; + // ATITC RGB texture format test class TextureATITCRGB : public TextureDemo { diff --git a/tests/test-cpp/Resources/Images/test_512x512_s3tc_dxt5_with_no_mipmaps.dds.REMOVED.git-id b/tests/test-cpp/Resources/Images/test_512x512_s3tc_dxt5_with_no_mipmaps.dds.REMOVED.git-id new file mode 100644 index 0000000000..4cdbd8338e --- /dev/null +++ b/tests/test-cpp/Resources/Images/test_512x512_s3tc_dxt5_with_no_mipmaps.dds.REMOVED.git-id @@ -0,0 +1 @@ +359857b480448e4fc5d2cb926ac597ca1a587dfb \ No newline at end of file