Hi Alexander,

On Sat, Jun 14, 2014 at 11:01:11PM +0700, Alexander Wolf wrote:
> Hi!
> 
> Today I tried build Stellarium on Windows with an OpenGL support in the
> follow combinations: 32-bits Qt 5.2.1 + MinGW 4.8 and 64-bits Qt 5.3.0 +
> MSVC2013. Both combinations has been broken in same places -
> glBlendFuncSeparate() in the StelPainter.cpp; glActiveTexture() and
> glGenerateMipmap() in the StelTexture.cpp.
> 
> This is very strange because all other gl-functions works without troubles.
> Fabien and Guillaume, can you look this issue?

This is normal, the default OpenGL library on Windows only exports
OpenGL 1 functions.  The other functions might still be accessible, but
you need to to manually request their addresses using some tricks (see
http://www.opengl.org/wiki/Load_OpenGL_Functions for more details).

The solutions for this are either:

    1) Using ANGLE.
    2) Using Qt QOpenGLFunctions classes.
    3) Linking with an up to date OpenGL library.

I think for the moment using ANGLE is the best thing to do.  Not only is
it simpler, but it will work on pretty much any windows version after XP
SP2.  I don't think many people are using XP SP1 anymore.

That being said, it would be nice to be able to also compile using the
QOpenGLFunctions.  Unfortunately, since QT 5.3, the API requires all the
opengl calls to be made from non const methods, which does not work on
stellarium.  A solution for this would be to use some macros.

For example a call like:

    glGenerateMipMap()

Could be automatically turned into:

    stelGL.glGenerateMipMap();

Where stelGL would be a global instance of QOpenGLFunctions.

This would solve the problem of the const methods.

Regards,

    Guillaume


------------------------------------------------------------------------------
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
Stellarium-pubdevel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel

Reply via email to