Hi
@atilim,
I noticed, just as I was about to use my
BhSnapshot plugin in anger, that something was changed in IOS6 to stop it working. I use this plugin to create thumbnail images of objects created in game so that they can be displayed in a slider view and chosen later by the user.
The BhSnapshot plugin uses glReadPixels() internally but it appears that, since iOS 6, this is returning just a bunch of zero bytes. The solution is described here:
http://stackoverflow.com/questions/12528365/why-is-glreadpixels-failing-in-this-code-in-ios-6-0?lq=1I've verified that if I change the Gideros EAGLView.m file to include:
[NSNumber numberWithBool:TRUE], kEAGLDrawablePropertyRetainedBacking, |
then the problem is fixed. Do you think it would be a good idea to change the base Gideros code to include this change? Alternatively, is it possible to set this option later (after initialization time) so that I can do it from within the plugin itself?
best regards
Comments
Setting the value to YES is recommended only when you need the content to remain unchanged, as using it can result in both reduced performance and additional memory usage.
Therefore I think I shouldn't change it.
And initialization needs a proper OpenGL context. Therefore I cannot set this option later.
The only good side is you can alter EAGLView.m by yourself
Likes: SinisterSoft, kussakov
I tell you, this gives me a horrible feeling of "shifting sands". This feature is absolutely critical to the way my game works so I'm just lucky that, this time, the fix is in a bit of Gideros code that is actually available to me. I'm now wondering that would happen if it were buried deep in the internals?
From my point of view, this means +100 votes for you to finally implement "render to texture". I know there are quite a few Gideros users out there who have requested this feature in the past. Is it actually difficult/impossible to do with the version of OGL that you're using?
best regards
Likes: Javi
I don't know OGL very well at all and my question was just, "is this feature actually hard to do with OGL1". If the answer was "no" then I'd recommend doing it now and hopefully the code would move across to OGL2 with little change.
To be honest, I think my real worry is this lack of a roadmap but that issue was beaten to death in another thread.
best regards
Currently, I'm developing new graphics backend considering these issues. To be honest, I don't know how long OGL2 version is going to take.
Likes: SinisterSoft
In terms of the roadmap. If we had a page like that where the items were in order of likely implementation then that would be helpful. I actually liked the original scheme you had a year ago, you just needed to be a bit more realistic with the timescales and to make it clear that any dates published are always tentative.
best regards
best regards
Likes: SinisterSoft
https://deluxepixel.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
@OZApps, yes, I use TaskBadges with Taskpaper and they seem to work well together.
best regards
-[UIImage rotate:]: unrecognized selector sent to instance 0xb584320
Does this relate to the glReadPixels() problem which cropped up in iOS6 remaining in iOS7? Are there any work-arounds?
thank you very much
Since render to texture was implemented, but can't be used to save a screenshot - I also use plugin.
I just set kEAGLDrawablePropertyRetainedBacking to TRUE in EAGLView.m
The screenshots are working on iOS 6 and 7 and I do not see any performance impact. The FPS, CPU usage and Memory remain the same.
I will keep digging, but so far - no difference (at least on my device).
@octopod - did you add all those UIImage+... files to you project?