<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Robert,<br>
<br>
Thank you for pointing me to exactly the right spot. I made a change
at the top of that function rather than in the spot you indicated.<br>
<br>
I set the locale immediately after the stringstream is constructed
(line 104):<br>
<br>
std::stringstream ss; <br>
ss.imbue(std::locale::classic());<br>
ss<<std::fixed<<std::setprecision(3); <br>
<br>
I see that the method createStateSet() is virtual. Rather than edit
the OSG source, would you advise creating a subclass and overriding
this method?<br>
<br>
Cory<br>
<br>
<br>
<div class="moz-cite-prefix">On 12/18/2019 5:14 AM, Robert Osfield
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFN7Y+W_LqHjg7Lyhnm6xS+uTjAPigCHu_UKRw6M9Q50Ksp87A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div>Hi Cory,</div>
<div><br>
</div>
<div>Looking at osgText there following line (152,
OpenSceneGraph/src/osgText/Text.cpp sets up the
TEXTURE_DIMENSION:</div>
<div><br>
</div>
<div> ss.str("");<br>
ss <<
float(activeFont->getTextureWidthHint());<br>
defineList["TEXTURE_DIMENSION"] =
osg::StateSet::DefinePair(ss.str(),
osg::StateAttribute::ON);<br>
</div>
</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">Which makes me think that the
std::stringstream ss used is defaulting to your locale and
then GLSL is using the standard locale.<br>
</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">If this is so then setting the locale
on the stringstream would be the appropriate thing to do.<br>
</div>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">Robert.<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<br>
</body>
</html>