Re: C++ OpenGL rendering, wxPython GUI?



On 28 Feb 2006 01:14:15 -0800
tobfon@xxxxxxxxx wrote:
I'm creating a scientific visualization application with rather high
demands on performance. I've created a nice rendering engine for it in
C++/OpenGL and a python interface to the rendering engine. Now I'm
looking to build a GUI in python with the rendering engine as an
integrated window. I will most likely use wxPython for the GUI and I
know it has support for adding an OpenGL canvas.

Maybe including wxWidgets in the C++ program and just using the
wxPython-created canvas ID there will somehow be possible? I'll look
into that but any help or ideas are most welcome.

I banged my head on this for quite a while trying to integrate
OpenInventor and wxPython (and later PyGTKGLext). Basically, the OpenGL
callers don't need to know what the current canvas is. You tell the
canvas to activate itself, it tells OpenGL "hey, I'm the current canvas
now". Then OpenGL commands draw themselves on that canvas. It's really
much simpler than I initially thought. You just have to make sure that
there's a Python function somewhere in your begin-rendering sequence
that activates the canvas before OpenGL calls begin.

- Michael

--
mouse, n: a device for pointing at the xterm in which you want to type.
-- Fortune
.



Relevant Pages

  • Re: C++ OpenGL rendering, wxPython GUI?
    ... C++/OpenGL and a python interface to the rendering engine. ... know it has support for adding an OpenGL canvas. ... You should be able to create and realize the OpenGL canvas (which will ...
    (comp.lang.python)
  • C++ OpenGL rendering, wxPython GUI?
    ... C++/OpenGL and a python interface to the rendering engine. ... I will most likely use wxPython for the GUI and I ... know it has support for adding an OpenGL canvas. ...
    (comp.lang.python)
  • Re: Any Good online tutorial for Carbon Programming ?
    ... a scripting language for mathematical graphics based on OpenGL. ... So all we need is an OpenGL canvas and a native Canvas ... Consider using GLUT, cross platform, open source, simple windowing ...
    (comp.sys.mac.programmer.help)
  • Re: easiest way to plot x,y graphically during run-time?
    ... it and its interface with Python to make any sort of judgments as ... def start: ... canvas = tk.Canvas ... "in-process") to see the effects of each Tkinter operation as you go. ...
    (comp.lang.python)
  • using a non power of two texture for a splashscreen.
    ... Since OpenGL only ... uses texture sizes that are power of two, ... wanted image and filling the remaining canvas with a black color. ...
    (comp.graphics.api.opengl)