Ubuntu 14.10中的OpenGL GLSL 3.10 mesa 10.1.3
问题描述:
当我尝试在Ubuntu中使用OpenGL编译glsl着色器时出现以下错误: - 0:1(10):错误:不支持GLSL 3.30。支持的版本为:1.10,1.20,1.30和1.00 ESUbuntu 14.10中的OpenGL GLSL 3.10 mesa 10.1.3
但是,当我做了一个 “glxinfo | grep的OpenGL的” 它说:
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD JUNIPER
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.3
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.1.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
看来,GLSL版本是正确的,所以我不“知道我在做什么错
我与lwjgl和Java
答
这个发展基本上是告诉你,你没有核心轮廓上下文。因为Mesa不支持兼容性配置文件,所以Mesa会给你一个3.0上下文,我想这是因为你没有明确地询问你用来为核心配置文件创建上下文的框架。
更新:
鉴于LWJGL,当你创建你的背景,你需要申请3.3核心配置文件。
可以是这样做的:
PixelFormat pixelFormat = new PixelFormat();
ContextAttribs contextAtrributes = new ContextAttribs (3, 3).withProfileCore (true);
[...]
Display.create (pixelFormat, contextAtrributes);
我使用LWJGL和Java – mcat 2014-09-20 17:46:00
@mcat:见我的答案更新,让我知道是否有帮助。 – 2014-09-20 17:57:09
它不会崩溃,但在Windows中不会渲染任何东西。将自己调查并将其标记为已解决,谢谢 – mcat 2014-09-20 18:03:22