+ 49

OpenGL vs WebGL

Hi, I’ve made a few WebGL simulations using JavaScript, but I want to rewrite my code using C++. I’ve heard that it is not possible to simulate on WebGL using C++, anyone got any experience with that? Is it not possible to call a C++ function in a JavaScript somehow? OpenGL is more often used with C++, but I want to publish my simulation. Is it possible to publish an OpenGL simulation on a website? Thanks, Joakim

26th Apr 2018, 12:17 PM
Joakim Nyland
Joakim Nyland - avatar
15 ответов
+ 19
Alright, so to my understanding this is the conclusion: WebGL simulations are written using JavaScript (and HTML) and can be shown in browsers and on phones (OpenGL ES). OpenGL graphics are written using C++, and are better graphics- and performance wise. However OpenGL graphics cannot be opened in browsers, so to simulate you would need to consider windows management. Thanks for all replies.
2nd May 2018, 6:00 PM
Joakim Nyland
Joakim Nyland - avatar
+ 30
WebGL is a modified version of OpenGL ES that is a "tiny" version of OpenGL ... Futhermore there are more version of WebGL, OpenGL ES (and oblivious OpenGL) and any version can or cant to have support for some features... On GL side most functions are similar (in role) for three standards but you must handle windows management and language "complexities" in C++
26th Apr 2018, 12:29 PM
KrOW
KrOW - avatar
+ 25
it so good
1st May 2018, 12:56 AM
Nina Hendra Putri
Nina Hendra Putri - avatar
+ 19
Thank you for replying. I know C++ might be more complex, but I’ve heard C++ is a lot quicker than JavaScript, and also it seems like OpenGL can have more advanced simulations than WebGL
26th Apr 2018, 6:17 PM
Joakim Nyland
Joakim Nyland - avatar
+ 19
I have posted my WebGL simulation on SoloLearn now if you want to check it out:-) https://code.sololearn.com/WTLq2T28Sz1v/?ref=app
9th May 2018, 12:11 PM
Joakim Nyland
Joakim Nyland - avatar
+ 14
Alright, thanks mate
26th Apr 2018, 7:45 PM
Joakim Nyland
Joakim Nyland - avatar
+ 10
This topic i heard for first time
30th Apr 2018, 4:04 PM
Mohammad Ismail
Mohammad Ismail - avatar
+ 9
nice
3rd May 2018, 12:03 AM
FIREmonger
FIREmonger - avatar
+ 8
In performance context C++ is much more suitable for this type of field and yes, like i tell before, WebGL is based on OpenGL ES thats is a subset of OpenGL
26th Apr 2018, 6:40 PM
KrOW
KrOW - avatar
+ 5
No.. It's almost ( totally? ) impossible to render OpenGL graphics in web platform using WebGL...WebGL is optimised for web, while OpenGL is made for desktops ( not phones )..Phones use another optimised version of OpenGL => OpenGL ES....
2nd May 2018, 7:44 AM
Vikaash
Vikaash - avatar
+ 4
what's then are the basic differences between the two, WebGL and open GL???
1st May 2018, 1:58 PM
scientist
scientist - avatar
+ 3
Void Skeleton Why you think this? Its possible and being really strange if it isnt (oblivious you cannot do graphics handling with standard c++ libraries because its too platform dependent and its not language responsability)
1st May 2018, 12:03 PM
KrOW
KrOW - avatar
+ 2
GL is graphics library
2nd May 2018, 7:42 AM
Vikaash
Vikaash - avatar
+ 1
Well, but I don’t think you can show an image with C++.
1st May 2018, 11:49 AM
Void Skeleton
+ 1
Can Visual Basic programming help?
1st May 2018, 9:47 PM
Jamaine Kakarouts
Jamaine Kakarouts - avatar