Embedding OpenGL in HTML

Started by
9 comments, last by Yann L 19 years, 8 months ago
Does anyone know how to do it?
Advertisement
well ... it's a longshot, but it might work given the right access permissions (ie. put the site it's running on in the local computer zone). You could simply embed a .NET control in HTML.

Visit nehe for a working opengl control (try the neheCS basecode).
Joel Martinez
http://codecube.net
[twitter]joelmartinez[/twitter]
You can't do this in pure HTML, you would have to rely on some external lib.
I guess you could make an ActiveX control or something, but that would require the user to have IE and also to install your control.
Then there is php opengl http://phpopengl.sourceforge.net. A java applet using opengl could also be a possible solution.
Can you use an applet if it's written in C++? I didn't think you could do that.
If it's an ActiveX control you can.
So, I need to write an Active X control to be downloaded that contains the dll files needed for the OpenGL app, then just embed the program in the <applet> tag? I've never really dealt with writing Active X controls before, does anyone know where I can look at some examples?
Ok, I think I found something here.

http://www.c-sharpcorner.com/Code/2003/March/ActiveXInNet.asp
ActiveX controls need to be embedded in an OBJECT tag
So, do you know of any other places that I could go to to look at an Active X control example for a C++ program?
Creating ActiveX controls isn't trivial. You'll have to deal with COM and ATL, which are often seen to be the nastier sides of Windows. As for tutorials, The CodeProject has a few good starters in ActiveX and COM.

Bear in mind also that I'd recommend that you get your ActiveX control digitally signed so that people can verify it's from you and not, in fact some malicious trojan. This costs money though.

Good luck

This topic is closed to new replies.

Advertisement