[SDL] Android: SDL_RenderCopy using dest rectangle not working

William Dyce wilbefast at gmail.com
Fri Jul 29 19:30:23 PDT 2011


I think I'm closing down on the problem: using SDL_image I was able to test
with images with alpha, my theory being that the image must monopolise the
renderer to be draw. Sure enough compositing two images with transparency,
even using NULL, NULL (whole render-surface) for both doesn't work properly:
I get a black screen.

I'll keep digging.

On 30 July 2011 02:09, William Dyce <wilbefast at gmail.com> wrote:

> Dunno - it works fine if the image gets to monopolise the render-srface but
> not if if can't, but I can't think why that would be. I'll have a look at
> the implementation tomorrow when I've had some sleep. Are there any other
> ways of blitting images I can try, without using the compat mode (which
> doesn't seem to work on my hardware)?
>
> William
>
>
>
>
> On 29 July 2011 21:36, Forest Hale <havoc at ghdigital.com> wrote:
>
>> I don't know anything about the specifics of what is going on there, but
>> keep in mind that copying image data is not a strongpoint of GLES, perhaps
>> the SDL_RendererCopy implementation is using functionality not present on
>> GLES?
>>
>>
>> On 07/29/2011 04:34 AM, William Dyce wrote:
>>
>>> Hi chaps,
>>>
>>> Sorry to both you again, I have a little problem here. The following
>>> works fine, stretching a whole image across the whole screen:
>>> *SDL_RenderCopy(renderer, sprite, NULL, NULL);*
>>>
>>> If I try to specific where to draw the sprite though, that is its
>>> destination rectangle, I get just a black square under Android:
>>> *SDL_RenderCopy(renderer, sprite, NULL, &rect);
>>> *
>>> Under Linux everything works fine. Any idea what might be causing this?
>>>
>>> I'm thinking it has to do with how the window's size is overridden by the
>>> mobile's screen-size...
>>>
>>> William
>>>
>>>
>>>
>>> ______________________________**_________________
>>> SDL mailing list
>>> SDL at lists.libsdl.org
>>> http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org<http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org>
>>>
>>
>>
>> --
>> LordHavoc
>> Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/**
>> darkplaces <http://icculus.org/twilight/darkplaces>
>> Co-designer of Nexuiz - http://alientrap.org/nexuiz
>> "War does not prove who is right, it proves who is left." - Unknown
>> "Any sufficiently advanced technology is indistinguishable from a rigged
>> demo." - James Klass
>> "A game is a series of interesting choices." - Sid Meier
>>
>> ______________________________**_________________
>> SDL mailing list
>> SDL at lists.libsdl.org
>> http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org<http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110730/7bd0b98b/attachment-0008.htm>


More information about the SDL mailing list