Let's say my goal was to write a graphical application (based on a game engine, or even raw OpenGL), which should be able to render arbitrary 3D graphics. Now let's say I want to annotate the different objects in the 3d scene, not just with small floating labels, but with long-form descriptions that you can show/hide and edit in-place. One solution would be to use whatever GUI/User-IO widgets are provided by the widget library of the 3D engine to enter the text. However, I find that these widgets (e.g. text input field widget) lack in functionality that other (specialized) software (like text editors) already have. It seems like re-programming all the specialized features (that already exist in the other software) would be an extremely tedious task. Is there a general way to take advantage of a specialized software's widgets from within another software?

Example: over the last year I became more and more aware of the power of a text editor like emacs. Now I am asking myself how it could be achieved to render an emacs buffer (a window for text entry, with all the features of emacs) inside a 3D graphics program (like Panda3D) and then be able to type text (interact with the underlying emacs client) in the same window.

For my example, an off-the-cuff idea would be to attempt to video-stream the window's contents and render it to a texture inside the graphics engine. Then, when interacting with the widget, have some editing/blocking state, the editing state being the state in which keypresses and mouse positions (IO events registered first by the 3D engine's windowing library) are forwarded to the underlying program.

If somebody has an idea for how to achieve this behaviour, I would be glad to hear it. However, I am more interested in whether this kind of scheme (rendering and interacting with windows of specialized software inside other software) is actually used and if there are sources or a name for this kind of scheme.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.