steffen_e

ArcGlobe and OpenGL: Offset when drawing

Discussion created by steffen_e on Oct 6, 2012
Latest reply on Jul 9, 2014 by c.huettermannconterra-de-esridist
Hi,

in ArcGlobe, I???m drawing geometry positioned at point features. This is done through OpenGL and works quite well except that the geometry is not drawn exactly at the point feature symbol but a meter or so aside.

Basically I compute the geocentric position of a feature point like that:

   
m_globeViewUtil.GeographicToGeocentric(
    point.X, point.Y, elevationMeters,
    out glX, out glY, out glZ);


The rendering is done in OnAfterDraw:

   
GL.glPointSize(15.0f);
GL.glColor3ub(255, 0, 0);
GL.glBegin(GL.GL_POINTS);
    GL.glVertex3f((float)glX, (float)glY, (float)glZ);
GL.glEnd();



With this sample code, the red point drawn by OpenGL is a few meters away from the feature points symbol. Depending on the location on earth, the distance varies. The real render code uses the geocentric position as origin for 3d models.

[ATTACH=CONFIG]18240[/ATTACH]

This happens in ArcGlobe 10.0 and 10.1. C# is used as development language. Does somebody know how to make the symbol and the drawn geometry coincide?

Attachments

Outcomes