Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: GLSL 3.30 is not supported. #2

Closed
XoMEX opened this issue Oct 12, 2018 · 3 comments
Closed

error: GLSL 3.30 is not supported. #2

XoMEX opened this issue Oct 12, 2018 · 3 comments

Comments

@XoMEX
Copy link
Contributor

XoMEX commented Oct 12, 2018

I tried to start PADRend using the Guide on Ubuntu 18.04. I've used the listed libraries from apt and updated all submodules.

I have added code to print some GL strings inside /modules/GUI/Base/Draw.cpp. As you can see GSLV 1.30 is used. But the shaders require GLSL 3.30.
From what I've read, one must (somehow) acquire a "core profile" which supports GLGS 3.3.
On that note, glewIsSupported("GL_VERSION_3_3") returns GL_TRUE, so it should be possible to run the shaders on my machine.

-------------------------------------------------------------------------------
PADrend 1.0.0 -- Platform for Algorithm Development and rendering (PADrend.de)
-------------------------------------------------------------------------------
Build:	2018-10-12 22:27.17 | 64 bit | debug
Libs:	EScript 0.7.2 Egon (https://github.com/EScript)
	Freetype 2.8.1 (www.freetype.org)
	SDL 2.0.8 (www.libsdl.org)
	SDL_image 2.0.3 (www.libsdl.org/projects/SDL_image/)
	SDL_net 2.0.1 (www.libsdl.org/projects/SDL_net/)
	curl 7.56.1 (curl.haxx.se)
	libarchive 3.3.2 (www.libarchive.org)
	libxml 2.9.7 (xmlsoft.org)
	libzip (www.nih.at/libzip)
	sqlite 3.22.0 (www.sqlite.org)
-------------------------------------------------------------------------------
Loading Util scripts...
Initializing PADrend...
[[--   Loading PADrend modules...   --]]
Initializing LibRenderingExt...
Initializing PADrend/EventLoop...
Initializing PADrend/HID...
Initializing PADrend/Navigation...
Initializing PADrend/NodeInteraction...
Initializing PADrend/Picking...
Initializing PADrend/RemoteControl...
Initializing PADrend/SceneManagement...
Initializing PADrend/Serialization...
Initializing PADrend/SplashScreen...
Initializing PADrend/SystemUI...
[[--   Creating Window...   --]]
Creating Rendering Context              ok.
OpenGL vendor: Intel Open Source Technology Center
OpenGL renderer: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) 
OpenGL version: 3.0 Mesa 18.0.5
OpenGL shading language version: 1.30
Initializing PADrend/UITools...
Initializing PADrend/CommandHandling...
Initializing PADrend/GUI...
Initializing PADrend/GUI/MainToolbar...
Initializing PADrend/GUI/MainWindow...
Initializing PADrend/GUI/ToolsToolbar...
Init network system                     ok.
[[--   Loading Plugins...   --]]
Initializing Effects...
Initializing NodeEditor...
Initializing NodeEditor/GUI...
Initializing NodeEditor/NodeConfig...
Initializing NodeEditor/StateConfig...
Initializing NodeEditor/Tools...
Initializing NodeEditor/Transformations...
Initializing NodeEditor/BehaviourConfig...
Initializing SceneEditor...
Initializing ObjectTraits...
Initializing SceneEditor/GroupStorage...
Initializing SceneEditor/NodeRepeater...
Initializing SceneEditor/ObjectEditor...
Initializing SceneEditor/ObjectPlacer...
Initializing SceneEditor/ObjectPlacer...
Initializing SceneEditor/ObjectPlacer/BuildinLib...
Initializing SceneEditor/Selection...
Initializing SceneEditor/TransformationTools3...
Initializing SceneEditor/VisualHelper...
Initializing Tests...
Initializing Tools...
[[--   Plugins loaded (0.98 sec)   --]]
Call extensions [PADrend_Init]...
Creating SceneGraph elements...
Creating main toolbar                   ok.
[[--   PADrend started in 2.01 sec.   --]]
Starting EventLoop...
GL_VENDOR:                   Intel Open Source Technology Center
GL_RENDERER:                 Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) 
GL_VERSION:                  3.0 Mesa 18.0.5
GL_SHADING_LANGUAGE_VERSION: 1.30

Warning: Shader compile error:
0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES

Shader code:
#version 330
in vec4 attr_color;
in vec2 attr_vertex;
in vec2 attr_uv;
uniform vec2 u_posOffset;
uniform vec2 u_screenScale;
uniform vec4 u_color;
uniform int u_textureEnabled;
uniform int u_colorAttrEnabled;
out vec2 var_uv;
out vec4 var_color;
void main() {
	gl_Position = vec4(vec2(-1.0, 1.0) + u_screenScale * (attr_vertex + u_posOffset), -0.1, 1.0);
	var_uv = (u_textureEnabled > 0) ? attr_uv : vec2(0.0);
	var_color = (u_colorAttrEnabled > 0) ? attr_color : u_color;
}
 (../modules/GUI/Base/Draw.cpp:240)

Error: [#Exception "C++ exception: GUI: Invalid shader." near 'plugins/PADrend/GUI/Plugin.escript':133
[...]
$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
@MeisterYeti
Copy link
Member

Yes, Mesa does not support the compability profile for OpenGL and PADrend currently requires it to work.
I'm currently working on an option to disable compability mode, but it may take some time.
Until then, you can try a proprietary driver for your graphics card, if available. (Even with core profile enabled, Mesa seems to perform very poorly for PADrend, at least on my system)

@MeisterYeti
Copy link
Member

I pushed a new Version.
Now you can enable/disable the compability profile in the config.json (Rendering.GLCompabilityProfile)
It is disabled by default.
Please try out if it works.
Some features might be broken if you disable compability profile

@XoMEX
Copy link
Contributor Author

XoMEX commented Oct 13, 2018

With "GLCompatibilityProfile":false it works (Core Profile, OGSL 4.50).
If I set it to true it crashes as in #4 (with OGSL 1.30).
Thanks for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants