[Development] Changing GLdouble typedef in src/opengl/qgl.h

Gunnar Sletta gunnar.sletta at jolla.com
Wed Sep 3 07:26:23 CEST 2014


On 03 Sep 2014, at 01:18, Saikrishna Arcot <saiarcot895 at gmail.com> wrote:

> Hi,
> 
> I was looking at trying to get some libraries and applications to compile in Ubuntu for armhf (which supports only OpenGL ES for performance reasons). When I was trying to get OpenSceneGraph to compile, I noticed that in Qt's src/opengl/qgl.h, GLdouble is aliased to GLfloat. OpenSceneGraph (and some other applications) expect GLdouble and GLfloat to be different things, and some applications typedef GLdouble to double in their own code.
> 
> Is there a reason why GLdouble is typedefed to GLfloat? If this was changed to typedef to double instead, is there a risk of breaking something within Qt?

There is nothing in stock ES that supports double precision floats without the use of extensions, so I suspect it was done to make the initial port easier...

Anyway, you should use Qt 5 and QOpenGLContext (not QGLWidget / QGLContext) which doesn't have this define and which should be easier to integrate with OpenSceneGraph as you are better control of the GL context.

cheers,
Gunnar

> 
> -- 
> Saikrishna Arcot_______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development




More information about the Development mailing list