treeform / shady

Nim to GPU shader language compiler and supporting utilities.
MIT License
148 stars 11 forks source link

error: "could not import: glXSwapIntervalMESA" #8

Open 0rn opened 2 years ago

0rn commented 2 years ago

When I am trying to run the examples on version 0.1.1, I am getting the following error:

nim c -rf --hints:off --threads:off colors.nim 
/home/wedge/Programming/nim/iso/colors.nim(1, 8) Warning: imported and not used: 'chroma' [UnusedImport]
could not import: glXSwapIntervalMESA
Error: execution of an external program failed: '/home/wedge/Programming/nim/iso/colors '

I have tested the same examples on version 0.1.0 and the error does not occur

treeform commented 2 years ago

It appears you are using linux. Which version? Which GPU? Which architecture?

Can you get simple windy examples to run?

Can you play around with this section in windy?:

https://github.com/treeform/windy/blob/master/src/windy/platforms/linux/x11.nim#L660-L668

It appears your linux says "I can do glXSwapIntervalMESA" then when I do "glXSwapIntervalMESA" it says Error!

Its hard to test all linux version/gpus....

0rn commented 2 years ago

I'm running a laptop with integrated intel graphics CPU: Intel m3-7Y30 (it is 64 bit) integrated GPU is running Intel HD Graphics 615

Linux distro is bunsenLabs Lithium, which is basically just Debian 10

commenting out these two lines of the file you linked:

elif glXSwapIntervalMESA != nil:
    glXSwapIntervalMESA(1)

makes some of the basic windy examples work (basic, triangle, fixedsize) and also lets most of the shady examples work too

Thanks for pointing me in the right direction, I had no idea what the error meant.