treeform / boxy

2D GPU rendering with a tiling atlas.
MIT License
102 stars 7 forks source link

Can not execute basic example, showing vertex shader compilation failed #45

Closed sk-Prime closed 2 years ago

sk-Prime commented 2 years ago

I tried the basic example provided on boxy readme page. It compiles but i can not execute because of some runtime error.

Error

/home/sk/.nimble/pkgs/boxy-0.4.0/boxy/glsl/410/atlas.vert(1(10): 0:1(10): error: GLSL 4.10 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, and 3.10 ES

I think there is something to do with glsl version. Do you know how to fix it. Thanks in advance.

Other info

OS: Linux mint 20.3 64bit Nim compiler: 1.6.2 Boxy installed using nimble. However windy example on github readme runs perfectly.

treeform commented 2 years ago

Hey, this looks like a linux mobile device that only does OpenGL 3.10 ES - ES stands for mobile.

Sorry currently we don't support mobile linux devices.

If this is a desktop or laptop some thing is wrong with your OpenGL setup.

sk-Prime commented 2 years ago

Not a mobile device but a laptop with embedded Intel hd graphics. Here is some more info, if it is helpful. In OpenGL core profile version string it says 4.5 (core profile)

sk@sk-pc:~$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 4400 (HSW GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.2.6
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 21.2.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
treeform commented 2 years ago

Its strange it says it supports openGL 4.5 which is enough for us.

OpenGL core profile version string: 4.5

But it does not load it. I think it some thing that can be fixed in windy: https://github.com/treeform/windy/blob/master/src/windy/platforms/linux/x11.nim#L572-L686

I am not sure how, as I don't have both openGL ES and openGL desktop GPUs at the same time.

sk-Prime commented 2 years ago

Yes, the issue is about windy not boxy. Most of examples provided in windy run properly but the triangle.nim shows same issue with some more information. I will make a issue at windy repo.

treeform commented 2 years ago

Thank you. If you can figure it how to select the right openGL version we would take it.