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

Cory Riddell cory at codeware.com
Tue Dec 17 08:34:44 PST 2019


This may be related to something having to do with my locale settings,
but for some reason the fragment shader is failing to compile. This is
the error from the log:

    FRAGMENT glCompileShader "" FAILED
    FRAGMENT Shader "" infolog:
    Fragment shader failed to compile with the following errors:
    ERROR: 1:184: error(#132) Syntax error: "024.0" parse error
    ERROR: error(#273) 1 compilation errors.  No code generated

When I look for the source that is echoed to the log, the problem is the
thousands separator on line 4:

    Compiling C: FRAGMENT source:
        1: #define BACKDROP_COLOR vec4(0.300, 0.300, 0.300, 1.000)
        2: #define GLYPH_DIMENSION 240.0
        3: #define OUTLINE 0.070
        4: #define TEXTURE_DIMENSION 1,024.0

I believe the line is generated from this pragma:

    #pragma import_defines( SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION,
GLYPH_DIMENSION)

At this point I'm stuck. What controls the generation of those #define
macros? How do I tell it to use the C locale?

Thanks for any help,
Cory Riddell





More information about the osg-users mailing list