szabolcsdombi / heightmap-multitexture-terrain

Small project using ModernGL for terrain rendering
MIT License
22 stars 0 forks source link

ModernGL has no attribute create_context #1

Open kritikamehta15 opened 6 years ago

kritikamehta15 commented 6 years ago

Got this while executing on Linux:

python3 main.py Traceback (most recent call last): File "main.py", line 10, in ctx = ModernGL.create_context() AttributeError: module 'ModernGL' has no attribute 'create_context'

And what to do about the GLWindow since it is not supported in Linux?

szabolcsdombi commented 6 years ago

Hi!

This example is using ModernGL4 and GLWindow

You have a folder called ModernGL probably because you had ModernGL4 installed. If you upgraded to ModernGL5 you should have a folder called moderngl.

To run this example you may need a virtualenv with ModernGL4 and GLWindow

GLWindow is not yet ported to linux: https://github.com/cprogrammer1994/GLWindow/issues/2 Here are some code that may help with porting.

Unfortunately I have no time right now to port it. You can also try to replace the GLWindow with any other window implementation. Here are a couple of examples.


Probably related: https://github.com/cprogrammer1994/ModernGL/issues/165 and https://github.com/cprogrammer1994/ModernGL/issues/166.