-
Notifications
You must be signed in to change notification settings - Fork 22
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
OpenGL version #1
Comments
Hi, hmm that is interesting. Can you create a standalone context with moderngl? Namely, what does the following output?
Running it on my laptop it outputs the following
As an extra test can you check that wxPython works correctly? The following code should create a black window of size 256x256 with the title "Hello". import wx
import wx.glcanvas
class Frame(wx.Frame):
def __init__(self, size, title):
super(Frame, self).__init__(
None,
style=wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX)
)
self.SetTitle(title)
self.SetClientSize(size)
self.Center()
self.view = Canvas(self)
class Canvas(wx.glcanvas.GLCanvas):
def __init__(self, parent):
super(Canvas, self).__init__(
parent,
attribList=[
wx.glcanvas.WX_GL_CORE_PROFILE,
wx.glcanvas.WX_GL_RGBA,
wx.glcanvas.WX_GL_DOUBLEBUFFER,
wx.glcanvas.WX_GL_DEPTH_SIZE,
24
]
)
app = wx.App(False)
frame = Frame((256, 256), "Hello")
frame.Show()
app.MainLoop() Let me know the output of the above. Cheers, |
Thank you for your fast reply! Here is the outcome from running a
Though I have install wxpython through
Here is what I get when I run the sample code that you have provided:
|
Ok, at least we are progressing towards figuring out the bug. I spent a bit of time yesterday trying to replicate the issue but I can't. WxPython needs some system libraries to work and thus may be causing this type of issues. We should consider adding PyQt as well, however, Qt has license problems that I don't want to deal with. I know this is really bad advice but anaconda could help with the wxPython building issues. Let me know if you figured something out. |
Im facing the same problem right now, any fix found for this?
|
I am facing same issue please help me out |
Hi @hariharan382, I am using simple-3dviz without any issues on a linux machine with python 3.9.16. Furthermore, my wxpython version is 4.2.0 and moderngl's version is 5.8.2. Note that I install wxpython through conda, using Can you please check whether it works with this setup? Best, |
The root of the problem is definitely the context creation in wx. It's either an old wx install or there's something wrong with the drivers or enviroment locally. The context creation parameters are clearly requesting a core context, meaning it should create an OpenGL 3.3 context or greater (In some casese a 3.2 could also work). https://github.com/angeloskath/simple-3dviz/blob/master/simple_3dviz/window/wx.py#L40-L43 |
Hi, I am on an Ubuntu 19.10 machine and having trouble running simple-3dviz. I installed everything using
pip3
, and I don't use any special repository on my machine for updating packages:The text was updated successfully, but these errors were encountered: