[mapserver-users] MapServer 6 beta, opengl, linux

Andy Colson andy at squeakycode.net
Fri Mar 11 23:13:09 EST 2011


On 03/11/2011 05:20 AM, thomas bonfort wrote:
> Andy,
> yes a (beefy) video card is needed or at least wanted, as you want to
> offset the calculations to the GPU. If one isn't present, you're going
> to fall back to a software opengl implementation which will be orders
> of magnitude slower than what AGG is going to take.
>
> cc-ing Toby if he wants to comment further on this.
>
> regards,
> thomas
>
> On Fri, Mar 11, 2011 at 03:02, Andy Colson<andy at squeakycode.net>  wrote:
>> On 03/10/2011 07:16 PM, Andy Colson wrote:
>>>
>>> On 03/09/2011 08:47 PM, Daniel Morissette wrote:
>>>>
>>>> The MapServer Team is pleased to announce the release of MapServer
>>>> 6.0.0-beta1. This is the first beta on our way to a final 6.0 release.
>>>>
>>>
>>> I cannot seem to get opengl to work.
>>>
>>> a stacktrace of shp2img:
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> 0x00007ffff690bcab in glGetIntegerv () from /usr/lib64/libGL.so.1
>>> (gdb) backtrace
>>> #0 0x00007ffff690bcab in glGetIntegerv () from /usr/lib64/libGL.so.1
>>> #1 0x000000000047667f in OglRenderer::OglRenderer(unsigned int, unsigned
>>> int, colorObj*) ()
>>> #2 0x0000000000474988 in msImageCreateOgl(int, int, outputFormatObj*,
>>> colorObj*) ()
>>> #3 0x000000000044cd26 in msPrepareImage ()
>>> #4 0x000000000044ce75 in msDrawMap ()
>>> #5 0x0000000000415067 in main ()
>>> (gdb)
>>>

I'll continue my comments from another thread in this better named thread.

So... I'm confused with mapoglrenderer.cpp.

I dont see where any GLX context or PBuffer have been setup yet before the first call to OglRenderer::OglRenderer.  The first thing it does is: glGetIntegerv(GL_VIEWPORT ,viewPort);

But how can there be a viewport size yet?  I added a debug message right after it:
   	if(msGetGlobalDebugLevel() >= MS_DEBUGLEVEL_DEBUG)
	{	
		msDebug("viewport %d, %d, %d, %d\n", viewportX, viewportY, viewportWidth, viewportHeight);
	}

and got:

$ ./shp2img -all_debug 15 -m /pub/maps/test.map -o x.png
[Fri Mar 11 19:30:01 2011].731230 msLoadMap(): 0.000s
[Fri Mar 11 19:30:01 2011].731352 viewport 48, 135483496, 134889737, 0

that cant be right... can it?

The next thing is getTextureSize, which calls glTexImage2D.  Will that work with no context?

-Andy


More information about the mapserver-users mailing list