diff --git a/ogre_media/materials/glsl150/Script.js b/ogre_media/materials/glsl150/Script.js new file mode 100644 index 0000000000..defd94a8b3 --- /dev/null +++ b/ogre_media/materials/glsl150/Script.js @@ -0,0 +1,24 @@ + +function rotateY(t) { + var s = Math.sin(t); + var c = Math.cos(t); + return [ + c, 0,-s, 0, + 0, 1, 0, 0, + s, 0, c, 0, + 0, 0, 0, 1 + ]; +} + +function perspective(fovy, aspect, near, far) { + var y = 1 / Math.tan(fovy / 2 * Math.PI / 180); + var x = y / aspect; + var c = (near + far) / (near - far); + var d = (near * far) / (near - far) * 2; + return [ + x, 0, 0, 0, + 0, y, 0, 0, + 0, 0, c,-1, + 0, 0, d, 0 + ]; +} diff --git a/ogre_media/materials/glsl150/box.geom b/ogre_media/materials/glsl150/box.geom index d7c655a44e..8184f32336 100644 --- a/ogre_media/materials/glsl150/box.geom +++ b/ogre_media/materials/glsl150/box.geom @@ -1,4 +1,4 @@ -#version 150 +#version 330 core // Generates an axis-aligned box with a given size // for each input vertex. @@ -19,13 +19,13 @@ uniform mat4 worldviewproj_matrix; uniform vec4 size; uniform vec4 auto_size; -in gl_PerVertex { - vec4 gl_Position; - vec4 gl_FrontColor; -} gl_in[]; +in PerVertex { + vec4 frontColor; +} gs_in[]; -out vec4 gl_TexCoord[]; +out vec4 texCoord[]; +out vec4 frontColor; layout(points) in; layout(triangle_strip, max_vertices=24) out; @@ -49,12 +49,12 @@ void emitVertex( int side, vec4 x, vec4 y, vec4 z, vec3 tex ) vec4 pos_rel = tex.x*x + tex.y*y + tex.z*z; vec4 pos = gl_in[0].gl_Position + vec4( pos_rel * size_factor * 0.5 ); gl_Position = worldviewproj_matrix * pos; - gl_TexCoord[0] = vec4( tex.x*0.5+0.5, tex.y*0.5+0.5, 0.0, 0.0 ); + texCoord[0] = vec4( tex.x*0.5+0.5, tex.y*0.5+0.5, 0.0, 0.0 ); #ifdef WITH_LIGHTING - gl_FrontColor = vec4( gl_in[0].gl_FrontColor.xyz * lightness[side], gl_in[0].gl_FrontColor.a ); + frontColor = vec4( gs_in[0].frontColor.xyz * lightness[side], gs_in[0].frontColor.a ); #else - gl_FrontColor = vec4( gl_in[0].gl_FrontColor.xyz, gl_in[0].gl_FrontColor.a ); + gl_FrontColor = vec4( gs_in[0].frontColor.xyz, gs_in[0].frontColor.a ); #endif #ifdef WITH_DEPTH diff --git a/ogre_media/materials/glsl150/box.gpjs b/ogre_media/materials/glsl150/box.gpjs new file mode 100644 index 0000000000..f33f71ecef --- /dev/null +++ b/ogre_media/materials/glsl150/box.gpjs @@ -0,0 +1,219 @@ +[ + { + "executeOn": "ResetEvaluation", + "fileName": "../../../../../../../../tmp/.mount_GPUpadasGMNv/usr/share/gpupad/samples/Cube/math.js", + "id": 103, + "type": "Script" + }, + { + "fileName": "cube_position_normal_texcoords.bin", + "id": 7253, + "items": [ + { + "id": 7254, + "items": [ + { + "count": 3, + "dataType": "Float", + "id": 7255, + "name": "position", + "padding": 0, + "type": "Field" + }, + { + "count": 3, + "dataType": "Float", + "id": 7256, + "name": "normal", + "padding": 0, + "type": "Field" + }, + { + "count": 2, + "dataType": "Float", + "id": 7257, + "name": "texcoords", + "padding": 0, + "type": "Field" + } + ], + "name": "Vertex", + "offset": "0", + "rowCount": "36", + "type": "Block" + } + ], + "type": "Buffer" + }, + { + "id": 7247, + "items": [ + { + "divisor": 0, + "fieldId": 7255, + "id": 7248, + "name": "vertex", + "normalize": false, + "type": "Attribute" + } + ], + "name": "Stream", + "type": "Stream" + }, + { + "bindingType": "Uniform", + "editor": "Expression4", + "id": 7250, + "name": "size", + "type": "Binding", + "values": [ + "4", + "4", + "4", + "4" + ] + }, + { + "bindingType": "Uniform", + "editor": "Expression4x4", + "id": 78, + "name": "uView", + "type": "Binding", + "values": [ + "1", + "0", + "0", + "0", + "0", + "1", + "0", + "0", + "0", + "0", + "1", + "0", + "0.40", + "-0.75", + "-4.00", + "1" + ] + }, + { + "bindingType": "Uniform", + "editor": "Expression", + "id": 7259, + "name": "uProjection", + "type": "Binding", + "values": [ + "perspective(45, 1, 1, 100)" + ] + }, + { + "bindingType": "Uniform", + "editor": "Expression", + "id": 7249, + "name": "worldviewproj_matrix", + "type": "Binding", + "values": [ + "uProjection*uView" + ] + }, + { + "bindingType": "Uniform", + "editor": "Expression4", + "id": 7251, + "name": "auto_size", + "type": "Binding", + "values": [ + "4", + "4", + "4", + "4" + ] + }, + { + "id": 7241, + "items": [ + { + "fileName": "pass_pos_color.vert", + "id": 7242, + "language": "GLSL", + "shaderType": "Vertex", + "type": "Shader" + }, + { + "fileName": "box.geom", + "id": 7243, + "language": "GLSL", + "shaderType": "Geometry", + "type": "Shader" + } + ], + "name": "Program", + "type": "Program" + }, + { + "flipVertically": false, + "format": "RGBA8_UNorm", + "height": "600", + "id": 7252, + "name": "Texture", + "target": "Target2D", + "type": "Texture", + "width": "800" + }, + { + "blendConstant": "#ffffffff", + "cullMode": "NoCulling", + "frontFace": "CCW", + "id": 7245, + "items": [ + { + "blendAlphaDest": "Zero", + "blendAlphaEq": "Add", + "blendAlphaSource": "One", + "blendColorDest": "Zero", + "blendColorEq": "Add", + "blendColorSource": "One", + "colorWriteMask": 15, + "id": 7246, + "level": 0, + "name": "Attachment", + "textureId": 7252, + "type": "Attachment" + } + ], + "logicOperation": "NoLogicOperation", + "name": "Target", + "polygonMode": "Fill", + "type": "Target" + }, + { + "callType": "ClearTexture", + "checked": true, + "clearColor": "#ff000000", + "clearDepth": 1, + "clearStencil": 0, + "executeOn": "EveryEvaluation", + "id": 7258, + "name": "Clear Texture", + "textureId": 7252, + "type": "Call" + }, + { + "baseInstance": "0", + "callType": "Draw", + "checked": true, + "count": "3", + "executeOn": "EveryEvaluation", + "first": "0", + "id": 7244, + "instanceCount": "1", + "name": "Draw", + "primitiveType": "Points", + "programId": 7241, + "targetId": 7245, + "type": "Call", + "vertexStreamId": 7247 + } +] diff --git a/ogre_media/materials/glsl150/box.gpjs.state b/ogre_media/materials/glsl150/box.gpjs.state new file mode 100644 index 0000000000..832d68f183 --- /dev/null +++ b/ogre_media/materials/glsl150/box.gpjs.state @@ -0,0 +1,3 @@ +[General] +editorState=@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x1\0\0\0\x2\0\0\x4\xf9\0\0\x3\v\xfc\x1\0\0\0\x10\xfc\0\0\0\0\0\0\x3 \0\0\0\0\0\xff\xff\xff\xfa\0\0\0\0\x1\0\0\0\x2\xfb\0\0\0\x1e\0\x66\0\x37\0\x61\0\x64\0\x35\0\x63\0\x66\0\x38\0\x36\0\x35\0\x30\0\x61\0\x66\0\x63\0\x65\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x31\0\x31\0\x36\0\x34\0\x39\0\x33\0\x35\0\x34\0\x37\0\x61\0\x65\0\x62\0\x33\0\x63\0\x36\0\x31\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfc\0\0\0\0\0\0\x1\xe0\0\0\0\0\0\xff\xff\xff\xfa\0\0\0\0\x1\0\0\0\x2\xfb\0\0\0 \0\x31\0\x30\0\x61\0\x65\0\x32\0\x66\0\x64\0\x39\0\x63\0\x34\0\x65\0\x63\0\x64\0\x39\0\x66\0\x31\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x39\0\x35\0\x64\0\x62\0\x33\0\x37\0\x38\0\x64\0\x31\0\x64\0\x33\0\x37\0\x31\0\x63\0\x62\0\x66\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfc\0\0\x1\xe6\0\0\x1\xd7\0\0\0\0\0\xff\xff\xff\xfa\0\0\0\0\x1\0\0\0\x2\xfb\0\0\0 \0\x64\0\x35\0\x35\0\x38\0\x39\0\x30\0\x66\0\x37\0\x61\0\x64\0\x61\0\x33\0\x37\0\x35\0\x66\0\x30\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x65\0\x30\0\x36\0\x64\0\x38\0\x31\0\x61\0\x38\0\x39\0\x64\0\x64\0\x38\0\x37\0\x61\0\x35\0\x36\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfc\0\0\0\0\0\0\x2\x61\0\0\0\0\0\xff\xff\xff\xfa\0\0\0\0\x1\0\0\0\x2\xfb\0\0\0 \0\x66\0\x38\0\x30\0\x64\0\x65\0\x36\0\x63\0\x35\0\x37\0\x34\0\x33\0\x37\0\x35\0\x32\0\x30\0\x39\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x63\0\x35\0\x36\0\x31\0\x65\0\x38\0\x37\0\x38\0\x33\0\x63\0\x63\0\x30\0\x31\0\x30\0\x38\0\x66\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfc\0\0\x2g\0\0\x2N\0\0\0\0\0\xff\xff\xff\xfa\0\0\0\0\x1\0\0\0\x4\xfb\0\0\0 \0\x62\0\x39\0\x32\0\x38\0\x31\0\x62\0\x65\0\x30\0\x36\0\x66\0\x64\0\x61\0\x32\0\x32\0\x34\0\x39\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x37\0\x37\0\x31\0\x38\0\x30\0\x39\0\x36\0\x63\0\x32\0\x65\0\x30\0\x65\0\x62\0\x38\0\x38\0\x65\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x38\0\x32\0\x38\0\x32\0\x34\0\x37\0\x66\0\x33\0\x63\0\x62\0\x31\0\x34\0\x37\0\x30\0\x61\0\x38\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x66\0\x36\0\x33\0\x38\0\x66\0\x39\0\x39\0\x63\0\x38\0\x63\0\x35\0\x36\0\x34\0\x61\0\x36\0\x66\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0\x1e\0\x32\0\x63\0\x66\0\x33\0\x33\0\x39\0\x63\0\x38\0\x62\0\x30\0\x66\0\x61\0\x63\0\x31\0\x64\x1\0\0\0\0\0\0\x4\xb5\0\0\0\0\0\0\0\0\xfb\0\0\0\x1e\0\x66\0\x30\0\x37\0\x31\0\x31\0\x66\0\x32\0\x35\0\x63\0\x65\0\x37\0\x61\0\x64\0\x31\0\x66\x1\0\0\0\0\0\0\x4\xb5\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x39\0\x65\0\x63\0\x34\0\x37\0\x62\0\x37\0\x35\0\x30\0\x39\0\x61\0\x34\0\x34\0\x35\0\x39\0\x30\x1\0\0\0\0\0\0\x4\xb5\0\0\0\0\0\0\0\0\xfb\0\0\0\x1e\0\x32\0\x31\0\x30\0\x31\0\x37\0\x65\0\x32\0\x66\0\x35\0\x37\0\x66\0\x32\0\x39\0\x66\0\x61\x1\0\0\0\0\0\0\x4\xb5\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x65\0\x35\0\x37\0\x33\0\x65\0\x30\0\x36\0\x65\0\x39\0\x34\0\x36\0\x62\0\x35\0\x36\0\x65\0\x35\x1\0\0\0\0\0\0\x4\xb5\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x36\0\x63\0\x63\0\x35\0\x34\0\x33\0\x65\0\x62\0\x34\0\x61\0\x61\0\x31\0\x35\0\x63\0\x37\0\x36\x1\0\0\0\0\0\0\x4\xb5\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x64\0\x65\0\x32\0\x32\0\x34\0\x33\0\x65\0\x63\0\x62\0\x38\0\x62\0\x64\0\x32\0\x37\0\x31\0\x61\x1\0\0\0\0\0\0\x4\xb5\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x62\0\x36\0\x62\0\x62\0\x37\0\x30\0\x30\0\x63\0\x39\0\x31\0\x34\0\x35\0\x34\0\x61\0\x32\0\x37\x1\0\0\0\0\0\0\x2X\0\0\0\0\0\0\0\0\xfc\0\0\x2^\0\0\x2W\0\0\0\0\0\xff\xff\xff\xfa\0\0\0\0\x1\0\0\0\x4\xfb\0\0\0 \0\x32\0\x39\0\x38\0\x62\0\x35\0\x64\0\x37\0\x34\0\x35\0\x36\0\x38\0\x39\0\x39\0\x64\0\x30\0\x31\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x66\0\x34\0\x64\0\x30\0\x39\0\x39\0\x63\0\x61\0\x32\0\x38\0\x33\0\x34\0\x33\0\x32\0\x36\0\x63\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x63\0\x36\0\x36\0\x34\0\x66\0\x38\0\x34\0\x65\0\x37\0\x37\0\x36\0\x37\0\x31\0\x61\0\x38\0\x35\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x34\0\x36\0\x33\0\x34\0\x66\0\x64\0\x66\0\x63\0\x34\0\x65\0\x39\0\x39\0\x39\0\x30\0\x30\0\x39\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfc\0\0\0\0\0\0\x2\x8f\0\0\0{\0\xff\xff\xff\xfa\0\0\0\0\x1\0\0\0\x4\xfb\0\0\0 \0\x34\0\x33\0\x33\0\x33\0\x65\0\x34\0\x61\0\x31\0\x38\0\x33\0\x35\0\x30\0\x64\0\x63\0\x64\0\x38\x1\0\0\0\0\xff\xff\xff\xff\0\0\0H\0\xff\xff\xff\xfb\0\0\0\x1e\0\x33\0\x62\0\x62\0\x38\0\x32\0\x61\0\x66\0\x61\0\x37\0\x66\0\x32\0\x61\0\x64\0\x38\0\x38\x1\0\0\0\0\xff\xff\xff\xff\0\0\0H\0\xff\xff\xff\xfb\0\0\0 \0\x37\0\x32\0\x61\0\x30\0\x66\0\x32\0\x64\0\x65\0\x39\0\x35\0\x34\0\x32\0\x30\0\x64\0\x34\0\x66\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0\xfb\0\0\0 \0\x64\0\x30\0\x36\0\x65\0\x39\0\x66\0\x66\0\x64\0\x34\0\x65\0\x66\0\x36\0\x32\0\x30\0\x63\0\x66\x1\0\0\0\0\xff\xff\xff\xff\0\0\0H\0\xff\xff\xff\xfb\0\0\0 \0\x64\0\x35\0\x38\0\x35\0\x37\0\x32\0\x35\0\x61\0\x64\0\x31\0\x62\0\x36\0\x30\0\x35\0\x66\0\x33\x1\0\0\x2\x95\0\0\x2\x64\0\0\0H\0\xff\xff\xff\0\0\x4\xf9\0\0\0\0\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0) +openEditors=103|d06e9ffd4ef620cf, 7242|4333e4a18350dcd8, 7243|3bb82afa7f2ad88, 7252|d585725ad1b605f3 diff --git a/ogre_media/materials/glsl150/cube_position_normal_texcoords.bin b/ogre_media/materials/glsl150/cube_position_normal_texcoords.bin new file mode 100644 index 0000000000..7dda806e37 Binary files /dev/null and b/ogre_media/materials/glsl150/cube_position_normal_texcoords.bin differ diff --git a/ogre_media/materials/glsl150/depth.frag b/ogre_media/materials/glsl150/depth.frag new file mode 100644 index 0000000000..7723250764 --- /dev/null +++ b/ogre_media/materials/glsl150/depth.frag @@ -0,0 +1,27 @@ +#version 330 + +// Passes on the packed depth value + +// Splits up a normalized depth value in the range (0..1) +// into the vertex RGB values. +// Alpha values below 1/255 are rendered transparent. + +uniform float alpha; +uniform float far_clip_distance; + +const float minimum_alpha = 1.0 / 255.0; + +varying float depth; + +void main() +{ + float normalized_depth = depth / far_clip_distance; + + // split up float into rgb components + const vec3 shift = vec3(256.0 * 256.0, 256.0, 1.0); + const vec3 mask = vec3(0.0, 1.0 / 256.0, 1.0 / 256.0); + vec3 depth_packed = fract(normalized_depth * shift); + depth_packed -= depth_packed.xxy * mask; + + gl_FragColor = vec4( depth_packed.zyx, step( minimum_alpha, alpha )); +} diff --git a/ogre_media/materials/glsl150/glsl150.program b/ogre_media/materials/glsl150/glsl150.program index 14c4fba115..816a4b41fa 100644 --- a/ogre_media/materials/glsl150/glsl150.program +++ b/ogre_media/materials/glsl150/glsl150.program @@ -1,3 +1,6 @@ + +fragment_program rviz/glsl150/depth.frag glsl { source depth.frag } + //all shaders, sorted by name geometry_program rviz/glsl150/billboard.geom glsl @@ -78,3 +81,14 @@ vertex_program rviz/glsl150/pass_pos_color.vert glsl { source pass_pos_color.vert } + + +fragment_program rviz/glsl150/smooth_square.frag glsl +{ + source smooth_square.frag + default_params + { + param_named_auto highlight custom 5 + param_named_auto alpha custom 1 + } +} diff --git a/ogre_media/materials/glsl150/pass_pos_color.vert b/ogre_media/materials/glsl150/pass_pos_color.vert index 9ee147ca5d..92d9673547 100644 --- a/ogre_media/materials/glsl150/pass_pos_color.vert +++ b/ogre_media/materials/glsl150/pass_pos_color.vert @@ -1,14 +1,19 @@ -#version 150 compatibility +#version 330 // this merely passes over position and color, // as needed by box.geom -out gl_PerVertex { - vec4 gl_Position; - vec4 gl_FrontColor; -}; +layout(location = 0) in vec3 vertex; +layout(location = 3) in vec4 color; + +uniform mat4 uProjection; + +out PerVertex { + vec4 frontColor; +} perVertex; + void main() { - gl_Position = gl_Vertex; - gl_FrontColor = gl_Color; + gl_Position = uProjection * vec4(vertex, 1); + perVertex.frontColor = color; } diff --git a/ogre_media/materials/glsl150/smooth_square.frag b/ogre_media/materials/glsl150/smooth_square.frag new file mode 100644 index 0000000000..26361a7bb6 --- /dev/null +++ b/ogre_media/materials/glsl150/smooth_square.frag @@ -0,0 +1,30 @@ +#version 330 + +// rasterizes a smooth square with ax,ay in [-0.5..0.5] + +uniform vec4 highlight; +uniform float alpha; + +in vec4 texCoord[]; +in vec4 frontColor; + +out vec4 fragColor; + +void main() +{ + float ax = texCoord[0].x-0.5; + float ay = texCoord[0].y-0.5; + + float blend = smoothstep(-0.48, -0.45, ay) * (1.0 - smoothstep(0.45, 0.48, ay)) * + smoothstep(-0.48, -0.45, ax) * (1.0 - smoothstep(0.45, 0.48, ax)); + + float inv_blend = 1.0 - blend; + vec3 col = blend * frontColor.xyz + (sign(0.5 - length(vec3(frontColor.xyz))) * vec3(0.2, 0.2, 0.2) + frontColor.xyz) * inv_blend; + + //alternative version: make color at edge darker + //vec3 col = (0.5 + 0.5*blend) * gl_Color.xyz; + + col = col + col * highlight.xyz; + + fragColor = vec4(col.r, col.g, col.b, alpha * frontColor.a ); +} diff --git a/ogre_media/materials/scripts150/point_cloud_box.material b/ogre_media/materials/scripts150/point_cloud_box.material index 8c76c163b1..2bcbfe3a75 100644 --- a/ogre_media/materials/scripts150/point_cloud_box.material +++ b/ogre_media/materials/scripts150/point_cloud_box.material @@ -11,7 +11,7 @@ material rviz/PointCloudBox { vertex_program_ref rviz/glsl150/pass_pos_color.vert {} geometry_program_ref rviz/glsl150/box.geom(with_lighting) {} - fragment_program_ref rviz/glsl120/smooth_square.frag {} + fragment_program_ref rviz/glsl150/smooth_square.frag {} } } @@ -22,7 +22,7 @@ material rviz/PointCloudBox { vertex_program_ref rviz/glsl150/pass_pos_color.vert {} geometry_program_ref rviz/glsl150/box.geom(with_depth) {} - fragment_program_ref rviz/glsl120/depth.frag {} + fragment_program_ref rviz/glsl150/depth.frag {} } } diff --git a/src/rviz/ogre_helpers/render_system.cpp b/src/rviz/ogre_helpers/render_system.cpp index 34f46d6ea6..0a551e8d64 100644 --- a/src/rviz/ogre_helpers/render_system.cpp +++ b/src/rviz/ogre_helpers/render_system.cpp @@ -173,7 +173,6 @@ void RenderSystem::loadOgrePlugins() void RenderSystem::detectGlVersion() { - bool mesa_workaround = false; if (force_gl_version_) { gl_version_ = force_gl_version_; @@ -186,14 +185,6 @@ void RenderSystem::detectGlVersion() int major = caps->getDriverVersion().major; int minor = caps->getDriverVersion().minor; gl_version_ = major * 100 + minor * 10; - -#ifdef __linux__ - std::string gl_version_string = (const char*)glGetString(GL_VERSION); - // The "Mesa 2" string is intended to match "Mesa 20.", "Mesa 21." and so on - mesa_workaround = gl_version_string.find("Mesa 2") != std::string::npos && gl_version_ >= 320; -#else - mesa_workaround = false; -#endif } switch (gl_version_) @@ -224,15 +215,6 @@ void RenderSystem::detectGlVersion() } break; } - if (mesa_workaround) - { // https://github.com/ros-visualization/rviz/issues/1508 - ROS_INFO("OpenGl version: %.1f (GLSL %.1f) limited to GLSL 1.4 on Mesa system.", - (float)gl_version_ / 100.0, (float)glsl_version_ / 100.0); - - gl_version_ = 310; - glsl_version_ = 140; - return; - } ROS_INFO("OpenGl version: %.1f (GLSL %.1f).", (float)gl_version_ / 100.0, (float)glsl_version_ / 100.0); }