What is the difference between opengl and GLSL? -


i started programming opengl. i've done code creating basic primitives , have used shaders in webgl. i've googled subject extensively it's still not clear me. basically, here's want know. there can done in glsl can't done in plain opengl, or glsl things more efficiently?

the short version is: opengl api rendering graphics, while glsl (which stands gl shading language) language gives programmers ability modify pipeline shaders. put way, glsl (small) part of overall opengl framework.

to understand glsl fits big picture, consider simplified graphics pipeline.

vertexes specified ---(vertex shader)---> transformed vertexes ---(primitive assembly)---> primitives ---(rasterization)---> fragments ---(fragment shader)---> output pixels

the shaders (here, vertex , fragment shaders) programmable. can sorts of things them. swap red , green channels, or implement bump mapping make surfaces appear more detailed. writing these shaders important part of graphics programming. here's link nice examples should see can accomplish custom shaders: http://docs.unity3d.com/documentation/components/sl-surfaceshaderexamples.html.

in not-too-distant past, way program them use gpu assembler. in opengl's case, language known arb assembler. because of difficulty of this, opengl folks gave glsl. glsl higher-level language can compiled , run on graphics hardware. sum up, programmable shaders integral part of opengl framework (or modern graphics api), , glsl makes vastly easier program them.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -