Commit 0bf68ece authored by Guillaume Seguin's avatar Guillaume Seguin

Initialize GL in OnReshape if needed

parent 7c78d539
......@@ -132,6 +132,9 @@ class wxGLPanel(wx.Panel):
def OnReshape(self, width, height):
'''Reshape the OpenGL viewport based on the dimensions of the window.'''
if not self.GLinitialized:
self.OnInitGL()
self.GLinitialized = True
glViewport(0, 0, width, height)
glMatrixMode(GL_PROJECTION)
glLoadIdentity()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment