[Interest] Bringing Qt, C++ To The Web

Jason H scorp1us at yahoo.com
Thu Jan 17 15:31:27 CET 2013


You all are doing it wrong!!! 

I've been researching this a week or so. Emcripten is not going to work. You do not want your binary transalted to JS. The demos are slow, and regardless of optimization will always be slow. 4MB of compressed javascript for a program? Not with the bandwidth we have. And nevermind textures!

If you want to make Qt5 web-able, what you need is a way to directly translate the OpenGL calls of Qt5's QML to WebGL.
The barrier there is not "hard" however I am out of my element. I am not a GL person, though I have a basic understanding. What is needed is a http server, your binary and a translation layer to WebGL. The translation layer would make whatever textures needed available. These should be cached on the client in HTML5 storage.  Then it is only a small amount of commands that are easily executed that create each frame. 

Using emscriptem the code path is this:
C++/Qt Code -> emscripten -> WebGL (ANGLE)-> GL
The code path I am taking a bout looks like this:

C++/Qt Code -> WebGL (ANGLE) -> client's GL
The even more ideal code path is to have a GL browser plugin that does away with WebGL:
server C++/Qt Code -> socket -> client's GL

One of the reasons to eliminate WebGL is it is not feature parity with GL. So you will lose some features.
One of the reasons to eliminate emscripten is it is slow, and produces far more code than should be needed to even start.

This of course would revolutionize OnLive, as they would not be streaming low-quality H264 versions of your games. They'd be streaming commands, so you'd get perfect clarity. 


Your would always be running compiled code and never in an interpreter. 




________________________________
 From: Nikos Chantziaras <realnc at gmail.com>
To: interest at qt-project.org 
Sent: Thursday, January 17, 2013 2:54 AM
Subject: Re: [Interest] Bringing Qt, C++ To The Web
 
On 17/01/13 03:07, d3fault wrote:
> Whoa. +1 for being simultaneously entirely pointless (hurr "Let's
> compile cross-platform C/C++ into cross-platform INTERPRETED
> JavaScript")

How's that pointless?  I, for a change, would *love* to be able to write 
client-side web applications in C and C++ rather than JS.  "Web" can be 
viewed as just another target, like "mobile" and "embedded."  It's not 
pointless to be able to write C++ for mobile apps instead of in Java. 
In the same manner, it's not pointless to write C++ for web apps instead 
of JavaScript.

_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130117/8a9dd9c7/attachment.html>


More information about the Interest mailing list