Difference between revisions of "OpenGL"

From Lazarus wiki
Jump to navigationJump to search
(glext contains higher lib)
m
Line 1: Line 1:
 +
{{OpenGL}}
 +
 
OpenGL ('''Open''' '''G'''raphics '''L'''ibrary) is a cross-platform API for producing 3D computer graphics. Most modern video cards provide hardware accelerated OpenGL support, wich makes OpenGL a good solution for writing advanced graphics software.
 
OpenGL ('''Open''' '''G'''raphics '''L'''ibrary) is a cross-platform API for producing 3D computer graphics. Most modern video cards provide hardware accelerated OpenGL support, wich makes OpenGL a good solution for writing advanced graphics software.
  

Revision as of 12:44, 14 March 2007

Deutsch (de) English (en) français (fr) 日本語 (ja) português (pt) русский (ru) Tiếng Việt (vi) 中文(中国大陆)‎ (zh_CN)

OpenGL (Open Graphics Library) is a cross-platform API for producing 3D computer graphics. Most modern video cards provide hardware accelerated OpenGL support, wich makes OpenGL a good solution for writing advanced graphics software.


The FreePascal OpenGL interface consists of the following units:

  • gl: This unit contains the main functionality such as drawing polygons, applying transformations, setting colors and materials,... Procedures always start with the preposition "gl".
  • glu: This unit contains OpenGL utils. Although it has some usefull functions, this unit is not necessary as you can implement all glu Procedures with the functionality of the gl unit. Procedures always start with the preposition "glu".
  • glext: Vendors can provide additional functionality through extensions. Use this unit to use these extensions.

    The functionality specific to higher OpenGL versions (1.2 and later) is available in this unit as well. Initializing this functionality is similar to initializing normal OpenGL extensions: just call Load_GL_version_X_Y function. If your OpenGL library version is older than X.Y, Load_GL_version_X_Y will return false.

  • glut: This unit provides functionality for creating an OpenGL window. Although this is a cross-platform unit, most Windows operating systems don't have a glut dll by default.
  • glx: glx provides functionality to set up an OpenGL window in an x window system. Procedures always start with the preposition "glx". Obviously, you cannot use this unit on non-x window systems such as Windows.