I was wondering if there were any plans to support the BlackBerry PlayBook platform?

While the PlayBook supports apps made with the Android SDK, it doesn't support apps that use the Android NDK. Fortunately RIM recently released the BlackBerry Native SDK that allows you to develop apps in c/c++ for the PlayBook Tablet. ( https://bdsc.webapps.blackberry.com/native/download)

They give some hints about porting and which libraries are already available. Unfortunately I don't know the openFrameworks core/design enough to give it a shot (although it looks like you can use normal Linux Makefiles).

If I would like to attempt to make a port/addon, were would I start? What would I need for example to build the bare minimum (like only to render ofImage objects, but not openCV or other complex addons). Would I also need to find an alternative for GLUT? All I currently know is that the device is capable of running OpenGL ES 1.0 (or 2.0 if needed).

noisecapella
—
2012-03-09T21:05:44Z —
#2

I don't really have much knowledge of the entire openFrameworks codebase, but the Android interface (the only one I've spent time with) is fairly self-contained and small. Specifically, look at the code in addons/ofxAndroid/src. It might be a good place to start learning how to write a Blackberry QNX interface. AFAIK it doesn't use GLUT at all.

falcon4ever
—
2012-03-09T22:10:51Z —
#3

noisecapella said:

I don't really have much knowledge of the entire openFrameworks codebase, but the Android interface (the only one I've spent time with) is fairly self-contained and small. Specifically, look at the code in addons/ofxAndroid/src. It might be a good place to start learning how to write a Blackberry QNX interface. AFAIK it doesn't use GLUT at all.

Thanks for your response noisecapella, I think you're right.

I've taken a look at ofxAndroid\src and the emptyExample from OF, and it seems that to get the basics working, I would need to implement my own class based on ofBaseApp and ofAppBaseWindow (e.g. ofxQNXApp and ofAppQNXWindow). Sound, camera and sensor data might come later.

I'll let you guys know how it goes

falcon4ever
—
2012-03-11T18:20:19Z —
#4

A small update of my progress.

I've managed to patch the OF sourcecode and created a handful of new classes for the ofxQNX addon. While it compiles most of the code now, I'm stuck with the dependencies part.

The minimal set requires the following libs:1. Freeimage- http://freeimage.sourceforge.net/- I've downloaded 3.15.2 and modified the Makefiles to use the QNX compiler. After removing TIFF and EXR support, it will compile just fine.

Tess2

Used the files from openFrameworks\libs\tess2\Sources

Import it to a "New BlackBerry OS C/C++ Project" and choose C, Managed Build, Static Lib (empty archive). After that just put in all the files from Sources and hit build.

http://www.boost.org/Just download 1.49, these are required because "std::tr1::shared_ptr" and "std::tr1::weak_ptr" are not available from the native SDK (#include ). Boost provides these implementations (its not needed to compile Boost)

While Poco provides sample build files for the QNX target system, I'm having some issues compiling this into a working library. After a few attempts, I managed to build it, however, when using it in my example OF project, I'm getting the following errors:

Any clues what I can do to make POCO compile properly for use with openFrameworks?

Note: For Poco I'm building the files on an Ubuntu (11.10) system + The BlackBerry Native SDK.

falcon4ever
—
2012-03-13T14:19:10Z —
#5

With help from the Poco forums, I finally managed to compile OF ! Here is ofxQNX running the graphicsExample on my BlackBerry Playbook:

cerupcat
—
2012-03-14T01:45:01Z —
#6

This is awesome! Great work!

fishkingsin
—
2012-03-14T03:55:01Z —
#7

good job

jvcleave
—
2012-03-14T04:53:53Z —
#8

Nice! Congrats and awesome work!

falcon4ever
—
2012-03-25T21:58:26Z —
#9

Hi there,

here is a brief update of my status.

So far multitouch input (4 points) and graphics are working. The only part I'm struggling with is the audio streaming support. I started by creating a new class called ofxQNXSoundStream and by looking on how this was implemented on other platforms.

As far as I see on the iPhone, Win/Mac (rtAudio) and Linux (portaudio), those implementations rely on a callback which periodically calls: - soundOutputPtr->audioOut(pcm_buf, int bufferSize, int nChannels);

On Android however, there isnt really a callback. From what I see, a new thread is created on the Java part of the application which calls a some method over JNI that calls the method above.

In a standalone sandbox app, I am able to play some noise on my playbook (I just filled the buffer with random values just like the audioOutputExample). In the code samples below I've already started to import some of the code into 3 methods:- int openQNXAudio();- void updateQNXAudio();- void closeQNXAudio();

On setup, it will call openQNXAudio(). This will take care of opening the audio device and setting up the parameters. So my only issue is how I would call updateQNXAudio() for every update loop? Is there some clean way to do it in oF? Or should I try to call it manually in testApp::update()

In the addon directory the README.txt explains some details on how to import the project.

falcon4ever
—
2012-04-02T14:45:31Z —
#12

Another update, ofxQNX is almost working perfectly on the PlayBook platform. I still have to fix the issues with the audio, but all graphics related examples are fully working.

Photos of the result:

qnxAudioOutputExample (audio is a bit broken for the moment)

qnxFontsExample

qnxGraphicsExample

qnxImageExample

qnxInputExample (4 touches max)

qnxPolygonExample

qnxTouchExample (accelerometer is fully working)

qnxVBOExample (runs at 60fps)

Real multitasking on the playbook

kylemcdonald
—
2012-04-02T16:11:35Z —
#13

this is awesome! congratulations on your progress, and this is a super well documented account of the kind of problems and solutions that come up when porting something.

joshuajnoble
—
2012-04-02T16:52:03Z —
#14

Congrats and thanks so much for all the hard work you've put into this, it's much appreciated! Oddly, just Friday I had someone ask whether I knew anything about this platform and the answer was "nope", today it's "well, maybe a little"

cerupcat
—
2012-04-02T17:29:48Z —
#15

Thanks for keeping up with this Laurence! We're going to have some fun with it!

falcon4ever
—
2012-04-03T17:30:37Z —
#16

Thanks for the kind comments guys .

@Kyle: I'm surprised by how nice its working out so far, it shows how well designed openFramework is as a portable framework. I guess Poco was the most difficult one though, since its using custom build files and for some reason didnt want to build on windows. Fortunately, the compiler builds libraries that I can use on any platform. Also a big thanks to Arturo for pointing out the issue with the polygon winding (libtess2), it fixed the issues I had earlier on with the polygonExample

@Joshua: Yea, Friday it was still barely running. I spend quite some time this weekend to clean up the code and work on the samples. I'd say it's in a reasonable state right now, if you don't need audio. Only the AudioPlayer and AudioStreamer class need quite some work.

@Seth: No doubt about that .

cerupcat
—
2012-04-07T08:01:48Z —
#17

Just a quick post. falcon4ever and I are getting closer on the audio side of things. We're still having some troubles, but making baby steps.

Here's a test of ofxPd running on the simulator. It's really great that the simulator can run at a full 60fps. There's some audio latency in the video, but i've gotten it much better since capturing the recording. I can make a quick video of some of the examples soon.

As a side note, overall it's been fairly simple to get the BlackBerry simulator/IDE setup (mostly thanks to falcon4ever). It's much easier to setup than Android since BlackBerry provides the eclipse IDE and everything necessary to get running. The simulator runs in a VM and is really fast which makes it easy to test.

cerupcat
—
2012-04-07T19:18:34Z —
#18

Here's a quick video of all the base OF examples running on the PlayBook.

There's still some weird issues with the audio example that we haven't figured out. Buffer underrun maybe?

falcon4ever
—
2012-04-10T17:02:01Z —
#19

Small update, major thanks to Seth for implementing the SoundStreamer class with SDL!

I received my PlayBook back from servicing, so here is the NodeBeat Beta running on real hardware (its very responsive compared to Android):

and all the demos:

jvcleave
—
2012-04-11T18:58:08Z —
#20

falcon4ever said:

With help from the Poco forums, I finally managed to compile OF !

hey falcon4ever - can you give me some insight to where in the Poco forums you found this solution? I am currently getting the errors you were getting while trying to do a port on ARM5