florianblume / qt3d-gizmo

3D gizmo to attach to Qt3D entities.
GNU General Public License v3.0
17 stars 3 forks source link

changed shader version to 120. #4

Closed parisa-hr closed 2 years ago

parisa-hr commented 2 years ago

I got this error that makes me can't see shaders:

QOpenGLShader::compile(Fragment): 0(6) : error C7533: global variable gl_FragColor is deprecated after version 120

Problematic Fragment shader source code

version 130

ifdef GL_KHR_blend_equation_advanced

extension GL_ARB_fragment_coord_conventions : enable

extension GL_KHR_blend_equation_advanced : enable

endif

define lowp

define mediump

define highp

line 1

uniform vec3 color;

void main(void) { gl_FragColor = vec4(color, 1.0); }


This relates to my NVDI GPU and I should change the version to 120.

Screenshot from 2022-05-14 08-50-50

florianblume commented 2 years ago

I undid your changes because suddenly I couldn't see the gizmo anymore.

Instead I tried to fix the error message you got by removing gl_Fragcolor and replace it with out vec4 fragColor. Could you try to run it again?

parisa-hr commented 2 years ago

I undid your changes because suddenly I couldn't see the gizmo anymore.

Instead I tried to fix the error message you got by removing gl_Fragcolor and replace it with out vec4 fragColor. Could you try to run it again?

Yes - thank you. It works well.