[mapserver-dev] OpenGL Renderer bugs

Mark Deneen mdeneen at gmail.com
Fri Jun 24 10:48:47 EDT 2011


Now that Mapserver 6.0 is out, I built it on a linux server, and
attempted to utilize a GTX-580 to render maps.  I wasn't all that
successful but part of that was the transition from mapserver 5.6.6 to
6.0.

I ripped out most of my layers to get a basic map to start with, and
added the following to my map definition:


   OUTPUTFORMAT
          NAME 'OGL_PNG24'
          DRIVER OGL/PNG
          IMAGEMODE RGB
   END


Which should be enough to trigger the OGL renderer.  However, judging
from the debug output, it's not using OGL but rather AGG.  I added
some debug output to mapoutput.c
 to msCreateDefaultOutputFormat(...) where it checks for OGL:

msSetError(MS_OGLERR, "Checking for OGL (%s)", "test", driver);


And, to my surprise, this was in the log:

[Thu Jun 23 17:49:00 2011].480192 test: Renderer error. Checking for
OGL (OGL/PNG)
[Thu Jun 23 17:49:00 2011].482227 CGI Request 12 on process 3284
[Thu Jun 23 17:49:00 2011].482287 test: Renderer error. Checking for
OGL (AGG/PNG)

It looks like the output driver is lost when using FCGI and it resets
to AGG/PNG.  I just altered msInitializeRendererVTable so that it uses
OGL for the MS_RENDER_WITH_AGG case to force the OGL renderer.

I also noticed some errors in the log from ms_uint32
OglContext::getTextureSize(GLuint dimension, ms_uint32 value).  It is
checking to see if the last parameter to glGetTexLevelParameteriv is 0
but, from reading the documentation on glGetTexLevelParameteriv, this
sort of check looks wrong.  The doc states "If an error is generated,
no change is made to the contents of params." and since check is
initially set to 0, it looks like this may be doing the opposite of
what was intended.

I was able to confirm that mapserver was, in fact, using OGL/GLX to
render.  However, none of my labels or roads show up and all of my
"shields" for the roads are in the upper left hand corner of the
image.

Additionally, at least when using FCGI, nvidia-smi -q shows increased
memory usage on the video card with each request.  This appears to be
freed when I terminate the mapserver FCGI process.

Would I be better off using the latest SVN?  Is using OGL _and_ FCGI
at the same time a bad idea?

Best Regards,
Mark Deneen


More information about the mapserver-dev mailing list