JavaScript EditorFree JavaScript Editor     Ajax Editor 



Main Page
Previous Page
Next Page

OpenGL 1.5 to OpenGL 2.0 GLSL Migration Guide

The OpenGL Shading Language was initially supported through ARB extensions to OpenGL 1.5. The following table (originally compiled by Teri Morrison) documents the mapping of OpenGL 1.5 ARB extension API entry points to the OpenGL 2.0 API entry points.

glAttachObjectARB

Renamed to glAttachShader. Input arguments program and shader were changed from GLhandleARB to GLuint.

glBindAttribLocationARB

Renamed to glBindAttribLocation. Input argument program was changed from GLhandleARB to GLuint. Input argument name was changed from const GLcharARB* to const GLchar*.

glCompileShaderARB

Renamed to glCompileShader. Input argument shader was changed from GLhandleARB to GLuint.

glCreateProgramObjectARB

Renamed to glCreateProgram. Function return value was changed from GLhandleARB to GLuint.

glCreateShaderObjectARB

Renamed to glCreateShader. Function return value was changed from GLhandleARB to GLuint.

glDeleteObjectARB

Split into two functions, glDeleteProgram and glDeleteShader. Input argument object was changed from GLhandleARB to GLuint. Additional error checking was added to ensure that the input argument in the new function (program or shader) is the proper object type.

glDetachObjectARB

Renamed to glDetachShader. Input arguments program and shader were changed from GLhandleARB to GLuint.

glDisableVertexAttribArrayARB

Renamed to glDisableVertexAttribArray.

glEnableVertexAttribArrayARB

Renamed to glEnableVertexAttribArray.

glGetActiveAttribARB

Renamed to glGetActiveAttrib. Input argument program was changed from GLhandleARB to GLuint. Input argument name was changed from GLcharARB* to GLchar*.

glGetActiveUniformARB

Renamed to glGetActiveUniform. Input argument program was changed from GLhandleARB to GLuint. Input argument name was changed from GLcharARB* to GLchar*.

glGetAttachedObjectsARB

Renamed to glGetAttachedShaders. Input argument program was changed from GLhandleARB to GLuint. Input argument objects was changed from GLhandleARB* to GLuint*.

glGetAttribLocationARB

Renamed to glGetAttribLocation. Input argument program was changed from GLhandleARB to GLuint. Input argument name was changed from const GLcharARB* to const GLchar*.

glGetHandleARB

Replaced by calling glGet with the symbolic constant GL_CURRENT_PROGRAM.

glGetInfoLogARB

Split into two functions, glGetProgramInfoLog and glGetShaderInfoLog. Input argument object was changed from GLhandleARB to GLuint. Output argument infoLog was changed from const GLcharARB* to const GLchar*. New error checking was added to ensure that the input argument in the new function (program or shader) is the proper object type.

glGetObjectParameterARB

Split into two functions, glGetProgram and glGetShader. Input argument object was changed from GLhandleARB to GLuint. Additional error checking was added to ensure that the input argument in the new function (program or shader) is the proper object type. In OpenGL 2.0 there is no equivalent for the floating-point version of the ARB function glGetObjectParameterfvARB.

glGetShaderSourceARB

Renamed to glGetShaderSource. Input argument shader was changed from GLhandleARB to GLuint. Output argument source was changed from const GLcharARB* to const GLchar*.

glGetUniformARB

Renamed to glGetUniform. Input argument program was changed from GLhandleARB to GLuint.

glGetUniformLocationARB

Renamed to glGetUniformLocation. Input argument program was changed from GLhandleARB to GLuint. Input argument name was changed from const GLcharARB* to const GLchar*.

glGetVertexAttribARB

Renamed to glGetVertexAttrib.

glGetVertexAttribPointerARB

Renamed to glGetVertexAttribPointer.

glLinkProgramARB

Renamed to glLinkProgram. Input argument program was changed from GLhandleARB to GLuint.

glShaderSourceARB

Renamed to glShaderSource. Input argument shader was changed from GLhandleARB to GLuint. Input argument strings was changed from const GLcharARB** to const GLchar**.

glUniformARB

Renamed to glUniform.

glUseProgramObjectARB

Renamed to glUseProgram. Input argument program was changed from GLhandleARB to GLuint.

glValidateProgramARB

Renamed to glValidateProgram. Input argument program was changed from GLhandleARB to GLuint.

glVertexAttribARB

Renamed to glVertexAttrib.

glVertexAttribPointerARB

Renamed to glVertexAttribPointer.

New functions

The functions glIsProgram and glIsShader were added in OpenGL 2.0 and have no equivalent in the ARB extensions that support GLSL.

 

The function glDrawBuffers was promoted to OpenGL 2.0 from the ARB_draw_buffers extension specification, where it was called glDrawBuffersARB.



Previous Page
Next Page




JavaScript EditorAjax Editor     JavaScript Editor