Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
RenderTarget memory allocation issue — Gideros Forum

RenderTarget memory allocation issue

edited October 2013 in Bugs and issues
Version 2013.06.3

I believe I've found a rather nasty bug regarding texture memory allocation in connection with RenderTarget.new().

I have an app which is utilizing a retro-style graphics scheme (blocky pixels and whatnot). To accomplish this, I'm using logical dimensions of only 160x240 and letting the framework handle the up-scaling (using "pixelPerfect") for all of my assets at draw time. On my iPad 3, this results in a logical scale of 8.

When creating a render target while this logical scale is active, the actual dimensions of the texture remain exactly as I requested. For instance, if I do a RenderTarget.new(128, 128) and call getWidth(), it returns 128, exactly as expected. However, when I check my texture memory usage, I discover that it's actually allocating 64 times as much memory as it needs (8x8, as per the logical scale).

I have a workaround that's simple enough, I just set the scale mode to "noScale", create my render target, then set it back to "pixelPerfect" immediately afterward, but I figured I should call this out.

Comments

Sign In or Register to comment.