O'Reilly logo

Python GUI Programming Cookbook by Burkhard A. Meier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Our GUI in 3D!

In this recipe we will create our own GUI using wxPython. We are reusing some code from the wxPython demo examples, which we have reduced to the minimum code required to display OpenGL in 3D.

Note

OpenGL is a very large library. We will not go into detailed explanations of this library. There are a lot of books and online documentation available if you want to study OpenGL further. It has its own shading language.

Getting ready

Reading the previous recipe is probably good preparation for this recipe.

How to do it...

As the entire Python code is a little bit long here, we will show just a little bit of the code.

The entire code is available online and this Python module is called:

# Ch10_wxPython_OpenGL_GUI import wx from wx import glcanvas ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required