[osg-users] incorrectly imported TEXTURE_DIMENSION macro in osgText_Text.frag

Robert Osfield robert.osfield at gmail.com
Wed Dec 18 06:30:08 PST 2019


Hi Cory,

On Wed, 18 Dec 2019 at 14:21, Cory Riddell <cory at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20191218/17575b8a/attachment.html>


More information about the osg-users mailing list