Disclaimer: I have not looked at the demo you're trying to run. I'm no
opengl expert so my advice might be a bit off, but I do know the basics of
gl programming.

I'm not familiar with JavaFX opengl rendering algorithm but is it really
needed to create a new (sub)texture object so many times? You're basically
asking the GPU to allocate a new piece of vmemory every time *and*
uploading your data to it *and* destroying it afterwards when no longer
needed... It might be better to either cache your textures and upload your
data to it async (lots of methods to do that online) or have some kind of
texture atlas or most likely: revise the way the jfx rendering algorithm
works. Also, you're profiling CPU time of the glTexSubImage2D function,
which might stall (sync call possibly) on iOS if the gpu is busy.



On Wed, Apr 8, 2015 at 9:12 AM, Johan Vos <jo...@lodgon.com> wrote:

> Hi,
>
> I did some performance tests on Android and iOS. I am using
> https://github.com/Ciruman/DemoFX.git which is forked from
> https://github.com/chriswhocodes/DemoFX and made mobile-ready.
>
> On my Nexus 5, I easily get 30 fps with triangles (the first test). On my
> old iPad, this is only 3 fps. I've reports we achieve 5-6 fps on an iPad
> Air.
>
> Digging into the potential bottlenecks, I found out that the native
> function responsible for 50% of the CPU time is glTexSubImage2D which seems
> to be slow on iOS (e.g. see
> http://stackoverflow.com/questions/21162688/gltexsubimage2d-slow-on-ios7)
> but it is heavily used in prism-es2.
>
> Any advice?
>
> Thanks,
>
> - Johan
>

Reply via email to