My client wants her website to have an application that renders 3D (light 3D stuff, we are drawing only flat squares in 3D world) but web programming is not my thing. So I am looking for something that can run a C++ program from a web browser. But I think, if this is the case, then the client side must download the program first, and that’s not what I want. The client should only be able to use this application only on the website.
I came across Google Native Client, which claims that it can run x86 native code in web applications. I haven’t decide whether it is worth it or not and I don’t know whether this is what I want or not, so I decided to ask experienced people about this.
If I want to have something like this, is what I said above possible? Or I completely need other languages like Flex because it does not worth the trouble? Or is Google Native Client suitable for doing something like this?
No, NativeClient is not what you want. It won’t let you run SDL+OpenGL — it may be C++ code, but it’s run inside a sandbox.
Running SDL in a browser is difficult in general. OpenGL somewhat less so, but it’s no cakewalk either. Any such native code solution is difficult if you want it to work across browsers and platforms — you’ll have to develop NPAPI plugins for multiple platforms (which will all be fairly different), as well as an ActiveX control. You are looking at four separate projects.
Almost assuredly, the correct answer here is to use Flash in one form or another.