OpenGL: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: prettier link)
m (→‎{{header|JavaScript}} (WebGL): Library doesn't go in header)
Line 1,351: Line 1,351:
</lang>
</lang>


=={{header|JavaScript}} (WebGL)==
=={{header|JavaScript}}==

===(WebGL)===


Unfortunately for comparison with the other examples on this page, WebGL provides only OpenGL ES, which removes the classic “fixed-function pipeline” and glVertex() in favor of requiring you to write ''vertex shaders'' and ''fragment shaders'', and use vertex arrays. It is not hard to write shader programs to emulate as much of the fixed-function pipeline as you need, but it does mean more verbosity as you have to explicitly define all of the data you're going to communicate to your shader.
Unfortunately for comparison with the other examples on this page, WebGL provides only OpenGL ES, which removes the classic “fixed-function pipeline” and glVertex() in favor of requiring you to write ''vertex shaders'' and ''fragment shaders'', and use vertex arrays. It is not hard to write shader programs to emulate as much of the fixed-function pipeline as you need, but it does mean more verbosity as you have to explicitly define all of the data you're going to communicate to your shader.