OK, I created a branch at:

    lp:~guillaume-chereau/stellarium/qt-5-3-windows-opengl

This is not as simple as I thought: instead of using the GL macro I
actually redefine (through a macro) all the Opengl ES 2 calls to use the
current context QOpenGLFunctions object.

The nice thing is that it is totally transparent, the ugly thing is
that it makes a lot of macros in StelOpenGL.hpp

I could compile with Qt 5.3 Opengl on Windows, though I had a few
problems with the recent changes to the CMakeList.txt file.  I think it
should also work with Qt 5.2.

I also noticed a bug in the rendering of the sun on this branch, but
this is maybe due to some unrelated issue.

Regards,

    Guillaume

On Mon, Jun 16, 2014 at 09:31:41PM +0800, Guillaume Chereau wrote:
> Yeah it makes sense to be able to compile with both version of Qt.  I
> removed QOpenGLFunctions support because it didn't work with Qt 5.3 the
> way we used it.  I opened a bug in Qt bug tracker
> (https://bugreports.qt-project.org/browse/QTBUG-39095) and the
> recommendation is to use QOpengGLContext::function method.  So basically
> its means all call to opengl function should look like:
> 
>     QOpengGLContext::currentContext()->glClearColor(0, 0, 0, 0);
> 
> Of course this is not a proper solution since it would make the code way
> too verbose.  Instead we could eventually use the 'GL' macro we already
> have to automatically add the extra code.  Then we would only need to
> write:
> 
>     GL(glClearColor(0, 0, 0, 0));
> 
> As an extra advantage, we can use it to automatically check for error
> after each opengl call in debug mode (like the GL macro is already used
> for).
> 
> I am going to give it a try and if it works I will make a new branch.
> 
> Regards,
> 
>     Gui
> 
> On Mon, Jun 16, 2014 at 02:45:25PM +0200, Georg Zotti wrote:
> > I would appreciate that. What about the other platforms without ANGLE? Qt
> > recommends deriving rendering classes from QtOpenGLFunctions and using
> > various initialize..() etc functions to resolve function addresses, are
> > there no problems now? Or are these only necessary for OpenGL beyond V2.1
> > / ES2.0 ?
> > 
> > Maybe a good read for some Qt/OpenGL insight:
> > http://www.kdab.com/opengl-in-qt-5-1-part-1/
> > 
> > Kind regards,
> > Georg
> > 
> > 
> > On Mo, 16.06.2014, 14:01, Fabien Chéreau wrote:
> > > Hi Barry,
> > > it seems that you use a version of Qt without angle. You should remove
> > > this
> > > Qt and use the one including ANGLE. Ii.e. if you machine is 64 bits you
> > > should install this one:
> > > http://download.qt-project.org/official_releases/qt/5.3/5.3.0/qt-opensource-windows-x86-msvc2013_64-5.3.0.exe
> > >
> > > Appart from this, I think we should do as Guillaume proposed to allow
> > > building on "OpenGL" version of Qt (otherwise we can't compile with mingw
> > > anymore).
> > >
> > > Fabien
> > >
> > >
> > >
> > > On Mon, Jun 16, 2014 at 8:51 AM, Barry Gerdes <[email protected]>
> > > wrote:
> > >
> > >> Hi Alex
> > >> I tried  the msvc method in the wiki but I can't follow what you do
> > >> about
> > >> the two screen drops yet.
> > >> I will get the other dependencies
> > >>
> > >>
> > >> Barry
> > >>
> > >> ------------------------------
> > >> Date: Mon, 16 Jun 2014 12:39:57 +0700
> > >> From: [email protected]
> > >> To: [email protected]
> > >>
> > >> Subject: Re: [Stellarium-pubdevel] Normal mapping for Moon
> > >>
> > >> Hi Barry!
> > >>
> > >> OpenGL version did not supported anymore (both - MinGW and MSVC) - you
> > >> should use Qt 5.3 with MSVC2013 or Qt 5.2.1 with MSVC2012 now.
> > >>
> > >> --
> > >> With best regards, Alexander
> > >>
> > >> ------------------------------------------------------------------------------
> > >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk
> > >> Solutions
> > >> Find What Matters Most in Your Big Data with HPCC Systems Open Source.
> > >> Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis
> > >> for
> > >> Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems
> > >> _______________________________________________ Stellarium-pubdevel
> > >> mailing list [email protected]
> > >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel
> > >>
> > >>
> > >>
> > 
> > 
> > ------------------------------------------------------------------------------
> > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> > Find What Matters Most in Your Big Data with HPCC Systems
> > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> > Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> > http://p.sf.net/sfu/hpccsystems
> > _______________________________________________
> > Stellarium-pubdevel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel
> 
> -- 
> Guillaume Chéreau <[email protected]>
> http://www.noctua-software.com
> tel: +886-970-422-910

-- 
Guillaume Chéreau <[email protected]>
http://www.noctua-software.com
tel: +886-970-422-910

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Stellarium-pubdevel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel

Reply via email to