Hi Cory,

On Wed, 18 Dec 2019 at 14:21, Cory Riddell <c...@codeware.com> wrote:

> 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.
>
> I set the locale immediately after the stringstream is constructed (line
> 104):
>
>     std::stringstream ss;
>     ss.imbue(std::locale::classic());
>     ss<<std::fixed<<std::setprecision(3);
>


This is exactly the fix I wrote 20 minutes ago, and now checked in :-)


https://github.com/openscenegraph/OpenSceneGraph/commit/1968f3d6e14fe4cdfa98df465c1f383d2bb7d8de

This fix is checked into OSG-3.6 branch and master.


> I see that the method createStateSet() is virtual. Rather than edit the
> OSG source, would you advise creating a subclass and overriding this method?
>

This is something you could do if you had to for older versions of the
OSG.  The best solution is to have it part of the stringstream setup in
Text.cpp as I'm sure this issue will crop up for others that change don't
have standard locale.

Cheers,
Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to