Hell o all,
I made native activity and i want to draw some text. what is the easiest way to do this? can i do this by using openGL and if yes how?
Thanks for help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re going to need to write your own text renderer in OpenGL. If you have a finite list of strings it may be easier to just pre-prepare them all in a single texture, and render them as single quads per word, or else you could have an atlas of characters and have a single quad per character. Alternatively, you could leverage a library to render to draw the text into a buffer at runtime and then render this to a quad.
If none of this makes sense, I suggest you go do some basic OpenGL tutorials. Google is your friend. A very feature rich font library is FreeType: http://freetype.sourceforge.net/index2.html.