I have a custom renderer which need to render modified geometry. The input features are all coming in via the IFeatureCursor as polygon elements. (This is similar to this example, though I'm not rendering points.)

I can easily render Polygons, Lines, and Points via either passing the new geometry into IFeatureDraw.Draw or calling IDisplay.DrawPolygon/IDisplay.DrawPoint/etc.

However, IDisplay does not provide a mechanism for drawing a multipatch, and passing this in as the geometry to IFeatureDraw.Draw results in nothing drawn to the screen.

Is there a way to directly "draw" a multipatch element (preferrably with texturing), within this method?

  • Is this in 2D Display (ArcMap) or in ArcScene or Globe? Jul 30 '11 at 5:17
  • @Craig: This needs to be supported in all three, though I'm willing to use multiple code paths to handle it. This is for a plugin data source, so the support will need to be "global.' Aug 1 '11 at 16:11

As Craig says, OpenGL is the way to go for 3D.

See Creating an ArcGIS Engine Application With C-Sharp and OpenGL. Earlier versions of ArcGIS Explorer also supported OpenGL calls, but last time I checked Esri no longer supports it.

I don't know why they did this - OpenGL drawing really helped differentiate AGX from Google Earth.


Even if your plugin returned multipatches correctly, I don't think ArcObjects offers methods to support drawing multipatches with OpenGL calls. It would likely be easier to just draw from their native format (by-pass the plugin in other words). I've never used it, but here's a script that shows how to use OpenGL with ArcScene.


2D display (IDisplay) does not support drawing multipatches directly. You'll need to covert them to footprints (see IMultipatch::XYFootprint for how to extract the footprint). If you want a 2D rendering of the multipatch textures you'll need to create an image from a 2D projection of the multipatch and draw that.

For 3D, you should be able to just return mulitpatches in the cursor and it will work but honestly most people just implement a custom layer for globe and do their own work in OpenGL.

  • I'm trying to support ArcScene primarily (not Globe), but also map/globe as secondary. Unfortunately, returning multipatches in the cursor doesn't work in a plugin dataset properly, from what I can tell... Aug 4 '11 at 15:42

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .