简体   繁体   English

不支持的GLSL着色器

[英]Unsupported GLSL Shaders

for a class I have to use Java, jogl and lwjgl. 对于一个类,我必须使用Java,jogl和lwjgl。 We were given some code and now i am trying to run this code, however i get the error: 我们得到了一些代码,现在我正在尝试运行此代码,但是出现错误:

" GLSL 3.30 is not supported. Supported versions are: 1.00 ES, 1.10, and 1.20" “不支持GLSL 3.30。受支持的版本是:1.00 ES,1.10和1.20”

And i am unable to determine what shaders are supported or if it is a driver problem or a hardware shortcomming. 而且我无法确定支持哪些着色器,或者是驱动程序问题还是硬件缺陷。

Currently I am on debian testing/unstable and use the current xorg-video-ati driver package. 目前,我正在进行debian测试/不稳定,并使用当前的xorg-video-ati驱动程序包。

Can anyone tell me how to identify which shaders (if at all) are supported? 谁能告诉我如何确定支持哪些着色器(如果有的话)?

" GLSL 3.30 is not supported. Supported versions are: 1.00 ES, 1.10, and 1.20" (...) Currently I am on debian testing/unstable and use the current xorg-video-ati driver package. “不支持GLSL 3.30。受支持的版本是:1.00 ES,1.10和1.20”(...)当前,我正在进行debian测试/不稳定,并使用当前的xorg-video-ati驱动程序包。

Well, that's no big surprise as the DRI/Mesa xorg-video-ati aka radeon drivers support only OpenGL-2.1 with extensions so far. 好吧,这并不奇怪,因为DRI / Mesa xorg-video-ati aka radeon驱动程序到目前为止仅支持带有扩展名的OpenGL-2.1。 OpenGL-3 is still in the experimental stage of DRI/Mesa development. OpenGL-3仍处于DRI / Mesa开发的试验阶段。

You need to install AMD/ATI's propriatary fglrx/Catalyst drivers to get support for OpenGL-3 and above (of course this still depends on your hardware). 您需要安装AMD / ATI专有的fglrx / Catalyst驱动程序才能获得对OpenGL-3及更高版本的支持(当然,这仍然取决于您的硬件)。 Luckily the quality of fglrx improved dramatically and my last exhaustive tests (with a Radeon HD6570) they showed great stability (they survived even all the torture tests, like obscure context and FB settings). 幸运的是,fglrx的质量得到了显着改善,而我上次的详尽测试(使用Radeon HD6570)显示出了很高的稳定性(即使在所有酷刑测试(例如晦涩的上下文和FB设置)下,它们也能幸免。 The only real bug I found and reported was that glXSwapBuffers would never block on a indirect rendering context no matter how V-sync and swap intervall were set. 我发现并报告的唯一真正的错误是,无论如何设置V-sync和swap intervall,glXSwapBuffers都不会在间接渲染上下文中阻止。

GLSL 3.30 requires OpenGL 3.3. GLSL 3.30需要OpenGL 3.3。 It would appear that either your hardware can't run GL 3.x or you haven't updated your drivers recently enough. 您的硬件似乎无法运行GL 3.x,或者您最近没有足够更新驱动程序。

If you look in the GLSL files or the string being loaded as a shader, there should be a line: 如果您查看GLSL文件或正在作为着色器加载的字符串,则应该有一行:

#version 330

This means version 3.3. 这意味着版本3.3。 You can try changing that to: 您可以尝试将其更改为:

#version 120

(Version 1.2) (1.2版)

There is no guarantee it will work but if the shaders are simple you might get away with it. 无法保证它会起作用,但是如果着色器很简单,则可能无法使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM