The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
VisualStudio different to MinGW
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
SDL_SetTextureAlphaMod seems to be working differently in Visual Studio to the MinGW libraries on Windows.

With Visual Studio the value correctly blends a sprite. However, with MinGW, any value other than 255 causes the sprite to disappear, and not be rendered!
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
Just created a Visual Studio 2013 and a fade up of a sprite correctly works. However, using Code::Blocks and GCC/MingGW, the fading up (this is from 0.0 to 255.0) doesn't happen for some reason.

The MinGW SDL2 libraries are 64-bit, whilst the Visual Studio SDL2 libraries are 32-bit
VisualStudio different to MinGW
Sik


Joined: 26 Nov 2011
Posts: 905
Wait, are you using the MinGW bundled with Code::Blocks? Just saying,
it doesn't even come with DirectX (so you may be using the software
renderer actually). If this is the case try downloading MinGW-w64 and
rebuild SDL2 with that. SDL2 has trouble with vanilla MinGW, it's
horribly outdated.

That said: if this is indeed an issue with the software renderer maybe
somebody should check and try to get it fixed, it doesn't seem like
something we would want the software renderer to not support.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
No, I downloaded MinGW separately from Code::Blocks.

If the software renderer is being used (and I would be surprised as the frame rate is very good), then it could well be the reason.
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
I've finally got around trying the 64-bit version (but for some reason most of the SDL2 functions aren't found).

I've got a video of the MinGW problem here : https://www.youtube.com/watch?v=LoMQ78v_T4o

I have no idea what the problem is with alpha levels and MinGW - I tried forcing direct3d use, but it made no difference.