wt as ui for c++ game (opengl) or application
Added by Azog Hanobitel about 8 years ago
Hello
I discover webtoolkit. I am interest on use webtoolkit as ui for c application or ui for some game in opengl.
Is it possible to embed wt inside opengl or accelerated graphic application?
Replies (7)
RE: wt as ui for c++ game (opengl) or application - Added by Wim Dumon about 8 years ago
There's WGlWidget, which allows for 3D rendering in the browser. Whether a server-side framework is suitable for all types of opengl games, is a different question, where the answer depends on the type of game you're planning to make.
There is a folder webgl in the examples folder, that demonstrates some of the features of this widget. The 3D charting library also uses the WGLWidget.
Wim.
RE: wt as ui for c++ game (opengl) or application - Added by Gunnar Skogsholm almost 8 years ago
If I'm understanding correctly, I think Azog's question is better stated:
Is there a way to render the results of the Wt engine to an OpenGL surface. This would provide a way to use Wt to create a 2d UI for an OpenGL game.
Something similar might be possible in the DirectX world using a library called Awesomium.
RE: wt as ui for c++ game (opengl) or application - Added by Wim Dumon almost 8 years ago
Gunnar,
If your question is whether it's possible to render a Wt application on a WebGL texture, then I don't think this is possible.
However, if you want to render a Wt application on top of a webgl canvas, I think this is no problem. Just put the UI on top of the WebGL widget, and make sure the UI has a transparant background.
Wim.
RE: wt as ui for c++ game (opengl) or application - Added by Gunnar Skogsholm almost 8 years ago
Wim, Understand.
The subtle part of the question is switching the orientation from the web to a desktop application.
Do you think it would be possible to implement a browser in OpenGL so that it can perform a request to an internal WServer or WApplication object?
MS did some similar by providing an HtmlView class so that an MFC application could function like a browser.
Hope that makes the question clearer.
RE: wt as ui for c++ game (opengl) or application - Added by Wim Dumon almost 8 years ago
I don't really understand the 'implement a browser in OpenGL' part of your question.
Running an internal Wt server and connecting to it with an embedded browser to create a desktop application is no problem, that has been done before by a few people. Apart from MS, Qt also has an embedded html viewer (as well as android and ios, but that was not your question ;-)).
Wim.
RE: wt as ui for c++ game (opengl) or application - Added by Gunnar Skogsholm almost 8 years ago
Wim,
It was my question, but I stated it very poorly.
"render the results of the Wt engine" = browser
You said it better: Running an internal Wt server and connecting to it with an embedded browser to create a desktop application.
So, maybe not a Wt question. I need to find a suitable embedded browser.
RE: wt as ui for c++ game (opengl) or application - Added by Obelix Stone over 7 years ago
Hello,
I apologize for late answers. I am the OP, but I lost login password and email.
Thanks all for answers, Gunnar Skogsholm get point of my question.
If I understand, WT can be used inside OpenGL? I dont want use it in WebGL or any web technology, but inside OpenGL /Direct3D inside desktop application for UI purpose.
My another question is, is possible to use WT without browser? I want create UI for my application but dont want use browser for display UI, but create window, like some window application. Does WT can do that?
Btw. I learn some GUI library or engine, but I am thinking about change it, becuase this looks prety simple from documentation compared to GUI I am learning.