cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Freetype (or some other library) to draw text in an Oculus Go VR app?

ejonathanlindgr
Explorer
This question has two parts. My first question is: What is the recommended method to make text in an Oculus GO VR app? What C/C++ libraries to use and how to compile and then link to them correctly in android studio? (I am using android studio and the Mobile SDK for native development, without unity or unreal)

Second part concerns my attempt at using Freetype for this purpose. I can successfully compile C++ code on my laptop with something like

    g++ cpptest.cpp -I/usr/local/include/freetype2 -L/usr/local/lib -lfreetype

so freetype is successfully installed, however just adding these flags in android.mk (in LOCAL_CPPFLAGS) does not work. I guess that I have to compile freetype specifically for android? and then somehow link to this by modifying android.mk correctly, or with some settings in android studio? I tried to follow the instructions on https://github.com/cdave1/freetype2-android but I fail miserably when running ndk-build (Android NDK: NDK Application 'local' targets unknown ABI(s): armeabi  ). I am really a beginner when it comes to android development, C++ linking, gradle, android studio etc so I am completely lost where to start, any help is appreciated.
0 REPLIES 0