Bug#439973: boson: 439973: test application

Paul Wise pabs at debian.org
Sat Mar 15 08:08:03 UTC 2008


tag 439973 + patch
thanks

IMO this indicates a bug in glGetString in mesa on amd64.

On i386 this program just prints "(nil) 0.000000", while on amd64 it
segfaults in glGetString. I'll file a separate bug on mesa about this.

#include <GL/gl.h>
#include <stdio.h>

int
main (int argc, char **argv)
{
	const GLubyte* extensions = glGetString(GL_EXTENSIONS);
	printf("%p %f\n",extensions);
	return 0;
}

This hacky patch prevents boson from crashing and makes what happens on
amd64 equivalent to what happens on i386 (returning zero extensions):

--- bogl/bogl.cpp.orig
+++ bogl/bogl.cpp
@@ -45,8 +45,7 @@
 
 QStringList boglGetOpenGLExtensions()
 {
- QString extensions = (const char*)glGetString(GL_EXTENSIONS);
- return QStringList::split(" ", extensions);
+ return BoGL::bogl()->OpenGLExtensions();
 }
 
 QStringList boglGetGLUExtensions()

-- 
bye,
pabs

http://wiki.debian.org/PaulWise
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20080315/5e69e4e4/attachment.pgp 


More information about the Pkg-games-devel mailing list