Ubuntu 14.10 mesa 10.1.3中的OpenGL GLSL 3.30 [英] OpenGL GLSL 3.30 in Ubuntu 14.10 mesa 10.1.3

查看:82
本文介绍了Ubuntu 14.10 mesa 10.1.3中的OpenGL GLSL 3.30的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在Ubuntu中使用OpenGL编译glsl着色器时,出现以下错误: -0:1(10):错误:不支持GLSL 3.30.支持的版本为:1.10、1.20、1.30和1.00 ES

when I try to compile a glsl shader with OpenGL in Ubuntu I get the following error: - 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, and 1.00 ES

但是当我执行"glxinfo | grep OpenGL"时,它会说:

But when I do a "glxinfo | grep OpenGL" it says:

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版本是正确的,所以我不知道我在做什么错

It appears that the glsl version is right, so I don't know what am I doing wrong

我正在使用 lwjgl 和Java

I am developing with lwjgl and Java

推荐答案

这基本上是在告诉您您没有 core 个人资料上下文. Mesa为您提供了3.0上下文,因为它不支持兼容性配置文件,而我想这是因为您没有明确询问用于创建核心配置文件上下文的框架.

This is basically telling you that you don't have a core profile context. Mesa is giving you a 3.0 context since it does not support compatibility profiles, and I imagine this is because you did not explicitly ask the framework you used to create your context for a core profile.

鉴于lwjgl,当您创建上下文时,您需要请求3.3核心配置文件.

Given lwjgl, when you create your context you need to request a 3.3 core profile.

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

[...]

Display.create (pixelFormat, contextAtrributes);

这篇关于Ubuntu 14.10 mesa 10.1.3中的OpenGL GLSL 3.30的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆