grahamrow / Muview2

3D visualization of micromagnetic simulation data from Mumax or OOMMF
GNU General Public License v2.0
41 stars 8 forks source link

switch GLSL to version 1.40 #2

Closed godsic closed 10 years ago

godsic commented 10 years ago

OpenGL 3.3 is not yet supported by the majority of the open-source drivers, e.g. i915. So, for the greater compatibility reason, it would be nice to switch from GLSL 3.30 (OpenGL 3.3) to GLSL 1.40 (OpenGL 3.1). Perhaps change OpenGL context type to OpenGL 3.1 as well (not sure how Qt handles this).

grahamrow commented 10 years ago

Thanks for the feedback. My shaders aren't advanced so there's probably not an issues with that strategy — I might even try to downgrade the whole thing to Qt 4.8 and forgo the Qt5 OpenGL bindings that I fought to keep around!

godsic commented 10 years ago

Hi Graham,

Qt5 is perfectly OK with me. Among countless goodies, Qt5 works on Wayland, but Qt4 is not. So I would rather stick to Qt5.

As for the shaders, I've changed GLSL version to '140' locally and now MuView2 works fine on my system with i915 driver and mesa 9.2. The patch is attached.

On Wed, 12 Feb, 2014 at 2:21 PM, Graham Rowlands notifications@github.com wrote:

Thanks for the feedback. My shaders aren't advanced so there's probably not an issues with that strategy — I might even try to downgrade the whole thing to Qt 4.8 and forgo the Qt5 OpenGL bindings that I fought to keep around!

— Reply to this email directly or view it on GitHub.

grahamrow commented 10 years ago

I can change the context to 3.1 without issue. My setup complains about the "inverse" function not being included in the GLSL 1.4 spec (contrary to the actual spec.) I have to include an extension to get it to work (at least the GLSL compiler was helpful in suggesting this!)

version 140

extension GL_ARB_gpu_shader5 : enable

It seems like this is more individualized than I'd like it to be...