- Home /
how can i read the openGL code which is converted from Unity 3d
As it is known that Unity3D is converted to OpenGL which in return can be read by GPU..
My question is this,
Is there any tool or program that can read this OpenGL code.
Answer by Graham-Dunnett · Jul 23, 2011 at 08:42 PM
Unity does not convert anything to OpenGL. The run-time on Mac and the mobile devices will call into the OpenGL API. If you have a tool that can intercept these calls then you can find out what Unity is doing. This will be a very specialised task.
Answer by Bunny83 · Jul 23, 2011 at 08:42 PM
There is nothing converted. OpenGL is a Open Graphics Library, it's "just" a programming interface that enables you to use the grapics card's functions. On Windows machines Unity uses DirectX in the first place. On mobile platforms OpenGL ES which is just a small subset of OpenGL. WebGL is based on OpenGL ES but Unity don't use or support WebGL.
I don't see what you want to compare? Even the interfaces work differently. Comparing the function calls of a random WebGL application with those executed by Unity is quite useless. It's like comparing the opcodes from MS Word with those from Crysis. Well i suggest they will be differently.
You can of course hook into the OpenGL driver itself by a wrapper dll to do some crazy stuff or gather general statistics, but comparing them with something totally different is still useless.
Maybe you can go a bit more in detail what's your actual target, what you want to achieve.
thanks a lot for a useful advises.
honestly, the aim of the comparison to differentiate between them in terms of speed and performance. then we can decide whether any of them can help developing a virtual life application ,like second life, to be work within the browser or not.
I think it would be possible with both Unity or WebGL + JaveScript but there are always advantages / disadvantages.
In modern browsers JavaScript is also getting compiled and is not as slow as in old browsers (x10 or more). But i guess Unity have more processing power since the engine is written in native code. WebGL is just a graphics interface but the whole game / application have to be written in JavaScript.
I'm not sure because i'm not up-to-date but as far as i know WebGL is only supported by a few browsers yet. The number of browsers with a Unity webplayer might be equal to the number of users with a WebGL-ready-browser but i guess it's less painful for a user to install a little plugin in a few sec. ins$$anonymous$$d of switching to another browser ;)
Unity comes up with lots of other features beyond graphics. I$$anonymous$$O TCP networking is one of the big advantages of Unity.
$$anonymous$$y favourite thing is that it supports a solid language like C# and it's very easy to use once you're familiar with it ;)