How I can write an OpenGl application using Enthought Framework? I created a TasksApplication and I am stuck on this tutorial, I don't know what I can use instead PythonEditor there. I need to create something where I will be able to render.
UPDATE:
I changed the code to
def create(self, parent):
widget = GLWidget(parent)
self.control = widget
Where GlWidget is implemented like in this example.
And I have a runtime crash. But I am able to run the GL script from the example above.
UPDATE2:
UPDATE4: Code was updated according to @Robert Kern suggestions. Now it works.
The
controltrait of aTaskPaneis just the Qt widget object that you are using. In the example that you link, we happen to be getting it from another PyFace widget that wraps a Qt widget in a similar fashion, so we just grab thecontrolattribute from it. You should just directly use aQGLWidgetas thecontrolof your pane. Please consult the Qt documentation for how to use it. You can use PyOpenGL in thepaintGL(), etc. methods to do the actual rendering.