Skip to content

Commit

Permalink
Merge branch 'master' into 2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Apr 12, 2019
2 parents d1d1353 + ce1ecdf commit db32f6f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 13 additions & 5 deletions docs/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <osgEarth/GLUtils>
...
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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/releasenotes.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 13 additions & 5 deletions src/osgEarth/PointDrawable.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db32f6f

Please sign in to comment.