Hi Robert, Thanks for the quick reply. Just for anyone else who runs into this, another way to get aorund this without changing order of includes is just to add the osg defines before Qt is included in the application:
#define GL_DOUBLE 0x140A #define GLdouble double It was a bit of a pain to change up order of includes everywhere in my application. Since both OSG and Qt have to check whether or not GLdouble is defined by the GL implementation, I think its safe to do this [and it seems to be working fine]. Regards, Preet On Wed, Dec 12, 2012 at 3:51 AM, Robert Osfield <robert.osfi...@gmail.com>wrote: > Hi Preet, > > On 12 December 2012 05:59, Preet <prismatic.proj...@gmail.com> wrote: > >> Hiya >> >> I'm using OSG with Qt to create an OpenGL ES 2 application. GL ES2 does >> not have GLdoubles. >> >> When building witHh against ES2, Qt typedefs GLdouble to GLfloat. OSG >> typedefs GLdouble to just 'double'. As a result I get an error when trying >> to compile my application. >> >> How do I get around this? >> >> > It will be an order of include issue, so just be careful which order you > include files, or keep the Qt GL code seperate from the OSG Qt code. > Personally I'm surprised by the Qt downcasting GLdoube to GLfloat, this > could break codes that rely on doubles. On the OSG side we generally use > floats for all key data that gets passed to OpenGL, it tends to be just > things like glu (which is now part of the OSG) that uses doubles. > > Robert. > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org