OpenGL (OpenTK) based Renderer

Jan 17, 2012 at 3:55 PM

Hello Guys,

I am looking for a Masters project to do and I am thinking of writing an OpenGL (OpenTK) based Renderer for DotSpatial. Do you think this is viable? If I look at my proof of concept rendering speed is way better then GDI if you have a graphics card installed.

So some questions?

1. Would this be useful to any one?

2. To get started I am trying to figure out where exactly the rendering gets done. It looks like I will have to implement My own OpenGL based MapFrame? I have just started looking through the huge number of interfaces and classes so not sure from which level I will need to start implementing the renderer.

3. Is there maybe some other meaningful contribution I can make? I.e does someone have a better idea then an openGL renderer?

Any comments would be much appreciated.


Jan 18, 2012 at 1:35 PM

Speeding up the rendering would be a great addition!

Other technologies to consider are WPF and/or Direct Draw (I heard from an nVidia person that Direct Draw is now richer than OpenGL, and I think WPF actually uses Direct Draw underneath).  Sounds like OpenTK on the other hand has the advantage of working with Mono.

I think this would be a fairly ambitious task.  The main layer drawing occurs in DotSpatial.Controls namespace in the Map*Layer.cs files.  Basically, anything that implements the IMapLayer interface (DrawRegions method), so that is probably a good place to start looking.

You'll also need to look at Symbology objects since some rendering is done there as well.

Seems like the intent has been to try and architect things so that the drawing is somewhat isolated, but not sure how successful we have been at that.


Jan 18, 2012 at 3:03 PM

I vaguely remember an effort early on to render using DirectX or Direct3D, but that may have been before this site was created because I am not finding it here. The problem that was run into then was that those platforms were not ready for large source datasets (raster or shapefiles) because they expected to be able to contain all the drawable things in video memory. I believe OpenGL is a step farther abstracted from the video hardware limitations, so hopefully it will prove to be a more useful path toward using video hardware acceleration.

Be sure to include some large rasters and large shapefiles in your tests as early as possible.

Jan 18, 2012 at 5:46 PM

Thank you both for your comments... I will ponder this a little while longer... I am not so worried about the implementation of this. What worries me is a 160 page theses on why and how...I am actually surprised at how few articles are available with regards to GIS and hardware acceleration. I have found some articles on using hardware acceleration for 3d GIS but nothing really for 2d... The only system I am aware of utilizing the GPU is manifold...

Jan 19, 2012 at 7:46 PM

Here is a related project:

Jan 20, 2012 at 1:27 PM

Thanks mudnug, I'll take a look at it!

Jun 25, 2013 at 1:41 AM
Any info on this? I am in a situation where I need to render a few Shapefiles and rasters using OpenGL, and this would be perfect.
Jun 25, 2013 at 2:47 PM
I am also interested.

I think also it would be great to move the mapwindow3d code to be used under dotspatial...but it is still far from my programming skills.