From 98d0f3f9d1631ce80cca727cc7efbbbff5a0a455 Mon Sep 17 00:00:00 2001 From: gwaldron Date: Tue, 9 Apr 2019 08:08:08 -0400 Subject: [PATCH 1/4] Update FAQ --- docs/source/faq.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/source/faq.rst b/docs/source/faq.rst index d4eaeaff76..aec69c9de9 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -51,12 +51,20 @@ I loaded a model, but it has no texture/lighting/etc. in osgEarth. Why? like sky lighting. -My Annotations (FeatureNode, etc.) are not rendering. Why? -.......................................................... +Lines or Annotations (FeatureNode, etc.) are not rendering. Why? +................................................................ - Best practice is to place an Annotation node (FeatureNodes, PlaceNodes, etc.) - as a descendant of the MapNode in your scene graph. You can also add them - to an AnnotationLayer and add that layer to the Map. + Lines render using a shader that requires some initial state to be set. + You can apply this state to your top-level camera (or anywhere else + above the geometry) like so: + + #include + ... + GLUtils::setGlobalDefaults(camera->getOrCreateStateSet()); + + For Annotations (FeatureNodes, PlaceNodes, etc.) best practice is to place + an Annotation node as a descendant of the MapNode in your scene graph. + You can also add them to an AnnotationLayer and add that layer to the Map. Annotations need access to the MapNode in order to render properly. If you cannot place them under the MapNode, you will have to manually install a few From 88c3231f144c63deef8510bdfb7fb1004cbdb5c7 Mon Sep 17 00:00:00 2001 From: Glenn Date: Wed, 10 Apr 2019 08:10:38 -0400 Subject: [PATCH 2/4] Update releasenotes.rst --- docs/source/releasenotes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/releasenotes.rst b/docs/source/releasenotes.rst index 1f35bbead0..f8dc7bd1cf 100644 --- a/docs/source/releasenotes.rst +++ b/docs/source/releasenotes.rst @@ -1,7 +1,7 @@ Release Notes ============= -Version 2.10 (TBD 2018) +Version 2.10 (November 2018) ---------------------------- * REX terrain engine promoted to default. Old MP engine is now in legacy support mode. * Removed the osgEarthQt nodekit from the SDK, along with all Qt examples From d63d2ac1b830e80bc55aaf99f94be7c06f1c652c Mon Sep 17 00:00:00 2001 From: Glenn Date: Wed, 10 Apr 2019 08:12:47 -0400 Subject: [PATCH 3/4] Update conf.py --- docs/source/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 248611cb67..618e531472 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -41,16 +41,16 @@ # General information about the project. project = u'osgEarth' -copyright = u'2013, Pelican Mapping' +copyright = u'2018, Pelican Mapping' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '2.4' +version = '2.10' # The full version, including alpha/beta/rc tags. -release = '2.4' +release = '2.10' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 95bad7cc1232ce1f1908415f8b25ab2a745b1abb Mon Sep 17 00:00:00 2001 From: gwaldron Date: Fri, 12 Apr 2019 09:11:46 -0400 Subject: [PATCH 4/4] PointDrawable: fix fwidth detection and provide alternative impl for smoothing without it --- src/osgEarth/PointDrawable.glsl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/osgEarth/PointDrawable.glsl b/src/osgEarth/PointDrawable.glsl index cb4d4cbfe2..5195f68d1c 100644 --- a/src/osgEarth/PointDrawable.glsl +++ b/src/osgEarth/PointDrawable.glsl @@ -19,16 +19,24 @@ void oe_PointDrawable_VS_VIEW(inout vec4 vertexView) #pragma vp_location fragment_coloring #pragma import_defines(OE_POINT_SMOOTH) +// Some GLES impls don't have fwidth yet: +#if !defined(GL_ES) || defined(GL_OES_standard_derivatives) +#define HAVE_FWIDTH +#endif + void oe_PointDrawable_FS(inout vec4 color) { #ifdef OE_POINT_SMOOTH vec2 c = 2.0*gl_PointCoord-1.0; float r = dot(c, c); - float d = 0.0; - #ifdef GL_OES_standard_derivatives - d = fwidth(r); - #endif - color.a = 1.0 - smoothstep(1.0-d, 1.0+d, r); + +#ifdef HAVE_FWIDTH + float d = fwidth(r); + color.a = 1.0 - smoothstep(1.0 - d, 1.0 + d, r); +#else + color.a = 1.0 - smoothstep(-0.1, 0.1, r - 1.0); +#endif + if (color.a < 0.1) discard; #endif