Ver Fonte

chore: properly detect video textures

Almamu há 7 meses atrás
pai
commit
4819f9d6ec

+ 2 - 1
src/WallpaperEngine/Data/Assets/Texture.h

@@ -90,9 +90,10 @@ enum TextureFlags {
     TextureFlags_ClampUVs = 2,
     TextureFlags_ClampUVs = 2,
     TextureFlags_IsGif = 4,
     TextureFlags_IsGif = 4,
     TextureFlags_ClampUVsBorder = 8,
     TextureFlags_ClampUVsBorder = 8,
+    TextureFlags_Video = 32,
     TextureFlags_AlphaChannelPriority = 524288, // Indicates RG88/R8 format where alpha is in G/R channel
     TextureFlags_AlphaChannelPriority = 524288, // Indicates RG88/R8 format where alpha is in G/R channel
     TextureFlags_All = TextureFlags_NoInterpolation | TextureFlags_ClampUVs | TextureFlags_IsGif
     TextureFlags_All = TextureFlags_NoInterpolation | TextureFlags_ClampUVs | TextureFlags_IsGif
-	| TextureFlags_ClampUVsBorder | TextureFlags_AlphaChannelPriority,
+	| TextureFlags_ClampUVsBorder | TextureFlags_Video | TextureFlags_AlphaChannelPriority,
 };
 };
 
 
 struct Mipmap {
 struct Mipmap {

+ 4 - 0
src/WallpaperEngine/Render/CTexture.cpp

@@ -33,6 +33,10 @@ CTexture::CTexture (TextureUniquePtr header) : m_header (std::move (header)) {
 	    const uint32_t bufferSize = mipmap->uncompressedSize;
 	    const uint32_t bufferSize = mipmap->uncompressedSize;
 	    GLenum textureFormat = GL_RGBA;
 	    GLenum textureFormat = GL_RGBA;
 
 
+	    if (this->m_header->isVideoMp4 || this->m_header->flags & TextureFlags_Video) {
+	        sLog.exception ("MP4 textures are not supported yet");
+	    }
+
 	    if (this->m_header->freeImageFormat != FIF_UNKNOWN) {
 	    if (this->m_header->freeImageFormat != FIF_UNKNOWN) {
 		int fileChannels;
 		int fileChannels;