Can't display LineString on the phone(IOS&Android)

classic Classic list List threaded Threaded
1 message Options
showzh20 showzh20
Reply | Threaded
Open this post in threaded view
|

Can't display LineString on the phone(IOS&Android)

I have builded osgearth on IOS and Android
there is some mistake on LineString

this is my Code:
Geometry* path = new LineString();
        path->push_back( osg::Vec3d(-74, 40.714, 0) );   // New York
        path->push_back( osg::Vec3d(139.75, 35.68, 0) ); // Tokyo

        Feature* pathFeature = new Feature(path, geoSRS);
        pathFeature->geoInterp() = GEOINTERP_GREAT_CIRCLE;

        Style pathStyle;
        pathStyle.getOrCreate<LineSymbol>()->stroke()->color() = Color::White;
        pathStyle.getOrCreate<LineSymbol>()->stroke()->width() = 1.0f;
        pathStyle.getOrCreate<LineSymbol>()->stroke()->smooth() = true;
        pathStyle.getOrCreate<LineSymbol>()->tessellationSize() = 75000;
        pathStyle.getOrCreate<PointSymbol>()->size() = 8;
        pathStyle.getOrCreate<PointSymbol>()->fill()->color() = Color::Red;
        pathStyle.getOrCreate<PointSymbol>()->smooth() = true;
        pathStyle.getOrCreate<AltitudeSymbol>()->clamping() = AltitudeSymbol::CLAMP_TO_TERRAIN;
        pathStyle.getOrCreate<AltitudeSymbol>()->technique() = AltitudeSymbol::TECHNIQUE_GPU;
        pathStyle.getOrCreate<RenderSymbol>()->depthOffset()->enabled() = true;

        pathNode = new FeatureNode(pathFeature, pathStyle);

and this is log
FRAGMENT glCompileShader "" FAILED
FRAGMENT Shader "" infolog:
ERROR: 0:5: 'vec2' : declaration must include a precision qualifier for type
ERROR: 0:7: 'float' : declaration must include a precision qualifier for type
ERROR: 0:38: Use of undeclared identifier 'oe_LineDrawable_rv'
ERROR: 0:38: Use of undeclared identifier 'oe_LineDrawable_rv'
ERROR: 0:39: Use of undeclared identifier 'oe_LineDrawable_rv'
ERROR: 0:39: Use of undeclared identifier 'oe_LineDrawable_rv'
ERROR: 0:43: Use of undeclared identifier 'coordProj'
ERROR: 0:44: Use of undeclared identifier 'ci'
ERROR: 0:45: Use of undeclared identifier 'pattern16'
ERROR: 0:63: Use of undeclared identifier 'oe_LineDrawable_rv'
ERROR: 0:64: Use of undeclared identifier 'oe_LineDrawable_lateral'

glLinkProgram 0x2820fc2d0"osgEarth::LineDrawable" FAILED
Program "osgEarth::LineDrawable" infolog:
ERROR: One or more attached shaders not successfully compiled