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

2014-09-04 Thread Gunnar Sletta

On 03 Sep 2014, at 22:20, Fredrik Höglund fred...@kde.org wrote:

 On Wednesday 03 September 2014, Thiago Macieira wrote:
 On Wednesday 03 September 2014 07:54:14 Saikrishna Arcot wrote:
 I should have mentioned that these libraries are using Qt 4, and it would be
 non-trivial to change them to Qt 5 just for compilation purposes.
 
 I wasn't aware that doubles weren't supported on GLES. Based on that, and
 rereading the forum post here
 (http://forum.openscenegraph.org/viewtopic.php?t=11504[1]), it seems like
 there are two standards:
 
 1. Accept doubles, use double for internal processing (if any), and cast it
 to float when calling the appropriate GLES function. 2. Accept and use only
 floats for both internal processing and calling GLES functions.
 
 I wonder which one might be better to follow.
 
 We can't / won't change QtOpenGL API any more, especially not in Qt 4.
 
 If you need to, please apply a workaround so your application builds. But 
 from 
 the point of view of the Qt Project, this problem is solved in Qt 5, with 
 QtGui and the new OpenGL classes.
 
 It is not solved in Qt 5. qopengl.h has the same typedef.
 
 Fredrik

yeah, I spoke too soon.. If we were to apply 
https://codereview.qt-project.org/#/c/93984/ it would be fixed though :)

The change that introduced them was the S60 integration back in the Nokia days. 
I suspect it is due to make examples and stuff (which was mostly desktop 1.x at 
the time) compile, but there might be something else I'm not aware of.

I did a test on linux configured with -opengl es2, including qtdeclarative, 
qtquickcontrols and qtmultimedia and it all still compiles. 

-
Gunnar

 
 ___
 Development mailing list
 Development@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2014-09-03 Thread Saikrishna Arcot
I should have mentioned that these libraries are using Qt 4, and it would be 
non-trivial to change them to Qt 5 just for compilation purposes.

I wasn't aware that doubles weren't supported on GLES. Based on that, and 
rereading the forum post here 
(http://forum.openscenegraph.org/viewtopic.php?t504[1]), it seems like there 
are two standards:

1. Accept doubles, use double for internal processing (if any), and cast it to 
float when calling the appropriate GLES function.
2. Accept and use only floats for both internal processing and calling GLES 
functions.

I wonder which one might be better to follow.

On Wednesday, September 03, 2014 05:26:23 Gunnar Sletta wrote:

 On 03 Sep 2014, at 01:18, Saikrishna Arcot saiarcot...@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


[1] http://forum.openscenegraph.org/viewtopic.php?t504


signature.asc
Description: This is a digitally signed message part.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2014-09-03 Thread Thiago Macieira
On Wednesday 03 September 2014 07:54:14 Saikrishna Arcot wrote:
 I should have mentioned that these libraries are using Qt 4, and it would be
 non-trivial to change them to Qt 5 just for compilation purposes.
 
 I wasn't aware that doubles weren't supported on GLES. Based on that, and
 rereading the forum post here
 (http://forum.openscenegraph.org/viewtopic.php?t=11504[1]), it seems like
 there are two standards:
 
 1. Accept doubles, use double for internal processing (if any), and cast it
 to float when calling the appropriate GLES function. 2. Accept and use only
 floats for both internal processing and calling GLES functions.
 
 I wonder which one might be better to follow.

We can't / won't change QtOpenGL API any more, especially not in Qt 4.

If you need to, please apply a workaround so your application builds. But from 
the point of view of the Qt Project, this problem is solved in Qt 5, with 
QtGui and the new OpenGL classes.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2014-09-03 Thread Fredrik Höglund
On Wednesday 03 September 2014, Thiago Macieira wrote:
 On Wednesday 03 September 2014 07:54:14 Saikrishna Arcot wrote:
  I should have mentioned that these libraries are using Qt 4, and it would be
  non-trivial to change them to Qt 5 just for compilation purposes.
  
  I wasn't aware that doubles weren't supported on GLES. Based on that, and
  rereading the forum post here
  (http://forum.openscenegraph.org/viewtopic.php?t=11504[1]), it seems like
  there are two standards:
  
  1. Accept doubles, use double for internal processing (if any), and cast it
  to float when calling the appropriate GLES function. 2. Accept and use only
  floats for both internal processing and calling GLES functions.
  
  I wonder which one might be better to follow.
 
 We can't / won't change QtOpenGL API any more, especially not in Qt 4.
 
 If you need to, please apply a workaround so your application builds. But 
 from 
 the point of view of the Qt Project, this problem is solved in Qt 5, with 
 QtGui and the new OpenGL classes.

It is not solved in Qt 5. qopengl.h has the same typedef.

Fredrik

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2014-09-02 Thread Saikrishna Arcot
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?

-- 
Saikrishna Arcot

signature.asc
Description: This is a digitally signed message part.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


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

2014-09-02 Thread Gunnar Sletta

On 03 Sep 2014, at 01:18, Saikrishna Arcot saiarcot...@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@qt-project.org
 http://lists.qt-project.org/mailman/listinfo/development

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development