My first post here, so hello everyone!
I’ve been playing around with SDL2 and I think I’ve come across a bug, either in SDL or in vmware’s driver stack.
Some info ony my vm: (windows7 host)
x86-64, Archlinux, linux-3.14.4, sld-2.0.3, xf86-video-vmware-13.0.2.
I am using SDL_RenderCopyEX() to draw a texture, this worked fine on native linux. (archlinux, 64bit, xf86-video-ati).
The same binary displays only a white box when running inside vm.
Fiddling with SDL_RENDERER_X does not help. I then set SDL_HINT_RENDER_DRIVER to “software”, which works but only if you use SDL_RenderCopy(), with CopyEX, still just a white box.
I looked at src/render/SDL_render.c, and saw that CopyEx actually returns an error “Renderer does not support RenderCopyEx”, so I tried to catch it thinking that maybe I was at fault for initally not checking the renderfunction for errors, but it sails through, without errors.
I also found this comment with CopyEx:
/* We don’t intersect the dstrect with the viewport as RenderCopy does because of potential rotation clipping issues… TODO: should we? */
So I conclude, somethings up with SDL_RenderCopyEx() under some specific conditions.
To make matters worse, it seems to also matter which image is loaded as a texture. (Example uses SDL_image to load png).
You can go to: http://lazyfoo.net/tutorials/SDL/07_texture_loading_and_rendering/index.php and download the example code. It wont work inside a vm.
will make it work.
But, swapping out RenderCopy with CopyEx will brake it again, DEPENDING on the image that is loaded.
The one that comes with that particular example will work (although libpng complians about it…),
however, this (random example) : http://www.arabdoss.com/images/Page-BgTexture.png will not.
This is quite confusing, but maybe somebody wants/can try and confirm this.
Also, it would be nice to understand what that TODO in CopyEx alludes to.