%%
%% %CopyrightBegin%
%%
%% 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.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%
%% %CopyrightEnd%
%% OPENGL API
%% This file is generated DO NOT EDIT
%% @doc Standard OpenGL api.
%% See www.khronos.org
%%
%% Booleans are represented by integers 0 and 1.
-module(gl).
-compile(inline).
-define(GLenum,32/native-unsigned).
-define(GLboolean,8/native-unsigned).
-define(GLbitfield,32/native-unsigned).
-define(GLbyte,8/native-signed).
-define(GLshort,16/native-signed).
-define(GLint,32/native-signed).
-define(GLubyte,8/native-unsigned).
-define(GLushort,16/native-unsigned).
-define(GLuint,32/native-unsigned).
-define(GLsizei,32/native-signed).
-define(GLfloat,32/native-float).
-define(GLclampf,32/native-float).
-define(GLdouble,64/native-float).
-define(GLclampd,64/native-float).
-define(GLsizeiptr,64/native-unsigned).
-define(GLintptr,64/native-unsigned).
-define(GLUquadric,64/native-unsigned).
-define(GLhandleARB,64/native-unsigned).
-define(GLsync,64/native-unsigned).
-define(GLuint64,64/native-unsigned).
-define(GLint64,64/native-signed).
-type enum() :: non_neg_integer(). %% See wx/include/gl.hrl
-type clamp() :: float(). %% 0.0..1.0
-type offset() :: non_neg_integer(). %% Offset in memory block
-type matrix12() :: {float(),float(),float(),float(),
float(),float(),float(),float(),
float(),float(),float(),float()}.
-type matrix16() :: {float(),float(),float(),float(),
float(),float(),float(),float(),
float(),float(),float(),float(),
float(),float(),float(),float()}.
-type matrix() :: matrix12() | matrix16().
-type mem() :: binary() | tuple(). %% Memory block
-export([clearIndex/1,clearColor/4,clear/1,indexMask/1,colorMask/4,alphaFunc/2,
blendFunc/2,logicOp/1,cullFace/1,frontFace/1,pointSize/1,lineWidth/1,
lineStipple/2,polygonMode/2,polygonOffset/2,polygonStipple/1,getPolygonStipple/0,
edgeFlag/1,edgeFlagv/1,scissor/4,clipPlane/2,getClipPlane/1,drawBuffer/1,
readBuffer/1,enable/1,disable/1,isEnabled/1,enableClientState/1,disableClientState/1,
getBooleanv/1,getDoublev/1,getFloatv/1,getIntegerv/1,pushAttrib/1,
popAttrib/0,pushClientAttrib/1,popClientAttrib/0,renderMode/1,getError/0,
getString/1,finish/0,flush/0,hint/2,clearDepth/1,depthFunc/1,depthMask/1,
depthRange/2,clearAccum/4,accum/2,matrixMode/1,ortho/6,frustum/6,viewport/4,
pushMatrix/0,popMatrix/0,loadIdentity/0,loadMatrixd/1,loadMatrixf/1,
multMatrixd/1,multMatrixf/1,rotated/4,rotatef/4,scaled/3,scalef/3,translated/3,
translatef/3,isList/1,deleteLists/2,genLists/1,newList/2,endList/0,
callList/1,callLists/1,listBase/1,'begin'/1,'end'/0,vertex2d/2,vertex2f/2,
vertex2i/2,vertex2s/2,vertex3d/3,vertex3f/3,vertex3i/3,vertex3s/3,vertex4d/4,
vertex4f/4,vertex4i/4,vertex4s/4,vertex2dv/1,vertex2fv/1,vertex2iv/1,
vertex2sv/1,vertex3dv/1,vertex3fv/1,vertex3iv/1,vertex3sv/1,vertex4dv/1,
vertex4fv/1,vertex4iv/1,vertex4sv/1,normal3b/3,normal3d/3,normal3f/3,
normal3i/3,normal3s/3,normal3bv/1,normal3dv/1,normal3fv/1,normal3iv/1,
normal3sv/1,indexd/1,indexf/1,indexi/1,indexs/1,indexub/1,indexdv/1,
indexfv/1,indexiv/1,indexsv/1,indexubv/1,color3b/3,color3d/3,color3f/3,
color3i/3,color3s/3,color3ub/3,color3ui/3,color3us/3,color4b/4,color4d/4,
color4f/4,color4i/4,color4s/4,color4ub/4,color4ui/4,color4us/4,color3bv/1,
color3dv/1,color3fv/1,color3iv/1,color3sv/1,color3ubv/1,color3uiv/1,
color3usv/1,color4bv/1,color4dv/1,color4fv/1,color4iv/1,color4sv/1,
color4ubv/1,color4uiv/1,color4usv/1,texCoord1d/1,texCoord1f/1,texCoord1i/1,
texCoord1s/1,texCoord2d/2,texCoord2f/2,texCoord2i/2,texCoord2s/2,texCoord3d/3,
texCoord3f/3,texCoord3i/3,texCoord3s/3,texCoord4d/4,texCoord4f/4,texCoord4i/4,
texCoord4s/4,texCoord1dv/1,texCoord1fv/1,texCoord1iv/1,texCoord1sv/1,
texCoord2dv/1,texCoord2fv/1,texCoord2iv/1,texCoord2sv/1,texCoord3dv/1,
texCoord3fv/1,texCoord3iv/1,texCoord3sv/1,texCoord4dv/1,texCoord4fv/1,
texCoord4iv/1,texCoord4sv/1,rasterPos2d/2,rasterPos2f/2,rasterPos2i/2,
rasterPos2s/2,rasterPos3d/3,rasterPos3f/3,rasterPos3i/3,rasterPos3s/3,
rasterPos4d/4,rasterPos4f/4,rasterPos4i/4,rasterPos4s/4,rasterPos2dv/1,
rasterPos2fv/1,rasterPos2iv/1,rasterPos2sv/1,rasterPos3dv/1,rasterPos3fv/1,
rasterPos3iv/1,rasterPos3sv/1,rasterPos4dv/1,rasterPos4fv/1,rasterPos4iv/1,
rasterPos4sv/1,rectd/4,rectf/4,recti/4,rects/4,rectdv/2,rectfv/2,rectiv/2,
rectsv/2,vertexPointer/4,normalPointer/3,colorPointer/4,indexPointer/3,
texCoordPointer/4,edgeFlagPointer/2,arrayElement/1,drawArrays/3,drawElements/4,
interleavedArrays/3,shadeModel/1,lightf/3,lighti/3,lightfv/3,lightiv/3,
getLightfv/2,getLightiv/2,lightModelf/2,lightModeli/2,lightModelfv/2,
lightModeliv/2,materialf/3,materiali/3,materialfv/3,materialiv/3,getMaterialfv/2,
getMaterialiv/2,colorMaterial/2,pixelZoom/2,pixelStoref/2,pixelStorei/2,
pixelTransferf/2,pixelTransferi/2,pixelMapfv/3,pixelMapuiv/3,pixelMapusv/3,
getPixelMapfv/2,getPixelMapuiv/2,getPixelMapusv/2,bitmap/7,readPixels/7,
drawPixels/5,copyPixels/5,stencilFunc/3,stencilMask/1,stencilOp/3,
clearStencil/1,texGend/3,texGenf/3,texGeni/3,texGendv/3,texGenfv/3,
texGeniv/3,getTexGendv/2,getTexGenfv/2,getTexGeniv/2,texEnvf/3,texEnvi/3,
texEnvfv/3,texEnviv/3,getTexEnvfv/2,getTexEnviv/2,texParameterf/3,
texParameteri/3,texParameterfv/3,texParameteriv/3,getTexParameterfv/2,
getTexParameteriv/2,getTexLevelParameterfv/3,getTexLevelParameteriv/3,
texImage1D/8,texImage2D/9,getTexImage/5,genTextures/1,deleteTextures/1,
bindTexture/2,prioritizeTextures/2,areTexturesResident/1,isTexture/1,
texSubImage1D/7,texSubImage2D/9,copyTexImage1D/7,copyTexImage2D/8,
copyTexSubImage1D/6,copyTexSubImage2D/8,map1d/6,map1f/6,map2d/10,map2f/10,
getMapdv/3,getMapfv/3,getMapiv/3,evalCoord1d/1,evalCoord1f/1,evalCoord1dv/1,
evalCoord1fv/1,evalCoord2d/2,evalCoord2f/2,evalCoord2dv/1,evalCoord2fv/1,
mapGrid1d/3,mapGrid1f/3,mapGrid2d/6,mapGrid2f/6,evalPoint1/1,evalPoint2/2,
evalMesh1/3,evalMesh2/5,fogf/2,fogi/2,fogfv/2,fogiv/2,feedbackBuffer/3,
passThrough/1,selectBuffer/2,initNames/0,loadName/1,pushName/1,popName/0,
blendColor/4,blendEquation/1,drawRangeElements/6,texImage3D/10,texSubImage3D/11,
copyTexSubImage3D/9,colorTable/6,colorTableParameterfv/3,colorTableParameteriv/3,
copyColorTable/5,getColorTable/4,getColorTableParameterfv/2,getColorTableParameteriv/2,
colorSubTable/6,copyColorSubTable/5,convolutionFilter1D/6,convolutionFilter2D/7,
convolutionParameterf/3,convolutionParameterfv/3,convolutionParameteri/3,
convolutionParameteriv/3,copyConvolutionFilter1D/5,copyConvolutionFilter2D/6,
getConvolutionFilter/4,getConvolutionParameterfv/2,getConvolutionParameteriv/2,
separableFilter2D/8,getHistogram/5,getHistogramParameterfv/2,getHistogramParameteriv/2,
getMinmax/5,getMinmaxParameterfv/2,getMinmaxParameteriv/2,histogram/4,
minmax/3,resetHistogram/1,resetMinmax/1,activeTexture/1,sampleCoverage/2,
compressedTexImage3D/9,compressedTexImage2D/8,compressedTexImage1D/7,
compressedTexSubImage3D/11,compressedTexSubImage2D/9,compressedTexSubImage1D/7,
getCompressedTexImage/3,clientActiveTexture/1,multiTexCoord1d/2,
multiTexCoord1dv/2,multiTexCoord1f/2,multiTexCoord1fv/2,multiTexCoord1i/2,
multiTexCoord1iv/2,multiTexCoord1s/2,multiTexCoord1sv/2,multiTexCoord2d/3,
multiTexCoord2dv/2,multiTexCoord2f/3,multiTexCoord2fv/2,multiTexCoord2i/3,
multiTexCoord2iv/2,multiTexCoord2s/3,multiTexCoord2sv/2,multiTexCoord3d/4,
multiTexCoord3dv/2,multiTexCoord3f/4,multiTexCoord3fv/2,multiTexCoord3i/4,
multiTexCoord3iv/2,multiTexCoord3s/4,multiTexCoord3sv/2,multiTexCoord4d/5,
multiTexCoord4dv/2,multiTexCoord4f/5,multiTexCoord4fv/2,multiTexCoord4i/5,
multiTexCoord4iv/2,multiTexCoord4s/5,multiTexCoord4sv/2,loadTransposeMatrixf/1,
loadTransposeMatrixd/1,multTransposeMatrixf/1,multTransposeMatrixd/1,
blendFuncSeparate/4,multiDrawArrays/3,pointParameterf/2,pointParameterfv/2,
pointParameteri/2,pointParameteriv/2,fogCoordf/1,fogCoordfv/1,fogCoordd/1,
fogCoorddv/1,fogCoordPointer/3,secondaryColor3b/3,secondaryColor3bv/1,
secondaryColor3d/3,secondaryColor3dv/1,secondaryColor3f/3,secondaryColor3fv/1,
secondaryColor3i/3,secondaryColor3iv/1,secondaryColor3s/3,secondaryColor3sv/1,
secondaryColor3ub/3,secondaryColor3ubv/1,secondaryColor3ui/3,secondaryColor3uiv/1,
secondaryColor3us/3,secondaryColor3usv/1,secondaryColorPointer/4,
windowPos2d/2,windowPos2dv/1,windowPos2f/2,windowPos2fv/1,windowPos2i/2,
windowPos2iv/1,windowPos2s/2,windowPos2sv/1,windowPos3d/3,windowPos3dv/1,
windowPos3f/3,windowPos3fv/1,windowPos3i/3,windowPos3iv/1,windowPos3s/3,
windowPos3sv/1,genQueries/1,deleteQueries/1,isQuery/1,beginQuery/2,
endQuery/1,getQueryiv/2,getQueryObjectiv/2,getQueryObjectuiv/2,bindBuffer/2,
deleteBuffers/1,genBuffers/1,isBuffer/1,bufferData/4,bufferSubData/4,
getBufferSubData/4,getBufferParameteriv/2,blendEquationSeparate/2,
drawBuffers/1,stencilOpSeparate/4,stencilFuncSeparate/4,stencilMaskSeparate/2,
attachShader/2,bindAttribLocation/3,compileShader/1,createProgram/0,
createShader/1,deleteProgram/1,deleteShader/1,detachShader/2,disableVertexAttribArray/1,
enableVertexAttribArray/1,getActiveAttrib/3,getActiveUniform/3,getAttachedShaders/2,
getAttribLocation/2,getProgramiv/2,getProgramInfoLog/2,getShaderiv/2,
getShaderInfoLog/2,getShaderSource/2,getUniformLocation/2,getUniformfv/2,
getUniformiv/2,getVertexAttribdv/2,getVertexAttribfv/2,getVertexAttribiv/2,
isProgram/1,isShader/1,linkProgram/1,shaderSource/2,useProgram/1,uniform1f/2,
uniform2f/3,uniform3f/4,uniform4f/5,uniform1i/2,uniform2i/3,uniform3i/4,
uniform4i/5,uniform1fv/2,uniform2fv/2,uniform3fv/2,uniform4fv/2,uniform1iv/2,
uniform2iv/2,uniform3iv/2,uniform4iv/2,uniformMatrix2fv/3,uniformMatrix3fv/3,
uniformMatrix4fv/3,validateProgram/1,vertexAttrib1d/2,vertexAttrib1dv/2,
vertexAttrib1f/2,vertexAttrib1fv/2,vertexAttrib1s/2,vertexAttrib1sv/2,
vertexAttrib2d/3,vertexAttrib2dv/2,vertexAttrib2f/3,vertexAttrib2fv/2,
vertexAttrib2s/3,vertexAttrib2sv/2,vertexAttrib3d/4,vertexAttrib3dv/2,
vertexAttrib3f/4,vertexAttrib3fv/2,vertexAttrib3s/4,vertexAttrib3sv/2,
vertexAttrib4Nbv/2,vertexAttrib4Niv/2,vertexAttrib4Nsv/2,vertexAttrib4Nub/5,
vertexAttrib4Nubv/2,vertexAttrib4Nuiv/2,vertexAttrib4Nusv/2,vertexAttrib4bv/2,
vertexAttrib4d/5,vertexAttrib4dv/2,vertexAttrib4f/5,vertexAttrib4fv/2,
vertexAttrib4iv/2,vertexAttrib4s/5,vertexAttrib4sv/2,vertexAttrib4ubv/2,
vertexAttrib4uiv/2,vertexAttrib4usv/2,vertexAttribPointer/6,uniformMatrix2x3fv/3,
uniformMatrix3x2fv/3,uniformMatrix2x4fv/3,uniformMatrix4x2fv/3,uniformMatrix3x4fv/3,
uniformMatrix4x3fv/3,colorMaski/5,getBooleani_v/2,getIntegeri_v/2,
enablei/2,disablei/2,isEnabledi/2,beginTransformFeedback/1,endTransformFeedback/0,
bindBufferRange/5,bindBufferBase/3,transformFeedbackVaryings/3,getTransformFeedbackVarying/3,
clampColor/2,beginConditionalRender/2,endConditionalRender/0,vertexAttribIPointer/5,
getVertexAttribIiv/2,getVertexAttribIuiv/2,vertexAttribI1i/2,vertexAttribI2i/3,
vertexAttribI3i/4,vertexAttribI4i/5,vertexAttribI1ui/2,vertexAttribI2ui/3,
vertexAttribI3ui/4,vertexAttribI4ui/5,vertexAttribI1iv/2,vertexAttribI2iv/2,
vertexAttribI3iv/2,vertexAttribI4iv/2,vertexAttribI1uiv/2,vertexAttribI2uiv/2,
vertexAttribI3uiv/2,vertexAttribI4uiv/2,vertexAttribI4bv/2,vertexAttribI4sv/2,
vertexAttribI4ubv/2,vertexAttribI4usv/2,getUniformuiv/2,bindFragDataLocation/3,
getFragDataLocation/2,uniform1ui/2,uniform2ui/3,uniform3ui/4,uniform4ui/5,
uniform1uiv/2,uniform2uiv/2,uniform3uiv/2,uniform4uiv/2,texParameterIiv/3,
texParameterIuiv/3,getTexParameterIiv/2,getTexParameterIuiv/2,clearBufferiv/3,
clearBufferuiv/3,clearBufferfv/3,clearBufferfi/4,getStringi/2,drawArraysInstanced/4,
drawElementsInstanced/5,texBuffer/3,primitiveRestartIndex/1,getInteger64i_v/2,
getBufferParameteri64v/2,framebufferTexture/4,vertexAttribDivisor/2,
minSampleShading/1,blendEquationi/2,blendEquationSeparatei/3,blendFunci/3,
blendFuncSeparatei/5,loadTransposeMatrixfARB/1,loadTransposeMatrixdARB/1,
multTransposeMatrixfARB/1,multTransposeMatrixdARB/1,weightbvARB/1,
weightsvARB/1,weightivARB/1,weightfvARB/1,weightdvARB/1,weightubvARB/1,
weightusvARB/1,weightuivARB/1,vertexBlendARB/1,currentPaletteMatrixARB/1,
matrixIndexubvARB/1,matrixIndexusvARB/1,matrixIndexuivARB/1,programStringARB/3,
bindProgramARB/2,deleteProgramsARB/1,genProgramsARB/1,programEnvParameter4dARB/6,
programEnvParameter4dvARB/3,programEnvParameter4fARB/6,programEnvParameter4fvARB/3,
programLocalParameter4dARB/6,programLocalParameter4dvARB/3,programLocalParameter4fARB/6,
programLocalParameter4fvARB/3,getProgramEnvParameterdvARB/2,getProgramEnvParameterfvARB/2,
getProgramLocalParameterdvARB/2,getProgramLocalParameterfvARB/2,
getProgramStringARB/3,getBufferParameterivARB/2,deleteObjectARB/1,
getHandleARB/1,detachObjectARB/2,createShaderObjectARB/1,shaderSourceARB/2,
compileShaderARB/1,createProgramObjectARB/0,attachObjectARB/2,linkProgramARB/1,
useProgramObjectARB/1,validateProgramARB/1,getObjectParameterfvARB/2,
getObjectParameterivARB/2,getInfoLogARB/2,getAttachedObjectsARB/2,
getUniformLocationARB/2,getActiveUniformARB/3,getUniformfvARB/2,
getUniformivARB/2,getShaderSourceARB/2,bindAttribLocationARB/3,getActiveAttribARB/3,
getAttribLocationARB/2,isRenderbuffer/1,bindRenderbuffer/2,deleteRenderbuffers/1,
genRenderbuffers/1,renderbufferStorage/4,getRenderbufferParameteriv/2,
isFramebuffer/1,bindFramebuffer/2,deleteFramebuffers/1,genFramebuffers/1,
checkFramebufferStatus/1,framebufferTexture1D/5,framebufferTexture2D/5,
framebufferTexture3D/6,framebufferRenderbuffer/4,getFramebufferAttachmentParameteriv/3,
generateMipmap/1,blitFramebuffer/10,renderbufferStorageMultisample/5,
framebufferTextureLayer/5,framebufferTextureFaceARB/5,flushMappedBufferRange/3,
bindVertexArray/1,deleteVertexArrays/1,genVertexArrays/1,isVertexArray/1,
getUniformIndices/2,getActiveUniformsiv/3,getActiveUniformName/3,
getUniformBlockIndex/2,getActiveUniformBlockiv/4,getActiveUniformBlockName/3,
uniformBlockBinding/3,copyBufferSubData/5,drawElementsBaseVertex/5,
drawRangeElementsBaseVertex/7,drawElementsInstancedBaseVertex/6,
provokingVertex/1,fenceSync/2,isSync/1,deleteSync/1,clientWaitSync/3,
waitSync/3,getInteger64v/1,getSynciv/3,texImage2DMultisample/6,texImage3DMultisample/7,
getMultisamplefv/2,sampleMaski/2,namedStringARB/3,deleteNamedStringARB/1,
compileShaderIncludeARB/2,isNamedStringARB/1,getNamedStringARB/2,
getNamedStringivARB/2,bindFragDataLocationIndexed/4,getFragDataIndex/2,
genSamplers/1,deleteSamplers/1,isSampler/1,bindSampler/2,samplerParameteri/3,
samplerParameteriv/3,samplerParameterf/3,samplerParameterfv/3,samplerParameterIiv/3,
samplerParameterIuiv/3,getSamplerParameteriv/2,getSamplerParameterIiv/2,
getSamplerParameterfv/2,getSamplerParameterIuiv/2,queryCounter/2,
getQueryObjecti64v/2,getQueryObjectui64v/2,drawArraysIndirect/2,
drawElementsIndirect/3,uniform1d/2,uniform2d/3,uniform3d/4,uniform4d/5,
uniform1dv/2,uniform2dv/2,uniform3dv/2,uniform4dv/2,uniformMatrix2dv/3,
uniformMatrix3dv/3,uniformMatrix4dv/3,uniformMatrix2x3dv/3,uniformMatrix2x4dv/3,
uniformMatrix3x2dv/3,uniformMatrix3x4dv/3,uniformMatrix4x2dv/3,uniformMatrix4x3dv/3,
getUniformdv/2,getSubroutineUniformLocation/3,getSubroutineIndex/3,
getActiveSubroutineUniformName/4,getActiveSubroutineName/4,uniformSubroutinesuiv/2,
getUniformSubroutineuiv/2,getProgramStageiv/3,patchParameteri/2,
patchParameterfv/2,bindTransformFeedback/2,deleteTransformFeedbacks/1,
genTransformFeedbacks/1,isTransformFeedback/1,pauseTransformFeedback/0,
resumeTransformFeedback/0,drawTransformFeedback/2,drawTransformFeedbackStream/3,
beginQueryIndexed/3,endQueryIndexed/2,getQueryIndexediv/3,releaseShaderCompiler/0,
shaderBinary/3,getShaderPrecisionFormat/2,depthRangef/2,clearDepthf/1,
getProgramBinary/2,programBinary/3,programParameteri/3,useProgramStages/3,
activeShaderProgram/2,createShaderProgramv/2,bindProgramPipeline/1,
deleteProgramPipelines/1,genProgramPipelines/1,isProgramPipeline/1,
getProgramPipelineiv/2,programUniform1i/3,programUniform1iv/3,programUniform1f/3,
programUniform1fv/3,programUniform1d/3,programUniform1dv/3,programUniform1ui/3,
programUniform1uiv/3,programUniform2i/4,programUniform2iv/3,programUniform2f/4,
programUniform2fv/3,programUniform2d/4,programUniform2dv/3,programUniform2ui/4,
programUniform2uiv/3,programUniform3i/5,programUniform3iv/3,programUniform3f/5,
programUniform3fv/3,programUniform3d/5,programUniform3dv/3,programUniform3ui/5,
programUniform3uiv/3,programUniform4i/6,programUniform4iv/3,programUniform4f/6,
programUniform4fv/3,programUniform4d/6,programUniform4dv/3,programUniform4ui/6,
programUniform4uiv/3,programUniformMatrix2fv/4,programUniformMatrix3fv/4,
programUniformMatrix4fv/4,programUniformMatrix2dv/4,programUniformMatrix3dv/4,
programUniformMatrix4dv/4,programUniformMatrix2x3fv/4,programUniformMatrix3x2fv/4,
programUniformMatrix2x4fv/4,programUniformMatrix4x2fv/4,programUniformMatrix3x4fv/4,
programUniformMatrix4x3fv/4,programUniformMatrix2x3dv/4,programUniformMatrix3x2dv/4,
programUniformMatrix2x4dv/4,programUniformMatrix4x2dv/4,programUniformMatrix3x4dv/4,
programUniformMatrix4x3dv/4,validateProgramPipeline/1,getProgramPipelineInfoLog/2,
vertexAttribL1d/2,vertexAttribL2d/3,vertexAttribL3d/4,vertexAttribL4d/5,
vertexAttribL1dv/2,vertexAttribL2dv/2,vertexAttribL3dv/2,vertexAttribL4dv/2,
vertexAttribLPointer/5,getVertexAttribLdv/2,viewportArrayv/2,viewportIndexedf/5,
viewportIndexedfv/2,scissorArrayv/2,scissorIndexed/5,scissorIndexedv/2,
depthRangeArrayv/2,depthRangeIndexed/3,getFloati_v/2,getDoublei_v/2,
debugMessageControlARB/5,debugMessageInsertARB/5,getDebugMessageLogARB/2,
getGraphicsResetStatusARB/0,drawArraysInstancedBaseInstance/5,drawElementsInstancedBaseInstance/6,
drawElementsInstancedBaseVertexBaseInstance/7,drawTransformFeedbackInstanced/3,
drawTransformFeedbackStreamInstanced/4,getInternalformativ/4,bindImageTexture/7,
memoryBarrier/1,texStorage1D/4,texStorage2D/5,texStorage3D/6,depthBoundsEXT/2,
stencilClearTagEXT/2]).
-export([call/2, cast/2, send_bin/1]).
%% @hidden
call(Op, Args) ->
Port = get(opengl_port),
_ = erlang:port_control(Port,Op,Args),
rec(Op).
%% @hidden
cast(Op, Args) ->
Port = get(opengl_port),
_ = erlang:port_control(Port,Op,Args),
ok.
%% @hidden
rec(Op) ->
receive
{'_egl_result_', Res} -> Res;
{'_egl_error_', Op, Res} -> error({error,Res,Op});
{'_egl_error_', Other, Res} ->
Err = io_lib:format("~p in op: ~p", [Res, Other]),
error_logger:error_report([{gl, error}, {message, lists:flatten(Err)}]),
rec(Op)
end.
%% @hidden
send_bin(Bin) when is_binary(Bin) ->
Port = get(opengl_port),
erlang:port_command(Port,Bin);
send_bin(Tuple) when is_tuple(Tuple) ->
Port = get(opengl_port),
case element(2, Tuple) of
Bin when is_binary(Bin) ->
erlang:port_command(Port,Bin)
end.
%% API
%% @doc Specify the clear value for the color index buffers
%%
%% ``gl:clearIndex'' specifies the index used by {@link gl:clear/1} to clear the color index
%% buffers. `C' is not clamped. Rather, `C' is converted to a fixed-point value
%% with unspecified precision to the right of the binary point. The integer part of this
%% value is then masked with 2 m-1, where m is the number of bits in a color index stored
%% in the frame buffer.
%%
%% See external documentation.
-spec clearIndex(C) -> 'ok' when C :: float().
clearIndex(C) ->
cast(5037, <>).
%% @doc Specify clear values for the color buffers
%%
%% ``gl:clearColor'' specifies the red, green, blue, and alpha values used by {@link gl:clear/1}
%% to clear the color buffers. Values specified by ``gl:clearColor'' are clamped to the
%% range [0 1].
%%
%% See external documentation.
-spec clearColor(Red, Green, Blue, Alpha) -> 'ok' when Red :: clamp(),Green :: clamp(),Blue :: clamp(),Alpha :: clamp().
clearColor(Red,Green,Blue,Alpha) ->
cast(5038, <>).
%% @doc Clear buffers to preset values
%%
%% ``gl:clear'' sets the bitplane area of the window to values previously selected by ``gl:clearColor''
%% , ``gl:clearDepth'', and ``gl:clearStencil''. Multiple color buffers can be cleared
%% simultaneously by selecting more than one buffer at a time using {@link gl:drawBuffer/1} .
%%
%% See external documentation.
-spec clear(Mask) -> 'ok' when Mask :: integer().
clear(Mask) ->
cast(5039, <>).
%% @doc Control the writing of individual bits in the color index buffers
%%
%% ``gl:indexMask'' controls the writing of individual bits in the color index buffers.
%% The least significant n bits of `Mask' , where n is the number of bits in a color
%% index buffer, specify a mask. Where a 1 (one) appears in the mask, it's possible to write
%% to the corresponding bit in the color index buffer (or buffers). Where a 0 (zero) appears,
%% the corresponding bit is write-protected.
%%
%% See external documentation.
-spec indexMask(Mask) -> 'ok' when Mask :: integer().
indexMask(Mask) ->
cast(5040, <>).
%% @doc Enable and disable writing of frame buffer color components
%%
%% ``gl:colorMask'' and ``gl:colorMaski'' specify whether the individual color components
%% in the frame buffer can or cannot be written. ``gl:colorMaski'' sets the mask for a
%% specific draw buffer, whereas ``gl:colorMask'' sets the mask for all draw buffers. If `Red'
%% is `?GL_FALSE', for example, no change is made to the red component of any pixel
%% in any of the color buffers, regardless of the drawing operation attempted.
%%
%% See external documentation.
-spec colorMask(Red, Green, Blue, Alpha) -> 'ok' when Red :: 0|1,Green :: 0|1,Blue :: 0|1,Alpha :: 0|1.
colorMask(Red,Green,Blue,Alpha) ->
cast(5041, <>).
%% @doc Specify the alpha test function
%%
%% The alpha test discards fragments depending on the outcome of a comparison between an
%% incoming fragment's alpha value and a constant reference value. ``gl:alphaFunc'' specifies
%% the reference value and the comparison function. The comparison is performed only if alpha
%% testing is enabled. By default, it is not enabled. (See {@link gl:enable/1} and {@link gl:enable/1}
%% of `?GL_ALPHA_TEST'.)
%%
%% See external documentation.
-spec alphaFunc(Func, Ref) -> 'ok' when Func :: enum(),Ref :: clamp().
alphaFunc(Func,Ref) ->
cast(5042, <>).
%% @doc Specify pixel arithmetic
%%
%% Pixels can be drawn using a function that blends the incoming (source) RGBA values with
%% the RGBA values that are already in the frame buffer (the destination values). Blending
%% is initially disabled. Use {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_BLEND'
%% to enable and disable blending.
%%
%% See external documentation.
-spec blendFunc(Sfactor, Dfactor) -> 'ok' when Sfactor :: enum(),Dfactor :: enum().
blendFunc(Sfactor,Dfactor) ->
cast(5043, <>).
%% @doc Specify a logical pixel operation for rendering
%%
%% ``gl:logicOp'' specifies a logical operation that, when enabled, is applied between
%% the incoming RGBA color and the RGBA color at the corresponding location in the frame
%% buffer. To enable or disable the logical operation, call {@link gl:enable/1} and {@link gl:enable/1}
%% using the symbolic constant `?GL_COLOR_LOGIC_OP'. The initial value is disabled.
%%
%% See external documentation.
-spec logicOp(Opcode) -> 'ok' when Opcode :: enum().
logicOp(Opcode) ->
cast(5044, <>).
%% @doc Specify whether front- or back-facing facets can be culled
%%
%% ``gl:cullFace'' specifies whether front- or back-facing facets are culled (as specified
%% by `mode') when facet culling is enabled. Facet culling is initially disabled. To
%% enable and disable facet culling, call the {@link gl:enable/1} and {@link gl:enable/1}
%% commands with the argument `?GL_CULL_FACE'. Facets include triangles, quadrilaterals,
%% polygons, and rectangles.
%%
%% See external documentation.
-spec cullFace(Mode) -> 'ok' when Mode :: enum().
cullFace(Mode) ->
cast(5045, <>).
%% @doc Define front- and back-facing polygons
%%
%% In a scene composed entirely of opaque closed surfaces, back-facing polygons are never
%% visible. Eliminating these invisible polygons has the obvious benefit of speeding up the
%% rendering of the image. To enable and disable elimination of back-facing polygons, call {@link gl:enable/1}
%% and {@link gl:enable/1} with argument `?GL_CULL_FACE'.
%%
%% See external documentation.
-spec frontFace(Mode) -> 'ok' when Mode :: enum().
frontFace(Mode) ->
cast(5046, <>).
%% @doc Specify the diameter of rasterized points
%%
%% ``gl:pointSize'' specifies the rasterized diameter of points. If point size mode is
%% disabled (see {@link gl:enable/1} with parameter `?GL_PROGRAM_POINT_SIZE'), this value
%% will be used to rasterize points. Otherwise, the value written to the shading language
%% built-in variable gl_PointSize will be used.
%%
%% See external documentation.
-spec pointSize(Size) -> 'ok' when Size :: float().
pointSize(Size) ->
cast(5047, <>).
%% @doc Specify the width of rasterized lines
%%
%% ``gl:lineWidth'' specifies the rasterized width of both aliased and antialiased lines.
%% Using a line width other than 1 has different effects, depending on whether line antialiasing
%% is enabled. To enable and disable line antialiasing, call {@link gl:enable/1} and {@link gl:enable/1}
%% with argument `?GL_LINE_SMOOTH'. Line antialiasing is initially disabled.
%%
%% See external documentation.
-spec lineWidth(Width) -> 'ok' when Width :: float().
lineWidth(Width) ->
cast(5048, <>).
%% @doc Specify the line stipple pattern
%%
%% Line stippling masks out certain fragments produced by rasterization; those fragments
%% will not be drawn. The masking is achieved by using three parameters: the 16-bit line
%% stipple pattern `Pattern' , the repeat count `Factor' , and an integer stipple
%% counter s.
%%
%% See external documentation.
-spec lineStipple(Factor, Pattern) -> 'ok' when Factor :: integer(),Pattern :: integer().
lineStipple(Factor,Pattern) ->
cast(5049, <>).
%% @doc Select a polygon rasterization mode
%%
%% ``gl:polygonMode'' controls the interpretation of polygons for rasterization. `Face'
%% describes which polygons `Mode' applies to: both front and back-facing polygons (`?GL_FRONT_AND_BACK'
%% ). The polygon mode affects only the final rasterization of polygons. In particular, a
%% polygon's vertices are lit and the polygon is clipped and possibly culled before these
%% modes are applied.
%%
%% See external documentation.
-spec polygonMode(Face, Mode) -> 'ok' when Face :: enum(),Mode :: enum().
polygonMode(Face,Mode) ->
cast(5050, <>).
%% @doc Set the scale and units used to calculate depth values
%%
%% When `?GL_POLYGON_OFFSET_FILL', `?GL_POLYGON_OFFSET_LINE', or `?GL_POLYGON_OFFSET_POINT'
%% is enabled, each fragment's `depth' value will be offset after it is interpolated
%% from the `depth' values of the appropriate vertices. The value of the offset is
%% factor×DZ+r×units, where DZ is a measurement of the change in depth relative to the
%% screen area of the polygon, and r is the smallest value that is guaranteed to produce
%% a resolvable offset for a given implementation. The offset is added before the depth test
%% is performed and before the value is written into the depth buffer.
%%
%% See external documentation.
-spec polygonOffset(Factor, Units) -> 'ok' when Factor :: float(),Units :: float().
polygonOffset(Factor,Units) ->
cast(5051, <>).
%% @doc Set the polygon stippling pattern
%%
%% Polygon stippling, like line stippling (see {@link gl:lineStipple/2} ), masks out certain
%% fragments produced by rasterization, creating a pattern. Stippling is independent of polygon
%% antialiasing.
%%
%% See external documentation.
-spec polygonStipple(Mask) -> 'ok' when Mask :: binary().
polygonStipple(Mask) ->
send_bin(Mask),
cast(5052, <<>>).
%% @doc Return the polygon stipple pattern
%%
%% ``gl:getPolygonStipple'' returns to `Pattern' a 32×32 polygon stipple pattern.
%% The pattern is packed into memory as if {@link gl:readPixels/7} with both `height'
%% and `width' of 32, `type' of `?GL_BITMAP', and `format' of `?GL_COLOR_INDEX'
%% were called, and the stipple pattern were stored in an internal 32×32 color index buffer.
%% Unlike {@link gl:readPixels/7} , however, pixel transfer operations (shift, offset, pixel
%% map) are not applied to the returned stipple image.
%%
%% See external documentation.
-spec getPolygonStipple() -> binary().
getPolygonStipple() ->
call(5053, <<>>).
%% @doc Flag edges as either boundary or nonboundary
%%
%% Each vertex of a polygon, separate triangle, or separate quadrilateral specified between
%% a {@link gl:'begin'/1} / {@link gl:'begin'/1} pair is marked as the start of either a boundary or
%% nonboundary edge. If the current edge flag is true when the vertex is specified, the vertex
%% is marked as the start of a boundary edge. Otherwise, the vertex is marked as the start
%% of a nonboundary edge. ``gl:edgeFlag'' sets the edge flag bit to `?GL_TRUE' if `Flag'
%% is `?GL_TRUE' and to `?GL_FALSE' otherwise.
%%
%% See external documentation.
-spec edgeFlag(Flag) -> 'ok' when Flag :: 0|1.
edgeFlag(Flag) ->
cast(5054, <>).
%% @equiv edgeFlag(Flag)
-spec edgeFlagv(Flag) -> 'ok' when Flag :: {Flag :: 0|1}.
edgeFlagv({Flag}) -> edgeFlag(Flag).
%% @doc Define the scissor box
%%
%% ``gl:scissor'' defines a rectangle, called the scissor box, in window coordinates. The
%% first two arguments, `X' and `Y' , specify the lower left corner of the box. `Width'
%% and `Height' specify the width and height of the box.
%%
%% See external documentation.
-spec scissor(X, Y, Width, Height) -> 'ok' when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
scissor(X,Y,Width,Height) ->
cast(5055, <>).
%% @doc Specify a plane against which all geometry is clipped
%%
%% Geometry is always clipped against the boundaries of a six-plane frustum in `x', `y'
%% , and `z'. ``gl:clipPlane'' allows the specification of additional planes, not
%% necessarily perpendicular to the `x', `y', or `z' axis, against which all
%% geometry is clipped. To determine the maximum number of additional clipping planes, call {@link gl:getBooleanv/1}
%% with argument `?GL_MAX_CLIP_PLANES'. All implementations support at least six such
%% clipping planes. Because the resulting clipping region is the intersection of the defined
%% half-spaces, it is always convex.
%%
%% See external documentation.
-spec clipPlane(Plane, Equation) -> 'ok' when Plane :: enum(),Equation :: {float(),float(),float(),float()}.
clipPlane(Plane,{E1,E2,E3,E4}) ->
cast(5056, <>).
%% @doc Return the coefficients of the specified clipping plane
%%
%% ``gl:getClipPlane'' returns in `Equation' the four coefficients of the plane equation
%% for `Plane' .
%%
%% See external documentation.
-spec getClipPlane(Plane) -> {float(),float(),float(),float()} when Plane :: enum().
getClipPlane(Plane) ->
call(5057, <>).
%% @doc Specify which color buffers are to be drawn into
%%
%% When colors are written to the frame buffer, they are written into the color buffers
%% specified by ``gl:drawBuffer''. The specifications are as follows:
%%
%% See external documentation.
-spec drawBuffer(Mode) -> 'ok' when Mode :: enum().
drawBuffer(Mode) ->
cast(5058, <>).
%% @doc Select a color buffer source for pixels
%%
%% ``gl:readBuffer'' specifies a color buffer as the source for subsequent {@link gl:readPixels/7}
%% , {@link gl:copyTexImage1D/7} , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8}
%% , and {@link gl:copyTexSubImage3D/9} commands. `Mode' accepts one of twelve or more
%% predefined values. In a fully configured system, `?GL_FRONT', `?GL_LEFT', and `?GL_FRONT_LEFT'
%% all name the front left buffer, `?GL_FRONT_RIGHT' and `?GL_RIGHT' name the
%% front right buffer, and `?GL_BACK_LEFT' and `?GL_BACK' name the back left buffer.
%% Further more, the constants `?GL_COLOR_ATTACHMENT'`i' may be used to indicate
%% the `i'th color attachment where `i' ranges from zero to the value of `?GL_MAX_COLOR_ATTACHMENTS'
%% minus one.
%%
%% See external documentation.
-spec readBuffer(Mode) -> 'ok' when Mode :: enum().
readBuffer(Mode) ->
cast(5059, <>).
%% @doc Enable or disable server-side GL capabilities
%%
%% ``gl:enable'' and {@link gl:enable/1} enable and disable various capabilities. Use {@link gl:isEnabled/1}
%% or {@link gl:getBooleanv/1} to determine the current setting of any capability. The initial value
%% for each capability with the exception of `?GL_DITHER' and `?GL_MULTISAMPLE'
%% is `?GL_FALSE'. The initial value for `?GL_DITHER' and `?GL_MULTISAMPLE'
%% is `?GL_TRUE'.
%%
%% See external documentation.
-spec enable(Cap) -> 'ok' when Cap :: enum().
enable(Cap) ->
cast(5060, <>).
%% @doc
%% See {@link enable/1}
-spec disable(Cap) -> 'ok' when Cap :: enum().
disable(Cap) ->
cast(5061, <>).
%% @doc Test whether a capability is enabled
%%
%% ``gl:isEnabled'' returns `?GL_TRUE' if `Cap' is an enabled capability and
%% returns `?GL_FALSE' otherwise. Boolean states that are indexed may be tested with ``gl:isEnabledi''
%% . For ``gl:isEnabledi'', `Index' specifies the index of the capability to test. `Index'
%% must be between zero and the count of indexed capabilities for `Cap' . Initially
%% all capabilities except `?GL_DITHER' are disabled; `?GL_DITHER' is initially
%% enabled.
%%
%% See external documentation.
-spec isEnabled(Cap) -> 0|1 when Cap :: enum().
isEnabled(Cap) ->
call(5062, <>).
%% @doc Enable or disable client-side capability
%%
%% ``gl:enableClientState'' and {@link gl:enableClientState/1} enable or disable individual
%% client-side capabilities. By default, all client-side capabilities are disabled. Both ``gl:enableClientState''
%% and {@link gl:enableClientState/1} take a single argument, `Cap' , which can assume
%% one of the following values:
%%
%% See external documentation.
-spec enableClientState(Cap) -> 'ok' when Cap :: enum().
enableClientState(Cap) ->
cast(5063, <>).
%% @doc
%% See {@link enableClientState/1}
-spec disableClientState(Cap) -> 'ok' when Cap :: enum().
disableClientState(Cap) ->
cast(5064, <>).
%% @doc Return the value or values of a selected parameter
%%
%% These four commands return values for simple state variables in GL. `Pname' is a
%% symbolic constant indicating the state variable to be returned, and `Params' is a
%% pointer to an array of the indicated type in which to place the returned data.
%%
%% See external documentation.
-spec getBooleanv(Pname) -> [0|1] when Pname :: enum().
getBooleanv(Pname) ->
call(5065, <>).
%% @doc
%% See {@link getBooleanv/1}
-spec getDoublev(Pname) -> [float()] when Pname :: enum().
getDoublev(Pname) ->
call(5066, <>).
%% @doc
%% See {@link getBooleanv/1}
-spec getFloatv(Pname) -> [float()] when Pname :: enum().
getFloatv(Pname) ->
call(5067, <>).
%% @doc
%% See {@link getBooleanv/1}
-spec getIntegerv(Pname) -> [integer()] when Pname :: enum().
getIntegerv(Pname) ->
call(5068, <>).
%% @doc Push and pop the server attribute stack
%%
%% ``gl:pushAttrib'' takes one argument, a mask that indicates which groups of state variables
%% to save on the attribute stack. Symbolic constants are used to set bits in the mask. `Mask'
%% is typically constructed by specifying the bitwise-or of several of these constants
%% together. The special mask `?GL_ALL_ATTRIB_BITS' can be used to save all stackable
%% states.
%%
%% See external documentation.
-spec pushAttrib(Mask) -> 'ok' when Mask :: integer().
pushAttrib(Mask) ->
cast(5069, <>).
%% @doc
%% See {@link pushAttrib/1}
-spec popAttrib() -> 'ok'.
popAttrib() ->
cast(5070, <<>>).
%% @doc Push and pop the client attribute stack
%%
%% ``gl:pushClientAttrib'' takes one argument, a mask that indicates which groups of client-state
%% variables to save on the client attribute stack. Symbolic constants are used to set bits
%% in the mask. `Mask' is typically constructed by specifying the bitwise-or of several
%% of these constants together. The special mask `?GL_CLIENT_ALL_ATTRIB_BITS' can
%% be used to save all stackable client state.
%%
%% See external documentation.
-spec pushClientAttrib(Mask) -> 'ok' when Mask :: integer().
pushClientAttrib(Mask) ->
cast(5071, <>).
%% @doc
%% See {@link pushClientAttrib/1}
-spec popClientAttrib() -> 'ok'.
popClientAttrib() ->
cast(5072, <<>>).
%% @doc Set rasterization mode
%%
%% ``gl:renderMode'' sets the rasterization mode. It takes one argument, `Mode' , which
%% can assume one of three predefined values:
%%
%% See external documentation.
-spec renderMode(Mode) -> integer() when Mode :: enum().
renderMode(Mode) ->
call(5073, <>).
%% @doc Return error information
%%
%% ``gl:getError'' returns the value of the error flag. Each detectable error is assigned
%% a numeric code and symbolic name. When an error occurs, the error flag is set to the appropriate
%% error code value. No other errors are recorded until ``gl:getError'' is called, the
%% error code is returned, and the flag is reset to `?GL_NO_ERROR'. If a call to ``gl:getError''
%% returns `?GL_NO_ERROR', there has been no detectable error since the last call to ``gl:getError''
%% , or since the GL was initialized.
%%
%% See external documentation.
-spec getError() -> enum().
getError() ->
call(5074, <<>>).
%% @doc Return a string describing the current GL connection
%%
%% ``gl:getString'' returns a pointer to a static string describing some aspect of the
%% current GL connection. `Name' can be one of the following:
%%
%% See external documentation.
-spec getString(Name) -> string() when Name :: enum().
getString(Name) ->
call(5075, <>).
%% @doc Block until all GL execution is complete
%%
%% ``gl:finish'' does not return until the effects of all previously called GL commands
%% are complete. Such effects include all changes to GL state, all changes to connection
%% state, and all changes to the frame buffer contents.
%%
%% See external documentation.
-spec finish() -> 'ok'.
finish() ->
cast(5076, <<>>).
%% @doc Force execution of GL commands in finite time
%%
%% Different GL implementations buffer commands in several different locations, including
%% network buffers and the graphics accelerator itself. ``gl:flush'' empties all of these
%% buffers, causing all issued commands to be executed as quickly as they are accepted by
%% the actual rendering engine. Though this execution may not be completed in any particular
%% time period, it does complete in finite time.
%%
%% See external documentation.
-spec flush() -> 'ok'.
flush() ->
cast(5077, <<>>).
%% @doc Specify implementation-specific hints
%%
%% Certain aspects of GL behavior, when there is room for interpretation, can be controlled
%% with hints. A hint is specified with two arguments. `Target' is a symbolic constant
%% indicating the behavior to be controlled, and `Mode' is another symbolic constant
%% indicating the desired behavior. The initial value for each `Target' is `?GL_DONT_CARE'
%% . `Mode' can be one of the following:
%%
%% See external documentation.
-spec hint(Target, Mode) -> 'ok' when Target :: enum(),Mode :: enum().
hint(Target,Mode) ->
cast(5078, <>).
%% @doc Specify the clear value for the depth buffer
%%
%% ``gl:clearDepth'' specifies the depth value used by {@link gl:clear/1} to clear the depth
%% buffer. Values specified by ``gl:clearDepth'' are clamped to the range [0 1].
%%
%% See external documentation.
-spec clearDepth(Depth) -> 'ok' when Depth :: clamp().
clearDepth(Depth) ->
cast(5079, <>).
%% @doc Specify the value used for depth buffer comparisons
%%
%% ``gl:depthFunc'' specifies the function used to compare each incoming pixel depth value
%% with the depth value present in the depth buffer. The comparison is performed only if
%% depth testing is enabled. (See {@link gl:enable/1} and {@link gl:enable/1} of `?GL_DEPTH_TEST'
%% .)
%%
%% See external documentation.
-spec depthFunc(Func) -> 'ok' when Func :: enum().
depthFunc(Func) ->
cast(5080, <>).
%% @doc Enable or disable writing into the depth buffer
%%
%% ``gl:depthMask'' specifies whether the depth buffer is enabled for writing. If `Flag'
%% is `?GL_FALSE', depth buffer writing is disabled. Otherwise, it is enabled. Initially,
%% depth buffer writing is enabled.
%%
%% See external documentation.
-spec depthMask(Flag) -> 'ok' when Flag :: 0|1.
depthMask(Flag) ->
cast(5081, <>).
%% @doc Specify mapping of depth values from normalized device coordinates to window coordinates
%%
%% After clipping and division by `w', depth coordinates range from -1 to 1, corresponding
%% to the near and far clipping planes. ``gl:depthRange'' specifies a linear mapping of
%% the normalized depth coordinates in this range to window depth coordinates. Regardless
%% of the actual depth buffer implementation, window coordinate depth values are treated
%% as though they range from 0 through 1 (like color components). Thus, the values accepted
%% by ``gl:depthRange'' are both clamped to this range before they are accepted.
%%
%% See external documentation.
-spec depthRange(Near_val, Far_val) -> 'ok' when Near_val :: clamp(),Far_val :: clamp().
depthRange(Near_val,Far_val) ->
cast(5082, <>).
%% @doc Specify clear values for the accumulation buffer
%%
%% ``gl:clearAccum'' specifies the red, green, blue, and alpha values used by {@link gl:clear/1}
%% to clear the accumulation buffer.
%%
%% See external documentation.
-spec clearAccum(Red, Green, Blue, Alpha) -> 'ok' when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
clearAccum(Red,Green,Blue,Alpha) ->
cast(5083, <>).
%% @doc Operate on the accumulation buffer
%%
%% The accumulation buffer is an extended-range color buffer. Images are not rendered into
%% it. Rather, images rendered into one of the color buffers are added to the contents of
%% the accumulation buffer after rendering. Effects such as antialiasing (of points, lines,
%% and polygons), motion blur, and depth of field can be created by accumulating images generated
%% with different transformation matrices.
%%
%% See external documentation.
-spec accum(Op, Value) -> 'ok' when Op :: enum(),Value :: float().
accum(Op,Value) ->
cast(5084, <>).
%% @doc Specify which matrix is the current matrix
%%
%% ``gl:matrixMode'' sets the current matrix mode. `Mode' can assume one of four values:
%%
%%
%% See external documentation.
-spec matrixMode(Mode) -> 'ok' when Mode :: enum().
matrixMode(Mode) ->
cast(5085, <>).
%% @doc Multiply the current matrix with an orthographic matrix
%%
%% ``gl:ortho'' describes a transformation that produces a parallel projection. The current
%% matrix (see {@link gl:matrixMode/1} ) is multiplied by this matrix and the result replaces
%% the current matrix, as if {@link gl:multMatrixd/1} were called with the following matrix
%% as its argument:
%%
%% See external documentation.
-spec ortho(Left, Right, Bottom, Top, Near_val, Far_val) -> 'ok' when Left :: float(),Right :: float(),Bottom :: float(),Top :: float(),Near_val :: float(),Far_val :: float().
ortho(Left,Right,Bottom,Top,Near_val,Far_val) ->
cast(5086, <>).
%% @doc Multiply the current matrix by a perspective matrix
%%
%% ``gl:frustum'' describes a perspective matrix that produces a perspective projection.
%% The current matrix (see {@link gl:matrixMode/1} ) is multiplied by this matrix and the result
%% replaces the current matrix, as if {@link gl:multMatrixd/1} were called with the following
%% matrix as its argument:
%%
%% See external documentation.
-spec frustum(Left, Right, Bottom, Top, Near_val, Far_val) -> 'ok' when Left :: float(),Right :: float(),Bottom :: float(),Top :: float(),Near_val :: float(),Far_val :: float().
frustum(Left,Right,Bottom,Top,Near_val,Far_val) ->
cast(5087, <>).
%% @doc Set the viewport
%%
%% ``gl:viewport'' specifies the affine transformation of x and y from normalized device
%% coordinates to window coordinates. Let (x nd y nd) be normalized device coordinates. Then the window
%% coordinates (x w y w) are computed as follows:
%%
%% See external documentation.
-spec viewport(X, Y, Width, Height) -> 'ok' when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
viewport(X,Y,Width,Height) ->
cast(5088, <>).
%% @doc Push and pop the current matrix stack
%%
%% There is a stack of matrices for each of the matrix modes. In `?GL_MODELVIEW' mode,
%% the stack depth is at least 32. In the other modes, `?GL_COLOR', `?GL_PROJECTION'
%% , and `?GL_TEXTURE', the depth is at least 2. The current matrix in any mode is the
%% matrix on the top of the stack for that mode.
%%
%% See external documentation.
-spec pushMatrix() -> 'ok'.
pushMatrix() ->
cast(5089, <<>>).
%% @doc
%% See {@link pushMatrix/0}
-spec popMatrix() -> 'ok'.
popMatrix() ->
cast(5090, <<>>).
%% @doc Replace the current matrix with the identity matrix
%%
%% ``gl:loadIdentity'' replaces the current matrix with the identity matrix. It is semantically
%% equivalent to calling {@link gl:loadMatrixd/1} with the identity matrix
%%
%% See external documentation.
-spec loadIdentity() -> 'ok'.
loadIdentity() ->
cast(5091, <<>>).
%% @doc Replace the current matrix with the specified matrix
%%
%% ``gl:loadMatrix'' replaces the current matrix with the one whose elements are specified
%% by `M' . The current matrix is the projection matrix, modelview matrix, or texture
%% matrix, depending on the current matrix mode (see {@link gl:matrixMode/1} ).
%%
%% See external documentation.
-spec loadMatrixd(M) -> 'ok' when M :: matrix().
loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5092, <>);
loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5092, <>).
%% @doc
%% See {@link loadMatrixd/1}
-spec loadMatrixf(M) -> 'ok' when M :: matrix().
loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5093, <>);
loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5093, <>).
%% @doc Multiply the current matrix with the specified matrix
%%
%% ``gl:multMatrix'' multiplies the current matrix with the one specified using `M' ,
%% and replaces the current matrix with the product.
%%
%% See external documentation.
-spec multMatrixd(M) -> 'ok' when M :: matrix().
multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5094, <>);
multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5094, <>).
%% @doc
%% See {@link multMatrixd/1}
-spec multMatrixf(M) -> 'ok' when M :: matrix().
multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) ->
cast(5095, <>);
multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) ->
cast(5095, <>).
%% @doc Multiply the current matrix by a rotation matrix
%%
%% ``gl:rotate'' produces a rotation of `Angle' degrees around the vector (x y z). The current
%% matrix (see {@link gl:matrixMode/1} ) is multiplied by a rotation matrix with the product
%% replacing the current matrix, as if {@link gl:multMatrixd/1} were called with the following
%% matrix as its argument:
%%
%% See external documentation.
-spec rotated(Angle, X, Y, Z) -> 'ok' when Angle :: float(),X :: float(),Y :: float(),Z :: float().
rotated(Angle,X,Y,Z) ->
cast(5096, <>).
%% @doc
%% See {@link rotated/4}
-spec rotatef(Angle, X, Y, Z) -> 'ok' when Angle :: float(),X :: float(),Y :: float(),Z :: float().
rotatef(Angle,X,Y,Z) ->
cast(5097, <>).
%% @doc Multiply the current matrix by a general scaling matrix
%%
%% ``gl:scale'' produces a nonuniform scaling along the `x', `y', and `z'
%% axes. The three parameters indicate the desired scale factor along each of the three axes.
%%
%%
%% See external documentation.
-spec scaled(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
scaled(X,Y,Z) ->
cast(5098, <>).
%% @doc
%% See {@link scaled/3}
-spec scalef(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
scalef(X,Y,Z) ->
cast(5099, <>).
%% @doc Multiply the current matrix by a translation matrix
%%
%% ``gl:translate'' produces a translation by (x y z). The current matrix (see {@link gl:matrixMode/1}
%% ) is multiplied by this translation matrix, with the product replacing the current matrix,
%% as if {@link gl:multMatrixd/1} were called with the following matrix for its argument:
%%
%% See external documentation.
-spec translated(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
translated(X,Y,Z) ->
cast(5100, <>).
%% @doc
%% See {@link translated/3}
-spec translatef(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
translatef(X,Y,Z) ->
cast(5101, <>).
%% @doc Determine if a name corresponds to a display list
%%
%% ``gl:isList'' returns `?GL_TRUE' if `List' is the name of a display list and
%% returns `?GL_FALSE' if it is not, or if an error occurs.
%%
%% See external documentation.
-spec isList(List) -> 0|1 when List :: integer().
isList(List) ->
call(5102, <>).
%% @doc Delete a contiguous group of display lists
%%
%% ``gl:deleteLists'' causes a contiguous group of display lists to be deleted. `List'
%% is the name of the first display list to be deleted, and `Range' is the number of
%% display lists to delete. All display lists d with list<= d<= list+range-1 are
%% deleted.
%%
%% See external documentation.
-spec deleteLists(List, Range) -> 'ok' when List :: integer(),Range :: integer().
deleteLists(List,Range) ->
cast(5103, <>).
%% @doc Generate a contiguous set of empty display lists
%%
%% ``gl:genLists'' has one argument, `Range' . It returns an integer `n' such
%% that `Range' contiguous empty display lists, named n, n+1, ..., n+range-1,
%% are created. If `Range' is 0, if there is no group of `Range' contiguous names
%% available, or if any error is generated, no display lists are generated, and 0 is returned.
%%
%%
%% See external documentation.
-spec genLists(Range) -> integer() when Range :: integer().
genLists(Range) ->
call(5104, <>).
%% @doc Create or replace a display list
%%
%% Display lists are groups of GL commands that have been stored for subsequent execution.
%% Display lists are created with ``gl:newList''. All subsequent commands are placed in
%% the display list, in the order issued, until {@link gl:endList/0} is called.
%%
%% See external documentation.
-spec newList(List, Mode) -> 'ok' when List :: integer(),Mode :: enum().
newList(List,Mode) ->
cast(5105, <>).
%% @doc glBeginList
%%
%% See external documentation.
-spec endList() -> 'ok'.
endList() ->
cast(5106, <<>>).
%% @doc Execute a display list
%%
%% ``gl:callList'' causes the named display list to be executed. The commands saved in
%% the display list are executed in order, just as if they were called without using a display
%% list. If `List' has not been defined as a display list, ``gl:callList'' is ignored.
%%
%%
%% See external documentation.
-spec callList(List) -> 'ok' when List :: integer().
callList(List) ->
cast(5107, <>).
%% @doc Execute a list of display lists
%%
%% ``gl:callLists'' causes each display list in the list of names passed as `Lists'
%% to be executed. As a result, the commands saved in each display list are executed in order,
%% just as if they were called without using a display list. Names of display lists that
%% have not been defined are ignored.
%%
%% See external documentation.
-spec callLists(Lists) -> 'ok' when Lists :: [integer()].
callLists(Lists) ->
ListsLen = length(Lists),
cast(5108, <> || C <- Lists>>)/binary,0:(((1+ListsLen) rem 2)*32)>>).
%% @doc set the display-list base for
%%
%% {@link gl:callLists/1}
%%
%% {@link gl:callLists/1} specifies an array of offsets. Display-list names are generated
%% by adding `Base' to each offset. Names that reference valid display lists are executed;
%% the others are ignored.
%%
%% See external documentation.
-spec listBase(Base) -> 'ok' when Base :: integer().
listBase(Base) ->
cast(5109, <>).
%% @doc Delimit the vertices of a primitive or a group of like primitives
%%
%% ``gl:'begin''' and {@link gl:'begin'/1} delimit the vertices that define a primitive or a group
%% of like primitives. ``gl:'begin''' accepts a single argument that specifies in which of
%% ten ways the vertices are interpreted. Taking n as an integer count starting at one,
%% and N as the total number of vertices specified, the interpretations are as follows:
%%
%% See external documentation.
-spec 'begin'(Mode) -> 'ok' when Mode :: enum().
'begin'(Mode) ->
cast(5110, <>).
%% @doc
%% See {@link 'begin'/1}
-spec 'end'() -> 'ok'.
'end'() ->
cast(5111, <<>>).
%% @doc Specify a vertex
%%
%% ``gl:vertex'' commands are used within {@link gl:'begin'/1} / {@link gl:'begin'/1} pairs to specify
%% point, line, and polygon vertices. The current color, normal, texture coordinates, and
%% fog coordinate are associated with the vertex when ``gl:vertex'' is called.
%%
%% See external documentation.
-spec vertex2d(X, Y) -> 'ok' when X :: float(),Y :: float().
vertex2d(X,Y) ->
cast(5112, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex2f(X, Y) -> 'ok' when X :: float(),Y :: float().
vertex2f(X,Y) ->
cast(5113, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex2i(X, Y) -> 'ok' when X :: integer(),Y :: integer().
vertex2i(X,Y) ->
cast(5114, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex2s(X, Y) -> 'ok' when X :: integer(),Y :: integer().
vertex2s(X,Y) ->
cast(5115, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex3d(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
vertex3d(X,Y,Z) ->
cast(5116, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex3f(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
vertex3f(X,Y,Z) ->
cast(5117, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex3i(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
vertex3i(X,Y,Z) ->
cast(5118, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex3s(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
vertex3s(X,Y,Z) ->
cast(5119, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex4d(X, Y, Z, W) -> 'ok' when X :: float(),Y :: float(),Z :: float(),W :: float().
vertex4d(X,Y,Z,W) ->
cast(5120, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex4f(X, Y, Z, W) -> 'ok' when X :: float(),Y :: float(),Z :: float(),W :: float().
vertex4f(X,Y,Z,W) ->
cast(5121, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex4i(X, Y, Z, W) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertex4i(X,Y,Z,W) ->
cast(5122, <>).
%% @doc
%% See {@link vertex2d/2}
-spec vertex4s(X, Y, Z, W) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
vertex4s(X,Y,Z,W) ->
cast(5123, <>).
%% @equiv vertex2d(X,Y)
-spec vertex2dv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
vertex2dv({X,Y}) -> vertex2d(X,Y).
%% @equiv vertex2f(X,Y)
-spec vertex2fv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
vertex2fv({X,Y}) -> vertex2f(X,Y).
%% @equiv vertex2i(X,Y)
-spec vertex2iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
vertex2iv({X,Y}) -> vertex2i(X,Y).
%% @equiv vertex2s(X,Y)
-spec vertex2sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
vertex2sv({X,Y}) -> vertex2s(X,Y).
%% @equiv vertex3d(X,Y,Z)
-spec vertex3dv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
vertex3dv({X,Y,Z}) -> vertex3d(X,Y,Z).
%% @equiv vertex3f(X,Y,Z)
-spec vertex3fv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
vertex3fv({X,Y,Z}) -> vertex3f(X,Y,Z).
%% @equiv vertex3i(X,Y,Z)
-spec vertex3iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertex3iv({X,Y,Z}) -> vertex3i(X,Y,Z).
%% @equiv vertex3s(X,Y,Z)
-spec vertex3sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
vertex3sv({X,Y,Z}) -> vertex3s(X,Y,Z).
%% @equiv vertex4d(X,Y,Z,W)
-spec vertex4dv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertex4dv({X,Y,Z,W}) -> vertex4d(X,Y,Z,W).
%% @equiv vertex4f(X,Y,Z,W)
-spec vertex4fv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
vertex4fv({X,Y,Z,W}) -> vertex4f(X,Y,Z,W).
%% @equiv vertex4i(X,Y,Z,W)
-spec vertex4iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertex4iv({X,Y,Z,W}) -> vertex4i(X,Y,Z,W).
%% @equiv vertex4s(X,Y,Z,W)
-spec vertex4sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
vertex4sv({X,Y,Z,W}) -> vertex4s(X,Y,Z,W).
%% @doc Set the current normal vector
%%
%% The current normal is set to the given coordinates whenever ``gl:normal'' is issued.
%% Byte, short, or integer arguments are converted to floating-point format with a linear
%% mapping that maps the most positive representable integer value to 1.0 and the most negative
%% representable integer value to -1.0.
%%
%% See external documentation.
-spec normal3b(Nx, Ny, Nz) -> 'ok' when Nx :: integer(),Ny :: integer(),Nz :: integer().
normal3b(Nx,Ny,Nz) ->
cast(5124, <>).
%% @doc
%% See {@link normal3b/3}
-spec normal3d(Nx, Ny, Nz) -> 'ok' when Nx :: float(),Ny :: float(),Nz :: float().
normal3d(Nx,Ny,Nz) ->
cast(5125, <>).
%% @doc
%% See {@link normal3b/3}
-spec normal3f(Nx, Ny, Nz) -> 'ok' when Nx :: float(),Ny :: float(),Nz :: float().
normal3f(Nx,Ny,Nz) ->
cast(5126, <>).
%% @doc
%% See {@link normal3b/3}
-spec normal3i(Nx, Ny, Nz) -> 'ok' when Nx :: integer(),Ny :: integer(),Nz :: integer().
normal3i(Nx,Ny,Nz) ->
cast(5127, <>).
%% @doc
%% See {@link normal3b/3}
-spec normal3s(Nx, Ny, Nz) -> 'ok' when Nx :: integer(),Ny :: integer(),Nz :: integer().
normal3s(Nx,Ny,Nz) ->
cast(5128, <>).
%% @equiv normal3b(Nx,Ny,Nz)
-spec normal3bv(V) -> 'ok' when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
normal3bv({Nx,Ny,Nz}) -> normal3b(Nx,Ny,Nz).
%% @equiv normal3d(Nx,Ny,Nz)
-spec normal3dv(V) -> 'ok' when V :: {Nx :: float(),Ny :: float(),Nz :: float()}.
normal3dv({Nx,Ny,Nz}) -> normal3d(Nx,Ny,Nz).
%% @equiv normal3f(Nx,Ny,Nz)
-spec normal3fv(V) -> 'ok' when V :: {Nx :: float(),Ny :: float(),Nz :: float()}.
normal3fv({Nx,Ny,Nz}) -> normal3f(Nx,Ny,Nz).
%% @equiv normal3i(Nx,Ny,Nz)
-spec normal3iv(V) -> 'ok' when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
normal3iv({Nx,Ny,Nz}) -> normal3i(Nx,Ny,Nz).
%% @equiv normal3s(Nx,Ny,Nz)
-spec normal3sv(V) -> 'ok' when V :: {Nx :: integer(),Ny :: integer(),Nz :: integer()}.
normal3sv({Nx,Ny,Nz}) -> normal3s(Nx,Ny,Nz).
%% @doc Set the current color index
%%
%% ``gl:index'' updates the current (single-valued) color index. It takes one argument,
%% the new value for the current color index.
%%
%% See external documentation.
-spec indexd(C) -> 'ok' when C :: float().
indexd(C) ->
cast(5129, <>).
%% @doc
%% See {@link indexd/1}
-spec indexf(C) -> 'ok' when C :: float().
indexf(C) ->
cast(5130, <>).
%% @doc
%% See {@link indexd/1}
-spec indexi(C) -> 'ok' when C :: integer().
indexi(C) ->
cast(5131, <>).
%% @doc
%% See {@link indexd/1}
-spec indexs(C) -> 'ok' when C :: integer().
indexs(C) ->
cast(5132, <>).
%% @doc
%% See {@link indexd/1}
-spec indexub(C) -> 'ok' when C :: integer().
indexub(C) ->
cast(5133, <>).
%% @equiv indexd(C)
-spec indexdv(C) -> 'ok' when C :: {C :: float()}.
indexdv({C}) -> indexd(C).
%% @equiv indexf(C)
-spec indexfv(C) -> 'ok' when C :: {C :: float()}.
indexfv({C}) -> indexf(C).
%% @equiv indexi(C)
-spec indexiv(C) -> 'ok' when C :: {C :: integer()}.
indexiv({C}) -> indexi(C).
%% @equiv indexs(C)
-spec indexsv(C) -> 'ok' when C :: {C :: integer()}.
indexsv({C}) -> indexs(C).
%% @equiv indexub(C)
-spec indexubv(C) -> 'ok' when C :: {C :: integer()}.
indexubv({C}) -> indexub(C).
%% @doc Set the current color
%%
%% The GL stores both a current single-valued color index and a current four-valued RGBA
%% color. ``gl:color'' sets a new four-valued RGBA color. ``gl:color'' has two major
%% variants: ``gl:color3'' and ``gl:color4''. ``gl:color3'' variants specify new red,
%% green, and blue values explicitly and set the current alpha value to 1.0 (full intensity)
%% implicitly. ``gl:color4'' variants specify all four color components explicitly.
%%
%% See external documentation.
-spec color3b(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3b(Red,Green,Blue) ->
cast(5134, <>).
%% @doc
%% See {@link color3b/3}
-spec color3d(Red, Green, Blue) -> 'ok' when Red :: float(),Green :: float(),Blue :: float().
color3d(Red,Green,Blue) ->
cast(5135, <>).
%% @doc
%% See {@link color3b/3}
-spec color3f(Red, Green, Blue) -> 'ok' when Red :: float(),Green :: float(),Blue :: float().
color3f(Red,Green,Blue) ->
cast(5136, <>).
%% @doc
%% See {@link color3b/3}
-spec color3i(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3i(Red,Green,Blue) ->
cast(5137, <>).
%% @doc
%% See {@link color3b/3}
-spec color3s(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3s(Red,Green,Blue) ->
cast(5138, <>).
%% @doc
%% See {@link color3b/3}
-spec color3ub(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3ub(Red,Green,Blue) ->
cast(5139, <>).
%% @doc
%% See {@link color3b/3}
-spec color3ui(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3ui(Red,Green,Blue) ->
cast(5140, <>).
%% @doc
%% See {@link color3b/3}
-spec color3us(Red, Green, Blue) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer().
color3us(Red,Green,Blue) ->
cast(5141, <>).
%% @doc
%% See {@link color3b/3}
-spec color4b(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4b(Red,Green,Blue,Alpha) ->
cast(5142, <>).
%% @doc
%% See {@link color3b/3}
-spec color4d(Red, Green, Blue, Alpha) -> 'ok' when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
color4d(Red,Green,Blue,Alpha) ->
cast(5143, <>).
%% @doc
%% See {@link color3b/3}
-spec color4f(Red, Green, Blue, Alpha) -> 'ok' when Red :: float(),Green :: float(),Blue :: float(),Alpha :: float().
color4f(Red,Green,Blue,Alpha) ->
cast(5144, <>).
%% @doc
%% See {@link color3b/3}
-spec color4i(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4i(Red,Green,Blue,Alpha) ->
cast(5145, <>).
%% @doc
%% See {@link color3b/3}
-spec color4s(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4s(Red,Green,Blue,Alpha) ->
cast(5146, <>).
%% @doc
%% See {@link color3b/3}
-spec color4ub(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4ub(Red,Green,Blue,Alpha) ->
cast(5147, <>).
%% @doc
%% See {@link color3b/3}
-spec color4ui(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4ui(Red,Green,Blue,Alpha) ->
cast(5148, <>).
%% @doc
%% See {@link color3b/3}
-spec color4us(Red, Green, Blue, Alpha) -> 'ok' when Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer().
color4us(Red,Green,Blue,Alpha) ->
cast(5149, <>).
%% @equiv color3b(Red,Green,Blue)
-spec color3bv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3bv({Red,Green,Blue}) -> color3b(Red,Green,Blue).
%% @equiv color3d(Red,Green,Blue)
-spec color3dv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float()}.
color3dv({Red,Green,Blue}) -> color3d(Red,Green,Blue).
%% @equiv color3f(Red,Green,Blue)
-spec color3fv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float()}.
color3fv({Red,Green,Blue}) -> color3f(Red,Green,Blue).
%% @equiv color3i(Red,Green,Blue)
-spec color3iv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3iv({Red,Green,Blue}) -> color3i(Red,Green,Blue).
%% @equiv color3s(Red,Green,Blue)
-spec color3sv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3sv({Red,Green,Blue}) -> color3s(Red,Green,Blue).
%% @equiv color3ub(Red,Green,Blue)
-spec color3ubv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3ubv({Red,Green,Blue}) -> color3ub(Red,Green,Blue).
%% @equiv color3ui(Red,Green,Blue)
-spec color3uiv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3uiv({Red,Green,Blue}) -> color3ui(Red,Green,Blue).
%% @equiv color3us(Red,Green,Blue)
-spec color3usv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}.
color3usv({Red,Green,Blue}) -> color3us(Red,Green,Blue).
%% @equiv color4b(Red,Green,Blue,Alpha)
-spec color4bv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4bv({Red,Green,Blue,Alpha}) -> color4b(Red,Green,Blue,Alpha).
%% @equiv color4d(Red,Green,Blue,Alpha)
-spec color4dv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float(),Alpha :: float()}.
color4dv({Red,Green,Blue,Alpha}) -> color4d(Red,Green,Blue,Alpha).
%% @equiv color4f(Red,Green,Blue,Alpha)
-spec color4fv(V) -> 'ok' when V :: {Red :: float(),Green :: float(),Blue :: float(),Alpha :: float()}.
color4fv({Red,Green,Blue,Alpha}) -> color4f(Red,Green,Blue,Alpha).
%% @equiv color4i(Red,Green,Blue,Alpha)
-spec color4iv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4iv({Red,Green,Blue,Alpha}) -> color4i(Red,Green,Blue,Alpha).
%% @equiv color4s(Red,Green,Blue,Alpha)
-spec color4sv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4sv({Red,Green,Blue,Alpha}) -> color4s(Red,Green,Blue,Alpha).
%% @equiv color4ub(Red,Green,Blue,Alpha)
-spec color4ubv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4ubv({Red,Green,Blue,Alpha}) -> color4ub(Red,Green,Blue,Alpha).
%% @equiv color4ui(Red,Green,Blue,Alpha)
-spec color4uiv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4uiv({Red,Green,Blue,Alpha}) -> color4ui(Red,Green,Blue,Alpha).
%% @equiv color4us(Red,Green,Blue,Alpha)
-spec color4usv(V) -> 'ok' when V :: {Red :: integer(),Green :: integer(),Blue :: integer(),Alpha :: integer()}.
color4usv({Red,Green,Blue,Alpha}) -> color4us(Red,Green,Blue,Alpha).
%% @doc Set the current texture coordinates
%%
%% ``gl:texCoord'' specifies texture coordinates in one, two, three, or four dimensions. ``gl:texCoord1''
%% sets the current texture coordinates to (s 0 0 1); a call to ``gl:texCoord2'' sets them to (s t
%% 0 1).
%% Similarly, ``gl:texCoord3'' specifies the texture coordinates as (s t r 1), and ``gl:texCoord4''
%% defines all four components explicitly as (s t r q).
%%
%% See external documentation.
-spec texCoord1d(S) -> 'ok' when S :: float().
texCoord1d(S) ->
cast(5150, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord1f(S) -> 'ok' when S :: float().
texCoord1f(S) ->
cast(5151, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord1i(S) -> 'ok' when S :: integer().
texCoord1i(S) ->
cast(5152, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord1s(S) -> 'ok' when S :: integer().
texCoord1s(S) ->
cast(5153, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord2d(S, T) -> 'ok' when S :: float(),T :: float().
texCoord2d(S,T) ->
cast(5154, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord2f(S, T) -> 'ok' when S :: float(),T :: float().
texCoord2f(S,T) ->
cast(5155, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord2i(S, T) -> 'ok' when S :: integer(),T :: integer().
texCoord2i(S,T) ->
cast(5156, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord2s(S, T) -> 'ok' when S :: integer(),T :: integer().
texCoord2s(S,T) ->
cast(5157, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord3d(S, T, R) -> 'ok' when S :: float(),T :: float(),R :: float().
texCoord3d(S,T,R) ->
cast(5158, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord3f(S, T, R) -> 'ok' when S :: float(),T :: float(),R :: float().
texCoord3f(S,T,R) ->
cast(5159, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord3i(S, T, R) -> 'ok' when S :: integer(),T :: integer(),R :: integer().
texCoord3i(S,T,R) ->
cast(5160, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord3s(S, T, R) -> 'ok' when S :: integer(),T :: integer(),R :: integer().
texCoord3s(S,T,R) ->
cast(5161, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord4d(S, T, R, Q) -> 'ok' when S :: float(),T :: float(),R :: float(),Q :: float().
texCoord4d(S,T,R,Q) ->
cast(5162, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord4f(S, T, R, Q) -> 'ok' when S :: float(),T :: float(),R :: float(),Q :: float().
texCoord4f(S,T,R,Q) ->
cast(5163, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord4i(S, T, R, Q) -> 'ok' when S :: integer(),T :: integer(),R :: integer(),Q :: integer().
texCoord4i(S,T,R,Q) ->
cast(5164, <>).
%% @doc
%% See {@link texCoord1d/1}
-spec texCoord4s(S, T, R, Q) -> 'ok' when S :: integer(),T :: integer(),R :: integer(),Q :: integer().
texCoord4s(S,T,R,Q) ->
cast(5165, <>).
%% @equiv texCoord1d(S)
-spec texCoord1dv(V) -> 'ok' when V :: {S :: float()}.
texCoord1dv({S}) -> texCoord1d(S).
%% @equiv texCoord1f(S)
-spec texCoord1fv(V) -> 'ok' when V :: {S :: float()}.
texCoord1fv({S}) -> texCoord1f(S).
%% @equiv texCoord1i(S)
-spec texCoord1iv(V) -> 'ok' when V :: {S :: integer()}.
texCoord1iv({S}) -> texCoord1i(S).
%% @equiv texCoord1s(S)
-spec texCoord1sv(V) -> 'ok' when V :: {S :: integer()}.
texCoord1sv({S}) -> texCoord1s(S).
%% @equiv texCoord2d(S,T)
-spec texCoord2dv(V) -> 'ok' when V :: {S :: float(),T :: float()}.
texCoord2dv({S,T}) -> texCoord2d(S,T).
%% @equiv texCoord2f(S,T)
-spec texCoord2fv(V) -> 'ok' when V :: {S :: float(),T :: float()}.
texCoord2fv({S,T}) -> texCoord2f(S,T).
%% @equiv texCoord2i(S,T)
-spec texCoord2iv(V) -> 'ok' when V :: {S :: integer(),T :: integer()}.
texCoord2iv({S,T}) -> texCoord2i(S,T).
%% @equiv texCoord2s(S,T)
-spec texCoord2sv(V) -> 'ok' when V :: {S :: integer(),T :: integer()}.
texCoord2sv({S,T}) -> texCoord2s(S,T).
%% @equiv texCoord3d(S,T,R)
-spec texCoord3dv(V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float()}.
texCoord3dv({S,T,R}) -> texCoord3d(S,T,R).
%% @equiv texCoord3f(S,T,R)
-spec texCoord3fv(V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float()}.
texCoord3fv({S,T,R}) -> texCoord3f(S,T,R).
%% @equiv texCoord3i(S,T,R)
-spec texCoord3iv(V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer()}.
texCoord3iv({S,T,R}) -> texCoord3i(S,T,R).
%% @equiv texCoord3s(S,T,R)
-spec texCoord3sv(V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer()}.
texCoord3sv({S,T,R}) -> texCoord3s(S,T,R).
%% @equiv texCoord4d(S,T,R,Q)
-spec texCoord4dv(V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
texCoord4dv({S,T,R,Q}) -> texCoord4d(S,T,R,Q).
%% @equiv texCoord4f(S,T,R,Q)
-spec texCoord4fv(V) -> 'ok' when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}.
texCoord4fv({S,T,R,Q}) -> texCoord4f(S,T,R,Q).
%% @equiv texCoord4i(S,T,R,Q)
-spec texCoord4iv(V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
texCoord4iv({S,T,R,Q}) -> texCoord4i(S,T,R,Q).
%% @equiv texCoord4s(S,T,R,Q)
-spec texCoord4sv(V) -> 'ok' when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}.
texCoord4sv({S,T,R,Q}) -> texCoord4s(S,T,R,Q).
%% @doc Specify the raster position for pixel operations
%%
%% The GL maintains a 3D position in window coordinates. This position, called the raster
%% position, is used to position pixel and bitmap write operations. It is maintained with
%% subpixel accuracy. See {@link gl:bitmap/7} , {@link gl:drawPixels/5} , and {@link gl:copyPixels/5}
%% .
%%
%% See external documentation.
-spec rasterPos2d(X, Y) -> 'ok' when X :: float(),Y :: float().
rasterPos2d(X,Y) ->
cast(5166, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos2f(X, Y) -> 'ok' when X :: float(),Y :: float().
rasterPos2f(X,Y) ->
cast(5167, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos2i(X, Y) -> 'ok' when X :: integer(),Y :: integer().
rasterPos2i(X,Y) ->
cast(5168, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos2s(X, Y) -> 'ok' when X :: integer(),Y :: integer().
rasterPos2s(X,Y) ->
cast(5169, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos3d(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
rasterPos3d(X,Y,Z) ->
cast(5170, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos3f(X, Y, Z) -> 'ok' when X :: float(),Y :: float(),Z :: float().
rasterPos3f(X,Y,Z) ->
cast(5171, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos3i(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
rasterPos3i(X,Y,Z) ->
cast(5172, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos3s(X, Y, Z) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer().
rasterPos3s(X,Y,Z) ->
cast(5173, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos4d(X, Y, Z, W) -> 'ok' when X :: float(),Y :: float(),Z :: float(),W :: float().
rasterPos4d(X,Y,Z,W) ->
cast(5174, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos4f(X, Y, Z, W) -> 'ok' when X :: float(),Y :: float(),Z :: float(),W :: float().
rasterPos4f(X,Y,Z,W) ->
cast(5175, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos4i(X, Y, Z, W) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
rasterPos4i(X,Y,Z,W) ->
cast(5176, <>).
%% @doc
%% See {@link rasterPos2d/2}
-spec rasterPos4s(X, Y, Z, W) -> 'ok' when X :: integer(),Y :: integer(),Z :: integer(),W :: integer().
rasterPos4s(X,Y,Z,W) ->
cast(5177, <>).
%% @equiv rasterPos2d(X,Y)
-spec rasterPos2dv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
rasterPos2dv({X,Y}) -> rasterPos2d(X,Y).
%% @equiv rasterPos2f(X,Y)
-spec rasterPos2fv(V) -> 'ok' when V :: {X :: float(),Y :: float()}.
rasterPos2fv({X,Y}) -> rasterPos2f(X,Y).
%% @equiv rasterPos2i(X,Y)
-spec rasterPos2iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
rasterPos2iv({X,Y}) -> rasterPos2i(X,Y).
%% @equiv rasterPos2s(X,Y)
-spec rasterPos2sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer()}.
rasterPos2sv({X,Y}) -> rasterPos2s(X,Y).
%% @equiv rasterPos3d(X,Y,Z)
-spec rasterPos3dv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
rasterPos3dv({X,Y,Z}) -> rasterPos3d(X,Y,Z).
%% @equiv rasterPos3f(X,Y,Z)
-spec rasterPos3fv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float()}.
rasterPos3fv({X,Y,Z}) -> rasterPos3f(X,Y,Z).
%% @equiv rasterPos3i(X,Y,Z)
-spec rasterPos3iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
rasterPos3iv({X,Y,Z}) -> rasterPos3i(X,Y,Z).
%% @equiv rasterPos3s(X,Y,Z)
-spec rasterPos3sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer()}.
rasterPos3sv({X,Y,Z}) -> rasterPos3s(X,Y,Z).
%% @equiv rasterPos4d(X,Y,Z,W)
-spec rasterPos4dv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
rasterPos4dv({X,Y,Z,W}) -> rasterPos4d(X,Y,Z,W).
%% @equiv rasterPos4f(X,Y,Z,W)
-spec rasterPos4fv(V) -> 'ok' when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}.
rasterPos4fv({X,Y,Z,W}) -> rasterPos4f(X,Y,Z,W).
%% @equiv rasterPos4i(X,Y,Z,W)
-spec rasterPos4iv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
rasterPos4iv({X,Y,Z,W}) -> rasterPos4i(X,Y,Z,W).
%% @equiv rasterPos4s(X,Y,Z,W)
-spec rasterPos4sv(V) -> 'ok' when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}.
rasterPos4sv({X,Y,Z,W}) -> rasterPos4s(X,Y,Z,W).
%% @doc Draw a rectangle
%%
%% ``gl:rect'' supports efficient specification of rectangles as two corner points. Each
%% rectangle command takes four arguments, organized either as two consecutive pairs of (x y)
%% coordinates or as two pointers to arrays, each containing an (x y) pair. The resulting rectangle
%% is defined in the z=0 plane.
%%
%% See external documentation.
-spec rectd(X1, Y1, X2, Y2) -> 'ok' when X1 :: float(),Y1 :: float(),X2 :: float(),Y2 :: float().
rectd(X1,Y1,X2,Y2) ->
cast(5178, <>).
%% @doc
%% See {@link rectd/4}
-spec rectf(X1, Y1, X2, Y2) -> 'ok' when X1 :: float(),Y1 :: float(),X2 :: float(),Y2 :: float().
rectf(X1,Y1,X2,Y2) ->
cast(5179, <>).
%% @doc
%% See {@link rectd/4}
-spec recti(X1, Y1, X2, Y2) -> 'ok' when X1 :: integer(),Y1 :: integer(),X2 :: integer(),Y2 :: integer().
recti(X1,Y1,X2,Y2) ->
cast(5180, <>).
%% @doc
%% See {@link rectd/4}
-spec rects(X1, Y1, X2, Y2) -> 'ok' when X1 :: integer(),Y1 :: integer(),X2 :: integer(),Y2 :: integer().
rects(X1,Y1,X2,Y2) ->
cast(5181, <>).
%% @doc
%% See {@link rectd/4}
-spec rectdv(V1, V2) -> 'ok' when V1 :: {float(),float()},V2 :: {float(),float()}.
rectdv({V1,V2},{V1,V2}) ->
cast(5182, <>).
%% @doc
%% See {@link rectd/4}
-spec rectfv(V1, V2) -> 'ok' when V1 :: {float(),float()},V2 :: {float(),float()}.
rectfv({V1,V2},{V1,V2}) ->
cast(5183, <>).
%% @doc
%% See {@link rectd/4}
-spec rectiv(V1, V2) -> 'ok' when V1 :: {integer(),integer()},V2 :: {integer(),integer()}.
rectiv({V1,V2},{V1,V2}) ->
cast(5184, <>).
%% @doc
%% See {@link rectd/4}
-spec rectsv(V1, V2) -> 'ok' when V1 :: {integer(),integer()},V2 :: {integer(),integer()}.
rectsv({V1,V2},{V1,V2}) ->
cast(5185, <>).
%% @doc Define an array of vertex data
%%
%% ``gl:vertexPointer'' specifies the location and data format of an array of vertex coordinates
%% to use when rendering. `Size' specifies the number of coordinates per vertex, and
%% must be 2, 3, or 4. `Type' specifies the data type of each coordinate, and `Stride'
%% specifies the byte stride from one vertex to the next, allowing vertices and attributes
%% to be packed into a single array or stored in separate arrays. (Single-array storage may
%% be more efficient on some implementations; see {@link gl:interleavedArrays/3} .)
%%
%% See external documentation.
-spec vertexPointer(Size, Type, Stride, Ptr) -> 'ok' when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
vertexPointer(Size,Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5186, <>);
vertexPointer(Size,Type,Stride,Ptr) ->
send_bin(Ptr),
cast(5187, <>).
%% @doc Define an array of normals
%%
%% ``gl:normalPointer'' specifies the location and data format of an array of normals to
%% use when rendering. `Type' specifies the data type of each normal coordinate, and `Stride'
%% specifies the byte stride from one normal to the next, allowing vertices and attributes
%% to be packed into a single array or stored in separate arrays. (Single-array storage may
%% be more efficient on some implementations; see {@link gl:interleavedArrays/3} .)
%%
%% See external documentation.
-spec normalPointer(Type, Stride, Ptr) -> 'ok' when Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
normalPointer(Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5188, <>);
normalPointer(Type,Stride,Ptr) ->
send_bin(Ptr),
cast(5189, <>).
%% @doc Define an array of colors
%%
%% ``gl:colorPointer'' specifies the location and data format of an array of color components
%% to use when rendering. `Size' specifies the number of components per color, and must
%% be 3 or 4. `Type' specifies the data type of each color component, and `Stride'
%% specifies the byte stride from one color to the next, allowing vertices and attributes
%% to be packed into a single array or stored in separate arrays. (Single-array storage may
%% be more efficient on some implementations; see {@link gl:interleavedArrays/3} .)
%%
%% See external documentation.
-spec colorPointer(Size, Type, Stride, Ptr) -> 'ok' when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
colorPointer(Size,Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5190, <>);
colorPointer(Size,Type,Stride,Ptr) ->
send_bin(Ptr),
cast(5191, <>).
%% @doc Define an array of color indexes
%%
%% ``gl:indexPointer'' specifies the location and data format of an array of color indexes
%% to use when rendering. `Type' specifies the data type of each color index and `Stride'
%% specifies the byte stride from one color index to the next, allowing vertices and attributes
%% to be packed into a single array or stored in separate arrays.
%%
%% See external documentation.
-spec indexPointer(Type, Stride, Ptr) -> 'ok' when Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
indexPointer(Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5192, <>);
indexPointer(Type,Stride,Ptr) ->
send_bin(Ptr),
cast(5193, <>).
%% @doc Define an array of texture coordinates
%%
%% ``gl:texCoordPointer'' specifies the location and data format of an array of texture
%% coordinates to use when rendering. `Size' specifies the number of coordinates per
%% texture coordinate set, and must be 1, 2, 3, or 4. `Type' specifies the data type
%% of each texture coordinate, and `Stride' specifies the byte stride from one texture
%% coordinate set to the next, allowing vertices and attributes to be packed into a single
%% array or stored in separate arrays. (Single-array storage may be more efficient on some
%% implementations; see {@link gl:interleavedArrays/3} .)
%%
%% See external documentation.
-spec texCoordPointer(Size, Type, Stride, Ptr) -> 'ok' when Size :: integer(),Type :: enum(),Stride :: integer(),Ptr :: offset()|mem().
texCoordPointer(Size,Type,Stride,Ptr) when is_integer(Ptr) ->
cast(5194, <>);
texCoordPointer(Size,Type,Stride,Ptr) ->
send_bin(Ptr),
cast(5195, <>).
%% @doc Define an array of edge flags
%%
%% ``gl:edgeFlagPointer'' specifies the location and data format of an array of boolean
%% edge flags to use when rendering. `Stride' specifies the byte stride from one edge
%% flag to the next, allowing vertices and attributes to be packed into a single array or
%% stored in separate arrays.
%%
%% See external documentation.
-spec edgeFlagPointer(Stride, Ptr) -> 'ok' when Stride :: integer(),Ptr :: offset()|mem().
edgeFlagPointer(Stride,Ptr) when is_integer(Ptr) ->
cast(5196, <>);
edgeFlagPointer(Stride,Ptr) ->
send_bin(Ptr),
cast(5197, <>).
%% @doc Render a vertex using the specified vertex array element
%%
%% ``gl:arrayElement'' commands are used within {@link gl:'begin'/1} / {@link gl:'begin'/1} pairs
%% to specify vertex and attribute data for point, line, and polygon primitives. If `?GL_VERTEX_ARRAY'
%% is enabled when ``gl:arrayElement'' is called, a single vertex is drawn, using vertex
%% and attribute data taken from location `I' of the enabled arrays. If `?GL_VERTEX_ARRAY'
%% is not enabled, no drawing occurs but the attributes corresponding to the enabled arrays
%% are modified.
%%
%% See external documentation.
-spec arrayElement(I) -> 'ok' when I :: integer().
arrayElement(I) ->
cast(5198, <>).
%% @doc Render primitives from array data
%%
%% ``gl:drawArrays'' specifies multiple geometric primitives with very few subroutine calls.
%% Instead of calling a GL procedure to pass each individual vertex, normal, texture coordinate,
%% edge flag, or color, you can prespecify separate arrays of vertices, normals, and colors
%% and use them to construct a sequence of primitives with a single call to ``gl:drawArrays''
%% .
%%
%% See external documentation.
-spec drawArrays(Mode, First, Count) -> 'ok' when Mode :: enum(),First :: integer(),Count :: integer().
drawArrays(Mode,First,Count) ->
cast(5199, <>).
%% @doc Render primitives from array data
%%
%% ``gl:drawElements'' specifies multiple geometric primitives with very few subroutine
%% calls. Instead of calling a GL function to pass each individual vertex, normal, texture
%% coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals,
%% and so on, and use them to construct a sequence of primitives with a single call to ``gl:drawElements''
%% .
%%
%% See external documentation.
-spec drawElements(Mode, Count, Type, Indices) -> 'ok' when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem().
drawElements(Mode,Count,Type,Indices) when is_integer(Indices) ->
cast(5200, <>);
drawElements(Mode,Count,Type,Indices) ->
send_bin(Indices),
cast(5201, <>).
%% @doc Simultaneously specify and enable several interleaved arrays
%%
%% ``gl:interleavedArrays'' lets you specify and enable individual color, normal, texture
%% and vertex arrays whose elements are part of a larger aggregate array element. For some
%% implementations, this is more efficient than specifying the arrays separately.
%%
%% See external documentation.
-spec interleavedArrays(Format, Stride, Pointer) -> 'ok' when Format :: enum(),Stride :: integer(),Pointer :: offset()|mem().
interleavedArrays(Format,Stride,Pointer) when is_integer(Pointer) ->
cast(5202, <>);
interleavedArrays(Format,Stride,Pointer) ->
send_bin(Pointer),
cast(5203, <>).
%% @doc Select flat or smooth shading
%%
%% GL primitives can have either flat or smooth shading. Smooth shading, the default, causes
%% the computed colors of vertices to be interpolated as the primitive is rasterized, typically
%% assigning different colors to each resulting pixel fragment. Flat shading selects the
%% computed color of just one vertex and assigns it to all the pixel fragments generated
%% by rasterizing a single primitive. In either case, the computed color of a vertex is the
%% result of lighting if lighting is enabled, or it is the current color at the time the
%% vertex was specified if lighting is disabled.
%%
%% See external documentation.
-spec shadeModel(Mode) -> 'ok' when Mode :: enum().
shadeModel(Mode) ->
cast(5204, <>).
%% @doc Set light source parameters
%%
%% ``gl:light'' sets the values of individual light source parameters. `Light' names
%% the light and is a symbolic name of the form `?GL_LIGHT' i, where i ranges from 0
%% to the value of `?GL_MAX_LIGHTS' - 1. `Pname' specifies one of ten light source
%% parameters, again by symbolic name. `Params' is either a single value or a pointer
%% to an array that contains the new values.
%%
%% See external documentation.
-spec lightf(Light, Pname, Param) -> 'ok' when Light :: enum(),Pname :: enum(),Param :: float().
lightf(Light,Pname,Param) ->
cast(5205, <>).
%% @doc
%% See {@link lightf/3}
-spec lighti(Light, Pname, Param) -> 'ok' when Light :: enum(),Pname :: enum(),Param :: integer().
lighti(Light,Pname,Param) ->
cast(5206, <>).
%% @doc
%% See {@link lightf/3}
-spec lightfv(Light, Pname, Params) -> 'ok' when Light :: enum(),Pname :: enum(),Params :: tuple().
lightfv(Light,Pname,Params) ->
cast(5207, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link lightf/3}
-spec lightiv(Light, Pname, Params) -> 'ok' when Light :: enum(),Pname :: enum(),Params :: tuple().
lightiv(Light,Pname,Params) ->
cast(5208, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc Return light source parameter values
%%
%% ``gl:getLight'' returns in `Params' the value or values of a light source parameter.
%% `Light' names the light and is a symbolic name of the form `?GL_LIGHT' i where
%% i ranges from 0 to the value of `?GL_MAX_LIGHTS' - 1. `?GL_MAX_LIGHTS' is an
%% implementation dependent constant that is greater than or equal to eight. `Pname'
%% specifies one of ten light source parameters, again by symbolic name.
%%
%% See external documentation.
-spec getLightfv(Light, Pname) -> {float(),float(),float(),float()} when Light :: enum(),Pname :: enum().
getLightfv(Light,Pname) ->
call(5209, <>).
%% @doc
%% See {@link getLightfv/2}
-spec getLightiv(Light, Pname) -> {integer(),integer(),integer(),integer()} when Light :: enum(),Pname :: enum().
getLightiv(Light,Pname) ->
call(5210, <>).
%% @doc Set the lighting model parameters
%%
%% ``gl:lightModel'' sets the lighting model parameter. `Pname' names a parameter
%% and `Params' gives the new value. There are three lighting model parameters:
%%
%% See external documentation.
-spec lightModelf(Pname, Param) -> 'ok' when Pname :: enum(),Param :: float().
lightModelf(Pname,Param) ->
cast(5211, <>).
%% @doc
%% See {@link lightModelf/2}
-spec lightModeli(Pname, Param) -> 'ok' when Pname :: enum(),Param :: integer().
lightModeli(Pname,Param) ->
cast(5212, <>).
%% @doc
%% See {@link lightModelf/2}
-spec lightModelfv(Pname, Params) -> 'ok' when Pname :: enum(),Params :: tuple().
lightModelfv(Pname,Params) ->
cast(5213, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link lightModelf/2}
-spec lightModeliv(Pname, Params) -> 'ok' when Pname :: enum(),Params :: tuple().
lightModeliv(Pname,Params) ->
cast(5214, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>).
%% @doc Specify material parameters for the lighting model
%%
%% ``gl:material'' assigns values to material parameters. There are two matched sets of
%% material parameters. One, the `front-facing' set, is used to shade points, lines,
%% bitmaps, and all polygons (when two-sided lighting is disabled), or just front-facing
%% polygons (when two-sided lighting is enabled). The other set, `back-facing', is used
%% to shade back-facing polygons only when two-sided lighting is enabled. Refer to the {@link gl:lightModelf/2}
%% reference page for details concerning one- and two-sided lighting calculations.
%%
%% See external documentation.
-spec materialf(Face, Pname, Param) -> 'ok' when Face :: enum(),Pname :: enum(),Param :: float().
materialf(Face,Pname,Param) ->
cast(5215, <>).
%% @doc
%% See {@link materialf/3}
-spec materiali(Face, Pname, Param) -> 'ok' when Face :: enum(),Pname :: enum(),Param :: integer().
materiali(Face,Pname,Param) ->
cast(5216, <>).
%% @doc
%% See {@link materialf/3}
-spec materialfv(Face, Pname, Params) -> 'ok' when Face :: enum(),Pname :: enum(),Params :: tuple().
materialfv(Face,Pname,Params) ->
cast(5217, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link materialf/3}
-spec materialiv(Face, Pname, Params) -> 'ok' when Face :: enum(),Pname :: enum(),Params :: tuple().
materialiv(Face,Pname,Params) ->
cast(5218, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc Return material parameters
%%
%% ``gl:getMaterial'' returns in `Params' the value or values of parameter `Pname'
%% of material `Face' . Six parameters are defined:
%%
%% See external documentation.
-spec getMaterialfv(Face, Pname) -> {float(),float(),float(),float()} when Face :: enum(),Pname :: enum().
getMaterialfv(Face,Pname) ->
call(5219, <>).
%% @doc
%% See {@link getMaterialfv/2}
-spec getMaterialiv(Face, Pname) -> {integer(),integer(),integer(),integer()} when Face :: enum(),Pname :: enum().
getMaterialiv(Face,Pname) ->
call(5220, <>).
%% @doc Cause a material color to track the current color
%%
%% ``gl:colorMaterial'' specifies which material parameters track the current color. When `?GL_COLOR_MATERIAL'
%% is enabled, the material parameter or parameters specified by `Mode' , of the material
%% or materials specified by `Face' , track the current color at all times.
%%
%% See external documentation.
-spec colorMaterial(Face, Mode) -> 'ok' when Face :: enum(),Mode :: enum().
colorMaterial(Face,Mode) ->
cast(5221, <>).
%% @doc Specify the pixel zoom factors
%%
%% ``gl:pixelZoom'' specifies values for the x and y zoom factors. During the execution
%% of {@link gl:drawPixels/5} or {@link gl:copyPixels/5} , if ( xr, yr) is the current raster
%% position, and a given element is in the mth row and nth column of the pixel rectangle,
%% then pixels whose centers are in the rectangle with corners at
%%
%% See external documentation.
-spec pixelZoom(Xfactor, Yfactor) -> 'ok' when Xfactor :: float(),Yfactor :: float().
pixelZoom(Xfactor,Yfactor) ->
cast(5222, <>).
%% @doc Set pixel storage modes
%%
%% ``gl:pixelStore'' sets pixel storage modes that affect the operation of subsequent {@link gl:readPixels/7}
%% as well as the unpacking of texture patterns (see {@link gl:texImage1D/8} , {@link gl:texImage2D/9}
%% , {@link gl:texImage3D/10} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7}
%% ), {@link gl:compressedTexImage1D/7} , {@link gl:compressedTexImage2D/8} , {@link gl:compressedTexImage3D/9}
%% , {@link gl:compressedTexSubImage1D/7} , {@link gl:compressedTexSubImage2D/9} or {@link gl:compressedTexSubImage1D/7}
%% .
%%
%% See external documentation.
-spec pixelStoref(Pname, Param) -> 'ok' when Pname :: enum(),Param :: float().
pixelStoref(Pname,Param) ->
cast(5223, <>).
%% @doc
%% See {@link pixelStoref/2}
-spec pixelStorei(Pname, Param) -> 'ok' when Pname :: enum(),Param :: integer().
pixelStorei(Pname,Param) ->
cast(5224, <>).
%% @doc Set pixel transfer modes
%%
%% ``gl:pixelTransfer'' sets pixel transfer modes that affect the operation of subsequent {@link gl:copyPixels/5}
%% , {@link gl:copyTexImage1D/7} , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8}
%% , {@link gl:copyTexSubImage3D/9} , {@link gl:drawPixels/5} , {@link gl:readPixels/7} , {@link gl:texImage1D/8}
%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7}
%% , and {@link gl:texSubImage1D/7} commands. Additionally, if the ARB_imaging subset is supported,
%% the routines {@link gl:colorTable/6} , {@link gl:colorSubTable/6} , {@link gl:convolutionFilter1D/6}
%% , {@link gl:convolutionFilter2D/7} , {@link gl:histogram/4} , {@link gl:minmax/3} , and {@link gl:separableFilter2D/8}
%% are also affected. The algorithms that are specified by pixel transfer modes operate
%% on pixels after they are read from the frame buffer ( {@link gl:copyPixels/5} {@link gl:copyTexImage1D/7}
%% , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8} ,
%% {@link gl:copyTexSubImage3D/9} , and {@link gl:readPixels/7} ), or unpacked from client memory
%% ( {@link gl:drawPixels/5} , {@link gl:texImage1D/8} , {@link gl:texImage2D/9} , {@link gl:texImage3D/10}
%% , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7} , and {@link gl:texSubImage1D/7} ).
%% Pixel transfer operations happen in the same order, and in the same manner, regardless
%% of the command that resulted in the pixel operation. Pixel storage modes (see {@link gl:pixelStoref/2}
%% ) control the unpacking of pixels being read from client memory and the packing of pixels
%% being written back into client memory.
%%
%% See external documentation.
-spec pixelTransferf(Pname, Param) -> 'ok' when Pname :: enum(),Param :: float().
pixelTransferf(Pname,Param) ->
cast(5225, <>).
%% @doc
%% See {@link pixelTransferf/2}
-spec pixelTransferi(Pname, Param) -> 'ok' when Pname :: enum(),Param :: integer().
pixelTransferi(Pname,Param) ->
cast(5226, <>).
%% @doc Set up pixel transfer maps
%%
%% ``gl:pixelMap'' sets up translation tables, or `maps', used by {@link gl:copyPixels/5}
%% , {@link gl:copyTexImage1D/7} , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8}
%% , {@link gl:copyTexSubImage3D/9} , {@link gl:drawPixels/5} , {@link gl:readPixels/7} , {@link gl:texImage1D/8}
%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7}
%% , and {@link gl:texSubImage1D/7} . Additionally, if the ARB_imaging subset is supported,
%% the routines {@link gl:colorTable/6} , {@link gl:colorSubTable/6} , {@link gl:convolutionFilter1D/6}
%% , {@link gl:convolutionFilter2D/7} , {@link gl:histogram/4} , {@link gl:minmax/3} , and {@link gl:separableFilter2D/8}
%% . Use of these maps is described completely in the {@link gl:pixelTransferf/2} reference
%% page, and partly in the reference pages for the pixel and texture image commands. Only
%% the specification of the maps is described in this reference page.
%%
%% See external documentation.
-spec pixelMapfv(Map, Mapsize, Values) -> 'ok' when Map :: enum(),Mapsize :: integer(),Values :: binary().
pixelMapfv(Map,Mapsize,Values) ->
send_bin(Values),
cast(5227, <>).
%% @doc
%% See {@link pixelMapfv/3}
-spec pixelMapuiv(Map, Mapsize, Values) -> 'ok' when Map :: enum(),Mapsize :: integer(),Values :: binary().
pixelMapuiv(Map,Mapsize,Values) ->
send_bin(Values),
cast(5228, <>).
%% @doc
%% See {@link pixelMapfv/3}
-spec pixelMapusv(Map, Mapsize, Values) -> 'ok' when Map :: enum(),Mapsize :: integer(),Values :: binary().
pixelMapusv(Map,Mapsize,Values) ->
send_bin(Values),
cast(5229, <>).
%% @doc Return the specified pixel map
%%
%% See the {@link gl:pixelMapfv/3} reference page for a description of the acceptable values
%% for the `Map' parameter. ``gl:getPixelMap'' returns in `Data' the contents
%% of the pixel map specified in `Map' . Pixel maps are used during the execution of {@link gl:readPixels/7}
%% , {@link gl:drawPixels/5} , {@link gl:copyPixels/5} , {@link gl:texImage1D/8} , {@link gl:texImage2D/9}
%% , {@link gl:texImage3D/10} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7} , {@link gl:texSubImage1D/7}
%% , {@link gl:copyTexImage1D/7} , {@link gl:copyTexImage2D/8} , {@link gl:copyTexSubImage1D/6} , {@link gl:copyTexSubImage2D/8}
%% , and {@link gl:copyTexSubImage3D/9} . to map color indices, stencil indices, color components,
%% and depth components to other values.
%%
%% See external documentation.
-spec getPixelMapfv(Map, Values) -> 'ok' when Map :: enum(),Values :: mem().
getPixelMapfv(Map,Values) ->
send_bin(Values),
call(5230, <>).
%% @doc
%% See {@link getPixelMapfv/2}
-spec getPixelMapuiv(Map, Values) -> 'ok' when Map :: enum(),Values :: mem().
getPixelMapuiv(Map,Values) ->
send_bin(Values),
call(5231, <>).
%% @doc
%% See {@link getPixelMapfv/2}
-spec getPixelMapusv(Map, Values) -> 'ok' when Map :: enum(),Values :: mem().
getPixelMapusv(Map,Values) ->
send_bin(Values),
call(5232, <>).
%% @doc Draw a bitmap
%%
%% A bitmap is a binary image. When drawn, the bitmap is positioned relative to the current
%% raster position, and frame buffer pixels corresponding to 1's in the bitmap are written
%% using the current raster color or index. Frame buffer pixels corresponding to 0's in the
%% bitmap are not modified.
%%
%% See external documentation.
-spec bitmap(Width, Height, Xorig, Yorig, Xmove, Ymove, Bitmap) -> 'ok' when Width :: integer(),Height :: integer(),Xorig :: float(),Yorig :: float(),Xmove :: float(),Ymove :: float(),Bitmap :: offset()|mem().
bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) when is_integer(Bitmap) ->
cast(5233, <>);
bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) ->
send_bin(Bitmap),
cast(5234, <>).
%% @doc Read a block of pixels from the frame buffer
%%
%% ``gl:readPixels'' returns pixel data from the frame buffer, starting with the pixel
%% whose lower left corner is at location ( `X' , `Y' ), into client memory starting
%% at location `Data' . Several parameters control the processing of the pixel data before
%% it is placed into client memory. These parameters are set with {@link gl:pixelStoref/2} .
%% This reference page describes the effects on ``gl:readPixels'' of most, but not all
%% of the parameters specified by these three commands.
%%
%% See external documentation.
-spec readPixels(X, Y, Width, Height, Format, Type, Pixels) -> 'ok' when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: mem().
readPixels(X,Y,Width,Height,Format,Type,Pixels) ->
send_bin(Pixels),
call(5235, <>).
%% @doc Write a block of pixels to the frame buffer
%%
%% ``gl:drawPixels'' reads pixel data from memory and writes it into the frame buffer relative
%% to the current raster position, provided that the raster position is valid. Use {@link gl:rasterPos2d/2}
%% or {@link gl:windowPos2d/2} to set the current raster position; use {@link gl:getBooleanv/1} with
%% argument `?GL_CURRENT_RASTER_POSITION_VALID' to determine if the specified raster
%% position is valid, and {@link gl:getBooleanv/1} with argument `?GL_CURRENT_RASTER_POSITION'
%% to query the raster position.
%%
%% See external documentation.
-spec drawPixels(Width, Height, Format, Type, Pixels) -> 'ok' when Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
drawPixels(Width,Height,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5236, <>);
drawPixels(Width,Height,Format,Type,Pixels) ->
send_bin(Pixels),
cast(5237, <>).
%% @doc Copy pixels in the frame buffer
%%
%% ``gl:copyPixels'' copies a screen-aligned rectangle of pixels from the specified frame
%% buffer location to a region relative to the current raster position. Its operation is
%% well defined only if the entire pixel source region is within the exposed portion of the
%% window. Results of copies from outside the window, or from regions of the window that
%% are not exposed, are hardware dependent and undefined.
%%
%% See external documentation.
-spec copyPixels(X, Y, Width, Height, Type) -> 'ok' when X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Type :: enum().
copyPixels(X,Y,Width,Height,Type) ->
cast(5238, <>).
%% @doc Set front and back function and reference value for stencil testing
%%
%% Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis.
%% Stencil planes are first drawn into using GL drawing primitives, then geometry and images
%% are rendered using the stencil planes to mask out portions of the screen. Stenciling is
%% typically used in multipass rendering algorithms to achieve special effects, such as decals,
%% outlining, and constructive solid geometry rendering.
%%
%% See external documentation.
-spec stencilFunc(Func, Ref, Mask) -> 'ok' when Func :: enum(),Ref :: integer(),Mask :: integer().
stencilFunc(Func,Ref,Mask) ->
cast(5239, <>).
%% @doc Control the front and back writing of individual bits in the stencil planes
%%
%% ``gl:stencilMask'' controls the writing of individual bits in the stencil planes. The
%% least significant n bits of `Mask' , where n is the number of bits in the stencil
%% buffer, specify a mask. Where a 1 appears in the mask, it's possible to write to the corresponding
%% bit in the stencil buffer. Where a 0 appears, the corresponding bit is write-protected.
%% Initially, all bits are enabled for writing.
%%
%% See external documentation.
-spec stencilMask(Mask) -> 'ok' when Mask :: integer().
stencilMask(Mask) ->
cast(5240, <>).
%% @doc Set front and back stencil test actions
%%
%% Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis.
%% You draw into the stencil planes using GL drawing primitives, then render geometry and
%% images, using the stencil planes to mask out portions of the screen. Stenciling is typically
%% used in multipass rendering algorithms to achieve special effects, such as decals, outlining,
%% and constructive solid geometry rendering.
%%
%% See external documentation.
-spec stencilOp(Fail, Zfail, Zpass) -> 'ok' when Fail :: enum(),Zfail :: enum(),Zpass :: enum().
stencilOp(Fail,Zfail,Zpass) ->
cast(5241, <>).
%% @doc Specify the clear value for the stencil buffer
%%
%% ``gl:clearStencil'' specifies the index used by {@link gl:clear/1} to clear the stencil
%% buffer. `S' is masked with 2 m-1, where m is the number of bits in the stencil
%% buffer.
%%
%% See external documentation.
-spec clearStencil(S) -> 'ok' when S :: integer().
clearStencil(S) ->
cast(5242, <>).
%% @doc Control the generation of texture coordinates
%%
%% ``gl:texGen'' selects a texture-coordinate generation function or supplies coefficients
%% for one of the functions. `Coord' names one of the (`s', `t', `r', `q'
%% ) texture coordinates; it must be one of the symbols `?GL_S', `?GL_T', `?GL_R'
%% , or `?GL_Q'. `Pname' must be one of three symbolic constants: `?GL_TEXTURE_GEN_MODE'
%% , `?GL_OBJECT_PLANE', or `?GL_EYE_PLANE'. If `Pname' is `?GL_TEXTURE_GEN_MODE'
%% , then `Params' chooses a mode, one of `?GL_OBJECT_LINEAR', `?GL_EYE_LINEAR'
%% , `?GL_SPHERE_MAP', `?GL_NORMAL_MAP', or `?GL_REFLECTION_MAP'. If `Pname'
%% is either `?GL_OBJECT_PLANE' or `?GL_EYE_PLANE', `Params' contains coefficients
%% for the corresponding texture generation function.
%%
%% See external documentation.
-spec texGend(Coord, Pname, Param) -> 'ok' when Coord :: enum(),Pname :: enum(),Param :: float().
texGend(Coord,Pname,Param) ->
cast(5243, <>).
%% @doc
%% See {@link texGend/3}
-spec texGenf(Coord, Pname, Param) -> 'ok' when Coord :: enum(),Pname :: enum(),Param :: float().
texGenf(Coord,Pname,Param) ->
cast(5244, <>).
%% @doc
%% See {@link texGend/3}
-spec texGeni(Coord, Pname, Param) -> 'ok' when Coord :: enum(),Pname :: enum(),Param :: integer().
texGeni(Coord,Pname,Param) ->
cast(5245, <>).
%% @doc
%% See {@link texGend/3}
-spec texGendv(Coord, Pname, Params) -> 'ok' when Coord :: enum(),Pname :: enum(),Params :: tuple().
texGendv(Coord,Pname,Params) ->
cast(5246, <> ||C <- tuple_to_list(Params)>>)/binary>>).
%% @doc
%% See {@link texGend/3}
-spec texGenfv(Coord, Pname, Params) -> 'ok' when Coord :: enum(),Pname :: enum(),Params :: tuple().
texGenfv(Coord,Pname,Params) ->
cast(5247, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link texGend/3}
-spec texGeniv(Coord, Pname, Params) -> 'ok' when Coord :: enum(),Pname :: enum(),Params :: tuple().
texGeniv(Coord,Pname,Params) ->
cast(5248, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc Return texture coordinate generation parameters
%%
%% ``gl:getTexGen'' returns in `Params' selected parameters of a texture coordinate
%% generation function that was specified using {@link gl:texGend/3} . `Coord' names one
%% of the (`s', `t', `r', `q') texture coordinates, using the symbolic
%% constant `?GL_S', `?GL_T', `?GL_R', or `?GL_Q'.
%%
%% See external documentation.
-spec getTexGendv(Coord, Pname) -> {float(),float(),float(),float()} when Coord :: enum(),Pname :: enum().
getTexGendv(Coord,Pname) ->
call(5249, <>).
%% @doc
%% See {@link getTexGendv/2}
-spec getTexGenfv(Coord, Pname) -> {float(),float(),float(),float()} when Coord :: enum(),Pname :: enum().
getTexGenfv(Coord,Pname) ->
call(5250, <>).
%% @doc
%% See {@link getTexGendv/2}
-spec getTexGeniv(Coord, Pname) -> {integer(),integer(),integer(),integer()} when Coord :: enum(),Pname :: enum().
getTexGeniv(Coord,Pname) ->
call(5251, <>).
%% @doc glTexEnvf
%%
%% See external documentation.
-spec texEnvf(Target, Pname, Param) -> 'ok' when Target :: enum(),Pname :: enum(),Param :: float().
texEnvf(Target,Pname,Param) ->
cast(5252, <>).
%% @doc glTexEnvi
%%
%% See external documentation.
-spec texEnvi(Target, Pname, Param) -> 'ok' when Target :: enum(),Pname :: enum(),Param :: integer().
texEnvi(Target,Pname,Param) ->
cast(5253, <>).
%% @doc Set texture environment parameters
%%
%% A texture environment specifies how texture values are interpreted when a fragment is
%% textured. When `Target' is `?GL_TEXTURE_FILTER_CONTROL', `Pname' must be `?GL_TEXTURE_LOD_BIAS'
%% . When `Target' is `?GL_TEXTURE_ENV', `Pname' can be `?GL_TEXTURE_ENV_MODE'
%% , `?GL_TEXTURE_ENV_COLOR', `?GL_COMBINE_RGB', `?GL_COMBINE_ALPHA', `?GL_RGB_SCALE'
%% , `?GL_ALPHA_SCALE', `?GL_SRC0_RGB', `?GL_SRC1_RGB', `?GL_SRC2_RGB', `?GL_SRC0_ALPHA'
%% , `?GL_SRC1_ALPHA', or `?GL_SRC2_ALPHA'.
%%
%% See external documentation.
-spec texEnvfv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texEnvfv(Target,Pname,Params) ->
cast(5254, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link texEnvfv/3}
-spec texEnviv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texEnviv(Target,Pname,Params) ->
cast(5255, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc Return texture environment parameters
%%
%% ``gl:getTexEnv'' returns in `Params' selected values of a texture environment that
%% was specified with {@link gl:texEnvfv/3} . `Target' specifies a texture environment.
%%
%% See external documentation.
-spec getTexEnvfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum().
getTexEnvfv(Target,Pname) ->
call(5256, <>).
%% @doc
%% See {@link getTexEnvfv/2}
-spec getTexEnviv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum().
getTexEnviv(Target,Pname) ->
call(5257, <>).
%% @doc Set texture parameters
%%
%% ``gl:texParameter'' assigns the value or values in `Params' to the texture parameter
%% specified as `Pname' . `Target' defines the target texture, either `?GL_TEXTURE_1D'
%% , `?GL_TEXTURE_2D', `?GL_TEXTURE_1D_ARRAY', `?GL_TEXTURE_2D_ARRAY', `?GL_TEXTURE_RECTANGLE'
%% , or `?GL_TEXTURE_3D'. The following symbols are accepted in `Pname' :
%%
%% See external documentation.
-spec texParameterf(Target, Pname, Param) -> 'ok' when Target :: enum(),Pname :: enum(),Param :: float().
texParameterf(Target,Pname,Param) ->
cast(5258, <>).
%% @doc
%% See {@link texParameterf/3}
-spec texParameteri(Target, Pname, Param) -> 'ok' when Target :: enum(),Pname :: enum(),Param :: integer().
texParameteri(Target,Pname,Param) ->
cast(5259, <>).
%% @doc
%% See {@link texParameterf/3}
-spec texParameterfv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texParameterfv(Target,Pname,Params) ->
cast(5260, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc
%% See {@link texParameterf/3}
-spec texParameteriv(Target, Pname, Params) -> 'ok' when Target :: enum(),Pname :: enum(),Params :: tuple().
texParameteriv(Target,Pname,Params) ->
cast(5261, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>).
%% @doc Return texture parameter values
%%
%% ``gl:getTexParameter'' returns in `Params' the value or values of the texture parameter
%% specified as `Pname' . `Target' defines the target texture. `?GL_TEXTURE_1D',
%% `?GL_TEXTURE_2D', `?GL_TEXTURE_3D', `?GL_TEXTURE_1D_ARRAY', `?GL_TEXTURE_2D_ARRAY'
%% , `?GL_TEXTURE_RECTANGLE', `?GL_TEXTURE_CUBE_MAP', `?GL_TEXTURE_CUBE_MAP_ARRAY'
%% specify one-, two-, or three-dimensional, one-dimensional array, two-dimensional array,
%% rectangle, cube-mapped or cube-mapped array texturing, respectively. `Pname' accepts
%% the same symbols as {@link gl:texParameterf/3} , with the same interpretations:
%%
%% See external documentation.
-spec getTexParameterfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum().
getTexParameterfv(Target,Pname) ->
call(5262, <>).
%% @doc
%% See {@link getTexParameterfv/2}
-spec getTexParameteriv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum().
getTexParameteriv(Target,Pname) ->
call(5263, <>).
%% @doc Return texture parameter values for a specific level of detail
%%
%% ``gl:getTexLevelParameter'' returns in `Params' texture parameter values for a
%% specific level-of-detail value, specified as `Level' . `Target' defines the target
%% texture, either `?GL_TEXTURE_1D', `?GL_TEXTURE_2D', `?GL_TEXTURE_3D', `?GL_PROXY_TEXTURE_1D'
%% , `?GL_PROXY_TEXTURE_2D', `?GL_PROXY_TEXTURE_3D', `?GL_TEXTURE_CUBE_MAP_POSITIVE_X'
%% , `?GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y'
%% , `?GL_TEXTURE_CUBE_MAP_POSITIVE_Z', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z', or `?GL_PROXY_TEXTURE_CUBE_MAP'
%% .
%%
%% See external documentation.
-spec getTexLevelParameterfv(Target, Level, Pname) -> {float()} when Target :: enum(),Level :: integer(),Pname :: enum().
getTexLevelParameterfv(Target,Level,Pname) ->
call(5264, <>).
%% @doc
%% See {@link getTexLevelParameterfv/3}
-spec getTexLevelParameteriv(Target, Level, Pname) -> {integer()} when Target :: enum(),Level :: integer(),Pname :: enum().
getTexLevelParameteriv(Target,Level,Pname) ->
call(5265, <>).
%% @doc Specify a one-dimensional texture image
%%
%% Texturing maps a portion of a specified texture image onto each graphical primitive for
%% which texturing is enabled. To enable and disable one-dimensional texturing, call {@link gl:enable/1}
%% and {@link gl:enable/1} with argument `?GL_TEXTURE_1D'.
%%
%% See external documentation.
-spec texImage1D(Target, Level, InternalFormat, Width, Border, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texImage1D(Target,Level,InternalFormat,Width,Border,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5266, <>);
texImage1D(Target,Level,InternalFormat,Width,Border,Format,Type,Pixels) ->
send_bin(Pixels),
cast(5267, <>).
%% @doc Specify a two-dimensional texture image
%%
%% Texturing allows elements of an image array to be read by shaders.
%%
%% See external documentation.
-spec texImage2D(Target, Level, InternalFormat, Width, Height, Border, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texImage2D(Target,Level,InternalFormat,Width,Height,Border,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5268, <>);
texImage2D(Target,Level,InternalFormat,Width,Height,Border,Format,Type,Pixels) ->
send_bin(Pixels),
cast(5269, <>).
%% @doc Return a texture image
%%
%% ``gl:getTexImage'' returns a texture image into `Img' . `Target' specifies
%% whether the desired texture image is one specified by {@link gl:texImage1D/8} (`?GL_TEXTURE_1D'
%% ), {@link gl:texImage2D/9} (`?GL_TEXTURE_1D_ARRAY', `?GL_TEXTURE_RECTANGLE', `?GL_TEXTURE_2D'
%% or any of `?GL_TEXTURE_CUBE_MAP_*'), or {@link gl:texImage3D/10} (`?GL_TEXTURE_2D_ARRAY'
%% , `?GL_TEXTURE_3D'). `Level' specifies the level-of-detail number of the desired
%% image. `Format' and `Type' specify the format and type of the desired image
%% array. See the reference page for {@link gl:texImage1D/8} for a description of the acceptable
%% values for the `Format' and `Type' parameters, respectively.
%%
%% See external documentation.
-spec getTexImage(Target, Level, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),Format :: enum(),Type :: enum(),Pixels :: mem().
getTexImage(Target,Level,Format,Type,Pixels) ->
send_bin(Pixels),
call(5270, <>).
%% @doc Generate texture names
%%
%% ``gl:genTextures'' returns `N' texture names in `Textures' . There is no guarantee
%% that the names form a contiguous set of integers; however, it is guaranteed that none
%% of the returned names was in use immediately before the call to ``gl:genTextures''.
%%
%% See external documentation.
-spec genTextures(N) -> [integer()] when N :: integer().
genTextures(N) ->
call(5271, <>).
%% @doc Delete named textures
%%
%% ``gl:deleteTextures'' deletes `N' textures named by the elements of the array `Textures'
%% . After a texture is deleted, it has no contents or dimensionality, and its name is free
%% for reuse (for example by {@link gl:genTextures/1} ). If a texture that is currently bound
%% is deleted, the binding reverts to 0 (the default texture).
%%
%% See external documentation.
-spec deleteTextures(Textures) -> 'ok' when Textures :: [integer()].
deleteTextures(Textures) ->
TexturesLen = length(Textures),
cast(5272, <> || C <- Textures>>)/binary,0:(((1+TexturesLen) rem 2)*32)>>).
%% @doc Bind a named texture to a texturing target
%%
%% ``gl:bindTexture'' lets you create or use a named texture. Calling ``gl:bindTexture''
%% with `Target' set to `?GL_TEXTURE_1D', `?GL_TEXTURE_2D', `?GL_TEXTURE_3D'
%% , or `?GL_TEXTURE_1D_ARRAY', `?GL_TEXTURE_2D_ARRAY', `?GL_TEXTURE_RECTANGLE'
%% , `?GL_TEXTURE_CUBE_MAP', `?GL_TEXTURE_2D_MULTISAMPLE' or `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY'
%% and `Texture' set to the name of the new texture binds the texture name to the target.
%% When a texture is bound to a target, the previous binding for that target is automatically
%% broken.
%%
%% See external documentation.
-spec bindTexture(Target, Texture) -> 'ok' when Target :: enum(),Texture :: integer().
bindTexture(Target,Texture) ->
cast(5273, <>).
%% @doc Set texture residence priority
%%
%% ``gl:prioritizeTextures'' assigns the `N' texture priorities given in `Priorities'
%% to the `N' textures named in `Textures' .
%%
%% See external documentation.
-spec prioritizeTextures(Textures, Priorities) -> 'ok' when Textures :: [integer()],Priorities :: [clamp()].
prioritizeTextures(Textures,Priorities) ->
TexturesLen = length(Textures),
PrioritiesLen = length(Priorities),
cast(5274, <> || C <- Textures>>)/binary,0:(((1+TexturesLen) rem 2)*32),PrioritiesLen:?GLuint,
(<< <> || C <- Priorities>>)/binary,0:(((1+PrioritiesLen) rem 2)*32)>>).
%% @doc Determine if textures are loaded in texture memory
%%
%% GL establishes a ``working set'' of textures that are resident in texture memory. These
%% textures can be bound to a texture target much more efficiently than textures that are
%% not resident.
%%
%% See external documentation.
-spec areTexturesResident(Textures) -> {0|1,Residences :: [0|1]} when Textures :: [integer()].
areTexturesResident(Textures) ->
TexturesLen = length(Textures),
call(5275, <> || C <- Textures>>)/binary,0:(((1+TexturesLen) rem 2)*32)>>).
%% @doc Determine if a name corresponds to a texture
%%
%% ``gl:isTexture'' returns `?GL_TRUE' if `Texture' is currently the name of
%% a texture. If `Texture' is zero, or is a non-zero value that is not currently the
%% name of a texture, or if an error occurs, ``gl:isTexture'' returns `?GL_FALSE'.
%%
%% See external documentation.
-spec isTexture(Texture) -> 0|1 when Texture :: integer().
isTexture(Texture) ->
call(5276, <>).
%% @doc glTexSubImage
%%
%% See external documentation.
-spec texSubImage1D(Target, Level, Xoffset, Width, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5277, <>);
texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) ->
send_bin(Pixels),
cast(5278, <>).
%% @doc glTexSubImage
%%
%% See external documentation.
-spec texSubImage2D(Target, Level, Xoffset, Yoffset, Width, Height, Format, Type, Pixels) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem().
texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) when is_integer(Pixels) ->
cast(5279, <>);
texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) ->
send_bin(Pixels),
cast(5280, <>).
%% @doc Copy pixels into a 1D texture image
%%
%% ``gl:copyTexImage1D'' defines a one-dimensional texture image with pixels from the current
%% `?GL_READ_BUFFER'.
%%
%% See external documentation.
-spec copyTexImage1D(Target, Level, Internalformat, X, Y, Width, Border) -> 'ok' when Target :: enum(),Level :: integer(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Border :: integer().
copyTexImage1D(Target,Level,Internalformat,X,Y,Width,Border) ->
cast(5281, <>).
%% @doc Copy pixels into a 2D texture image
%%
%% ``gl:copyTexImage2D'' defines a two-dimensional texture image, or cube-map texture image
%% with pixels from the current `?GL_READ_BUFFER'.
%%
%% See external documentation.
-spec copyTexImage2D(Target, Level, Internalformat, X, Y, Width, Height, Border) -> 'ok' when Target :: enum(),Level :: integer(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(),Border :: integer().
copyTexImage2D(Target,Level,Internalformat,X,Y,Width,Height,Border) ->
cast(5282, <>).
%% @doc Copy a one-dimensional texture subimage
%%
%% ``gl:copyTexSubImage1D'' replaces a portion of a one-dimensional texture image with
%% pixels from the current `?GL_READ_BUFFER' (rather than from main memory, as is the
%% case for {@link gl:texSubImage1D/7} ).
%%
%% See external documentation.
-spec copyTexSubImage1D(Target, Level, Xoffset, X, Y, Width) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer().
copyTexSubImage1D(Target,Level,Xoffset,X,Y,Width) ->
cast(5283, <>).
%% @doc Copy a two-dimensional texture subimage
%%
%% ``gl:copyTexSubImage2D'' replaces a rectangular portion of a two-dimensional texture
%% image or cube-map texture image with pixels from the current `?GL_READ_BUFFER' (rather
%% than from main memory, as is the case for {@link gl:texSubImage1D/7} ).
%%
%% See external documentation.
-spec copyTexSubImage2D(Target, Level, Xoffset, Yoffset, X, Y, Width, Height) -> 'ok' when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer().
copyTexSubImage2D(Target,Level,Xoffset,Yoffset,X,Y,Width,Height) ->
cast(5284, <>).
%% @doc glMap
%%
%% See external documentation.
-spec map1d(Target, U1, U2, Stride, Order, Points) -> 'ok' when Target :: enum(),U1 :: float(),U2 :: float(),Stride :: integer(),Order :: integer(),Points :: binary().
map1d(Target,U1,U2,Stride,Order,Points) ->
send_bin(Points),
cast(5285, <>).
%% @doc glMap
%%
%% See external documentation.
-spec map1f(Target, U1, U2, Stride, Order, Points) -> 'ok' when Target :: enum(),U1 :: float(),U2 :: float(),Stride :: integer(),Order :: integer(),Points :: binary().
map1f(Target,U1,U2,Stride,Order,Points) ->
send_bin(Points),
cast(5286, <>).
%% @doc glMap
%%
%% See external documentation.
-spec map2d(Target, U1, U2, Ustride, Uorder, V1, V2, Vstride, Vorder, Points) -> 'ok' when Target :: enum(),U1 :: float(),U2 :: float(),Ustride :: integer(),Uorder :: integer(),V1 :: float(),V2 :: float(),Vstride :: integer(),Vorder :: integer(),Points :: binary().
map2d(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
send_bin(Points),
cast(5287, <>).
%% @doc glMap
%%
%% See external documentation.
-spec map2f(Target, U1, U2, Ustride, Uorder, V1, V2, Vstride, Vorder, Points) -> 'ok' when Target :: enum(),U1 :: float(),U2 :: float(),Ustride :: integer(),Uorder :: integer(),V1 :: float(),V2 :: float(),Vstride :: integer(),Vorder :: integer(),Points :: binary().
map2f(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) ->
send_bin(Points),
cast(5288, <>).
%% @doc Return evaluator parameters
%%
%% {@link gl:map1d/6} and {@link gl:map1d/6} define evaluators. ``gl:getMap'' returns evaluator
%% parameters. `Target' chooses a map, `Query' selects a specific parameter, and `V'
%% points to storage where the values will be returned.
%%
%% See external documentation.
-spec getMapdv(Target, Query, V) -> 'ok' when Target :: enum(),Query :: enum(),V :: mem().
getMapdv(Target,Query,V) ->
send_bin(V),
call(5289, <>).
%% @doc
%% See {@link getMapdv/3}
-spec getMapfv(Target, Query, V) -> 'ok' when Target :: enum(),Query :: enum(),V :: mem().
getMapfv(Target,Query,V) ->
send_bin(V),
call(5290, <>).
%% @doc
%% See {@link getMapdv/3}
-spec getMapiv(Target, Query, V) -> 'ok' when Target :: enum(),Query :: enum(),V :: mem().
getMapiv(Target,Query,V) ->
send_bin(V),
call(5291, <>).
%% @doc Evaluate enabled one- and two-dimensional maps
%%
%% ``gl:evalCoord1'' evaluates enabled one-dimensional maps at argument `U' . ``gl:evalCoord2''
%% does the same for two-dimensional maps using two domain values, `U' and `V' .
%% To define a map, call {@link gl:map1d/6} and {@link gl:map1d/6} ; to enable and disable it,
%% call {@link gl:enable/1} and {@link gl:enable/1} .
%%
%% See external documentation.
-spec evalCoord1d(U) -> 'ok' when U :: float().
evalCoord1d(U) ->
cast(5292, <>).
%% @doc
%% See {@link evalCoord1d/1}
-spec evalCoord1f(U) -> 'ok' when U :: float().
evalCoord1f(U) ->
cast(5293, <>).
%% @equiv evalCoord1d(U)
-spec evalCoord1dv(U) -> 'ok' when U :: {U :: float()}.
evalCoord1dv({U}) -> evalCoord1d(U).
%% @equiv evalCoord1f(U)
-spec evalCoord1fv(U) -> 'ok' when U :: {U :: float()}.
evalCoord1fv({U}) -> evalCoord1f(U).
%% @doc
%% See {@link evalCoord1d/1}
-spec evalCoord2d(U, V) -> 'ok' when U :: float(),V :: float().
evalCoord2d(U,V) ->
cast(5294, <>).
%% @doc
%% See {@link evalCoord1d/1}
-spec evalCoord2f(U, V) -> 'ok' when U :: float(),V :: float().
evalCoord2f(U,V) ->
cast(5295, <>).
%% @equiv evalCoord2d(U,V)
-spec evalCoord2dv(U) -> 'ok' when U :: {U :: float(),V :: float()}.
evalCoord2dv({U,V}) -> evalCoord2d(U,V).
%% @equiv evalCoord2f(U,V)
-spec evalCoord2fv(U) -> 'ok' when U :: {U :: float(),V :: float()}.
evalCoord2fv({U,V}) -> evalCoord2f(U,V).
%% @doc Define a one- or two-dimensional mesh
%%
%% ``gl:mapGrid'' and {@link gl:evalMesh1/3} are used together to efficiently generate and
%% evaluate a series of evenly-spaced map domain values. {@link gl:evalMesh1/3} steps through
%% the integer domain of a one- or two-dimensional grid, whose range is the domain of the
%% evaluation maps specified by {@link gl:map1d/6} and {@link gl:map1d/6} .
%%
%% See external documentation.
-spec mapGrid1d(Un, U1, U2) -> 'ok' when Un :: integer(),U1 :: float(),U2 :: float().
mapGrid1d(Un,U1,U2) ->
cast(5296, <>).
%% @doc
%% See {@link mapGrid1d/3}
-spec mapGrid1f(Un, U1, U2) -> 'ok' when Un :: integer(),U1 :: float(),U2 :: float().
mapGrid1f(Un,U1,U2) ->
cast(5297, <>).
%% @doc
%% See {@link mapGrid1d/3}
-spec mapGrid2d(Un, U1, U2, Vn, V1, V2) -> 'ok' when Un :: integer(),U1 :: float(),U2 :: float(),Vn :: integer(),V1 :: float(),V2 :: float().
mapGrid2d(Un,U1,U2,Vn,V1,V2) ->
cast(5298, <