Select to view content in your preferred language

ArcGlobe and OpenGL: Offset when drawing

2079
1
10-06-2012 05:34 AM
SteffenErnst
Emerging Contributor
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?
0 Kudos
1 Reply
ClausHüttermann
Deactivated User

Hi Steffen,

I think that I am facing the same problem with features in GlobeGraphicsLayer.

Did you solve your problem??

0 Kudos