Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
tylorpin
Posts: 39
Registered: ‎06-13-2011
My Device: playbook, torch 9810 and Alpha device!

Help with OpenGL

Hello there, I'm developing my app in Adobe AIR, but I ran into a huge problem.

I can't exactly play huge, frame by frame animation using Flash, because it took up a lot of memory and laggy.

 

As I know the Adobe AIR isn't hardware accelerated, and to achieve hardware-accelerated animations I would need a NDK extension to my Adobe AIR apps, and this is where I needed help. 

 

My situation is I already got 30 images, which I can play it frame by frame to form an animation. However, the size of each image is quite huge and takes up almost the 1024x600 of the pb's screen.

 

So is OpenGL using C++ my solution?

Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Help with OpenGL

Air should be hardware accelerated. Have you checked on the Air forum?
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Contributor
tylorpin
Posts: 39
Registered: ‎06-13-2011
My Device: playbook, torch 9810 and Alpha device!

Re: Help with OpenGL

but as far as I know AIR isn't GPU accelerated, just like Flash. Correct me if I'm wrong..
Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Help with OpenGL

This is one of the things I found: http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Animation-on-playbook/m-p/1510273

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Retired
dtomilovskiy
Posts: 36
Registered: ‎10-26-2011
My Device: RIM Developer

Re: Help with OpenGL

I am not sure what you are trying to achieve in your application. However, even going GLES path, you are going to run into performance issues.

 

Consider the following, a single frame is (almost) 1024x600 image, and you need to play 30 of these in rapid succession.

So, in case you wish to use those as textures mapped onto a full-screen billboard, we get

 

1024x600x30 = 18432000 ~ 17.57Mb of texture memory

 

The size of your textures is not a major concern in terms of available memory, yet bandwidth is going to be your limiting factor here. Since you are not the only user of the system bus, I can almost guarantee that you wont be able to render such an animation in exactly half a second.

 

Contact me offline if you want to discuss potential alternatives in C++.