Skip to content
This repository

Patched openFrameworks 0071 for the QNX platform (BlackBerry PlayBook & BB10) #1587

Closed
wants to merge 3 commits into from

5 participants

Laurence Muller Kyle McDonald Christoph Buchner Theodore Watson arturo
Laurence Muller

This patch adds support for the QNX platforms (BlackBerry PlayBook & BB10) to openFrameworks.

The code is based of the developPlayBook branch (https://github.com/falcon4ever/openFrameworks/tree/developPlayBook) that has been used for the NodeBeat project (http://nodebeat.com/). However, I have updated the code for compatibility with openFrameworks 0071 (develop branch)

The current code has been tested using the following SDKs

  • BlackBerry PlayBook Native SDK 2.1.0 beta 1
  • BlackBerry 10 Native SDK 10.0.06 beta 2

To develop for QNX or run the examples, you will need to download the ofxQNX add-on and place it in the addon folder of openFrameworks.

For now, ofxQNX resides in a different repository for the following reasons:

  • Because I include pre-compiled libraries, the current size of the repository is about 100 MB.
  • Pre-compiled libraries are used because of the complexity involved with building them from scratch. Most of them need to be patched for the QNX compiler and Poco for QNX can't be build on Windows platforms.
  • Another reason for the size (mostly due Poco) is because it supports multiple QNX architectures and build modes. The devices all use an ARMv7 cpu, the simulator uses x86.
  • > PlayBook device (ARMv7) - Release
  • > PlayBook device (ARMv7) - Debug
  • > PlayBook simulator (X86) - Debug
  • > BB10 device (ARMv7) - Release
  • > BB10 device (ARMv7) - Debug
  • > BB10 simulator (X86) - Debug

Additional info on ofxQNX:

Laurence Muller Patched openFrameworks 0071 for the QNX platform (BlackBerry PlayBook…
… and BlackBerry 10)

To develop for the BlackBerry PlayBook and BlackBerry 10 platform:
- Download ofxQNX (https://github.com/falcon4ever/ofxQNX) and install it into the addon folder.
1652c0d
Laurence Muller Enabled QNX output log cec0279
Laurence Muller use absolute path on QNX platform 3d75860
Kyle McDonald
Owner

i'd like to ask the core how they feel about this -- it's been sitting here for a bit. @ofZach @ofTheo @arturoc

it's awesome to see people contributing to OF in a way that opens it up to more platforms, but my feeling is that QNX is not popular enough to warrant merging into the OF core. if there is a way to make this work without requiring QNX-specific changes to the core, that would be really cool.

for now i'm going to close this PR unless zach/theo/arturo have a plan for incorporating this kind of work.

Kyle McDonald kylemcdonald closed this June 14, 2013
Laurence Muller

@kylemcdonald: Just a small update on this PR, this one was done quite a while ago with an older version (0071). The patches for 0.7.4 are now in https://github.com/falcon4ever/openFrameworks/commits/openframeworks-v0.7.4-stable

Kyle McDonald
Owner

cool -- good to know it's still possible to get OF working on QNX :) i hope there's something we can incorporate from all this work!

Christoph Buchner
Owner

@kylemcdonald judging from this PR, it seems the necessary changes are primarily a bunch of finer-grained ifdefs, so not too invasive I think. Maybe we can do some kind of "unofficial" support, i.e. just have the ifdefs in Core, everything else is in the addon anyway? I guess it depends how committed @falcon4ever is to maintaining QNX support? Alternatively, @falcon4ever could just keep maintaining a patched OF branch in his repo like currently.

Theodore Watson
Owner
ofTheo commented June 15, 2013

it doesn't seem too invasive: falcon4ever@93598c7

@falcon4ever - what could we do on our end to make it easier to keep it working for QNX?
Is it similar to iOS where there are some #ifdefs in the core and then the rest in an addon?

Laurence Muller

@ofTheo Yep, pretty much like iOS or Android. I have only patched a handful of files in openFrameworks to add QNX support. Since the BB Native SDK doesn't have the tr1 memory/shared_ptr implementations, I borrowed them from boost. For poco I'm using the same version (1.4.3) as in the repo. It works fine with the poco you guys patched ( 8a59e32 )

The rest is all handled in the addon ofxQNX (https://github.com/falcon4ever/ofxQNX/blob/develop/README.md). The readme contains the changelog and details about the libraries that I include.

Since this pull request is 9 months old and was made for 0071, I think it would be easier to just create a new pull request based on the latest dev branch / v0.8.0. The rest of the add-on can stay in https://github.com/falcon4ever/ofxQNX which I will maintain.

Theodore Watson
Owner
ofTheo commented June 17, 2013
arturo
Owner

sounds good to me too, everything opengles related is now properly ifdef'd for opengles instead of iOS and i guess there's little more that need ifdefs since i think this should be pretty similar to android or arm linux.

also we can avoid using boost by typedefing ofPtr to poco SharedPtr instead.

i would add the libraries in the official OF repo so it's easier to generate official packages?

arturo
Owner

also, i've heard that there's a tool from RIM to convert android apps to their new OS. have you tried that? it could be an option too but not sure how well it works

Christoph Buchner
Owner

i would add the libraries in the official OF repo so it's easier to generate official packages?

the thing is, when we do that, we'd have to maintain it in the future, too. do we even have devs who use BB devices (except @falcon4ever)?

Laurence Muller

I personally would prefer to keep the libs in the ofxQNX repo as they are updated quite frequently. Blackberry is working quite hard to update its platform so in the couple of months they did a few major upgrades (10.0.09, 10.0.10 and now 10.1.x). ( http://developer.blackberry.com/native/downloads/bb10/releasenotes_nativesdk.html )
Besides that, the libs folder is quite big (70+ MB) so that might pollute the openFrameworks repo quite a bit (perhaps make it an optional submodule in the addons folder?).

@arturoc The tool from RIM only allows you to convert Android apps that are implemented in Java only. It checks all the API calls that the app will make and gives you a report. Native libs are not supported (well officially that is, its disabled on purpose) so you can't just create an *.apk and then convert it to a *.bar and expect it to run.

About boost, yea if that is a possibility I could probably drop the boost dependency in ofxQNX.

@bilderbuchi I dont know how many people are using it, probably a handful of indie devs. I've used it for Nodebeat and Super Hexagon but I believe Breakeroids from Simon is using it as well.

arturo
Owner

I personally would prefer to keep the libs in the ofxQNX repo as ...

sounds good, i would try to look into using SharedPtr for ofPtr to avoid having boost, let me know if you need help

Laurence Muller falcon4ever deleted the branch December 22, 2013
Laurence Muller falcon4ever restored the branch December 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 3 unique commits by 1 author.

Sep 11, 2012
Laurence Muller Patched openFrameworks 0071 for the QNX platform (BlackBerry PlayBook…
… and BlackBerry 10)

To develop for the BlackBerry PlayBook and BlackBerry 10 platform:
- Download ofxQNX (https://github.com/falcon4ever/ofxQNX) and install it into the addon folder.
1652c0d
Jan 23, 2013
Laurence Muller Enabled QNX output log cec0279
Feb 15, 2013
Laurence Muller use absolute path on QNX platform 3d75860
This page is out of date. Refresh to see the latest.
20  libs/openFrameworks/3d/ofMesh.cpp
@@ -348,7 +348,7 @@ int ofPrimitive::getNumIndicesWire(){
348 348
 
349 349
 //--------------------------------------------------------------
350 350
 ofVec3f* ofMesh::getVerticesPointer(){
351  
-#ifdef TARGET_OSX
  351
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
352 352
 	return &vertices[0];
353 353
 #else
354 354
 	return vertices.data();
@@ -357,7 +357,7 @@ ofVec3f* ofMesh::getVerticesPointer(){
357 357
 
358 358
 //--------------------------------------------------------------
359 359
 ofFloatColor* ofMesh::getColorsPointer(){
360  
-#ifdef TARGET_OSX
  360
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
361 361
 	return &colors[0];
362 362
 #else
363 363
 	return colors.data();
@@ -366,7 +366,7 @@ ofFloatColor* ofMesh::getColorsPointer(){
366 366
 
367 367
 //--------------------------------------------------------------
368 368
 ofVec3f* ofMesh::getNormalsPointer(){
369  
-#ifdef TARGET_OSX
  369
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
370 370
 		return &normals[0];
371 371
 #else
372 372
 	return normals.data();
@@ -375,7 +375,7 @@ ofVec3f* ofMesh::getNormalsPointer(){
375 375
 
376 376
 //--------------------------------------------------------------
377 377
 ofVec2f* ofMesh::getTexCoordsPointer(){
378  
-#ifdef TARGET_OSX
  378
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
379 379
 		return &texCoords[0];
380 380
 #else
381 381
 	return texCoords.data();
@@ -384,7 +384,7 @@ ofVec2f* ofMesh::getTexCoordsPointer(){
384 384
 
385 385
 //--------------------------------------------------------------
386 386
 ofIndexType* ofMesh::getIndexPointer(){
387  
-#ifdef TARGET_OSX
  387
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
388 388
 		return &indices[0];
389 389
 #else
390 390
 	return indices.data();
@@ -394,7 +394,7 @@ ofIndexType* ofMesh::getIndexPointer(){
394 394
 
395 395
 //--------------------------------------------------------------
396 396
 const ofVec3f* ofMesh::getVerticesPointer() const{
397  
-#ifdef TARGET_OSX
  397
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
398 398
 	return &vertices[0];
399 399
 #else
400 400
 	return vertices.data();
@@ -403,7 +403,7 @@ const ofVec3f* ofMesh::getVerticesPointer() const{
403 403
 
404 404
 //--------------------------------------------------------------
405 405
 const ofFloatColor* ofMesh::getColorsPointer() const{
406  
-#ifdef TARGET_OSX
  406
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
407 407
 	return &colors[0];
408 408
 #else
409 409
 	return colors.data();
@@ -412,7 +412,7 @@ const ofFloatColor* ofMesh::getColorsPointer() const{
412 412
 
413 413
 //--------------------------------------------------------------
414 414
 const ofVec3f* ofMesh::getNormalsPointer() const{
415  
-#ifdef TARGET_OSX
  415
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
416 416
 	return &normals[0];
417 417
 #else
418 418
 	return normals.data();
@@ -421,7 +421,7 @@ const ofVec3f* ofMesh::getNormalsPointer() const{
421 421
 
422 422
 //--------------------------------------------------------------
423 423
 const ofVec2f* ofMesh::getTexCoordsPointer() const{
424  
-#ifdef TARGET_OSX
  424
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
425 425
 	return &texCoords[0];
426 426
 #else
427 427
 	return texCoords.data();
@@ -430,7 +430,7 @@ const ofVec2f* ofMesh::getTexCoordsPointer() const{
430 430
 
431 431
 //--------------------------------------------------------------
432 432
 const ofIndexType * ofMesh::getIndexPointer() const{
433  
-#ifdef TARGET_OSX
  433
+#if defined(TARGET_OSX) || defined(TARGET_QNX)
434 434
 	return &indices[0];
435 435
 #else
436 436
 	return indices.data();
4  libs/openFrameworks/app/ofAppRunner.cpp
@@ -30,6 +30,8 @@ static ofPtr<ofAppBaseWindow> 		window;
30 30
 	#include "ofAppiPhoneWindow.h"
31 31
 #elif defined TARGET_ANDROID
32 32
 	#include "ofAppAndroidWindow.h"
  33
+#elif defined TARGET_QNX
  34
+	#include "ofAppQNXWindow.h"
33 35
 #else
34 36
 	#include "ofAppGlutWindow.h"
35 37
 #endif
@@ -104,6 +106,8 @@ void ofSetupOpenGL(int w, int h, int screenMode){
104 106
 		window = ofPtr<ofAppBaseWindow>(new ofAppiPhoneWindow());
105 107
 	#elif defined TARGET_ANDROID
106 108
 		window = ofPtr<ofAppBaseWindow>(new ofAppAndroidWindow());
  109
+	#elif defined TARGET_QNX
  110
+		window = ofPtr<ofAppBaseWindow>(new ofAppQNXWindow());
107 111
 	#else
108 112
 		window = ofPtr<ofAppBaseWindow>(new ofAppGlutWindow());
109 113
 	#endif
2  libs/openFrameworks/math/ofMatrix4x4.h
@@ -422,7 +422,7 @@ class ofMatrix4x4 {
422 422
 
423 423
 inline bool ofMatrix4x4::isNaN() const {
424 424
 	
425  
-#if (_MSC_VER) || defined (TARGET_ANDROID)
  425
+#if (_MSC_VER) || defined (TARGET_ANDROID) || defined (TARGET_QNX)
426 426
 #ifndef isnan
427 427
 #define isnan(a) ((a) != (a))
428 428
 #endif
2  libs/openFrameworks/ofMain.h
@@ -25,7 +25,7 @@
25 25
 
26 26
 //--------------------------
27 27
 // communication
28  
-#if !defined( TARGET_OF_IPHONE ) & !defined(TARGET_ANDROID)
  28
+#if !defined( TARGET_OF_IPHONE ) & !defined(TARGET_ANDROID) & !defined(TARGET_QNX)
29 29
 	#include "ofSerial.h"
30 30
 	#include "ofArduino.h"
31 31
 #endif
5  libs/openFrameworks/sound/ofSoundPlayer.h
@@ -44,6 +44,11 @@ void ofSoundShutdown();
44 44
 inline void ofSoundShutdown(){}
45 45
 #endif
46 46
 
  47
+#ifdef TARGET_QNX
  48
+#include "ofxQNXSoundPlayer.h"
  49
+#define OF_SOUND_PLAYER_TYPE ofxQNXSoundPlayer
  50
+#endif
  51
+
47 52
 //---------------------------------------------
48 53
 class ofSoundPlayer : public ofBaseSoundPlayer {
49 54
 
3  libs/openFrameworks/sound/ofSoundStream.h
@@ -18,6 +18,9 @@
18 18
 #elif defined(OF_SOUNDSTREAM_IPHONE)
19 19
 	#include "ofxiPhoneSoundStream.h"
20 20
 	#define OF_SOUND_STREAM_TYPE ofxiPhoneSoundStream
  21
+#elif defined(OF_SOUNDSTREAM_QNX)
  22
+	#include "ofxQNXSoundStream.h"
  23
+	#define OF_SOUND_STREAM_TYPE ofxQNXSoundStream
21 24
 #endif 
22 25
 
23 26
 void ofSoundStreamSetup(int nOutputChannels, int nInputChannels, ofBaseApp * appPtr = NULL);
12  libs/openFrameworks/types/ofTypes.h
@@ -5,6 +5,9 @@
5 5
 
6 6
 #if (_MSC_VER)
7 7
 #include <memory>
  8
+#elif defined(TARGET_QNX)
  9
+#include <boost/tr1/memory.hpp>
  10
+#include <boost/shared_ptr.hpp>
8 11
 #else
9 12
 #include <tr1/memory>
10 13
 #endif
@@ -146,6 +149,10 @@ class ofPtr: public std::tr1::shared_ptr<T>
146 149
 	template<typename Tp1>
147 150
 	ofPtr(const ofPtr<Tp1>& __r, std::tr1::_Dynamic_tag)
148 151
 	: std::tr1::shared_ptr<T>(__r, std::tr1::_Dynamic_tag()) { }
  152
+#elif defined(TARGET_QNX)
  153
+	template<typename Tp1>
  154
+	ofPtr(const ofPtr<Tp1>& __r, boost::detail::dynamic_cast_tag)
  155
+	: std::tr1::shared_ptr<T>(__r, boost::detail::dynamic_cast_tag()) { }
149 156
 #else
150 157
 	template<typename Tp1>
151 158
 	ofPtr(const ofPtr<Tp1>& __r, std::tr1::__dynamic_cast_tag)
@@ -167,6 +174,11 @@ template<typename _Tp, typename _Tp1>
167 174
 ofPtr<_Tp>
168 175
 	dynamic_pointer_cast(const ofPtr<_Tp1>& __r)
169 176
 { return ofPtr<_Tp>(__r, std::tr1::_Dynamic_tag()); }
  177
+#elif defined(TARGET_QNX)
  178
+template<typename _Tp, typename _Tp1>
  179
+ofPtr<_Tp>
  180
+	dynamic_pointer_cast(const ofPtr<_Tp1>& __r)
  181
+{ return ofPtr<_Tp>(__r, boost::detail::dynamic_cast_tag()); }
170 182
 #else
171 183
 template<typename _Tp, typename _Tp1>
172 184
 ofPtr<_Tp>
40  libs/openFrameworks/utils/ofConstants.h
@@ -18,7 +18,8 @@ enum ofTargetPlatform{
18 18
 	OF_TARGET_IPHONE,
19 19
 	OF_TARGET_ANDROID,
20 20
 	OF_TARGET_LINUX,
21  
-	OF_TARGET_LINUX64
  21
+	OF_TARGET_LINUX64,
  22
+	OF_TARGET_QNX
22 23
 };
23 24
 
24 25
 // Cross-platform deprecation warning
@@ -60,6 +61,9 @@ enum ofTargetPlatform{
60 61
 #elif defined (ANDROID)
61 62
 	#define TARGET_ANDROID
62 63
 	#define TARGET_OPENGLES
  64
+#elif defined (__QNX__)
  65
+	#define TARGET_QNX
  66
+	#define TARGET_OPENGLES
63 67
 #else
64 68
 	#define TARGET_LINUX
65 69
 #endif
@@ -176,9 +180,29 @@ enum ofTargetPlatform{
176 180
 	#define TARGET_LITTLE_ENDIAN
177 181
 #endif
178 182
 
  183
+#ifdef TARGET_QNX
  184
+	#define GL_GLEXT_PROTOTYPES
  185
+
  186
+	#include <EGL/egl.h>
  187
+	#ifdef USING_GL11
  188
+	#include <GLES/gl.h>
  189
+	#include <GLES/glext.h>
  190
+	#elif defined(USING_GL20)
  191
+	#include <GLES2/gl2.h>
  192
+	#else
  193
+	#error openFrameworks QNX must be compiled with either USING_GL11 or USING_GL20 flags
  194
+	#endif
  195
+
  196
+	#define TARGET_LITTLE_ENDIAN
  197
+#endif
  198
+
179 199
 #ifdef TARGET_OPENGLES
180  
-	#include "glu.h"
181  
-	//typedef GLushort ofIndexType ;
  200
+	#if defined(TARGET_QNX)
  201
+		#include "glues.h"
  202
+	#else
  203
+		#include "glu.h"
  204
+		//typedef GLushort ofIndexType ;
  205
+	#endif
182 206
 #else
183 207
 	//typedef GLuint ofIndexType;
184 208
 #endif
@@ -231,6 +255,10 @@ typedef TESSindex ofIndexType;
231 255
 
232 256
 		#define OF_VIDEO_CAPTURE_ANDROID
233 257
 
  258
+	#elif defined(TARGET_QNX)
  259
+
  260
+		#define OF_VIDEO_CAPTURE_QNX
  261
+
234 262
 	#elif defined(TARGET_OF_IPHONE)
235 263
 
236 264
 		#define OF_VIDEO_CAPTURE_IPHONE
@@ -248,7 +276,7 @@ typedef TESSindex ofIndexType;
248 276
 			#define OF_VIDEO_PLAYER_IPHONE
249 277
         #elif defined(TARGET_OSX)
250 278
 			#define OF_VIDEO_PLAYER_QTKIT
251  
-		#elif !defined(TARGET_ANDROID)
  279
+		#elif !defined(TARGET_ANDROID) && !defined(TARGET_QNX)
252 280
 			#define OF_VIDEO_PLAYER_QUICKTIME
253 281
 		#endif
254 282
 	#endif
@@ -263,6 +291,8 @@ typedef TESSindex ofIndexType;
263 291
 		#define OF_SOUNDSTREAM_RTAUDIO
264 292
 	#elif defined(TARGET_ANDROID)
265 293
 		#define OF_SOUNDSTREAM_ANDROID
  294
+	#elif defined(TARGET_QNX)
  295
+		#define OF_SOUNDSTREAM_QNX
266 296
 	#else
267 297
 		#define OF_SOUNDSTREAM_IPHONE
268 298
 	#endif
@@ -275,7 +305,7 @@ typedef TESSindex ofIndexType;
275 305
   	#define OF_SOUND_PLAYER_IPHONE
276 306
   #elif defined TARGET_LINUX
277 307
   	#define OF_SOUND_PLAYER_OPENAL
278  
-  #elif !defined(TARGET_ANDROID)
  308
+  #elif !defined(TARGET_ANDROID) && !defined(TARGET_QNX)
279 309
   	#define OF_SOUND_PLAYER_FMOD
280 310
   #endif
281 311
 #endif
5  libs/openFrameworks/utils/ofLog.cpp
@@ -14,9 +14,12 @@ static map<string,ofLogLevel> & getModules(){
14 14
 }
15 15
 
16 16
 static void noopDeleter(ofBaseLoggerChannel*){}
17  
-#ifdef TARGET_ANDROID
  17
+#if defined(TARGET_ANDROID)
18 18
 	#include "ofxAndroidLogChannel.h"
19 19
 	ofPtr<ofBaseLoggerChannel> ofLog::channel = ofPtr<ofxAndroidLogChannel>(new ofxAndroidLogChannel,std::ptr_fun(noopDeleter));
  20
+#elif defined(TARGET_QNX)
  21
+	#include "ofxQNXLogChannel.h"
  22
+	ofPtr<ofBaseLoggerChannel> ofLog::channel = ofPtr<ofxQNXLogChannel>(new ofxQNXLogChannel,std::ptr_fun(noopDeleter));
20 23
 #else
21 24
 	ofPtr<ofBaseLoggerChannel> ofLog::channel = ofPtr<ofConsoleLoggerChannel>(new ofConsoleLoggerChannel,std::ptr_fun(noopDeleter));
22 25
 #endif
26  libs/openFrameworks/utils/ofUtils.cpp
@@ -20,7 +20,7 @@
20 20
 #endif
21 21
 
22 22
 
23  
-#if defined(TARGET_OF_IPHONE) || defined(TARGET_OSX ) || defined(TARGET_LINUX)
  23
+#if defined(TARGET_OF_IPHONE) || defined(TARGET_OSX ) || defined(TARGET_LINUX) || defined(TARGET_QNX)
24 24
 	#include <sys/time.h>
25 25
 #endif
26 26
 
@@ -205,6 +205,8 @@ static string & dataPathRoot(){
205 205
 	static string * dataPathRoot = new string("../../../data/");
206 206
 #elif defined TARGET_ANDROID
207 207
 	static string * dataPathRoot = new string("sdcard/");
  208
+#elif defined TARGET_QNX
  209
+	static string * dataPathRoot = new string("");
208 210
 #elif defined(TARGET_LINUX)
209 211
 	static string * dataPathRoot = new string(ofFilePath::join(ofFilePath::getCurrentExeDir(),  "data/"));
210 212
 #else
@@ -272,8 +274,18 @@ string ofToDataPath(string path, bool makeAbsolute){
272 274
 			path = dataPathRoot()+path;
273 275
 		}
274 276
 
  277
+	#if defined(TARGET_QNX)
  278
+		// Always use absolute path on QNX platform
  279
+		char fullpath[1024];
  280
+		char appPath[1024];
  281
+
  282
+		getcwd(appPath, 1024);
  283
+		snprintf(fullpath, 1024, "%s/%s", appPath, path.c_str());
  284
+		path = fullpath;
  285
+	#endif
  286
+	
275 287
 		if(makeAbsolute && (path.length()==0 || path.substr(0,1) != "/")){
276  
-			#if !defined( TARGET_OF_IPHONE) & !defined(TARGET_ANDROID)
  288
+			#if !defined( TARGET_OF_IPHONE) & !defined(TARGET_ANDROID) & !defined(TARGET_QNX)
277 289
 
278 290
 			#ifndef TARGET_WIN32
279 291
 				char currDir[1024];
@@ -531,14 +543,22 @@ bool ofIsStringInString(string haystack, string needle){
531 543
 //--------------------------------------------------
532 544
 string ofToLower(const string & src){
533 545
 	string dst(src);
  546
+#if defined TARGET_QNX
  547
+	transform(src.begin(),src.end(),dst.begin(),tolower);
  548
+#else
534 549
 	transform(src.begin(),src.end(),dst.begin(),::tolower);
  550
+#endif
535 551
 	return dst;
536 552
 }
537 553
 
538 554
 //--------------------------------------------------
539 555
 string ofToUpper(const string & src){
540 556
 	string dst(src);
  557
+#if defined TARGET_QNX
  558
+	transform(src.begin(),src.end(),dst.begin(),toupper);
  559
+#else
541 560
 	transform(src.begin(),src.end(),dst.begin(),::toupper);
  561
+#endif
542 562
 	return dst;
543 563
 }
544 564
 
@@ -728,6 +748,8 @@ ofTargetPlatform ofGetTargetPlatform(){
728 748
 	#endif
729 749
 #elif defined(TARGET_ANDROID)
730 750
 	return OF_TARGET_ANDROID;
  751
+#elif defined(TARGET_QNX)
  752
+	return OF_TARGET_QNX;
731 753
 #elif defined(TARGET_OF_IPHONE)
732 754
 	return OF_TARGET_IPHONE;
733 755
 #endif
2  libs/tess2/include/tesselator.h
@@ -69,7 +69,7 @@ enum TessElementType
69 69
 
70 70
 typedef float TESSreal;
71 71
 //note this shouldn't be defined(TARGET_OS_IPHONE) as its always defined either 0 or 1
72  
-#if TARGET_OS_IPHONE || defined(ANDROID)
  72
+#if TARGET_OS_IPHONE || defined(ANDROID) || defined(__QNX__)
73 73
 typedef unsigned short TESSindex;
74 74
 #else
75 75
 typedef unsigned int TESSindex;
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.