Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / CreateRenderImage() on Android

Author
Message
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 18th Jan 2018 10:18
I use render images to create object textures / sprites on the fly. On windows, I am able to create a render image and it has all pixel values set to zero so I am able to treat it as a transparent canvas (no call to ClearScreen()). When I test on android, however, the images are not transparent and seem to have pixel data in them. Is there a difference between platforms and initilaisation of new images?

How can I get around this?
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 18th Jan 2018 10:29
Quote: "Is there a difference between platforms"

Probably. Different hardware. It's the same as AppGameKit variables being zeroed on creation, but C variables being uninitialised.

Quote: "How can I get around this?"

Call ClearScreen() before use?
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 21st Jan 2018 13:22
Unfortunately if I use ClearScreen() then the alpha channel gets set to opaque. I guess I can use SetImageMask() to reset the alpha channel, but that's going to have a performance impact.
JohnStabler
AGK Bronze Backer
11
Years of Service
User Offline
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 21st Jan 2018 13:29
Actually, ClearScrren() seems to be doing the job. Strange, I'm sure that didn't happen before. Never mind

Login to post a reply

Server time is: 2024-11-24 03:28:28
Your offset time is: 2024-11-24 03:28:28