When I try to draw DDS textures onto the screen, the texture comes out as completely black. (The top half is a PNG that I loaded in and the bottom half is the same image but compressed as a DDS)

Here's the code that I used for this program
#include "raylib.h"
int main( )
{
int screenWidth = 1920;
int screenHeight = 1080;
InitWindow( screenWidth, screenHeight, "raylib [core] example - basic window" );
Texture2D png = LoadTexture( "/Users/Rennan/Desktop/RayLib/Video/Test.png" );
Texture2D dxt = LoadTexture( "/Users/Rennan/Desktop/RayLib/Converted/Test.dds" );
SetTargetFPS( 60 );
while( !WindowShouldClose( ) )
{
BeginDrawing( );
ClearBackground( RAYWHITE );
DrawTextureRec( png, (Rectangle){ 0, 0, 1920, 540 }, (Vector2){ 0, 0 }, WHITE );
DrawTextureRec( dxt, (Rectangle){ 0, 0, 1920, 540 }, (Vector2){ 0, 540 }, WHITE );
EndDrawing( );
}
CloseWindow( );
return 0;
}
And this is what the console spits out when I run the sample code
INFO: Initializing raylib (v1.7.0)
INFO: Display device initialized successfully
INFO: Display size: 3440 x 1440
INFO: Render size: 1920 x 1080
INFO: Screen size: 1920 x 1080
INFO: Viewport offsets: 0, 0
INFO: GPU: Vendor: ATI Technologies Inc.
INFO: GPU: Renderer: AMD Radeon HD - FirePro D300 OpenGL Engine
INFO: GPU: Version: 4.1 ATI-1.50.38
INFO: GPU: GLSL: 4.10
INFO: Number of supported extensions: 46
INFO: [EXTENSION] DXT compressed textures supported
INFO: [EXTENSION] Anisotropic textures filtering supported (max: 16X)
INFO: [EXTENSION] Clamp mirror wrap texture mode supported
INFO: [TEX ID 1] Texture created successfully (1x1)
INFO: [TEX ID 1] Base white texture loaded successfully
INFO: [VSHDR ID 1] Vertex shader compiled successfully
INFO: [FSHDR ID 2] Fragment shader compiled successfully
INFO: [SHDR ID 3] Shader program loaded successfully
INFO: [SHDR ID 3] Default shader loaded successfully
INFO: [CPU] Default buffers initialized successfully (lines, triangles, quads)
INFO: [VAO ID 1] Default buffers VAO initialized successfully (lines)
INFO: [VAO ID 2] Default buffers VAO initialized successfully (triangles)
INFO: [VAO ID 3] Default buffers VAO initialized successfully (quads)
INFO: OpenGL default states initialized successfully
INFO: [TEX ID 2] Texture created successfully (128x128)
INFO: [TEX 2] Parameters: 128x128, 1 mips, format 2
INFO: [TEX ID 2] Default font loaded successfully
INFO: [/Users/Rennan/Desktop/RayLib/Video/Test.png] Image loaded successfully (1920x1080)
INFO: [TEX ID 3] Texture created successfully (1920x1080)
INFO: [TEX 3] Parameters: 1920x1080, 1 mips, format 7
INFO: [/Users/Rennan/Desktop/RayLib/Converted/Test.dds] Image loaded successfully (1920x1080)
INFO: [TEX ID 4] Texture created successfully (1920x1080)
INFO: [TEX 4] Parameters: 1920x1080, 0 mips, format 12
INFO: Target time per frame: 16.667 milliseconds
Not sure exactly what it could be, and when I went over the examples that are provided none of them use DDS compression or any of the other image formats other than PNG and RAW. It would be a huge help if you could take a quick look at this.
Also here are the two images that I used in case you would like to test them out for yourself Images.zip
After a quick check, you're right, something fails with this file.
I generated multiple compressed files (DDS) and they work ok but for some reason not that one... how did you generate it? which software you used? which configuration? Maybe it's not correctly generated...
When loaded is detected as DXT5 RGBA (BC3), is that right?
Just generated it again from .png using PVRTexTool and it works ok: video_ok.zip
Hey raysan, thanks for getting back to me so quickly, I used the DDS that you provided and it worked just fine, I used a program called DDS Converter to generate the DDS files and just selected DXT3 and DXT5 as the output formats. I figured that it might have had something to do with RayLib because I had gotten the DDS files to work fine in Monogame, but it seems that it might just be the way the images are generating or something. I'll take a look at PVRTexTool in order to generate the DDS files.
After some more deep check, I found that it was created with NVIDIA Texture Tools (probably Photoshop plugin), it seems this tool adds an unnecesary (and probably inappropiate) signature on the file header: NVTT. There are also some other values that I should check more carefully...

This is a binary comparison of both files, showing some discrepancies.
Ah! I see! DDS Converter uses internally NVIDIA Texture Tools (so the signature)! :D
I'll try to investigate this issue more deeply... in the meantime, you could use PVRTexTool...
Also uploaded some testing images (DXT1, DXT5, ETC2) to the repo: https://github.com/raysan5/raylib/commit/42ad00b7c280e2242e3338a4acd85815c1707701
Yea thanks for all the help, and also thanks for uploading those examples 馃槃
Finally I got some time for further investigation...
Issue was related to header parameter ddsHeader.mipMapCount, the NVIDIA Texture Tools (NVTT) don't use that parameter an consequently is set to 0 while other tools set it to 1 (personally I prefer that second approach). raylib fails when trying to load a 0 mipmaps texture.
Just corrected this issue on commit https://github.com/raysan5/raylib/commit/b0adac96b75a9e58b313e1684fc57798457bc0fc