From: No I. <kii...@gm...> - 2012-04-27 23:16:21
|
I managed to get GL2 to work so I can continue. StelSkyDrawer has a bug in combination with StelPainter GL2 code if not using shaders. I also encountered a bug with point sprites on my GPU driver (Mesa, Intel Sandy Bridge, Linux), so I replaced those temporarily with triangles and rewrote their shader. That was so I could actually test code. On the refactor side, I'm trying to write the Renderer backends so that their initialization can gracefully fail, allowing other backend to be used as fallback. I'm planning the GL2 backend to always use shaders, while the GL1 backend will never use them. On a machine with buggy shaders, the GL2 backend should fail to initialize and be replaced with a GL1 backend. This should work even on Qt5, as AFAIK they're only removing support for GL1 context creation - GL1 backend should still work as long as the drivers advertise GL2 support (even if very buggy) - and if they don't, Qt5 won't run, either. (Removing GL1 support as in breaking all GL1 code doesn't make sense, since GL2 is just a small update over 1.5 (basically a 1.6), and you can't write GL2 code without writing GL1 code) The whole point is that a fallback from GL2 to GL1 backend should make more sense / be more maintainable than mixing shader-based and shader-less code based on conditions such as useShader. On 4/16/12, Reaves, Timothy <tr...@si...> wrote: > Perhaps the need for refactoring now becomes more apparent? :) > > > > On Mon, Apr 16, 2012 at 3:09 PM, No Idea <kii...@gm...> wrote: > >> I can see the STELPAINTER_GL2 is implied by USE_OPENGL_ES2, >> but I thought STELPAINTER_GL2 is also used for desktop GL2 builds. >> >> It seems to me that not enabling STELPAINTER_GL2 >> leaves no GL2 features at all. Wouldn't this mean that the desktop version >> code is purely GL1 feature-wise? >> >> FM >> >> On 4/16/12, Alexander Wolf <ale...@gm...> wrote: >> > Hello! >> > >> > I think Fabien can give to you more info but I try answer for you. >> > >> > 2012/4/16 No Idea <kii...@gm...>: >> >> So, how are the GL2 builds compiled currently? >> > >> > Stellarium build with STELPAINTER_GL2 macro only for OpenGL ES >> > (StelPainter.hpp:38). This key used for Maemo/Android ports. For >> > desktop use a GL1+GL2 mode. Safe mode switch Stellarium to forced GL1 >> > mode (main.cpp:269) >> > >> > -- >> > With best regards, Alexander >> > >> > >> ------------------------------------------------------------------------------ >> > For Developers, A Lot Can Happen In A Second. >> > Boundary is the first to Know...and Tell You. >> > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> > http://p.sf.net/sfu/Boundary-d2dvs2 >> > _______________________________________________ >> > Stellarium-pubdevel mailing list >> > Ste...@li... >> > https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> > >> >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> Stellarium-pubdevel mailing list >> Ste...@li... >> https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel >> > |