Bug in SDL_CreateTextureFromSurface ? |
Bug in SDL_CreateTextureFromSurface ? |
Daniel Gibson
Guest
|
Hi,
I don't think this is a bug: SDL_CreateTextureFromSurface() converts the pixels to a format best suited for the renderer. Also, note how SDL_UpdateTexture() does *not* take a SDL_Surface as input, but a void pointer to "raw pixel data". This means the function does not "know" how to convert image surface to the internally used format. Maybe use SDL_QueryTexture() to get the texture's raw format and convert your surface to that? (I don't think you can expect your currently commented out code to always work, as the render is not guaranteed to support any specific pixelformat you might set in SDL_CreateTexture()) Cheers, Daniel On 21.11.2016 09:06, zweifel wrote:
_______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|