2014-09-20 114 views
1

當我嘗試在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

回答

3

這個發展基本上是告訴你,你沒有核心輪廓上下文。因爲Mesa不支持兼容性配置文件,所以Mesa會給你一個3.0上下文,我想這是因爲你沒有明確地詢問你用來爲核心配置文件創建上下文的框架。

更新:

鑑於LWJGL,當你創建你的背景,你需要申請3.3核心配置文件。

可以是這樣做的:

PixelFormat pixelFormat  = new PixelFormat(); 
ContextAttribs contextAtrributes = new ContextAttribs (3, 3).withProfileCore (true); 

[...] 

Display.create (pixelFormat, contextAtrributes); 
+0

我使用LWJGL和Java – mcat 2014-09-20 17:46:00

+0

@mcat:見我的答案更新,讓我知道是否有幫助。 – 2014-09-20 17:57:09

+0

它不會崩潰,但在Windows中不會渲染任何東西。將自己調查並將其標記爲已解決,謝謝 – mcat 2014-09-20 18:03:22