PDA

View Full Version : make a transiton to the modern opengl



sajis997
11-26-2014, 09:12 PM
Hello forum,

I have some GLSL shader code from OpenGL 2. I need some hint to make the transition to the modern opengl GLSL code. Could anyone point me to any references/material that will help me to do it ?

Thanks

GClements
11-27-2014, 02:58 AM
GLSL hasn't really changed much since 2.0. The main deprecations are


The "attribute" and "varying" qualifiers. Use "in" or "out".
glFragColor and glFragData. Use user-defined output variables.
Target-specific texture functions (texture2D, texture2DProj, etc). Use texture, textureProj, etc.
The noise functions (which no-one implemented).
A handful of constants (e.g. gl_MaxVaryingFloats) which weren't of much use.


Search for "deprecated" in the GLSL specifications for precise details.