pierrep / lpmt

Rewrite of the Little Projection Mapping Tool (http://projection-mapping.org/tools/lpmt/)
GNU General Public License v3.0
54 stars 4 forks source link

Compile for Raspberry Pi? #8

Open lumotroph opened 2 years ago

lumotroph commented 2 years ago

Greetings, and congratulations on the project reboot!

I'm trying to get a projection mapping system alive on RPi 4, and have been struggling to get this to compile.

Hitting the following error after compiling openFrameworks successfully:

make[1]: *** [/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:217: obj/linuxarmv6l/Release/src/quad.o] Error 1
make[1]: Leaving directory '/home/pi/openFrameworks/apps/myApps/lpmt'
make: *** [/home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

It seems there are some errors in quad.cpp. Here is one example:

/home/pi/openFrameworks/apps/myApps/lpmt/src/quad.cpp: In member function ‘void quad::bezierSurfaceUpdate()’:
/home/pi/openFrameworks/apps/myApps/lpmt/src/quad.cpp:1240:17: error: ‘GL_MAP2_VERTEX_3’ was not declared in this scope
         glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, &bezierCtrlPoints[0][0][0]);
                 ^~~~~~~~~~~~~~~~

There are more like that, but thought I'd check and see if this was something you'd seen before / if i'm barking up the wrong tree trying to get it to compile on arm.

Thanks for your work!

pierrep commented 2 years ago

It hasn't been ported to ARM so yeah, not likely to work. That line fails because arm uses GLES instead of OpenGL. An ARM port is a possibility, but not in the short term. I would recommend you look at ofxPiMapper instead. I have a more up to date fork here - https://github.com/pierrep/ofxPiMapper

See this post for more info: https://forum.openframeworks.cc/t/ofxpimapper-now-supports-shaders/37104

Another problem is that currently there is no hardware accelerated video player usable from within OF on the RPI4. So if that's your aim you might be out of luck. OF on RPI3 is still hardware accelerated though and works at 720p/30fps

lumotroph commented 2 years ago

Ahh that’s exactly my problem! Will have to look into an NUC or something a bit beefier which runs x86.

Thanks for the suggestions, appreciate it.

Out of curiosity, what would it take for me to help with the ARM port?

Duncan

On Wed, 08 Sep 2021 at 07:58, Pierre Proske @.***> wrote:

It hasn't been ported to ARM so yeah, not likely to work. That line fails because arm uses GLES instead of OpenGL. An ARM port is a possibility, but not in the short term. I would recommend you look at ofxPiMapper instead. I have a more up to date fork here - https://github.com/pierrep/ofxPiMapper

See this post for more info: https://forum.openframeworks.cc/t/ofxpimapper-now-supports-shaders/37104

Another problem is that currently there is no hardware accelerated video player usable from within OF on the RPI4. So if that's your aim you might be out of luck. OF on RPI3 is still hardware accelerated though and works at 720p/30fps

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pierrep/lpmt/issues/8#issuecomment-914940963, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADACLHIPQC7OI6WIOEWMJULUA33RHANCNFSM5DSPGJIA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Duncan Cosser - (+27)848009957

pierrep commented 2 years ago

You can try commenting out that Bezier stuff that's not working. It'll disable the functionality but everything else should work. Then try compiling again. Post here if you have more errors. Working on the RPI is very slow and time consuming, but if you want to give it a shot I can try and help you get a (semi) functional build working, provided there aren't any major problems.