aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/src/gen/glu.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wx/src/gen/glu.erl')
-rw-r--r--lib/wx/src/gen/glu.erl405
1 files changed, 28 insertions, 377 deletions
diff --git a/lib/wx/src/gen/glu.erl b/lib/wx/src/gen/glu.erl
index f641f41262..5e5f01874f 100644
--- a/lib/wx/src/gen/glu.erl
+++ b/lib/wx/src/gen/glu.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2017. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@
%% This file is generated DO NOT EDIT
%% @doc A part of the standard OpenGL Utility api.
-%% See <a href="http://www.opengl.org/sdk/docs/man/">www.opengl.org</a>
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/">www.khronos.org</a>
%%
%% Booleans are represented by integers 0 and 1.
@@ -92,29 +92,7 @@ tesselate({Nx,Ny,Nz}, Vs) ->
%% of decreasing resolutions called a mipmap. This is used for the antialiasing of texture
%% mapped primitives.
%%
-%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
-%% ).
-%%
-%% A series of mipmap levels from `Base' to `Max' is built by decimating `Data'
-%% in half until size 1×1 is reached. At each level, each texel in the halved mipmap
-%% level is an average of the corresponding two texels in the larger mipmap level. {@link gl:texImage1D/8}
-%% is called to load these mipmap levels from `Base' to `Max' . If `Max' is
-%% larger than the highest mipmap level for the texture of the specified size, then a GLU
-%% error code is returned (see {@link glu:errorString/1} ) and nothing is loaded.
-%%
-%% For example, if `Level' is 2 and `Width' is 16, the following levels are possible:
-%% 16×1, 8×1, 4×1, 2×1, 1×1. These correspond to levels 2 through 6 respectively.
-%% If `Base' is 3 and `Max' is 5, then only mipmap levels 8×1, 4×1 and 2×1
-%% are loaded. However, if `Max' is 7, then an error is returned and nothing is loaded
-%% since `Max' is larger than the highest mipmap level which is, in this case, 6.
-%%
-%% The highest mipmap level can be derived from the formula log 2(width×2 level).
-%%
-%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
-%% for `Type' parameter. See the {@link gl:drawPixels/5} reference page for a description
-%% of the acceptable values for `Level' parameter.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild1DMipmapLevels.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluBuild1DMipmapLevels.xml">external</a> documentation.
-spec build1DMipmapLevels(Target, InternalFormat, Width, Format, Type, Level, Base, Max, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Level :: integer(),Base :: integer(),Max :: integer(),Data :: binary().
build1DMipmapLevels(Target,InternalFormat,Width,Format,Type,Level,Base,Max,Data) ->
send_bin(Data),
@@ -126,33 +104,7 @@ build1DMipmapLevels(Target,InternalFormat,Width,Format,Type,Level,Base,Max,Data)
%% decreasing resolutions called a mipmap. This is used for the antialiasing of texture mapped
%% primitives.
%%
-%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
-%% ).
-%%
-%% Initially, the `Width' of `Data' is checked to see if it is a power of 2. If
-%% not, a copy of `Data' is scaled up or down to the nearest power of 2. (If `Width'
-%% is exactly between powers of 2, then the copy of `Data' will scale upwards.) This
-%% copy will be used for subsequent mipmapping operations described below. For example, if `Width'
-%% is 57, then a copy of `Data' will scale up to 64 before mipmapping takes place.
-%%
-%% Then, proxy textures (see {@link gl:texImage1D/8} ) are used to determine if the implementation
-%% can fit the requested texture. If not, `Width' is continually halved until it fits.
-%%
-%% Next, a series of mipmap levels is built by decimating a copy of `Data' in half
-%% until size 1×1 is reached. At each level, each texel in the halved mipmap level is an
-%% average of the corresponding two texels in the larger mipmap level.
-%%
-%% {@link gl:texImage1D/8} is called to load each of these mipmap levels. Level 0 is a copy
-%% of `Data' . The highest level is (log 2)(width). For example, if `Width' is 64 and the implementation
-%% can store a texture of this size, the following mipmap levels are built: 64×1, 32×1,
-%% 16×1, 8×1, 4×1, 2×1, and 1×1. These correspond to levels 0 through 6, respectively.
-%%
-%%
-%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
-%% for the `Type' parameter. See the {@link gl:drawPixels/5} reference page for a description
-%% of the acceptable values for the `Data' parameter.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild1DMipmaps.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluBuild1DMipmaps.xml">external</a> documentation.
-spec build1DMipmaps(Target, InternalFormat, Width, Format, Type, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Data :: binary().
build1DMipmaps(Target,InternalFormat,Width,Format,Type,Data) ->
send_bin(Data),
@@ -164,32 +116,7 @@ build1DMipmaps(Target,InternalFormat,Width,Format,Type,Data) ->
%% of decreasing resolutions called a mipmap. This is used for the antialiasing of texture
%% mapped primitives.
%%
-%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
-%% ).
-%%
-%% A series of mipmap levels from `Base' to `Max' is built by decimating `Data'
-%% in half along both dimensions until size 1×1 is reached. At each level, each texel
-%% in the halved mipmap level is an average of the corresponding four texels in the larger
-%% mipmap level. (In the case of rectangular images, the decimation will ultimately reach
-%% an N×1 or 1×N configuration. Here, two texels are averaged instead.) {@link gl:texImage2D/9}
-%% is called to load these mipmap levels from `Base' to `Max' . If `Max' is
-%% larger than the highest mipmap level for the texture of the specified size, then a GLU
-%% error code is returned (see {@link glu:errorString/1} ) and nothing is loaded.
-%%
-%% For example, if `Level' is 2 and `Width' is 16 and `Height' is 8, the
-%% following levels are possible: 16×8, 8×4, 4×2, 2×1, 1×1. These correspond to
-%% levels 2 through 6 respectively. If `Base' is 3 and `Max' is 5, then only mipmap
-%% levels 8×4, 4×2, and 2×1 are loaded. However, if `Max' is 7, then an error is
-%% returned and nothing is loaded since `Max' is larger than the highest mipmap level
-%% which is, in this case, 6.
-%%
-%% The highest mipmap level can be derived from the formula log 2(max(width height)×2 level).
-%%
-%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
-%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description
-%% of the acceptable values for `Type' parameter.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild2DMipmapLevels.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluBuild2DMipmapLevels.xml">external</a> documentation.
-spec build2DMipmapLevels(Target, InternalFormat, Width, Height, Format, Type, Level, Base, Max, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Level :: integer(),Base :: integer(),Max :: integer(),Data :: binary().
build2DMipmapLevels(Target,InternalFormat,Width,Height,Format,Type,Level,Base,Max,Data) ->
send_bin(Data),
@@ -201,40 +128,7 @@ build2DMipmapLevels(Target,InternalFormat,Width,Height,Format,Type,Level,Base,Ma
%% decreasing resolutions called a mipmap. This is used for the antialiasing of texture-mapped
%% primitives.
%%
-%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
-%% ).
-%%
-%% Initially, the `Width' and `Height' of `Data' are checked to see if they
-%% are a power of 2. If not, a copy of `Data' (not `Data' ), is scaled up or down
-%% to the nearest power of 2. This copy will be used for subsequent mipmapping operations
-%% described below. (If `Width' or `Height' is exactly between powers of 2, then
-%% the copy of `Data' will scale upwards.) For example, if `Width' is 57 and `Height'
-%% is 23, then a copy of `Data' will scale up to 64 in `Width' and down to 16
-%% in depth, before mipmapping takes place.
-%%
-%% Then, proxy textures (see {@link gl:texImage2D/9} ) are used to determine if the implementation
-%% can fit the requested texture. If not, both dimensions are continually halved until it
-%% fits. (If the OpenGL version is (&lt;= 1.0, both maximum texture dimensions are clamped
-%% to the value returned by {@link gl:getBooleanv/1} with the argument `?GLU_MAX_TEXTURE_SIZE'
-%% .)
-%%
-%% Next, a series of mipmap levels is built by decimating a copy of `Data' in half
-%% along both dimensions until size 1×1 is reached. At each level, each texel in the halved
-%% mipmap level is an average of the corresponding four texels in the larger mipmap level.
-%% (In the case of rectangular images, the decimation will ultimately reach an N×1 or 1×N
-%% configuration. Here, two texels are averaged instead.)
-%%
-%% {@link gl:texImage2D/9} is called to load each of these mipmap levels. Level 0 is a copy
-%% of `Data' . The highest level is (log 2)(max(width height)). For example, if `Width' is 64 and `Height'
-%% is 16 and the implementation can store a texture of this size, the following mipmap levels
-%% are built: 64×16, 32×8, 16×4, 8×2, 4×1, 2×1, and 1×1 These correspond to
-%% levels 0 through 6, respectively.
-%%
-%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
-%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description
-%% of the acceptable values for `Type' parameter.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild2DMipmaps.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluBuild2DMipmaps.xml">external</a> documentation.
-spec build2DMipmaps(Target, InternalFormat, Width, Height, Format, Type, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Data :: binary().
build2DMipmaps(Target,InternalFormat,Width,Height,Format,Type,Data) ->
send_bin(Data),
@@ -246,32 +140,7 @@ build2DMipmaps(Target,InternalFormat,Width,Height,Format,Type,Data) ->
%% maps of decreasing resolutions called a mipmap. This is used for the antialiasing of texture
%% mapped primitives.
%%
-%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
-%% ).
-%%
-%% A series of mipmap levels from `Base' to `Max' is built by decimating `Data'
-%% in half along both dimensions until size 1×1×1 is reached. At each level, each texel
-%% in the halved mipmap level is an average of the corresponding eight texels in the larger
-%% mipmap level. (If exactly one of the dimensions is 1, four texels are averaged. If exactly
-%% two of the dimensions are 1, two texels are averaged.) {@link gl:texImage3D/10} is called
-%% to load these mipmap levels from `Base' to `Max' . If `Max' is larger than
-%% the highest mipmap level for the texture of the specified size, then a GLU error code
-%% is returned (see {@link glu:errorString/1} ) and nothing is loaded.
-%%
-%% For example, if `Level' is 2 and `Width' is 16, `Height' is 8 and `Depth'
-%% is 4, the following levels are possible: 16×8×4, 8×4×2, 4×2×1, 2×1×1, 1×1×1.
-%% These correspond to levels 2 through 6 respectively. If `Base' is 3 and `Max'
-%% is 5, then only mipmap levels 8×4×2, 4×2×1, and 2×1×1 are loaded. However, if `Max'
-%% is 7, then an error is returned and nothing is loaded, since `Max' is larger than
-%% the highest mipmap level which is, in this case, 6.
-%%
-%% The highest mipmap level can be derived from the formula log 2(max(width height depth)×2 level).
-%%
-%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
-%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description
-%% of the acceptable values for `Type' parameter.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild3DMipmapLevels.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluBuild3DMipmapLevels.xml">external</a> documentation.
-spec build3DMipmapLevels(Target, InternalFormat, Width, Height, Depth, Format, Type, Level, Base, Max, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Level :: integer(),Base :: integer(),Max :: integer(),Data :: binary().
build3DMipmapLevels(Target,InternalFormat,Width,Height,Depth,Format,Type,Level,Base,Max,Data) ->
send_bin(Data),
@@ -283,39 +152,7 @@ build3DMipmapLevels(Target,InternalFormat,Width,Height,Depth,Format,Type,Level,B
%% of decreasing resolutions called a mipmap. This is used for the antialiasing of texture-mapped
%% primitives.
%%
-%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
-%% ).
-%%
-%% Initially, the `Width' , `Height' and `Depth' of `Data' are checked
-%% to see if they are a power of 2. If not, a copy of `Data' is made and scaled up or
-%% down to the nearest power of 2. (If `Width' , `Height' , or `Depth' is exactly
-%% between powers of 2, then the copy of `Data' will scale upwards.) This copy will
-%% be used for subsequent mipmapping operations described below. For example, if `Width'
-%% is 57, `Height' is 23, and `Depth' is 24, then a copy of `Data' will scale
-%% up to 64 in width, down to 16 in height, and up to 32 in depth before mipmapping takes
-%% place.
-%%
-%% Then, proxy textures (see {@link gl:texImage3D/10} ) are used to determine if the implementation
-%% can fit the requested texture. If not, all three dimensions are continually halved until
-%% it fits.
-%%
-%% Next, a series of mipmap levels is built by decimating a copy of `Data' in half
-%% along all three dimensions until size 1×1×1 is reached. At each level, each texel in
-%% the halved mipmap level is an average of the corresponding eight texels in the larger
-%% mipmap level. (If exactly one of the dimensions is 1, four texels are averaged. If exactly
-%% two of the dimensions are 1, two texels are averaged.)
-%%
-%% {@link gl:texImage3D/10} is called to load each of these mipmap levels. Level 0 is a copy
-%% of `Data' . The highest level is (log 2)(max(width height depth)). For example, if `Width' is 64, `Height'
-%% is 16, and `Depth' is 32, and the implementation can store a texture of this size,
-%% the following mipmap levels are built: 64×16×32, 32×8×16, 16×4×8, 8×2×4, 4×1×2,
-%% 2×1×1, and 1×1×1. These correspond to levels 0 through 6, respectively.
-%%
-%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values
-%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description
-%% of the acceptable values for `Type' parameter.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluBuild3DMipmaps.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluBuild3DMipmaps.xml">external</a> documentation.
-spec build3DMipmaps(Target, InternalFormat, Width, Height, Depth, Format, Type, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Data :: binary().
build3DMipmaps(Target,InternalFormat,Width,Height,Depth,Format,Type,Data) ->
send_bin(Data),
@@ -326,12 +163,7 @@ build3DMipmaps(Target,InternalFormat,Width,Height,Depth,Format,Type,Data) ->
%% ``glu:checkExtension'' returns `?GLU_TRUE' if `ExtName' is supported otherwise
%% `?GLU_FALSE' is returned.
%%
-%% This is used to check for the presence for OpenGL, GLU, or GLX extension names by passing
-%% the extension strings returned by {@link gl:getString/1} , {@link glu:getString/1} , see `glXGetClientString'
-%% , see `glXQueryExtensionsString', or see `glXQueryServerString', respectively,
-%% as `ExtString' .
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluCheckExtension.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluCheckExtension.xml">external</a> documentation.
-spec checkExtension(ExtName, ExtString) -> 0|1 when ExtName :: string(),ExtString :: string().
checkExtension(ExtName,ExtString) ->
ExtNameLen = length(ExtName),
@@ -345,19 +177,7 @@ checkExtension(ExtName,ExtString) ->
%% is subdivided around the `z' axis into slices and along the `z' axis into stacks.
%%
%%
-%% Note that if `Top' is set to 0.0, this routine generates a cone.
-%%
-%% If the orientation is set to `?GLU_OUTSIDE' (with {@link glu:quadricOrientation/2} ),
-%% then any generated normals point away from the `z' axis. Otherwise, they point toward
-%% the `z' axis.
-%%
-%% If texturing is turned on (with {@link glu:quadricTexture/2} ), then texture coordinates
-%% are generated so that `t' ranges linearly from 0.0 at `z' = 0 to 1.0 at `z'
-%% = `Height' , and `s' ranges from 0.0 at the +`y' axis, to 0.25 at the +`x'
-%% axis, to 0.5 at the -`y' axis, to 0.75 at the -`x' axis, and back to 1.0
-%% at the +`y' axis.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluCylinder.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluCylinder.xml">external</a> documentation.
-spec cylinder(Quad, Base, Top, Height, Slices, Stacks) -> 'ok' when Quad :: integer(),Base :: float(),Top :: float(),Height :: float(),Slices :: integer(),Stacks :: integer().
cylinder(Quad,Base,Top,Height,Slices,Stacks) ->
cast(5017, <<Quad:?GLUquadric,Base:?GLdouble,Top:?GLdouble,Height:?GLdouble,Slices:?GLint,Stacks:?GLint>>).
@@ -368,7 +188,7 @@ cylinder(Quad,Base,Top,Height,Slices,Stacks) ->
%% and frees any memory it uses. Once ``glu:deleteQuadric'' has been called, `Quad'
%% cannot be used again.
%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluDeleteQuadric.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluDeleteQuadric.xml">external</a> documentation.
-spec deleteQuadric(Quad) -> 'ok' when Quad :: integer().
deleteQuadric(Quad) ->
cast(5018, <<Quad:?GLUquadric>>).
@@ -381,17 +201,7 @@ deleteQuadric(Quad) ->
%% slices (like pizza slices) and also about the `z' axis into rings (as specified by `Slices'
%% and `Loops' , respectively).
%%
-%% With respect to orientation, the +`z' side of the disk is considered to be ``outside''
-%% (see {@link glu:quadricOrientation/2} ). This means that if the orientation is set to `?GLU_OUTSIDE'
-%% , then any normals generated point along the +`z' axis. Otherwise, they point along
-%% the -`z' axis.
-%%
-%% If texturing has been turned on (with {@link glu:quadricTexture/2} ), texture coordinates
-%% are generated linearly such that where r=outer, the value at (`r', 0, 0) is (1,
-%% 0.5), at (0, `r', 0) it is (0.5, 1), at (-`r', 0, 0) it is (0, 0.5), and at
-%% (0, -`r', 0) it is (0.5, 0).
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluDisk.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluDisk.xml">external</a> documentation.
-spec disk(Quad, Inner, Outer, Slices, Loops) -> 'ok' when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer().
disk(Quad,Inner,Outer,Slices,Loops) ->
cast(5019, <<Quad:?GLUquadric,Inner:?GLdouble,Outer:?GLdouble,Slices:?GLint,Loops:?GLint>>).
@@ -402,12 +212,7 @@ disk(Quad,Inner,Outer,Slices,Loops) ->
%% is in ISO Latin 1 format. For example, ``glu:errorString''(`?GLU_OUT_OF_MEMORY')
%% returns the string `out of memory'.
%%
-%% The standard GLU error codes are `?GLU_INVALID_ENUM', `?GLU_INVALID_VALUE',
-%% and `?GLU_OUT_OF_MEMORY'. Certain other GLU functions can return specialized error
-%% codes through callbacks. See the {@link gl:getError/0} reference page for the list of
-%% GL error codes.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluErrorString.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluErrorString.xml">external</a> documentation.
-spec errorString(Error) -> string() when Error :: enum().
errorString(Error) ->
call(5020, <<Error:?GLenum>>).
@@ -417,25 +222,7 @@ errorString(Error) ->
%% ``glu:getString'' returns a pointer to a static string describing the GLU version or
%% the GLU extensions that are supported.
%%
-%% The version number is one of the following forms:
-%%
-%% `major_number.minor_number'`major_number.minor_number.release_number'.
-%%
-%% The version string is of the following form:
-%%
-%% `version number&lt;space&gt;vendor-specific information'
-%%
-%% Vendor-specific information is optional. Its format and contents depend on the implementation.
-%%
-%%
-%% The standard GLU contains a basic set of features and capabilities. If a company or group
-%% of companies wish to support other features, these may be included as extensions to the
-%% GLU. If `Name' is `?GLU_EXTENSIONS', then ``glu:getString'' returns a space-separated
-%% list of names of supported GLU extensions. (Extension names never contain spaces.)
-%%
-%% All strings are null-terminated.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluGetString.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluGetString.xml">external</a> documentation.
-spec getString(Name) -> string() when Name :: enum().
getString(Name) ->
call(5021, <<Name:?GLenum>>).
@@ -445,31 +232,7 @@ getString(Name) ->
%% ``glu:lookAt'' creates a viewing matrix derived from an eye point, a reference point
%% indicating the center of the scene, and an `UP' vector.
%%
-%% The matrix maps the reference point to the negative `z' axis and the eye point to
-%% the origin. When a typical projection matrix is used, the center of the scene therefore
-%% maps to the center of the viewport. Similarly, the direction described by the `UP'
-%% vector projected onto the viewing plane is mapped to the positive `y' axis so that
-%% it points upward in the viewport. The `UP' vector must not be parallel to the line
-%% of sight from the eye point to the reference point.
-%%
-%% Let
-%%
-%% F=(centerX-eyeX centerY-eyeY centerZ-eyeZ)
-%%
-%% Let `UP' be the vector (upX upY upZ).
-%%
-%% Then normalize as follows: f=F/(||F||)
-%%
-%% UP"=UP/(||UP||)
-%%
-%% Finally, let s=f×UP", and u=s×f.
-%%
-%% M is then constructed as follows: M=(s[0] s[1] s[2] 0 u[0] u[1] u[2] 0-f[0]-f[1]-f[2] 0 0 0 0 1)
-%%
-%% and ``glu:lookAt'' is equivalent to glMultMatrixf(M); glTranslated(-eyex, -eyey,
-%% -eyez);
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluLookAt.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluLookAt.xml">external</a> documentation.
-spec lookAt(EyeX, EyeY, EyeZ, CenterX, CenterY, CenterZ, UpX, UpY, UpZ) -> 'ok' when EyeX :: float(),EyeY :: float(),EyeZ :: float(),CenterX :: float(),CenterY :: float(),CenterZ :: float(),UpX :: float(),UpY :: float(),UpZ :: float().
lookAt(EyeX,EyeY,EyeZ,CenterX,CenterY,CenterZ,UpX,UpY,UpZ) ->
cast(5022, <<EyeX:?GLdouble,EyeY:?GLdouble,EyeZ:?GLdouble,CenterX:?GLdouble,CenterY:?GLdouble,CenterZ:?GLdouble,UpX:?GLdouble,UpY:?GLdouble,UpZ:?GLdouble>>).
@@ -480,7 +243,7 @@ lookAt(EyeX,EyeY,EyeZ,CenterX,CenterY,CenterZ,UpX,UpY,UpZ) ->
%% must be referred to when calling quadrics rendering and control functions. A return value
%% of 0 means that there is not enough memory to allocate the object.
%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluNewQuadric.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluNewQuadric.xml">external</a> documentation.
-spec newQuadric() -> integer().
newQuadric() ->
call(5023, <<>>).
@@ -490,7 +253,7 @@ newQuadric() ->
%% ``glu:ortho2D'' sets up a two-dimensional orthographic viewing region. This is equivalent
%% to calling {@link gl:ortho/6} with near=-1 and far=1.
%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluOrtho2D.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluOrtho2D.xml">external</a> documentation.
-spec ortho2D(Left, Right, Bottom, Top) -> 'ok' when Left :: float(),Right :: float(),Bottom :: float(),Top :: float().
ortho2D(Left,Right,Bottom,Top) ->
cast(5024, <<Left:?GLdouble,Right:?GLdouble,Bottom:?GLdouble,Top:?GLdouble>>).
@@ -503,23 +266,7 @@ ortho2D(Left,Right,Bottom,Top) ->
%% the +`x' axis, 180 degrees along the -`y' axis, and 270 degrees along the -`x'
%% axis).
%%
-%% The partial disk has a radius of `Outer' and contains a concentric circular hole
-%% with a radius of `Inner' . If `Inner' is 0, then no hole is generated. The partial
-%% disk is subdivided around the `z' axis into slices (like pizza slices) and also about
-%% the `z' axis into rings (as specified by `Slices' and `Loops' , respectively).
-%%
-%%
-%% With respect to orientation, the +`z' side of the partial disk is considered to
-%% be outside (see {@link glu:quadricOrientation/2} ). This means that if the orientation
-%% is set to `?GLU_OUTSIDE', then any normals generated point along the +`z' axis.
-%% Otherwise, they point along the -`z' axis.
-%%
-%% If texturing is turned on (with {@link glu:quadricTexture/2} ), texture coordinates are
-%% generated linearly such that where r=outer, the value at (`r', 0, 0) is (1.0,
-%% 0.5), at (0, `r', 0) it is (0.5, 1.0), at (-`r', 0, 0) it is (0.0, 0.5), and
-%% at (0, -`r', 0) it is (0.5, 0.0).
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPartialDisk.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPartialDisk.xml">external</a> documentation.
-spec partialDisk(Quad, Inner, Outer, Slices, Loops, Start, Sweep) -> 'ok' when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer(),Start :: float(),Sweep :: float().
partialDisk(Quad,Inner,Outer,Slices,Loops,Start,Sweep) ->
cast(5025, <<Quad:?GLUquadric,Inner:?GLdouble,Outer:?GLdouble,Slices:?GLint,Loops:?GLint,Start:?GLdouble,Sweep:?GLdouble>>).
@@ -532,18 +279,7 @@ partialDisk(Quad,Inner,Outer,Slices,Loops,Start,Sweep) ->
%% as wide in `x' as it is in `y'. If the viewport is twice as wide as it is tall,
%% it displays the image without distortion.
%%
-%% The matrix generated by ``glu:perspective'' is multipled by the current matrix, just
-%% as if {@link gl:multMatrixd/1} were called with the generated matrix. To load the perspective
-%% matrix onto the current matrix stack instead, precede the call to ``glu:perspective''
-%% with a call to {@link gl:loadIdentity/0} .
-%%
-%% Given `f' defined as follows:
-%%
-%% f=cotangent(fovy/2) The generated matrix is
-%%
-%% (f/aspect 0 0 0 0 f 0 0 0 0(zFar+zNear)/(zNear-zFar)(2×zFar×zNear)/(zNear-zFar) 0 0 -1 0)
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPerspective.xml">external</a> documentation.
-spec perspective(Fovy, Aspect, ZNear, ZFar) -> 'ok' when Fovy :: float(),Aspect :: float(),ZNear :: float(),ZFar :: float().
perspective(Fovy,Aspect,ZNear,ZFar) ->
cast(5026, <<Fovy:?GLdouble,Aspect:?GLdouble,ZNear:?GLdouble,ZFar:?GLdouble>>).
@@ -557,19 +293,7 @@ perspective(Fovy,Aspect,ZNear,ZFar) ->
%% rerender the scene. All primitives that would have been drawn near the cursor are identified
%% and stored in the selection buffer.
%%
-%% The matrix created by ``glu:pickMatrix'' is multiplied by the current matrix just as
-%% if {@link gl:multMatrixd/1} is called with the generated matrix. To effectively use the
-%% generated pick matrix for picking, first call {@link gl:loadIdentity/0} to load an identity
-%% matrix onto the perspective matrix stack. Then call ``glu:pickMatrix'', and, finally,
-%% call a command (such as {@link glu:perspective/4} ) to multiply the perspective matrix by
-%% the pick matrix.
-%%
-%% When using ``glu:pickMatrix'' to pick NURBS, be careful to turn off the NURBS property
-%% `?GLU_AUTO_LOAD_MATRIX'. If `?GLU_AUTO_LOAD_MATRIX' is not turned off, then
-%% any NURBS surface rendered is subdivided differently with the pick matrix than the way
-%% it was subdivided without the pick matrix.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluPickMatrix.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluPickMatrix.xml">external</a> documentation.
-spec pickMatrix(X, Y, DelX, DelY, Viewport) -> 'ok' when X :: float(),Y :: float(),DelX :: float(),DelY :: float(),Viewport :: {integer(),integer(),integer(),integer()}.
pickMatrix(X,Y,DelX,DelY,{V1,V2,V3,V4}) ->
cast(5027, <<X:?GLdouble,Y:?GLdouble,DelX:?GLdouble,DelY:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>).
@@ -581,25 +305,7 @@ pickMatrix(X,Y,DelX,DelY,{V1,V2,V3,V4}) ->
%% , and `WinZ' . A return value of `?GLU_TRUE' indicates success, a return value
%% of `?GLU_FALSE' indicates failure.
%%
-%% To compute the coordinates, let v=(objX objY objZ 1.0) represented as a matrix with 4 rows and 1 column.
-%% Then ``glu:project'' computes v" as follows:
-%%
-%% v"=P×M×v
-%%
-%% where P is the current projection matrix `Proj' and M is the current modelview
-%% matrix `Model' (both represented as 4×4 matrices in column-major order).
-%%
-%% The window coordinates are then computed as follows:
-%%
-%% winX=view(0)+view(2)×(v"(0)+1)/2
-%%
-%% winY=view(1)+view(3)×(v"(1)+1)/2
-%%
-%% winZ=(v"(2)+1)/2
-%%
-%%
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluProject.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluProject.xml">external</a> documentation.
-spec project(ObjX, ObjY, ObjZ, Model, Proj, View) -> {integer(),WinX :: float(),WinY :: float(),WinZ :: float()} when ObjX :: float(),ObjY :: float(),ObjZ :: float(),Model :: matrix(),Proj :: matrix(),View :: {integer(),integer(),integer(),integer()}.
project(ObjX,ObjY,ObjZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16},{V1,V2,V3,V4}) ->
call(5028, <<ObjX:?GLdouble,ObjY:?GLdouble,ObjZ:?GLdouble,M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,P4:?GLdouble,P5:?GLdouble,P6:?GLdouble,P7:?GLdouble,P8:?GLdouble,P9:?GLdouble,P10:?GLdouble,P11:?GLdouble,P12:?GLdouble,P13:?GLdouble,P14:?GLdouble,P15:?GLdouble,P16:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>);
@@ -611,18 +317,7 @@ project(ObjX,ObjY,ObjZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12},{P1,P2,P3,P4,P5,
%% ``glu:quadricDrawStyle'' specifies the draw style for quadrics rendered with `Quad' .
%% The legal values are as follows:
%%
-%% `?GLU_FILL': Quadrics are rendered with polygon primitives. The polygons are drawn
-%% in a counterclockwise fashion with respect to their normals (as defined with {@link glu:quadricOrientation/2}
-%% ).
-%%
-%% `?GLU_LINE': Quadrics are rendered as a set of lines.
-%%
-%% `?GLU_SILHOUETTE': Quadrics are rendered as a set of lines, except that edges separating
-%% coplanar faces will not be drawn.
-%%
-%% `?GLU_POINT': Quadrics are rendered as a set of points.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricDrawStyle.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluQuadricDrawStyle.xml">external</a> documentation.
-spec quadricDrawStyle(Quad, Draw) -> 'ok' when Quad :: integer(),Draw :: enum().
quadricDrawStyle(Quad,Draw) ->
cast(5029, <<Quad:?GLUquadric,Draw:?GLenum>>).
@@ -632,14 +327,7 @@ quadricDrawStyle(Quad,Draw) ->
%% ``glu:quadricNormals'' specifies what kind of normals are desired for quadrics rendered
%% with `Quad' . The legal values are as follows:
%%
-%% `?GLU_NONE': No normals are generated.
-%%
-%% `?GLU_FLAT': One normal is generated for every facet of a quadric.
-%%
-%% `?GLU_SMOOTH': One normal is generated for every vertex of a quadric. This is the
-%% initial value.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricNormals.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluQuadricNormals.xml">external</a> documentation.
-spec quadricNormals(Quad, Normal) -> 'ok' when Quad :: integer(),Normal :: enum().
quadricNormals(Quad,Normal) ->
cast(5030, <<Quad:?GLUquadric,Normal:?GLenum>>).
@@ -649,15 +337,7 @@ quadricNormals(Quad,Normal) ->
%% ``glu:quadricOrientation'' specifies what kind of orientation is desired for quadrics
%% rendered with `Quad' . The `Orientation' values are as follows:
%%
-%% `?GLU_OUTSIDE': Quadrics are drawn with normals pointing outward (the initial value).
-%%
-%%
-%% `?GLU_INSIDE': Quadrics are drawn with normals pointing inward.
-%%
-%% Note that the interpretation of `outward' and `inward' depends on the quadric
-%% being drawn.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricOrientation.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluQuadricOrientation.xml">external</a> documentation.
-spec quadricOrientation(Quad, Orientation) -> 'ok' when Quad :: integer(),Orientation :: enum().
quadricOrientation(Quad,Orientation) ->
cast(5031, <<Quad:?GLUquadric,Orientation:?GLenum>>).
@@ -669,10 +349,7 @@ quadricOrientation(Quad,Orientation) ->
%% coordinates are generated, and if `Texture' is `?GLU_FALSE', they are not.
%% The initial value is `?GLU_FALSE'.
%%
-%% The manner in which texture coordinates are generated depends upon the specific quadric
-%% rendered.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluQuadricTexture.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluQuadricTexture.xml">external</a> documentation.
-spec quadricTexture(Quad, Texture) -> 'ok' when Quad :: integer(),Texture :: 0|1.
quadricTexture(Quad,Texture) ->
cast(5032, <<Quad:?GLUquadric,Texture:?GLboolean>>).
@@ -682,17 +359,7 @@ quadricTexture(Quad,Texture) ->
%% ``glu:scaleImage'' scales a pixel image using the appropriate pixel store modes to
%% unpack data from the source image and pack data into the destination image.
%%
-%% When shrinking an image, ``glu:scaleImage'' uses a box filter to sample the source
-%% image and create pixels for the destination image. When magnifying an image, the pixels
-%% from the source image are linearly interpolated to create the destination image.
-%%
-%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1}
-%% ).
-%%
-%% See the {@link gl:readPixels/7} reference page for a description of the acceptable values
-%% for the `Format' , `TypeIn' , and `TypeOut' parameters.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluScaleImage.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluScaleImage.xml">external</a> documentation.
-spec scaleImage(Format, WIn, HIn, TypeIn, DataIn, WOut, HOut, TypeOut, DataOut) -> integer() when Format :: enum(),WIn :: integer(),HIn :: integer(),TypeIn :: enum(),DataIn :: binary(),WOut :: integer(),HOut :: integer(),TypeOut :: enum(),DataOut :: mem().
scaleImage(Format,WIn,HIn,TypeIn,DataIn,WOut,HOut,TypeOut,DataOut) ->
send_bin(DataIn),
@@ -705,17 +372,7 @@ scaleImage(Format,WIn,HIn,TypeIn,DataIn,WOut,HOut,TypeOut,DataOut) ->
%% is subdivided around the `z' axis into slices and along the `z' axis into
%% stacks (similar to lines of longitude and latitude).
%%
-%% If the orientation is set to `?GLU_OUTSIDE' (with {@link glu:quadricOrientation/2} ),
-%% then any normals generated point away from the center of the sphere. Otherwise, they
-%% point toward the center of the sphere.
-%%
-%% If texturing is turned on (with {@link glu:quadricTexture/2} ), then texture coordinates
-%% are generated so that `t' ranges from 0.0 at z=-radius to 1.0 at z=radius (`t'
-%% increases linearly along longitudinal lines), and `s' ranges from 0.0 at the +`y'
-%% axis, to 0.25 at the +`x' axis, to 0.5 at the -`y' axis, to 0.75 at the -`x'
-%% axis, and back to 1.0 at the +`y' axis.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluSphere.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluSphere.xml">external</a> documentation.
-spec sphere(Quad, Radius, Slices, Stacks) -> 'ok' when Quad :: integer(),Radius :: float(),Slices :: integer(),Stacks :: integer().
sphere(Quad,Radius,Slices,Stacks) ->
cast(5034, <<Quad:?GLUquadric,Radius:?GLdouble,Slices:?GLint,Stacks:?GLint>>).
@@ -727,13 +384,7 @@ sphere(Quad,Radius,Slices,Stacks) ->
%% . A return value of `?GLU_TRUE' indicates success; a return value of `?GLU_FALSE'
%% indicates failure.
%%
-%% To compute the coordinates (objX objY objZ), ``glu:unProject'' multiplies the normalized device coordinates
-%% by the inverse of `Model' * `Proj' as follows:
-%%
-%% (objX objY objZ W)=INV(P M) ((2(winX-view[0]))/(view[2])-1(2(winY-view[1]))/(view[3])-1 2(winZ)-1 1) INV denotes matrix inversion. W is an unused variable, included for consistent
-%% matrix notation.
-%%
-%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluUnProject.xml">external</a> documentation.
+%% See <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluUnProject.xml">external</a> documentation.
-spec unProject(WinX, WinY, WinZ, Model, Proj, View) -> {integer(),ObjX :: float(),ObjY :: float(),ObjZ :: float()} when WinX :: float(),WinY :: float(),WinZ :: float(),Model :: matrix(),Proj :: matrix(),View :: {integer(),integer(),integer(),integer()}.
unProject(WinX,WinY,WinZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16},{V1,V2,V3,V4}) ->
call(5035, <<WinX:?GLdouble,WinY:?GLdouble,WinZ:?GLdouble,M1:?GLdouble,M2:?GLdouble,M3:?GLdouble,M4:?GLdouble,M5:?GLdouble,M6:?GLdouble,M7:?GLdouble,M8:?GLdouble,M9:?GLdouble,M10:?GLdouble,M11:?GLdouble,M12:?GLdouble,M13:?GLdouble,M14:?GLdouble,M15:?GLdouble,M16:?GLdouble,P1:?GLdouble,P2:?GLdouble,P3:?GLdouble,P4:?GLdouble,P5:?GLdouble,P6:?GLdouble,P7:?GLdouble,P8:?GLdouble,P9:?GLdouble,P10:?GLdouble,P11:?GLdouble,P12:?GLdouble,P13:?GLdouble,P14:?GLdouble,P15:?GLdouble,P16:?GLdouble,V1:?GLint,V2:?GLint,V3:?GLint,V4:?GLint>>);