<div dir="ltr"><div><div>Hi Bojan,<br><br></div>You don't provide enough details about your OSG version or build options to know what might going on in your system. The OSG shaders might be coming form the OSG side or in your own application, there is no way from the provided details we could guess.<br><br></div>Robert.<br><div><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 August 2017 at 13:24, Bojan Novak <span dir="ltr"><<a href="mailto:bojan@lxnav.com" target="_blank">bojan@lxnav.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I recently ran into a problem regarding osgText::Text class. I generate a text label as follows:<br>
<br>
Code:<br>
<br>
ref_ptr<osgText::Text> psText = new osgText::Text;<br>
psText->setText("Some text");<br>
psText->setDrawMode(osgText::<wbr>Text::TEXT);<br>
psText->setAxisAlignment(<wbr>osgText::Text::XY_PLANE);<br>
psText->setCharacterSizeMode(<wbr>osgText::Text::SCREEN_COORDS);<br>
psText->setCharacterSize(40));<br>
psText->setFont("font/Roboto-<wbr>Regular.ttf");<br>
psText->setBackdropType(<wbr>osgText::Text::OUTLINE);<br>
psText->setBackdropColor(Vec4(<wbr>0.0f, 0.0f, 0.0f, 1.0f));<br>
Vec3 vPos = convertFromPolar(p.lon(), p.lat(), p.elev() + 100);<br>
psText->setPosition(vPos);<br>
psText->setColor(Vec4(0.99, 0.6, 0.95, 1.0));<br>
psText->setAutoRotateToScreen(<wbr>true);<br>
<br>
m_psGeode->addDrawable(psText.<wbr>get());<br>
<br>
<br>
<br>
<br>
On my Ubuntu Linux laptop, this runs well and I can see the text label on the screen.<br>
But when I compile the same application for an ARMv7 processor (with OpenGL/ES) and run it there, I get the following output messages on the console:<br>
<br>
Code:<br>
<br>
VERTEX glCompileShader "" FAILED<br>
VERTEX Shader "" infolog:<br>
(8) : error C7506: OpenGL/ES does not define the global variable gl_FrontColor<br>
<br>
FRAGMENT glCompileShader "" FAILED<br>
FRAGMENT Shader "" infolog:<br>
(4) : error C7573: OpenGL/ES requires precision specifier on float types<br>
(5) : error C7573: OpenGL/ES requires precision specifier on float types<br>
(6) : error C7506: OpenGL/ES does not define the global variable gl_Color<br>
<br>
glLinkProgram "" FAILED<br>
<br>
<br>
<br>
<br>
And in this case, the text label does not appear on the screen.<br>
<br>
Reading the error messages, my guess is that the shader generated to show these labels is not compatible with OpenGL/ES. Is it possible to find out the source code of the vertex and fragment shaders that get generated in this case? Or even better, what shaders should I use for the OpenGL/ES to show text labels?<br>
<br>
BTW, before someone tells me to check if the font file exists, it does, I double checked it and debug messages also confirm that. :)<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Bojan[/img][/code]<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=71432#71432" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=71432#<wbr>71432</a><br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div><br></div>