From f4060823a4141740608ab1efbdf1072fec436076 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 9 Feb 2012 12:18:34 +0100 Subject: [wx] Generate GL api from latest version - Remove edoc types in gl - Add OpenGL documentation --- lib/wx/.gitignore | 2 + lib/wx/api_gen/Makefile | 2 +- lib/wx/api_gen/README | 15 +- lib/wx/api_gen/gen_util.erl | 14 +- lib/wx/api_gen/gl_gen.erl | 11 +- lib/wx/api_gen/gl_gen_erl.erl | 432 +- lib/wx/api_gen/gl_scan_doc.erl | 286 + lib/wx/api_gen/glapi.conf | 8 +- lib/wx/c_src/gen/gl_fdefs.h | 918 +- lib/wx/c_src/gen/gl_finit.h | 456 +- lib/wx/c_src/gen/gl_funcs.cpp | 3010 +++---- lib/wx/c_src/gen/glu_finit.h | 2 +- lib/wx/include/gl.hrl | 543 +- lib/wx/src/gen/gl.erl | 17769 +++++++++++++++++++++++++++++++-------- lib/wx/src/gen/glu.erl | 667 +- 15 files changed, 18247 insertions(+), 5888 deletions(-) create mode 100644 lib/wx/api_gen/gl_scan_doc.erl (limited to 'lib/wx') diff --git a/lib/wx/.gitignore b/lib/wx/.gitignore index fd76f078d7..0fa427bfe5 100644 --- a/lib/wx/.gitignore +++ b/lib/wx/.gitignore @@ -1,2 +1,4 @@ test_log_* wx_test_case_info +api_gen/gl_man? +doc/html/* \ No newline at end of file diff --git a/lib/wx/api_gen/Makefile b/lib/wx/api_gen/Makefile index 15d62f90fd..8adb485ba9 100644 --- a/lib/wx/api_gen/Makefile +++ b/lib/wx/api_gen/Makefile @@ -30,7 +30,7 @@ ERL_COMPILE_FLAGS=+debug_info +warn_unused_vars COMPILER = gen_util wx_gen wx_gen_erl wx_gen_cpp COMPILER_T = $(COMPILER:%=$(EBIN)/%.beam) -GL_COMP = gl_gen gl_gen_erl gl_gen_c +GL_COMP = gl_gen gl_gen_erl gl_gen_c gl_scan_doc GL_COMP_T = $(GL_COMP:%=$(EBIN)/%.beam) TARGET_EDIR = ../src/gen diff --git a/lib/wx/api_gen/README b/lib/wx/api_gen/README index 10b5209789..dd0c49d227 100644 --- a/lib/wx/api_gen/README +++ b/lib/wx/api_gen/README @@ -1,6 +1,6 @@ API GENERATION: - Most of the code in wx is generated. - Users of wxErlang should not normally need to regenerate the generated code, + Most of the code in wx is generated. + Users of wxErlang should not normally need to regenerate the generated code, as it is checked in by wxErlang developers, when changes are made. Code checked in is currently generated from wxwidgets 2.8.10. @@ -10,6 +10,8 @@ REQUIREMENTS: used to parse wxWidgets c++ headers and generate xml files (in wx_xml/). + 2012-02-09 doxygen 1.7.4 is working fine + 2008-09-29 doxygen 1.4.6 is required. Later versions of Doxygen - up to 1.5.6 at least - have a bug in the xml generation which causes us problems. This has been logged and we are waiting for a fix. @@ -32,5 +34,12 @@ RUNNING: I keep the opengl headers separate so I don't go backwards in version when generating the code from another machine. + Also gl.h from different vendors differ so keep it consistent, + I have used mesa's gl.h and the glext.h from opengl.org + (version see GL_GLEXT_VERSION in gl.hrl) + + I also get the xml documentation from opengl.org (subversion) and place it in + api_gen/gl_man2 (all old functions) and api_gen/gl_man4 (all the new functions). + CONTRIBUTION: - Send me patches or update the svn version. + Send me patches diff --git a/lib/wx/api_gen/gen_util.erl b/lib/wx/api_gen/gen_util.erl index df5b4c3405..4638d4c7ea 100644 --- a/lib/wx/api_gen/gen_util.erl +++ b/lib/wx/api_gen/gen_util.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2011. All Rights Reserved. +%% Copyright Ericsson AB 2008-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -96,8 +96,8 @@ check_diff(Diff) -> [<<>>] -> ok; _ -> throw(diff) end, - <<_, _, "%% Copyright", _/binary>> = D1, - <<_, _, "%% Copyright", _/binary>> = D2, + copyright(D1), + copyright(D2), copyright catch throw:_ -> diff; @@ -108,6 +108,10 @@ check_diff(Diff) -> diff end. +copyright(<<_, _, "%% Copyright", _/binary>>) -> ok; +copyright(<<_, _, " * Copyright", _/binary>>) -> ok; +copyright(_) -> throw(diff). + w(Str) -> w(Str, []). w(Str,Args) -> @@ -217,7 +221,7 @@ erl_copyright() -> w("%%~n",[]), w("%% %CopyrightBegin%~n",[]), w("%%~n",[]), - w("%% Copyright Ericsson AB ~p-2011. All Rights Reserved.~n", + w("%% Copyright Ericsson AB ~p-2012. All Rights Reserved.~n", [StartYear]), w("%%~n",[]), w("%% The contents of this file are subject to the Erlang Public License,~n",[]), @@ -237,7 +241,7 @@ c_copyright() -> w("/*~n",[]), w(" * %CopyrightBegin%~n",[]), w(" *~n",[]), - w(" * Copyright Ericsson AB 2008-2011. All Rights Reserved.~n",[]), + w(" * Copyright Ericsson AB 2008-2012. All Rights Reserved.~n",[]), w(" *~n",[]), w(" * The contents of this file are subject to the Erlang Public License,~n",[]), w(" * Version 1.1, (the \"License\"); you may not use this file except in~n",[]), diff --git a/lib/wx/api_gen/gl_gen.erl b/lib/wx/api_gen/gl_gen.erl index 8998d341e7..ce0cb922e9 100644 --- a/lib/wx/api_gen/gl_gen.erl +++ b/lib/wx/api_gen/gl_gen.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2011. All Rights Reserved. +%% Copyright Ericsson AB 2008-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -62,11 +62,11 @@ gen_code() -> GLDefs = parse_gl_defs(Opts), {GLUDefines,GLUFuncs} = setup(GLUDefs, Opts), {GLDefines,GLFuncs} = setup(GLDefs, Opts), + gl_gen_erl:gl_defines(GLDefines), + gl_gen_erl:gl_api(GLFuncs), gl_gen_erl:glu_defines(GLUDefines), gl_gen_erl:glu_api(GLUFuncs), - gl_gen_erl:gl_defines(GLDefines), - gl_gen_erl:gl_api(GLFuncs), %%gl_gen_erl:gen_debug(GLFuncs,GLUFuncs), gl_gen_c:gen(GLFuncs,GLUFuncs), ok. @@ -360,7 +360,9 @@ extract_type_info2("**", Acc) -> [{by_ref,{pointer,2}}|Acc]; extract_type_info2(Type, Acc) -> [Type|Acc]. parse_type2(["void"], _T, _Opts) -> void; -parse_type2([N="void"|R], T, Opts) -> +parse_type2([N="void", const|R], T, Opts) -> + parse_type2([const|R],T#type{name=N, base=idx_binary},Opts); +parse_type2([N="void"|R], T, Opts) -> parse_type2(R,T#type{name=N},Opts); parse_type2([const|R],T=#type{mod=Mod},Opts) -> parse_type2(R,T#type{mod=[const|Mod]},Opts); @@ -676,6 +678,7 @@ get_extension(ExtName,_Opts) -> "IGP" ++ Name -> {reverse(Name),"PGI"}; "PH" ++ Name -> {reverse(Name),"HP"}; "YDEMERG" ++ Name -> {reverse(Name),"GREMEDY"}; + "SEO" ++ Name -> {reverse(Name),"OES"}; %%["" ++ Name] -> {Name; %% _ -> {ExtName, ""} end. diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl index f292c8723e..f77b2d8e24 100644 --- a/lib/wx/api_gen/gl_gen_erl.erl +++ b/lib/wx/api_gen/gl_gen_erl.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% Copyright Ericsson AB 2008-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -19,7 +19,7 @@ %%%------------------------------------------------------------------- %%% File : gl_gen_erl.erl %%% Author : Dan Gudmundsson -%%% Description : +%%% Description : %%% %%% Created : 18 Apr 2007 by Dan Gudmundsson %%%------------------------------------------------------------------- @@ -31,7 +31,7 @@ -import(lists, [foldl/3,foldr/3,reverse/1, keysearch/3, map/2, filter/2, max/1]). -import(gen_util, [lowercase/1, lowercase_all/1, uppercase/1, uppercase_all/1, - open_write/1, close/0, erl_copyright/0, w/2, + open_write/1, close/0, erl_copyright/0, w/2, args/3, args/4, strip_name/2]). gl_defines(Defs) -> @@ -40,7 +40,7 @@ gl_defines(Defs) -> w("~n%% OPENGL DEFINITIONS~n~n", []), w("%% This file is generated DO NOT EDIT~n~n", []), [gen_define(Def) || Def=#def{} <- Defs], - close(), + close(), ok. glu_defines(Defs) -> @@ -50,36 +50,38 @@ glu_defines(Defs) -> w("%% This file is generated DO NOT EDIT~n~n", []), [gen_define(Def) || Def=#def{} <- Defs], close(), - ok. + ok. gen_define(#def{name=N, val=Val, type=int}) -> w("-define(~s, ~p).~n", [N,Val]); gen_define(#def{name=N, val=Val, type=hex}) -> w("-define(~s, ~.16#).~n", [N,Val]); gen_define(#def{name=N, val=Val, type=string}) -> - w("-define(~s, ?~s).~n", [N,Val]). + w("-define(~s, ?~s).~n", [N,Val]); +gen_define(#def{name="GLEXT_64_TYPES"++_, val=undefined, type=undefined}) -> + ok. types() -> [{"GLenum", "32/native-unsigned"}, {"GLboolean", "8/native-unsigned"}, {"GLbitfield","32/native-unsigned"}, % %%{"GLvoid",":void "},% - {"GLbyte", "8/native-signed"}, % 1-byte signed - {"GLshort", "16/native-signed"}, % 2-byte signed - {"GLint", "32/native-signed"}, % 4-byte signed - {"GLubyte", "8/native-unsigned"}, % 1-byte unsigned - {"GLushort", "16/native-unsigned"}, % 2-byte unsigned - {"GLuint", "32/native-unsigned"}, % 4-byte unsigned - {"GLsizei", "32/native-signed"}, % 4-byte signed - {"GLfloat", "32/native-float"}, % single precision float - {"GLclampf", "32/native-float"}, % single precision float in [0,1] - {"GLdouble", "64/native-float"}, % double precision float - {"GLclampd", "64/native-float"}, % double precision float in [0,1] + {"GLbyte", "8/native-signed"}, % 1-byte signed + {"GLshort", "16/native-signed"}, % 2-byte signed + {"GLint", "32/native-signed"}, % 4-byte signed + {"GLubyte", "8/native-unsigned"}, % 1-byte unsigned + {"GLushort", "16/native-unsigned"}, % 2-byte unsigned + {"GLuint", "32/native-unsigned"}, % 4-byte unsigned + {"GLsizei", "32/native-signed"}, % 4-byte signed + {"GLfloat", "32/native-float"}, % single precision float + {"GLclampf", "32/native-float"}, % single precision float in [0,1] + {"GLdouble", "64/native-float"}, % double precision float + {"GLclampd", "64/native-float"}, % double precision float in [0,1] {"GLsizeiptr","64/native-unsigned"}, % 64 bits int, convert on c-side {"GLintptr", "64/native-unsigned"}, % 64 bits int, convert on c-sidew {"GLUquadric", "64/native-unsigned"},% Handle 32bits aargh 64bits on mac64 {"GLhandleARB","64/native-unsigned"},% Handle 32bits aargh 64bits on mac64 - + {"GLsync", "64/native-unsigned"}, % Pointer to record {"GLuint64", "64/native-unsigned"}, {"GLint64", "64/native-signed"} @@ -94,20 +96,17 @@ gl_api(Fs) -> w("%% See www.opengl.org~n",[]), w("%%~n", []), w("%% Booleans are represented by integers 0 and 1.~n~n", []), - w("%% @type mem(). memory block~n", []), - w("%% @type enum(). An integer defined in gl.hrl~n", []), - w("%% @type offset(). An integer which is an offset in an array~n", []), - w("%% @type clamp(). A float clamped between 0.0 - 1.0~n", []), - - w("-module(gl).~n~n",[]), + + w("-module(gl).~n~n",[]), w("-compile(inline).~n", []), %% w("-include(\"wxe.hrl\").~n", []), [w("-define(~s,~s).~n", [GL,Erl]) || {GL,Erl} <- types()], gen_types(gl), - + Exp = fun(F) -> gen_export(F) end, ExportList = lists:map(Exp,Fs), + w("~n-export([~s]).~n~n", [args(fun(EF) -> EF end, ",", ExportList, 60)]), w("-export([call/2, cast/2, send_bin/1]).~n",[]), w("%% @hidden~n", []), @@ -140,10 +139,10 @@ gl_api(Fs) -> w(" erlang:port_command(Port,Bin)~n", []), w(" end.~n", []), w("~n", []), - + w("~n%% API~n~n", []), [gen_funcs(F) || F <- Fs], - close(), + close(), ok. glu_api(Fs) -> @@ -155,28 +154,24 @@ glu_api(Fs) -> w("%% See www.opengl.org~n",[]), w("%%~n", []), w("%% Booleans are represented by integers 0 and 1.~n~n", []), - w("%% @type mem(). memory block~n", []), - w("%% @type enum(). An integer defined in gl.hrl~n", []), - w("%% @type offset(). An integer which is an offset in an array~n", []), - w("%% @type clamp(). A float clamped between 0.0 - 1.0~n~n", []), - w("-module(glu).~n",[]), + w("-module(glu).~n",[]), w("-compile(inline).~n", []), %%w("-include(\"wxe.hrl\").~n", []), [w("-define(~s,~s).~n", [GL,Erl]) || {GL,Erl} <- types()], gen_types(glu), - + Exp = fun(F) -> gen_export(F) end, ExportList = ["tesselate/2" | lists:map(Exp,Fs)], w("~n-export([~s]).~n~n", [args(fun(EF) -> EF end, ",", ExportList, 60)]), w("-import(gl, [call/2,cast/2,send_bin/1]).", []), w("~n%% API~n~n", []), - w("%% @spec (Vec3, [Vec3]) -> {Triangles, VertexPos}~n",[]), - w("%% Vec3 = {float(),float(),float()}~n",[]), - w("%% Triangles = [VertexIndex::integer()]~n",[]), - w("%% VertexPos = binary()~n",[]), + %% w("%% @spec (Vec3, [Vec3]) -> {Triangles, VertexPos}~n",[]), + %% w("%% Vec3 = {float(),float(),float()}~n",[]), + %% w("%% Triangles = [VertexIndex::integer()]~n",[]), + %% w("%% VertexPos = binary()~n",[]), w("%% @doc General purpose polygon triangulation.~n",[]), w("%% The first argument is the normal and the second a list of~n" "%% vertex positions. Returned is a list of indecies of the vertices~n" @@ -184,6 +179,9 @@ glu_api(Fs) -> "%% vertex positions, it starts with the vertices in Vs and~n" "%% may contain newly created vertices in the end.~n", []), + w("-spec tesselate(Normal, [Vs]) -> {Triangles, VertexPos}~n", []), + w(" when Normal :: vertex(), Vs :: vertex(),~n", []), + w(" Triangles :: [integer()], VertexPos :: binary().~n", []), w("tesselate({Nx,Ny,Nz}, Vs) ->~n",[]), w(" call(5000, <<(length(Vs)):32/native,0:32,~n" " Nx:?GLdouble,Ny:?GLdouble,Nz:?GLdouble,~n" @@ -215,15 +213,21 @@ gen_funcs(F) -> erase(current_func), w(".~n~n",[]). -gen_types(Where) -> +gen_types(Where) -> case Where of - glu -> ignore; + glu -> + w("-type vertex() :: {float(), float(), float()}.~n", []), + w("-type enum() :: non_neg_integer(). %% See wx/include/gl.hrl or glu.hrl~n", []); gl -> - w("-type clamp() :: float().~n", []), - w("-type offset() :: non_neg_integer().~n", []) + w("-type enum() :: non_neg_integer(). %% See wx/include/gl.hrl~n", []), + w("-type clamp() :: float(). %% 0.0..1.0~n", []), + w("-type offset() :: non_neg_integer(). %% Offset in memory block~n", []) end, - w("-type enum() :: non_neg_integer().~n", []), - w("-type mem() :: binary() | tuple().~n", []), + w("-type matrix() :: {float(),float(),float(),float(),~n", []), + w(" float(),float(),float(),float(),~n", []), + w(" float(),float(),float(),float(),~n", []), + w(" float(),float(),float(),float()}.~n", []), + w("-type mem() :: binary() | tuple(). %% Memory block~n", []), ok. gen_export(F) -> @@ -238,43 +242,182 @@ gen_export_1([F|_]) when is_list(F) -> gen_export_1(F) when is_list(F) -> gen_export2(get(F)). -gen_export2(#func{name=Name,alt={vector,VecPos,Vec}}) -> - #func{params=As0} = get(Vec), +gen_export2(#func{name=Name,alt=Alt={vector,VecPos,Vec}}) -> + #func{params=As0} = get(Vec), {As1,_As2} = lists:split(VecPos, As0), Args = lists:filter(fun(Arg) -> func_arg(Arg) =/= skip end, As1), - erl_func_name(Name) ++ "/" ++ integer_to_list(length(Args) +1); -gen_export2(#func{name=Name,params=As0}) -> + Export = erl_func_name(Name) ++ "/" ++ integer_to_list(length(Args) +1), + DocN = doc_name(Name,Alt), + (get({export_arg,DocN}) == undefined) andalso put({export_arg, DocN}, Export), + Export; +gen_export2(#func{name=Name,params=As0, alt=Alt}) -> Args = lists:filter(fun(Arg) -> func_arg(Arg) =/= skip end, As0), - erl_func_name(Name) ++ "/" ++ integer_to_list(length(Args)). + Export = erl_func_name(Name) ++ "/" ++ integer_to_list(length(Args)), + DocN = doc_name(Name,Alt), + (get({export_arg,DocN}) == undefined) andalso put({export_arg, DocN}, Export), + Export. -gen_doc([#func{name=Name, alt={vector,VecPos,Vec}}]) -> - #func{type=T,params=As} = get(Vec), +gen_doc([#func{name=Name, params=Orig, alt={vector,VecPos,Vec}}]) -> + #func{type=T,params=As} = get(Vec), {As1,As2} = lists:split(VecPos, As), + #arg{name=OrigName} = lists:last(Orig), Args1 = case args(fun func_arg/1, ",", As1) of [] -> []; Else -> Else++"," end, Args2 = args(fun func_arg/1, ",", As2), - w("%% @spec (~s{~s}) -> ~s~n",[Args1,Args2,doc_return_types(T,As, doc)]), w("%% @equiv ~s(~s)~n",[erl_func_name(Vec), Args1++Args2]), - SA1 = case doc_arg_types(As1, spec) of [] -> []; E -> E++"," end, - SA2 = doc_arg_types(As2, spec), - w("-spec ~s(~s{~s}) -> ~s.~n", - [erl_func_name(Name), SA1, SA2, - doc_return_types(T,As, spec)]); - -gen_doc([#func{name=Name,type=T,params=As,alt=Alt}|_]) -> - w("%% @spec (~s) -> ~s~n", [doc_arg_types(As, doc),doc_return_types(T,As, doc)]), - GLDoc = "http://www.opengl.org/sdk/docs/man/xhtml/", - w("%% @doc See external documentation.~n", - [GLDoc, doc_name(Name,Alt)]), - w("-spec ~s(~s) -> ~s.~n", - [erl_func_name(Name), doc_arg_types(As, spec), doc_return_types(T,As, spec)]). + SA1 = case doc_arg_types(As1) of [] -> []; E -> E++"," end, + SA2 = doc_arg_types(As2), + w("-spec ~s(~s~s) -> ~s when ~s :: {~s}.~n", + [erl_func_name(Name), SA1, erl_arg_name(OrigName), + doc_return_types(T,As), erl_arg_name(OrigName), SA2]); + +gen_doc([F=#func{name=Name,type=T,params=As, alt=Alt}|_]) -> + gen_doc(Name, Alt, gen_export2(F)), + Ps = [Arg || #arg{name=Arg, in=In, where=Where} <- As, + In =/= false, Where =/= c], + Args = args(fun erl_arg_name/1, ", ", Ps), + case Args of + [] -> + w("-spec ~s(~s) -> ~s.~n", + [erl_func_name(Name), Args, doc_return_types(T,As)]); + _ -> w("-spec ~s(~s) -> ~s when ~s.~n", + [erl_func_name(Name), Args, doc_return_types(T,As), doc_arg_types(As)]) + end. + +-define(LINE_LEN, 90). + +gen_doc(Name0, Alt, Export) -> + Name = doc_name(Name0, Alt), + case get({doc, Name}) of + undefined -> + GLDoc = "http://www.opengl.org/sdk/docs/man/xhtml/", + case parse_doc(Name, _Dir1 ="gl_man4", _Dir2="gl_man2") of + {error, _} -> + case reverse(Name) of + "BRA" ++ _ -> ok; + "TXE" ++ _ -> ok; + _ -> + %% io:format("Missing doc: no ~s.xml (~s) found in ~s or ~s~n", + %% [Name, Name0, Dir1, Dir2]), + ok + end, + w("%% @doc ~s~n%%~n%% See external documentation.~n", + [Name, GLDoc, Name]); + Doc -> + put({doc, Name}, Export), + format_doc(Doc, ?LINE_LEN), + w("~n%%~n%% See external documentation.~n", + [GLDoc, Name]) + end; + Where -> + w("%% @doc ~n", []), + w("%% See {@link ~s}~n", [Where]) + end. +parse_doc(Name, Dir1, Dir2) -> + case gl_scan_doc:file(filename:join(Dir1, Name++".xml"), []) of + {error, {_, "no such" ++ _}} -> + gl_scan_doc:file(filename:join(Dir2, Name++".xml"), []); + Doc -> + Doc + end. + +format_doc(Strs, Count) when Count < 0 -> + w("~n%% ", []), + format_doc(Strs, ?LINE_LEN); +format_doc([{constant, Const}|Rest], Count) -> + w("`?~s'", [Const]), + format_doc(Rest, Count-length(Const)-8); +format_doc([{emphasis, Const}|Rest], Count) -> + w("`~s'", [Const]), + format_doc(Rest, Count-length(Const)-7); +format_doc([{function, Func}|Rest], Count) -> + case Func of + "glu" ++ _ -> + w("``glu:~s''", [erl_func_name(Func)]); + "gl" ++ _ -> + w("``gl:~s''", [erl_func_name(Func)]); + _ -> + w("`~s'", [Func]) + end, + format_doc(Rest, Count-length(Func)-7); +format_doc([{reffunc, Func}|Rest], Count) -> + Out = fun(Export) -> + case Func of + "glu" ++ _ -> w(" {@link glu:~s} ", [Export]); + "gl" ++ _ -> w(" {@link gl:~s} ", [Export]) + end + end, + case get({export_arg, Func}) of + undefined -> + case get({export_arg, doc_name(Func, undefined)}) of + undefined -> + %% io:format("Func ~p undefined (~p) ~n", + %% [Func, doc_name(Func, undef)]), + w("see `~s'", [Func]); + Export -> Out(Export) + end; + Export -> + Out(Export) + end, + format_doc(Rest, Count-length(Func)-10); +format_doc([{parameter, Param}|Rest], Count) -> + w(" `~s' ", [erl_arg_name(Param)]), + format_doc(Rest, Count-length(Param)-7); +format_doc([{equation, Eq}|Rest], Count) -> +%% w("```", []), + format_doc([Eq], Count), +%% w("'''", []), + format_doc(Rest, Count); +format_doc([{fenced, Open, Close, Eq}|Rest], Count) -> + w(Open, []), + format_doc(Eq, Count), + w(Close, []), + format_doc(Rest, Count); + +format_doc([{code, Code}|Rest], Count) -> + w("``~s''", [Code]), + format_doc(Rest, Count-length(Code)-7); + +format_doc([para|Rest], _Count) -> + w("~n%%~n%% ", []), + format_doc(Rest, ?LINE_LEN); +format_doc([break|Rest], _Count) -> + w("
~n%% ", []), + format_doc(Rest, ?LINE_LEN); +format_doc([{purpose, Purpose}, para | Doc], _Count) -> + w("%% @doc ~s~n%%~n%% ", [uppercase(Purpose)]), + format_doc(Doc, ?LINE_LEN); +format_doc([{purpose, Purpose} | Doc], _Count) -> + w("%% @doc ~s~n%%~n%% ", [Purpose]), + format_doc(Doc, ?LINE_LEN); +format_doc([listentry|Rest], _Count) -> + w("~n%%~n%% ", []), + format_doc(Rest, ?LINE_LEN); +format_doc([Str|Rest], Count) -> + case length(Str) of + Len when Len < Count -> + w("~s", [Str]), + format_doc(Rest, Count-Len); + _ -> + {Str1, Str2} = split(Str, Count, []), + w("~s~n%% ", [Str1]), + format_doc([Str2|Rest], ?LINE_LEN) + end; +format_doc([], _) -> ok. + +split([$ |Str], Count, Acc) when Count =< 5 -> + {reverse(Acc), Str}; +split([Chr|Str], Count, Acc) -> + split(Str, Count-1, [Chr|Acc]); +split([], _, Acc) -> + {reverse(Acc), []}. gen_func(#func{name=Name,alt={vector,VecPos,Vec}}) -> - #func{params=As} = get(Vec), + #func{params=As} = get(Vec), {As1,As2} = lists:split(VecPos, As), Args1 = case args(fun func_arg/1, ",", As1) of [] -> []; Else -> Else++"," end, Args2 = args(fun func_arg/1, ",", As2), - + w("~s(~s{~s}) ->", [erl_func_name(Name),Args1,Args2]), w(" ~s(~s)", [erl_func_name(Vec), Args1++Args2]); gen_func(_F=#func{name=Name,type=T,params=As,id=MId}) -> @@ -290,7 +433,7 @@ gen_func(_F=#func{name=Name,type=T,params=As,id=MId}) -> w(" cast(~p, <<~s>>)", [MId, StrArgs]) end. -func_arg(#arg{in=In,where=W,name=Name,type=Type}) +func_arg(#arg{in=In,where=W,name=Name,type=Type}) when In =/= false, W =/= c -> case Type of #type{single={tuple,TSz0}} when TSz0 =/= undefined -> @@ -305,45 +448,39 @@ func_arg(#arg{in=In,where=W,name=Name,type=Type}) end; func_arg(_) -> skip. -doc_arg_types(Ps0, Type) -> +doc_arg_types(Ps0) -> Ps = [P || P=#arg{in=In, where=Where} <- Ps0,In =/= false, Where =/= c], - args(fun(Arg) -> doc_arg_type(Arg, Type) end, ",", Ps). + args(fun(Arg) -> doc_arg_type(Arg) end, ",", Ps). -doc_return_types(T, Ps0, Type) -> +doc_return_types(T, Ps0) -> Ps = [P || P=#arg{in=In, where=Where} <- Ps0,In =/= true, Where =/= c], - doc_return_types2(T, Ps, Type). - -doc_return_types2(void, [], _) -> "ok"; -doc_return_types2(void, [#arg{type=T}], _) -> doc_arg_type2(T); -doc_return_types2(T, [], _) -> doc_arg_type2(T); -doc_return_types2(void, Ps, Type) -> - "{" ++ args(fun(Arg) -> doc_arg_type(Arg, Type) end,",",Ps) ++ "}"; -doc_return_types2(T, Ps, Type) -> - "{" ++ doc_arg_type2(T) ++ "," ++ - args(fun(Arg) -> doc_arg_type(Arg, Type) end,",",Ps) ++ "}". - -doc_arg_type(#arg{name=Name,type=T}, doc) -> - try - erl_arg_name(Name) ++ "::" ++ doc_arg_type2(T) - catch _:Error -> - io:format("Error: ~p ~p~n~p~n",[Name, Error, erlang:get_stacktrace()]), - exit(error) - end; -doc_arg_type(#arg{name=Name,type=T}, spec) -> - try - doc_arg_type2(T) + doc_return_types2(T, Ps). + +doc_return_types2(void, []) -> "ok"; +doc_return_types2(void, [#arg{type=T}]) -> doc_arg_type2(T); +doc_return_types2(T, []) -> doc_arg_type2(T); +doc_return_types2(void, Ps) -> + "{" ++ args(fun(Arg) -> doc_arg_type(Arg) end,",",Ps) ++ "}"; +doc_return_types2(T, Ps) -> + "{" ++ doc_arg_type2(T) ++ "," ++ + args(fun(Arg) -> doc_arg_type(Arg) end,",",Ps) ++ "}". + +doc_arg_type(#arg{name=Name,type=T}) -> + try + erl_arg_name(Name) ++ " :: " ++ doc_arg_type2(T) catch _:Error -> io:format("Error spec: ~p ~p~n~p~n",[Name, Error, erlang:get_stacktrace()]), exit(error) end. - doc_arg_type2(T=#type{single=true}) -> doc_arg_type3(T); doc_arg_type2(T=#type{single=undefined}) -> doc_arg_type3(T); doc_arg_type2(T=#type{single={tuple,undefined}}) -> "{" ++ doc_arg_type3(T) ++ "}"; +doc_arg_type2(#type{base=float, single={tuple,16}}) -> + "matrix()"; doc_arg_type2(T=#type{single={tuple,Sz}}) -> "{" ++ args(fun doc_arg_type3/1, ",", lists:duplicate(Sz,T)) ++ "}"; doc_arg_type2(T=#type{single=list}) -> @@ -365,21 +502,21 @@ doc_arg_type3(#type{base=bool}) -> "0|1"; doc_arg_type3(#type{base=binary}) -> "binary()"; doc_arg_type3(#type{base=memory}) -> "mem()". -guard_test(As) -> - Str = args(fun(#arg{name=N,type=#type{base=guard_int}}) -> - " is_integer("++erl_arg_name(N)++")"; - (_) -> +guard_test(As) -> + Str = args(fun(#arg{name=N,type=#type{base=guard_int}}) -> + " is_integer("++erl_arg_name(N)++")"; + (_) -> skip end, ",", As), case Str of [] -> []; Other -> " when " ++ Other - end. + end. -pre_marshal([#arg{name=N,in=true,type=#type{base=binary}}|R]) -> +pre_marshal([#arg{name=N,in=true,type=#type{base=binary}}|R]) -> w(" send_bin(~s),~n", [erl_arg_name(N)]), pre_marshal(R); -pre_marshal([#arg{name=N,type=#type{base=memory}}|R]) -> +pre_marshal([#arg{name=N,type=#type{base=memory}}|R]) -> w(" send_bin(~s),~n", [erl_arg_name(N)]), pre_marshal(R); pre_marshal([A=#arg{name=N,type=#type{base=string,single=list}}|R]) -> @@ -412,14 +549,14 @@ marshal_arg(#type{size=Sz,name=Type,single={tuple,undefined}},Name,A0) -> " (<< <> ||" "C <- tuple_to_list("++Name++")>>)/binary", case Sz of - 4 -> + 4 -> {Str,Align} = align(4,A0,Str0), {Str++",0:((("++integer_to_list(Align div 4)++ "+size("++Name++")) rem 2)*32)",0}; - 8 -> + 8 -> align(8,A0,Str0) end; -marshal_arg(#type{size=BSz,name=Type,single={tuple,TSz}},Name,A0) +marshal_arg(#type{size=BSz,name=Type,single={tuple,TSz}},Name,A0) when is_integer(TSz) -> NameId = hd(Name), Names = [[NameId|integer_to_list(Id)] || Id <- lists:seq(1,TSz)], @@ -427,7 +564,7 @@ marshal_arg(#type{size=BSz,name=Type,single={tuple,TSz}},Name,A0) align(BSz,TSz,A0,All); marshal_arg(#type{size=BSz,name=Type,single={tuple,matrix12}},Name,A0) -> - NameId = hd(Name), + NameId = hd(Name), Ns0 = [[NameId|integer_to_list(Id)] || Id <- lists:seq(1,3)], Ns1 = [[NameId|integer_to_list(Id)] || Id <- lists:seq(4,6)], Ns2 = [[NameId|integer_to_list(Id)] || Id <- lists:seq(7,9)], @@ -436,7 +573,7 @@ marshal_arg(#type{size=BSz,name=Type,single={tuple,matrix12}},Name,A0) -> Ns0 ++ ["0"] ++ Ns1 ++ ["0"] ++ Ns2 ++ ["0"] ++ Ns3 ++ ["1"]), align(BSz,16,A0,All); -marshal_arg(#type{size=Sz,name=Type,base=Base,single=list},Name,A0) +marshal_arg(#type{size=Sz,name=Type,base=Base,single=list},Name,A0) when Base =:= float; Base =:= int -> KeepA = case Sz of 8 -> "0:32,"; _ -> "" end, Str0 = "(length("++Name++")):?GLuint,"++KeepA++"\n" @@ -459,14 +596,14 @@ marshal_arg(#type{base=string,single=true,ref={pointer,1}},Name,A0) -> align_after(1,A0,1,1,Name,Str); marshal_arg(#type{base=string,single=list,ref={pointer,2}},Name,A0) -> - Str0 = + Str0 = "(length("++Name++")):?GLuint," "(size("++Name ++ "Temp)):?GLuint," "(" ++ Name ++ "Temp)/binary", {Str,A} = align(4,A0,Str0), - {Str ++ ",0:((8-((size("++Name++"Temp)+"++ + {Str ++ ",0:((8-((size("++Name++"Temp)+"++ integer_to_list(A) ++") rem 8)) rem 8)", 0}; - + marshal_arg(#type{size=Sz,name=Type,single={tuple_list,TSz}},Name,A0) -> NameId = hd(Name), Names = [[NameId|integer_to_list(Id)] || Id <- lists:seq(1,TSz)], @@ -508,11 +645,11 @@ align(8,_,6,Str) -> {"0:16,"++Str, 0}; align(8,_,7,Str) -> {"0:8," ++Str, 0}. align_after(8,0,_Add,_Multiplier,_Name,Str) -> {Str,0}; -align_after(4,0,Add,Mult,Name,Str) -> +align_after(4,0,Add,Mult,Name,Str) -> Extra = extra_align(Add,Mult), Align = ",0:(((length("++Name++")"++Extra++") rem 2)*32)", {Str ++ Align,0}; -align_after(4,4,Add,Mult,Name,Str) -> +align_after(4,4,Add,Mult,Name,Str) -> Extra = extra_align(Add,Mult), Align = ",0:(((1+length("++Name++")"++Extra++") rem 2)*32)", {Str ++ Align,0}; @@ -531,14 +668,14 @@ align_after(Sz,A,Add,Mult,Name,Str) -> extra_align(0,1) -> ""; extra_align(0,M) when M > 1 -> "* " ++ integer_to_list(M); extra_align(A,1) when A > 0 -> "+ " ++ integer_to_list(A); -extra_align(A,M) when A > 0,M>1 -> +extra_align(A,M) when A > 0,M>1 -> "* " ++ integer_to_list(M) ++ "+ " ++ integer_to_list(A). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% have_return_vals(void, Ps) -> - lists:any(fun(#arg{in=In, type=#type{base=B}}) -> - In =/= true orelse B =:= memory + lists:any(fun(#arg{in=In, type=#type{base=B}}) -> + In =/= true orelse B =:= memory end, Ps); have_return_vals(#type{}, _) -> true. @@ -550,21 +687,28 @@ erl_arg_name(Name) -> uppercase(Name). check_name("begin") -> "'begin'"; check_name("end") -> "'end'"; check_name(Other) -> Other. - - -doc_name(Name0, Alt) -> - Name = doc_name2(Name0,Alt), -%% case lists:member(lists:last(Name0), "uvbisdf987654312") of -%% true -> io:format("~s ~s~n", [Name0,Name]); -%% false -> ignore -%% end, - Name. - -doc_name2(N="glGetBufferParameteriv", _) -> N; -doc_name2(N="glEnd", _) -> N; -doc_name2(Name, {has_vector,_,_}) -> + +doc_name(N="glGetBufferParameteriv", _) -> N; +doc_name("glEnd"++What, _) -> "glBegin"++What; +doc_name("glDisable" ++ What, _) -> "glEnable" ++ What; +doc_name("glPop" ++ What, _) -> "glPush" ++ What; +doc_name("glGetBooleanv", _) -> "glGet"; +doc_name("glGetBooleani_v", _) -> "glGet"; +doc_name("glGetIntegerv", _) -> "glGet"; +doc_name("glGetIntegeri_v", _) -> "glGet"; +doc_name("glGetInteger64v", _) -> "glGet"; +doc_name("glGetInteger64i_v", _) -> "glGet"; +doc_name("glGetFloatv", _) -> "glGet"; +doc_name("glGetDoublev", _) -> "glGet"; +doc_name("glGetFloati_v", _) -> "glGet"; +doc_name("glGetDoublei_v", _) -> "glGet"; +doc_name("glUniformMatr" ++ _, _) -> "glUniform"; +doc_name("glTexSubImage" ++ _, _) -> "glTexSubImage"; +doc_name("glFramebufferText" ++ _, _) -> "glFramebufferTexture"; +doc_name("glProgramUniformMatr" ++ _, _) -> "glProgramUniform"; +doc_name(Name, {has_vector,_,_}) -> strip_hard(reverse(Name)); -doc_name2(Name, _) -> +doc_name(Name, _) -> reverse(strip(reverse(Name))). strip_hard(Rev) -> @@ -583,6 +727,21 @@ strip([$v,$s,$N,N|R]) when N > 47, N < 58 -> R; strip([$v,$d,$N,N|R]) when N > 47, N < 58 -> R; strip([$v,$f,$N,N|R]) when N > 47, N < 58 -> R; strip([$b,$u,$N,N|R]) when N > 47, N < 58 -> R; +strip([$v,$b,$I,N|R]) when N > 47, N < 58 -> R; +strip([$v,$i,$I,N|R]) when N > 47, N < 58 -> R; +strip([$v,$s,$I,N|R]) when N > 47, N < 58 -> R; +strip([$v,$d,$I,N|R]) when N > 47, N < 58 -> R; +strip([$v,$f,$I,N|R]) when N > 47, N < 58 -> R; +strip([$b,$u,$I,N|R]) when N > 47, N < 58 -> R; + +strip([$v,$b,$u,N,$I|R]) when N > 47, N < 58 ->R; +strip([$v,$i,$u,N,$I|R]) when N > 47, N < 58 ->R; +strip([$v,$s,$u,N,$I|R]) when N > 47, N < 58 ->R; +strip([$v,$b,N,$I|R]) when N > 47, N < 58 -> R; +strip([$v,$i,N,$I|R]) when N > 47, N < 58 -> R; +strip([$v,$s,N,$I|R]) when N > 47, N < 58 -> R; +strip([$v,$d,N,$I|R]) when N > 47, N < 58 -> R; +strip([$v,$f,N,$I|R]) when N > 47, N < 58 -> R; strip([$v,$b,$u,N|R]) when N > 47, N < 58 ->R; strip([$v,$i,$u,N|R]) when N > 47, N < 58 ->R; @@ -593,6 +752,15 @@ strip([$v,$s,N|R]) when N > 47, N < 58 -> R; strip([$v,$d,N|R]) when N > 47, N < 58 -> R; strip([$v,$f,N|R]) when N > 47, N < 58 -> R; +strip([$b,$u,N,$I|R]) when N > 47, N < 58 ->R; +strip([$i,$u,N,$I|R]) when N > 47, N < 58 ->R; +strip([$s,$u,N,$I|R]) when N > 47, N < 58 ->R; +strip([$b,N,$I|R]) when N > 47, N < 58 -> R; +strip([$i,N,$I|R]) when N > 47, N < 58 -> R; +strip([$s,N,$I|R]) when N > 47, N < 58 -> R; +strip([$d,N,$I|R]) when N > 47, N < 58 -> R; +strip([$f,N,$I|R]) when N > 47, N < 58 -> R; + strip([$b,$u,N|R]) when N > 47, N < 58 ->R; strip([$i,$u,N|R]) when N > 47, N < 58 ->R; strip([$s,$u,N|R]) when N > 47, N < 58 ->R; @@ -606,6 +774,7 @@ strip([$v,$b,$u|R]) -> R; strip([$v,$i,$u|R]) -> R; strip([$v,$s,$u|R]) -> R; strip([$v,$b|R]) -> R; +strip([$v,$i,$I|R]) -> R; strip([$v,$i|R]) -> R; strip([$v,$s|R]) -> R; strip([$v,$d|R]) -> R; @@ -629,6 +798,12 @@ strip([$i,$n|R]) -> [$n|R]; strip([$f,$n|R]) -> [$n|R]; strip([$d,$n|R]) -> [$n|R]; +%% strip([$D,$3|R]) -> R; +%% strip([$D,$2|R]) -> R; +%% strip([$D,$1|R]) -> R; + +strip([$I|R]) -> R; +strip([$L|R]) -> R; strip([$v,R]) -> R; strip([N|R]) when N > 47, N < 58 -> R; strip([_|R="tceRlg"]) -> R; @@ -656,7 +831,6 @@ gen_debug(GL, GLU) -> w("].~n~n", []), close(). - printd([F|R],Mod) when is_list(F) -> printd(F,Mod), printd(R,Mod); @@ -667,6 +841,6 @@ printd(F,Mod) -> #func{where=erl} -> ok; #func{id=Id, name=Method} -> w(" {~p, {~s, ~s, 0}},~n", [Id, Mod, erl_func_name(Method)]); - _Other -> - io:format("F= ~p => ~p~n", [F, _Other]) + _Other -> + io:format("F= ~p => ~p~n", [F, _Other]) end. diff --git a/lib/wx/api_gen/gl_scan_doc.erl b/lib/wx/api_gen/gl_scan_doc.erl new file mode 100644 index 0000000000..fc7b7cf275 --- /dev/null +++ b/lib/wx/api_gen/gl_scan_doc.erl @@ -0,0 +1,286 @@ +%%-*-erlang-*- +%%-------------------------------------------------------------------- +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2012. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%%---------------------------------------------------------------------- +-module(gl_scan_doc). + +-export([file/2]). +-export([event/3]). + +-compile(export_all). + +-define(error(Reason), + throw({gl_output_error, Reason})). + +-record(state, {type=undefined, gen_output=false, str=[]}). + +file(FileName, Options0) -> + {Options2, State} = parse_options(Options0), + Options = [skip_external_dtd, {event_fun, fun event/3}, {event_state, State}|Options2], + case xmerl_sax_parser:file(FileName, Options) of + {ok, #state{str=Str}, _} -> lists:reverse(Str); + Else -> Else + end. + +event(Event, _LineNo, State) -> + gen_output(Event, State). + +parse_options(Options) -> + parse_options(Options, #state{}). + +parse_options(Options, State) -> + {Options, State}. + +%% Element +%%---------------------------------------------------------------------- +gen_output({characters, String0}, #state{gen_output=true, type=Type, str=Str} = State) -> + case fix_str(strip_white_space(String0)) of + [] -> State; + String -> + Add = case Type of + mi -> case hd(Str) of + "/" -> String; + "*" -> String; + "+" -> String; + "-" -> String; + {fenced,_,_} -> String; + _ -> + [$ |String] + end; + constant -> {constant, String}; + emphasis -> {emphasis, String}; + function -> {function, String}; + reffunc -> {reffunc, String}; + purpose -> {purpose, String}; + parameter -> {parameter, String}; + equation -> {equation, String}; + _ -> String + end, + State#state{str=[Add|Str]} + end; + +gen_output({startElement, _Uri, "function", _QName, _Attributes}, #state{gen_output=true} = State) -> + State#state{type=function}; +gen_output({endElement, _Uri, "function", _QName}, #state{gen_output=true} = State) -> + State#state{type=undefined}; + +gen_output({startElement, _Uri, "constant", _QName, _Attributes}, #state{gen_output=true} = State) -> + State#state{type=constant}; +gen_output({endElement, _Uri, "constant", _QName}, #state{gen_output=true} = State) -> + State#state{type=undefined}; + +gen_output({startElement, _Uri, "parameter", _QName, _Attributes}, #state{gen_output=true} = State) -> + State#state{type=parameter}; +gen_output({endElement, _Uri, "parameter", _QName}, #state{gen_output=true} = State) -> + State#state{type=undefined}; + +gen_output({startElement, _Uri, "emphasis", _QName, _Attributes}, #state{gen_output=true} = State) -> + State#state{type=emphasis}; +gen_output({endElement, _Uri, "emphasis", _QName}, #state{gen_output=true} = State) -> + State#state{type=undefined}; + +gen_output(startDocument, State) -> + State; +gen_output(endDocument, State) -> + State; + +gen_output({startElement, _Uri, "refentrytitle", _QName, _Attributes}, #state{gen_output=true} = State) -> + State#state{type=reffunc}; +gen_output({endElement, _Uri, "refentrytitle", _QName}, #state{gen_output=true} = State) -> + State#state{type=undefined}; + +gen_output({startElement, _Uri, "refpurpose", _QName, _Attributes}, State) -> + State#state{gen_output=true, type=purpose}; +gen_output({endElement, _Uri, "refpurpose", _QName}, State) -> + State#state{gen_output=false, type=undefined}; + +gen_output({startElement, _Uri, "refsect1", _QName, [{_, _, "id", "description"}]}, State) -> + State#state{gen_output=true}; +gen_output({endElement, _Uri, "refsect1", _QName}, State) -> + State#state{gen_output=false}; + +gen_output({startElement, _Uri, "title", _QName, _Attributes}, #state{gen_output=true} = State) -> + State#state{gen_output=skip}; +gen_output({endElement, _Uri, "title", _QName}, #state{gen_output=skip} = State) -> + State#state{gen_output=true}; + +%% gen_output({startElement, _Uri, "inlineequation", _QName, _Attributes}, #state{gen_output=true} = State) -> +%% State#state{type=equation}; +%% gen_output({endElement, _Uri, "inlineequation", _QName}, #state{gen_output=skip} = State) -> +%% State#state{type=undefined}; +%% gen_output({startElement, _Uri, "informalequation", _QName, _Attributes}, #state{gen_output=true} = State) -> +%% State#state{type=equation}; +%% gen_output({endElement, _Uri, "informalequation", _QName}, #state{gen_output=skip} = State) -> +%% State#state{type=undefined}; +gen_output({startElement, _Uri, "mfenced", _QName, Attributes}, #state{gen_output=true, str=Str} = State) -> + Fenc = get_fenc(Attributes, "(", ")"), + State#state{str=[Fenc|Str]}; +gen_output({endElement, _Uri, "mfenced", _QName}, #state{gen_output=true, str=Str0} = State) -> + Check = fun(What) -> case What of {fenced,_,_} ->false; _ -> true end end, + {Fenced, [{fenced, Open, Close}|Str]} = lists:splitwith(Check, Str0), + State#state{str=[{fenced, Open, Close, lists:reverse(Fenced)}| Str]}; + +%% gen_output({startElement, _Uri, "tgroup", _QName, Attributes}, #state{gen_output=true, str=Str} = State) -> +%% {_, _, _, ValueStr} = lists:keyfind(3, "cols", Attributes), +%% ColSz = list_to_integer(ValueStr), +%% State#state{str=[{tgroup, ColSz}|Str]}; +%% gen_output({endElement, _Uri, "tgroup", _QName}, #state{gen_output=true, str=Str0} = State) -> +%% Check = fun(What) -> case What of {tgroup, _} ->false; _ -> true end end, +%% {Rows, [{tgroup, ColSize}|Str]} = lists:splitwith(Check, Str0), +%% State#state{str=[{tgroup, ColSize, lists:reverse(Rows)}| Str]}; + +%% gen_output({endElement, _Uri, "row", _QName}, #state{gen_output=true, str=Str} = State) -> +%% State#state{type=undefined, str=[break|Str]}; +gen_output({startElement, _Uri, "informaltable", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; +gen_output({endElement, _Uri, "informaltable", _QName}, #state{gen_output=true, str=Str} = State) -> + State#state{str=["
"|Str]}; +gen_output({startElement, _Uri, "table", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; +gen_output({endElement, _Uri, "table", _QName}, #state{gen_output=true, str=Str} = State) -> + State#state{str=["
"|Str]}; + +gen_output({startElement, _Uri, "tbody", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; +gen_output({endElement, _Uri, "tbody", _QName}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; + +gen_output({startElement, _Uri, "thead", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; +gen_output({endElement, _Uri, "thead", _QName}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; +gen_output({startElement, _Uri, "row", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; +gen_output({endElement, _Uri, "row", _QName}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; +gen_output({startElement, _Uri, "entry", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; +gen_output({endElement, _Uri, "entry", _QName}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[""|Str]}; + +gen_output({startElement, _Uri, "mi", _QName, _Attributes}, #state{gen_output=true} = State) -> + State#state{type=mi}; +gen_output({endElement, _Uri, "mi", _QName}, #state{gen_output=true} = State) -> + State#state{type=undefined}; +gen_output({startElement, _Uri, "mn", _QName, _Attributes}, #state{gen_output=true} = State) -> + State#state{type=mi}; +gen_output({endElement, _Uri, "mn", _QName}, #state{gen_output=true} = State) -> + State#state{type=undefined}; + + + +gen_output({startElement, _Uri, "varlistentry", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) -> + State#state{str=[listentry|Str]}; + +gen_output({endElement, _Uri, "mfrac", _QName}, #state{gen_output=true, str=[A0,B|Str]} = State) -> + A = case A0 of + [$ |A1] -> A1; + A1 -> A1 + end, + State#state{str=[A,"/",B|Str]}; + +gen_output({startElement, _Uri, "para", _QName, _Attributes}, #state{gen_output=true, str=Str} = State) -> + case Str of + [para|_] -> State; + [": "|_] -> State; + [Const, listentry | Rest] -> + State#state{str=[": ",Const,para|Rest]}; + [Mod, Const, listentry | Rest] -> + State#state{str=[": ",Mod,Const,para|Rest]}; + _ -> + State#state{str=[para|Str]} + end; + +%% gen_output({startElement, _Uri, What, _QName, _Attributes}, State) -> +%% io:format("Skipped ~s~n",[What]), +%% State; + +gen_output(_E, State) -> + State. + +%%---------------------------------------------------------------------- +%% Function : parse_attributes(Attributes) -> Result +%% Parameters: +%% Result : +%% Description: +%%---------------------------------------------------------------------- +print_attributes([]) -> + ok; +print_attributes([{_Uri, _Prefix, LocalName, AttrValue} |Attributes]) -> + io:format(" ~s=\"~s\"",[LocalName, AttrValue]), + print_attributes(Attributes). + +get_fenc([{_Uri, _Prefix, "open", AttrValue} |Attributes], _Open, Close) + when AttrValue /= "" -> + get_fenc(Attributes, fenc(AttrValue), Close); +get_fenc([{_Uri, _Prefix, "close", AttrValue} |Attributes], Open, _Close) + when AttrValue /= "" -> + get_fenc(Attributes, Open, fenc(AttrValue)); +get_fenc([_|Attributes], Open, Close) -> + get_fenc(Attributes, Open, Close); +get_fenc([], Open, Close) -> + {fenced,Open,Close}. + +fenc("∥") -> "||"; +fenc("∣") -> "|"; +fenc("⌈") -> "|"; +fenc("⌉") -> "|"; +fenc("⌈") -> "|"; +fenc("⌉") -> "|"; +fenc("⌊") -> "|"; +fenc("⌋") -> "|"; +fenc("⌊") -> "|"; +fenc("⌋") -> "|"; +fenc("[") -> "["; +fenc("]") -> "]"; +fenc(Else = [_]) -> Else. + +strip_white_space([$ | Str = [$ |_]]) -> + strip_white_space(Str); +strip_white_space([$\n| Str]) -> + strip_white_space([$ |Str]); +strip_white_space([$\t| Str]) -> + strip_white_space([$ |Str]); +strip_white_space([$\\| Str]) -> + strip_white_space(Str); + +strip_white_space([Char|Str]) -> + [Char|strip_white_space(Str)]; +strip_white_space([]) -> []. + +fix_str([$<|Str]) -> + [$&,$l,$t,$;|fix_str(Str)]; +fix_str([$>|Str]) -> + [$&,$g,$t,$;|fix_str(Str)]; +fix_str("×"++Str) -> + [$*|fix_str(Str)]; +fix_str("″"++Str) -> + [$"|fix_str(Str)]; +fix_str("·"++Str) -> + [$.|fix_str(Str)]; +fix_str("⁡"++Str) -> + fix_str(Str); +fix_str("⁢"++Str) -> + [$ |fix_str(Str)]; +fix_str([$&|Str]) -> + [$&,$a,$m,$p,$; |fix_str(Str)]; +fix_str([C|Str]) when C > 255 -> + fix_str(Str); +fix_str([C|Str]) -> + [C|fix_str(Str)]; +fix_str([]) -> []. diff --git a/lib/wx/api_gen/glapi.conf b/lib/wx/api_gen/glapi.conf index 525ccf8b68..59fa8f7727 100644 --- a/lib/wx/api_gen/glapi.conf +++ b/lib/wx/api_gen/glapi.conf @@ -57,11 +57,13 @@ "glVertexAttribP3", %* "glVertexAttribP4", %* - "glGetActiveSubroutineUniformiv", %% Bad API don't know what to allocate needs to ask + %% Bad API don't know what to allocate needs to ask + "glGetActiveSubroutineUniformiv", + "glGetActiveAtomicCounterBufferiv", %% EXT %% By default skip these extensions - "SGIX","SGIS","NV","ATI","AMD","SUN","SUNX","GREMEDY", + "SGIX","SGIS","NV","ATI","AMD","SUN","SUNX","GREMEDY","OES","MESA", "HP","IBM","INTEL","APPLE","3DFX","PGI","EXT"]}. %% Exceptions to the above @@ -336,7 +338,6 @@ {"length", [skip, {single, true}]}, {"name", {string,"bufSize","length"}}]}. - {"glGenRenderbuffers", {"renderbuffers", {single,{list,"n","n"}}}}. {"glGenFramebuffers", {"framebuffers",{single,{list,"n","n"}}}}. {"glGetRenderbufferParameteriv", {"params", {single,true}}}. @@ -491,4 +492,5 @@ {"glScissorIndexedv", {"v", {single,{tuple,4}}}}. {"glDepthRangeArrayv", [{"count",{c_only,{length,"v"}}}, {"v", [{single,{tuple_list,2}}]}]}. +{"glGetInternalformativ", {"params", [out, {single, {list, "bufSize", "bufSize"}}]}}. diff --git a/lib/wx/c_src/gen/gl_fdefs.h b/lib/wx/c_src/gen/gl_fdefs.h index a45896d30d..3e742724aa 100644 --- a/lib/wx/c_src/gen/gl_fdefs.h +++ b/lib/wx/c_src/gen/gl_fdefs.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2010. All Rights Reserved. + * Copyright Ericsson AB 2008-2012. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -31,40 +31,200 @@ typedef struct { } gl_fns_t; #define GLE_GL_FUNC_START 5037 -typedef void (APIENTRY * WXEGLACCUM)(GLenum,GLfloat); -WXE_EXTERN WXEGLACCUM weglAccum; +typedef void (APIENTRY * WXEGLCLEARINDEX)(GLfloat); +WXE_EXTERN WXEGLCLEARINDEX weglClearIndex; +typedef void (APIENTRY * WXEGLCLEARCOLOR)(GLclampf,GLclampf,GLclampf,GLclampf); +WXE_EXTERN WXEGLCLEARCOLOR weglClearColor; +typedef void (APIENTRY * WXEGLCLEAR)(GLbitfield); +WXE_EXTERN WXEGLCLEAR weglClear; +typedef void (APIENTRY * WXEGLINDEXMASK)(GLuint); +WXE_EXTERN WXEGLINDEXMASK weglIndexMask; +typedef void (APIENTRY * WXEGLCOLORMASK)(GLboolean,GLboolean,GLboolean,GLboolean); +WXE_EXTERN WXEGLCOLORMASK weglColorMask; typedef void (APIENTRY * WXEGLALPHAFUNC)(GLenum,GLclampf); WXE_EXTERN WXEGLALPHAFUNC weglAlphaFunc; -typedef GLboolean (APIENTRY * WXEGLARETEXTURESRESIDENT)(GLsizei,const GLuint *,GLboolean *); -WXE_EXTERN WXEGLARETEXTURESRESIDENT weglAreTexturesResident; -typedef void (APIENTRY * WXEGLARRAYELEMENT)(GLint); -WXE_EXTERN WXEGLARRAYELEMENT weglArrayElement; -typedef void (APIENTRY * WXEGLBEGIN)(GLenum); -WXE_EXTERN WXEGLBEGIN weglBegin; -typedef void (APIENTRY * WXEGLBINDTEXTURE)(GLenum,GLuint); -WXE_EXTERN WXEGLBINDTEXTURE weglBindTexture; -typedef void (APIENTRY * WXEGLBITMAP)(GLsizei,GLsizei,GLfloat,GLfloat,GLfloat,GLfloat,const GLubyte *); -WXE_EXTERN WXEGLBITMAP weglBitmap; typedef void (APIENTRY * WXEGLBLENDFUNC)(GLenum,GLenum); WXE_EXTERN WXEGLBLENDFUNC weglBlendFunc; +typedef void (APIENTRY * WXEGLLOGICOP)(GLenum); +WXE_EXTERN WXEGLLOGICOP weglLogicOp; +typedef void (APIENTRY * WXEGLCULLFACE)(GLenum); +WXE_EXTERN WXEGLCULLFACE weglCullFace; +typedef void (APIENTRY * WXEGLFRONTFACE)(GLenum); +WXE_EXTERN WXEGLFRONTFACE weglFrontFace; +typedef void (APIENTRY * WXEGLPOINTSIZE)(GLfloat); +WXE_EXTERN WXEGLPOINTSIZE weglPointSize; +typedef void (APIENTRY * WXEGLLINEWIDTH)(GLfloat); +WXE_EXTERN WXEGLLINEWIDTH weglLineWidth; +typedef void (APIENTRY * WXEGLLINESTIPPLE)(GLint,GLushort); +WXE_EXTERN WXEGLLINESTIPPLE weglLineStipple; +typedef void (APIENTRY * WXEGLPOLYGONMODE)(GLenum,GLenum); +WXE_EXTERN WXEGLPOLYGONMODE weglPolygonMode; +typedef void (APIENTRY * WXEGLPOLYGONOFFSET)(GLfloat,GLfloat); +WXE_EXTERN WXEGLPOLYGONOFFSET weglPolygonOffset; +typedef void (APIENTRY * WXEGLPOLYGONSTIPPLE)(const GLubyte *); +WXE_EXTERN WXEGLPOLYGONSTIPPLE weglPolygonStipple; +typedef void (APIENTRY * WXEGLGETPOLYGONSTIPPLE)(GLubyte *); +WXE_EXTERN WXEGLGETPOLYGONSTIPPLE weglGetPolygonStipple; +typedef void (APIENTRY * WXEGLEDGEFLAGV)(const GLboolean *); +WXE_EXTERN WXEGLEDGEFLAGV weglEdgeFlagv; +typedef void (APIENTRY * WXEGLSCISSOR)(GLint,GLint,GLsizei,GLsizei); +WXE_EXTERN WXEGLSCISSOR weglScissor; +typedef void (APIENTRY * WXEGLCLIPPLANE)(GLenum,const GLdouble *); +WXE_EXTERN WXEGLCLIPPLANE weglClipPlane; +typedef void (APIENTRY * WXEGLGETCLIPPLANE)(GLenum,GLdouble *); +WXE_EXTERN WXEGLGETCLIPPLANE weglGetClipPlane; +typedef void (APIENTRY * WXEGLDRAWBUFFER)(GLenum); +WXE_EXTERN WXEGLDRAWBUFFER weglDrawBuffer; +typedef void (APIENTRY * WXEGLREADBUFFER)(GLenum); +WXE_EXTERN WXEGLREADBUFFER weglReadBuffer; +typedef void (APIENTRY * WXEGLENABLE)(GLenum); +WXE_EXTERN WXEGLENABLE weglEnable; +typedef void (APIENTRY * WXEGLDISABLE)(GLenum); +WXE_EXTERN WXEGLDISABLE weglDisable; +typedef GLboolean (APIENTRY * WXEGLISENABLED)(GLenum); +WXE_EXTERN WXEGLISENABLED weglIsEnabled; +typedef void (APIENTRY * WXEGLENABLECLIENTSTATE)(GLenum); +WXE_EXTERN WXEGLENABLECLIENTSTATE weglEnableClientState; +typedef void (APIENTRY * WXEGLDISABLECLIENTSTATE)(GLenum); +WXE_EXTERN WXEGLDISABLECLIENTSTATE weglDisableClientState; +typedef void (APIENTRY * WXEGLGETBOOLEANV)(GLenum,GLboolean *); +WXE_EXTERN WXEGLGETBOOLEANV weglGetBooleanv; +typedef void (APIENTRY * WXEGLGETDOUBLEV)(GLenum,GLdouble *); +WXE_EXTERN WXEGLGETDOUBLEV weglGetDoublev; +typedef void (APIENTRY * WXEGLGETFLOATV)(GLenum,GLfloat *); +WXE_EXTERN WXEGLGETFLOATV weglGetFloatv; +typedef void (APIENTRY * WXEGLGETINTEGERV)(GLenum,GLint *); +WXE_EXTERN WXEGLGETINTEGERV weglGetIntegerv; +typedef void (APIENTRY * WXEGLPUSHATTRIB)(GLbitfield); +WXE_EXTERN WXEGLPUSHATTRIB weglPushAttrib; +typedef void (APIENTRY * WXEGLPOPATTRIB)(); +WXE_EXTERN WXEGLPOPATTRIB weglPopAttrib; +typedef void (APIENTRY * WXEGLPUSHCLIENTATTRIB)(GLbitfield); +WXE_EXTERN WXEGLPUSHCLIENTATTRIB weglPushClientAttrib; +typedef void (APIENTRY * WXEGLPOPCLIENTATTRIB)(); +WXE_EXTERN WXEGLPOPCLIENTATTRIB weglPopClientAttrib; +typedef GLint (APIENTRY * WXEGLRENDERMODE)(GLenum); +WXE_EXTERN WXEGLRENDERMODE weglRenderMode; +typedef GLenum (APIENTRY * WXEGLGETERROR)(); +WXE_EXTERN WXEGLGETERROR weglGetError; +typedef const GLubyte * (APIENTRY * WXEGLGETSTRING)(GLenum); +WXE_EXTERN WXEGLGETSTRING weglGetString; +typedef void (APIENTRY * WXEGLFINISH)(); +WXE_EXTERN WXEGLFINISH weglFinish; +typedef void (APIENTRY * WXEGLFLUSH)(); +WXE_EXTERN WXEGLFLUSH weglFlush; +typedef void (APIENTRY * WXEGLHINT)(GLenum,GLenum); +WXE_EXTERN WXEGLHINT weglHint; +typedef void (APIENTRY * WXEGLCLEARDEPTH)(GLclampd); +WXE_EXTERN WXEGLCLEARDEPTH weglClearDepth; +typedef void (APIENTRY * WXEGLDEPTHFUNC)(GLenum); +WXE_EXTERN WXEGLDEPTHFUNC weglDepthFunc; +typedef void (APIENTRY * WXEGLDEPTHMASK)(GLboolean); +WXE_EXTERN WXEGLDEPTHMASK weglDepthMask; +typedef void (APIENTRY * WXEGLDEPTHRANGE)(GLclampd,GLclampd); +WXE_EXTERN WXEGLDEPTHRANGE weglDepthRange; +typedef void (APIENTRY * WXEGLCLEARACCUM)(GLfloat,GLfloat,GLfloat,GLfloat); +WXE_EXTERN WXEGLCLEARACCUM weglClearAccum; +typedef void (APIENTRY * WXEGLACCUM)(GLenum,GLfloat); +WXE_EXTERN WXEGLACCUM weglAccum; +typedef void (APIENTRY * WXEGLMATRIXMODE)(GLenum); +WXE_EXTERN WXEGLMATRIXMODE weglMatrixMode; +typedef void (APIENTRY * WXEGLORTHO)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLORTHO weglOrtho; +typedef void (APIENTRY * WXEGLFRUSTUM)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLFRUSTUM weglFrustum; +typedef void (APIENTRY * WXEGLVIEWPORT)(GLint,GLint,GLsizei,GLsizei); +WXE_EXTERN WXEGLVIEWPORT weglViewport; +typedef void (APIENTRY * WXEGLPUSHMATRIX)(); +WXE_EXTERN WXEGLPUSHMATRIX weglPushMatrix; +typedef void (APIENTRY * WXEGLPOPMATRIX)(); +WXE_EXTERN WXEGLPOPMATRIX weglPopMatrix; +typedef void (APIENTRY * WXEGLLOADIDENTITY)(); +WXE_EXTERN WXEGLLOADIDENTITY weglLoadIdentity; +typedef void (APIENTRY * WXEGLLOADMATRIXD)(const GLdouble *); +WXE_EXTERN WXEGLLOADMATRIXD weglLoadMatrixd; +typedef void (APIENTRY * WXEGLLOADMATRIXF)(const GLfloat *); +WXE_EXTERN WXEGLLOADMATRIXF weglLoadMatrixf; +typedef void (APIENTRY * WXEGLMULTMATRIXD)(const GLdouble *); +WXE_EXTERN WXEGLMULTMATRIXD weglMultMatrixd; +typedef void (APIENTRY * WXEGLMULTMATRIXF)(const GLfloat *); +WXE_EXTERN WXEGLMULTMATRIXF weglMultMatrixf; +typedef void (APIENTRY * WXEGLROTATED)(GLdouble,GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLROTATED weglRotated; +typedef void (APIENTRY * WXEGLROTATEF)(GLfloat,GLfloat,GLfloat,GLfloat); +WXE_EXTERN WXEGLROTATEF weglRotatef; +typedef void (APIENTRY * WXEGLSCALED)(GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLSCALED weglScaled; +typedef void (APIENTRY * WXEGLSCALEF)(GLfloat,GLfloat,GLfloat); +WXE_EXTERN WXEGLSCALEF weglScalef; +typedef void (APIENTRY * WXEGLTRANSLATED)(GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLTRANSLATED weglTranslated; +typedef void (APIENTRY * WXEGLTRANSLATEF)(GLfloat,GLfloat,GLfloat); +WXE_EXTERN WXEGLTRANSLATEF weglTranslatef; +typedef GLboolean (APIENTRY * WXEGLISLIST)(GLuint); +WXE_EXTERN WXEGLISLIST weglIsList; +typedef void (APIENTRY * WXEGLDELETELISTS)(GLuint,GLsizei); +WXE_EXTERN WXEGLDELETELISTS weglDeleteLists; +typedef GLuint (APIENTRY * WXEGLGENLISTS)(GLsizei); +WXE_EXTERN WXEGLGENLISTS weglGenLists; +typedef void (APIENTRY * WXEGLNEWLIST)(GLuint,GLenum); +WXE_EXTERN WXEGLNEWLIST weglNewList; +typedef void (APIENTRY * WXEGLENDLIST)(); +WXE_EXTERN WXEGLENDLIST weglEndList; typedef void (APIENTRY * WXEGLCALLLIST)(GLuint); WXE_EXTERN WXEGLCALLLIST weglCallList; typedef void (APIENTRY * WXEGLCALLLISTS)(GLsizei,GLenum,const GLuint *); WXE_EXTERN WXEGLCALLLISTS weglCallLists; -typedef void (APIENTRY * WXEGLCLEAR)(GLbitfield); -WXE_EXTERN WXEGLCLEAR weglClear; -typedef void (APIENTRY * WXEGLCLEARACCUM)(GLfloat,GLfloat,GLfloat,GLfloat); -WXE_EXTERN WXEGLCLEARACCUM weglClearAccum; -typedef void (APIENTRY * WXEGLCLEARCOLOR)(GLclampf,GLclampf,GLclampf,GLclampf); -WXE_EXTERN WXEGLCLEARCOLOR weglClearColor; -typedef void (APIENTRY * WXEGLCLEARDEPTH)(GLclampd); -WXE_EXTERN WXEGLCLEARDEPTH weglClearDepth; -typedef void (APIENTRY * WXEGLCLEARINDEX)(GLfloat); -WXE_EXTERN WXEGLCLEARINDEX weglClearIndex; -typedef void (APIENTRY * WXEGLCLEARSTENCIL)(GLint); -WXE_EXTERN WXEGLCLEARSTENCIL weglClearStencil; -typedef void (APIENTRY * WXEGLCLIPPLANE)(GLenum,const GLdouble *); -WXE_EXTERN WXEGLCLIPPLANE weglClipPlane; +typedef void (APIENTRY * WXEGLLISTBASE)(GLuint); +WXE_EXTERN WXEGLLISTBASE weglListBase; +typedef void (APIENTRY * WXEGLBEGIN)(GLenum); +WXE_EXTERN WXEGLBEGIN weglBegin; +typedef void (APIENTRY * WXEGLEND)(); +WXE_EXTERN WXEGLEND weglEnd; +typedef void (APIENTRY * WXEGLVERTEX2DV)(const GLdouble *); +WXE_EXTERN WXEGLVERTEX2DV weglVertex2dv; +typedef void (APIENTRY * WXEGLVERTEX2FV)(const GLfloat *); +WXE_EXTERN WXEGLVERTEX2FV weglVertex2fv; +typedef void (APIENTRY * WXEGLVERTEX2IV)(const GLint *); +WXE_EXTERN WXEGLVERTEX2IV weglVertex2iv; +typedef void (APIENTRY * WXEGLVERTEX2SV)(const GLshort *); +WXE_EXTERN WXEGLVERTEX2SV weglVertex2sv; +typedef void (APIENTRY * WXEGLVERTEX3DV)(const GLdouble *); +WXE_EXTERN WXEGLVERTEX3DV weglVertex3dv; +typedef void (APIENTRY * WXEGLVERTEX3FV)(const GLfloat *); +WXE_EXTERN WXEGLVERTEX3FV weglVertex3fv; +typedef void (APIENTRY * WXEGLVERTEX3IV)(const GLint *); +WXE_EXTERN WXEGLVERTEX3IV weglVertex3iv; +typedef void (APIENTRY * WXEGLVERTEX3SV)(const GLshort *); +WXE_EXTERN WXEGLVERTEX3SV weglVertex3sv; +typedef void (APIENTRY * WXEGLVERTEX4DV)(const GLdouble *); +WXE_EXTERN WXEGLVERTEX4DV weglVertex4dv; +typedef void (APIENTRY * WXEGLVERTEX4FV)(const GLfloat *); +WXE_EXTERN WXEGLVERTEX4FV weglVertex4fv; +typedef void (APIENTRY * WXEGLVERTEX4IV)(const GLint *); +WXE_EXTERN WXEGLVERTEX4IV weglVertex4iv; +typedef void (APIENTRY * WXEGLVERTEX4SV)(const GLshort *); +WXE_EXTERN WXEGLVERTEX4SV weglVertex4sv; +typedef void (APIENTRY * WXEGLNORMAL3BV)(const GLbyte *); +WXE_EXTERN WXEGLNORMAL3BV weglNormal3bv; +typedef void (APIENTRY * WXEGLNORMAL3DV)(const GLdouble *); +WXE_EXTERN WXEGLNORMAL3DV weglNormal3dv; +typedef void (APIENTRY * WXEGLNORMAL3FV)(const GLfloat *); +WXE_EXTERN WXEGLNORMAL3FV weglNormal3fv; +typedef void (APIENTRY * WXEGLNORMAL3IV)(const GLint *); +WXE_EXTERN WXEGLNORMAL3IV weglNormal3iv; +typedef void (APIENTRY * WXEGLNORMAL3SV)(const GLshort *); +WXE_EXTERN WXEGLNORMAL3SV weglNormal3sv; +typedef void (APIENTRY * WXEGLINDEXDV)(const GLdouble *); +WXE_EXTERN WXEGLINDEXDV weglIndexdv; +typedef void (APIENTRY * WXEGLINDEXFV)(const GLfloat *); +WXE_EXTERN WXEGLINDEXFV weglIndexfv; +typedef void (APIENTRY * WXEGLINDEXIV)(const GLint *); +WXE_EXTERN WXEGLINDEXIV weglIndexiv; +typedef void (APIENTRY * WXEGLINDEXSV)(const GLshort *); +WXE_EXTERN WXEGLINDEXSV weglIndexsv; +typedef void (APIENTRY * WXEGLINDEXUBV)(const GLubyte *); +WXE_EXTERN WXEGLINDEXUBV weglIndexubv; typedef void (APIENTRY * WXEGLCOLOR3BV)(const GLbyte *); WXE_EXTERN WXEGLCOLOR3BV weglColor3bv; typedef void (APIENTRY * WXEGLCOLOR3DV)(const GLdouble *); @@ -97,300 +257,38 @@ typedef void (APIENTRY * WXEGLCOLOR4UIV)(const GLuint *); WXE_EXTERN WXEGLCOLOR4UIV weglColor4uiv; typedef void (APIENTRY * WXEGLCOLOR4USV)(const GLushort *); WXE_EXTERN WXEGLCOLOR4USV weglColor4usv; -typedef void (APIENTRY * WXEGLCOLORMASK)(GLboolean,GLboolean,GLboolean,GLboolean); -WXE_EXTERN WXEGLCOLORMASK weglColorMask; -typedef void (APIENTRY * WXEGLCOLORMATERIAL)(GLenum,GLenum); -WXE_EXTERN WXEGLCOLORMATERIAL weglColorMaterial; -typedef void (APIENTRY * WXEGLCOLORPOINTER)(GLint,GLenum,GLsizei,const GLvoid *); -WXE_EXTERN WXEGLCOLORPOINTER weglColorPointer; -typedef void (APIENTRY * WXEGLCOPYPIXELS)(GLint,GLint,GLsizei,GLsizei,GLenum); -WXE_EXTERN WXEGLCOPYPIXELS weglCopyPixels; -typedef void (APIENTRY * WXEGLCOPYTEXIMAGE1D)(GLenum,GLint,GLenum,GLint,GLint,GLsizei,GLint); -WXE_EXTERN WXEGLCOPYTEXIMAGE1D weglCopyTexImage1D; -typedef void (APIENTRY * WXEGLCOPYTEXIMAGE2D)(GLenum,GLint,GLenum,GLint,GLint,GLsizei,GLsizei,GLint); -WXE_EXTERN WXEGLCOPYTEXIMAGE2D weglCopyTexImage2D; -typedef void (APIENTRY * WXEGLCOPYTEXSUBIMAGE1D)(GLenum,GLint,GLint,GLint,GLint,GLsizei); -WXE_EXTERN WXEGLCOPYTEXSUBIMAGE1D weglCopyTexSubImage1D; -typedef void (APIENTRY * WXEGLCOPYTEXSUBIMAGE2D)(GLenum,GLint,GLint,GLint,GLint,GLint,GLsizei,GLsizei); -WXE_EXTERN WXEGLCOPYTEXSUBIMAGE2D weglCopyTexSubImage2D; -typedef void (APIENTRY * WXEGLCULLFACE)(GLenum); -WXE_EXTERN WXEGLCULLFACE weglCullFace; -typedef void (APIENTRY * WXEGLDELETELISTS)(GLuint,GLsizei); -WXE_EXTERN WXEGLDELETELISTS weglDeleteLists; -typedef void (APIENTRY * WXEGLDELETETEXTURES)(GLsizei,const GLuint *); -WXE_EXTERN WXEGLDELETETEXTURES weglDeleteTextures; -typedef void (APIENTRY * WXEGLDEPTHFUNC)(GLenum); -WXE_EXTERN WXEGLDEPTHFUNC weglDepthFunc; -typedef void (APIENTRY * WXEGLDEPTHMASK)(GLboolean); -WXE_EXTERN WXEGLDEPTHMASK weglDepthMask; -typedef void (APIENTRY * WXEGLDEPTHRANGE)(GLclampd,GLclampd); -WXE_EXTERN WXEGLDEPTHRANGE weglDepthRange; -typedef void (APIENTRY * WXEGLDISABLE)(GLenum); -WXE_EXTERN WXEGLDISABLE weglDisable; -typedef void (APIENTRY * WXEGLDISABLECLIENTSTATE)(GLenum); -WXE_EXTERN WXEGLDISABLECLIENTSTATE weglDisableClientState; -typedef void (APIENTRY * WXEGLDRAWARRAYS)(GLenum,GLint,GLsizei); -WXE_EXTERN WXEGLDRAWARRAYS weglDrawArrays; -typedef void (APIENTRY * WXEGLDRAWBUFFER)(GLenum); -WXE_EXTERN WXEGLDRAWBUFFER weglDrawBuffer; -typedef void (APIENTRY * WXEGLDRAWELEMENTS)(GLenum,GLsizei,GLenum,const GLvoid *); -WXE_EXTERN WXEGLDRAWELEMENTS weglDrawElements; -typedef void (APIENTRY * WXEGLDRAWPIXELS)(GLsizei,GLsizei,GLenum,GLenum,const GLvoid *); -WXE_EXTERN WXEGLDRAWPIXELS weglDrawPixels; -typedef void (APIENTRY * WXEGLEDGEFLAGV)(const GLboolean *); -WXE_EXTERN WXEGLEDGEFLAGV weglEdgeFlagv; -typedef void (APIENTRY * WXEGLEDGEFLAGPOINTER)(GLsizei,const GLvoid *); -WXE_EXTERN WXEGLEDGEFLAGPOINTER weglEdgeFlagPointer; -typedef void (APIENTRY * WXEGLENABLE)(GLenum); -WXE_EXTERN WXEGLENABLE weglEnable; -typedef void (APIENTRY * WXEGLENABLECLIENTSTATE)(GLenum); -WXE_EXTERN WXEGLENABLECLIENTSTATE weglEnableClientState; -typedef void (APIENTRY * WXEGLEND)(); -WXE_EXTERN WXEGLEND weglEnd; -typedef void (APIENTRY * WXEGLENDLIST)(); -WXE_EXTERN WXEGLENDLIST weglEndList; -typedef void (APIENTRY * WXEGLEVALCOORD1DV)(const GLdouble *); -WXE_EXTERN WXEGLEVALCOORD1DV weglEvalCoord1dv; -typedef void (APIENTRY * WXEGLEVALCOORD1FV)(const GLfloat *); -WXE_EXTERN WXEGLEVALCOORD1FV weglEvalCoord1fv; -typedef void (APIENTRY * WXEGLEVALCOORD2DV)(const GLdouble *); -WXE_EXTERN WXEGLEVALCOORD2DV weglEvalCoord2dv; -typedef void (APIENTRY * WXEGLEVALCOORD2FV)(const GLfloat *); -WXE_EXTERN WXEGLEVALCOORD2FV weglEvalCoord2fv; -typedef void (APIENTRY * WXEGLEVALMESH1)(GLenum,GLint,GLint); -WXE_EXTERN WXEGLEVALMESH1 weglEvalMesh1; -typedef void (APIENTRY * WXEGLEVALMESH2)(GLenum,GLint,GLint,GLint,GLint); -WXE_EXTERN WXEGLEVALMESH2 weglEvalMesh2; -typedef void (APIENTRY * WXEGLEVALPOINT1)(GLint); -WXE_EXTERN WXEGLEVALPOINT1 weglEvalPoint1; -typedef void (APIENTRY * WXEGLEVALPOINT2)(GLint,GLint); -WXE_EXTERN WXEGLEVALPOINT2 weglEvalPoint2; -typedef void (APIENTRY * WXEGLFEEDBACKBUFFER)(GLsizei,GLenum,GLfloat *); -WXE_EXTERN WXEGLFEEDBACKBUFFER weglFeedbackBuffer; -typedef void (APIENTRY * WXEGLFINISH)(); -WXE_EXTERN WXEGLFINISH weglFinish; -typedef void (APIENTRY * WXEGLFLUSH)(); -WXE_EXTERN WXEGLFLUSH weglFlush; -typedef void (APIENTRY * WXEGLFOGF)(GLenum,GLfloat); -WXE_EXTERN WXEGLFOGF weglFogf; -typedef void (APIENTRY * WXEGLFOGFV)(GLenum,const GLfloat *); -WXE_EXTERN WXEGLFOGFV weglFogfv; -typedef void (APIENTRY * WXEGLFOGI)(GLenum,GLint); -WXE_EXTERN WXEGLFOGI weglFogi; -typedef void (APIENTRY * WXEGLFOGIV)(GLenum,const GLint *); -WXE_EXTERN WXEGLFOGIV weglFogiv; -typedef void (APIENTRY * WXEGLFRONTFACE)(GLenum); -WXE_EXTERN WXEGLFRONTFACE weglFrontFace; -typedef void (APIENTRY * WXEGLFRUSTUM)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble); -WXE_EXTERN WXEGLFRUSTUM weglFrustum; -typedef GLuint (APIENTRY * WXEGLGENLISTS)(GLsizei); -WXE_EXTERN WXEGLGENLISTS weglGenLists; -typedef void (APIENTRY * WXEGLGENTEXTURES)(GLsizei,GLuint *); -WXE_EXTERN WXEGLGENTEXTURES weglGenTextures; -typedef void (APIENTRY * WXEGLGETBOOLEANV)(GLenum,GLboolean *); -WXE_EXTERN WXEGLGETBOOLEANV weglGetBooleanv; -typedef void (APIENTRY * WXEGLGETCLIPPLANE)(GLenum,GLdouble *); -WXE_EXTERN WXEGLGETCLIPPLANE weglGetClipPlane; -typedef void (APIENTRY * WXEGLGETDOUBLEV)(GLenum,GLdouble *); -WXE_EXTERN WXEGLGETDOUBLEV weglGetDoublev; -typedef GLenum (APIENTRY * WXEGLGETERROR)(); -WXE_EXTERN WXEGLGETERROR weglGetError; -typedef void (APIENTRY * WXEGLGETFLOATV)(GLenum,GLfloat *); -WXE_EXTERN WXEGLGETFLOATV weglGetFloatv; -typedef void (APIENTRY * WXEGLGETINTEGERV)(GLenum,GLint *); -WXE_EXTERN WXEGLGETINTEGERV weglGetIntegerv; -typedef void (APIENTRY * WXEGLGETLIGHTFV)(GLenum,GLenum,GLfloat *); -WXE_EXTERN WXEGLGETLIGHTFV weglGetLightfv; -typedef void (APIENTRY * WXEGLGETLIGHTIV)(GLenum,GLenum,GLint *); -WXE_EXTERN WXEGLGETLIGHTIV weglGetLightiv; -typedef void (APIENTRY * WXEGLGETMAPDV)(GLenum,GLenum,GLdouble *); -WXE_EXTERN WXEGLGETMAPDV weglGetMapdv; -typedef void (APIENTRY * WXEGLGETMAPFV)(GLenum,GLenum,GLfloat *); -WXE_EXTERN WXEGLGETMAPFV weglGetMapfv; -typedef void (APIENTRY * WXEGLGETMAPIV)(GLenum,GLenum,GLint *); -WXE_EXTERN WXEGLGETMAPIV weglGetMapiv; -typedef void (APIENTRY * WXEGLGETMATERIALFV)(GLenum,GLenum,GLfloat *); -WXE_EXTERN WXEGLGETMATERIALFV weglGetMaterialfv; -typedef void (APIENTRY * WXEGLGETMATERIALIV)(GLenum,GLenum,GLint *); -WXE_EXTERN WXEGLGETMATERIALIV weglGetMaterialiv; -typedef void (APIENTRY * WXEGLGETPIXELMAPFV)(GLenum,GLfloat *); -WXE_EXTERN WXEGLGETPIXELMAPFV weglGetPixelMapfv; -typedef void (APIENTRY * WXEGLGETPIXELMAPUIV)(GLenum,GLuint *); -WXE_EXTERN WXEGLGETPIXELMAPUIV weglGetPixelMapuiv; -typedef void (APIENTRY * WXEGLGETPIXELMAPUSV)(GLenum,GLushort *); -WXE_EXTERN WXEGLGETPIXELMAPUSV weglGetPixelMapusv; -typedef void (APIENTRY * WXEGLGETPOLYGONSTIPPLE)(GLubyte *); -WXE_EXTERN WXEGLGETPOLYGONSTIPPLE weglGetPolygonStipple; -typedef const GLubyte * (APIENTRY * WXEGLGETSTRING)(GLenum); -WXE_EXTERN WXEGLGETSTRING weglGetString; -typedef void (APIENTRY * WXEGLGETTEXENVFV)(GLenum,GLenum,GLfloat *); -WXE_EXTERN WXEGLGETTEXENVFV weglGetTexEnvfv; -typedef void (APIENTRY * WXEGLGETTEXENVIV)(GLenum,GLenum,GLint *); -WXE_EXTERN WXEGLGETTEXENVIV weglGetTexEnviv; -typedef void (APIENTRY * WXEGLGETTEXGENDV)(GLenum,GLenum,GLdouble *); -WXE_EXTERN WXEGLGETTEXGENDV weglGetTexGendv; -typedef void (APIENTRY * WXEGLGETTEXGENFV)(GLenum,GLenum,GLfloat *); -WXE_EXTERN WXEGLGETTEXGENFV weglGetTexGenfv; -typedef void (APIENTRY * WXEGLGETTEXGENIV)(GLenum,GLenum,GLint *); -WXE_EXTERN WXEGLGETTEXGENIV weglGetTexGeniv; -typedef void (APIENTRY * WXEGLGETTEXIMAGE)(GLenum,GLint,GLenum,GLenum,GLvoid *); -WXE_EXTERN WXEGLGETTEXIMAGE weglGetTexImage; -typedef void (APIENTRY * WXEGLGETTEXLEVELPARAMETERFV)(GLenum,GLint,GLenum,GLfloat *); -WXE_EXTERN WXEGLGETTEXLEVELPARAMETERFV weglGetTexLevelParameterfv; -typedef void (APIENTRY * WXEGLGETTEXLEVELPARAMETERIV)(GLenum,GLint,GLenum,GLint *); -WXE_EXTERN WXEGLGETTEXLEVELPARAMETERIV weglGetTexLevelParameteriv; -typedef void (APIENTRY * WXEGLGETTEXPARAMETERFV)(GLenum,GLenum,GLfloat *); -WXE_EXTERN WXEGLGETTEXPARAMETERFV weglGetTexParameterfv; -typedef void (APIENTRY * WXEGLGETTEXPARAMETERIV)(GLenum,GLenum,GLint *); -WXE_EXTERN WXEGLGETTEXPARAMETERIV weglGetTexParameteriv; -typedef void (APIENTRY * WXEGLHINT)(GLenum,GLenum); -WXE_EXTERN WXEGLHINT weglHint; -typedef void (APIENTRY * WXEGLINDEXMASK)(GLuint); -WXE_EXTERN WXEGLINDEXMASK weglIndexMask; -typedef void (APIENTRY * WXEGLINDEXPOINTER)(GLenum,GLsizei,const GLvoid *); -WXE_EXTERN WXEGLINDEXPOINTER weglIndexPointer; -typedef void (APIENTRY * WXEGLINDEXDV)(const GLdouble *); -WXE_EXTERN WXEGLINDEXDV weglIndexdv; -typedef void (APIENTRY * WXEGLINDEXFV)(const GLfloat *); -WXE_EXTERN WXEGLINDEXFV weglIndexfv; -typedef void (APIENTRY * WXEGLINDEXIV)(const GLint *); -WXE_EXTERN WXEGLINDEXIV weglIndexiv; -typedef void (APIENTRY * WXEGLINDEXSV)(const GLshort *); -WXE_EXTERN WXEGLINDEXSV weglIndexsv; -typedef void (APIENTRY * WXEGLINDEXUBV)(const GLubyte *); -WXE_EXTERN WXEGLINDEXUBV weglIndexubv; -typedef void (APIENTRY * WXEGLINITNAMES)(); -WXE_EXTERN WXEGLINITNAMES weglInitNames; -typedef void (APIENTRY * WXEGLINTERLEAVEDARRAYS)(GLenum,GLsizei,const GLvoid *); -WXE_EXTERN WXEGLINTERLEAVEDARRAYS weglInterleavedArrays; -typedef GLboolean (APIENTRY * WXEGLISENABLED)(GLenum); -WXE_EXTERN WXEGLISENABLED weglIsEnabled; -typedef GLboolean (APIENTRY * WXEGLISLIST)(GLuint); -WXE_EXTERN WXEGLISLIST weglIsList; -typedef GLboolean (APIENTRY * WXEGLISTEXTURE)(GLuint); -WXE_EXTERN WXEGLISTEXTURE weglIsTexture; -typedef void (APIENTRY * WXEGLLIGHTMODELF)(GLenum,GLfloat); -WXE_EXTERN WXEGLLIGHTMODELF weglLightModelf; -typedef void (APIENTRY * WXEGLLIGHTMODELFV)(GLenum,const GLfloat *); -WXE_EXTERN WXEGLLIGHTMODELFV weglLightModelfv; -typedef void (APIENTRY * WXEGLLIGHTMODELI)(GLenum,GLint); -WXE_EXTERN WXEGLLIGHTMODELI weglLightModeli; -typedef void (APIENTRY * WXEGLLIGHTMODELIV)(GLenum,const GLint *); -WXE_EXTERN WXEGLLIGHTMODELIV weglLightModeliv; -typedef void (APIENTRY * WXEGLLIGHTF)(GLenum,GLenum,GLfloat); -WXE_EXTERN WXEGLLIGHTF weglLightf; -typedef void (APIENTRY * WXEGLLIGHTFV)(GLenum,GLenum,const GLfloat *); -WXE_EXTERN WXEGLLIGHTFV weglLightfv; -typedef void (APIENTRY * WXEGLLIGHTI)(GLenum,GLenum,GLint); -WXE_EXTERN WXEGLLIGHTI weglLighti; -typedef void (APIENTRY * WXEGLLIGHTIV)(GLenum,GLenum,const GLint *); -WXE_EXTERN WXEGLLIGHTIV weglLightiv; -typedef void (APIENTRY * WXEGLLINESTIPPLE)(GLint,GLushort); -WXE_EXTERN WXEGLLINESTIPPLE weglLineStipple; -typedef void (APIENTRY * WXEGLLINEWIDTH)(GLfloat); -WXE_EXTERN WXEGLLINEWIDTH weglLineWidth; -typedef void (APIENTRY * WXEGLLISTBASE)(GLuint); -WXE_EXTERN WXEGLLISTBASE weglListBase; -typedef void (APIENTRY * WXEGLLOADIDENTITY)(); -WXE_EXTERN WXEGLLOADIDENTITY weglLoadIdentity; -typedef void (APIENTRY * WXEGLLOADMATRIXD)(const GLdouble *); -WXE_EXTERN WXEGLLOADMATRIXD weglLoadMatrixd; -typedef void (APIENTRY * WXEGLLOADMATRIXF)(const GLfloat *); -WXE_EXTERN WXEGLLOADMATRIXF weglLoadMatrixf; -typedef void (APIENTRY * WXEGLLOADNAME)(GLuint); -WXE_EXTERN WXEGLLOADNAME weglLoadName; -typedef void (APIENTRY * WXEGLLOGICOP)(GLenum); -WXE_EXTERN WXEGLLOGICOP weglLogicOp; -typedef void (APIENTRY * WXEGLMAP1D)(GLenum,GLdouble,GLdouble,GLint,GLint,const GLdouble *); -WXE_EXTERN WXEGLMAP1D weglMap1d; -typedef void (APIENTRY * WXEGLMAP1F)(GLenum,GLfloat,GLfloat,GLint,GLint,const GLfloat *); -WXE_EXTERN WXEGLMAP1F weglMap1f; -typedef void (APIENTRY * WXEGLMAP2D)(GLenum,GLdouble,GLdouble,GLint,GLint,GLdouble,GLdouble,GLint,GLint,const GLdouble *); -WXE_EXTERN WXEGLMAP2D weglMap2d; -typedef void (APIENTRY * WXEGLMAP2F)(GLenum,GLfloat,GLfloat,GLint,GLint,GLfloat,GLfloat,GLint,GLint,const GLfloat *); -WXE_EXTERN WXEGLMAP2F weglMap2f; -typedef void (APIENTRY * WXEGLMAPGRID1D)(GLint,GLdouble,GLdouble); -WXE_EXTERN WXEGLMAPGRID1D weglMapGrid1d; -typedef void (APIENTRY * WXEGLMAPGRID1F)(GLint,GLfloat,GLfloat); -WXE_EXTERN WXEGLMAPGRID1F weglMapGrid1f; -typedef void (APIENTRY * WXEGLMAPGRID2D)(GLint,GLdouble,GLdouble,GLint,GLdouble,GLdouble); -WXE_EXTERN WXEGLMAPGRID2D weglMapGrid2d; -typedef void (APIENTRY * WXEGLMAPGRID2F)(GLint,GLfloat,GLfloat,GLint,GLfloat,GLfloat); -WXE_EXTERN WXEGLMAPGRID2F weglMapGrid2f; -typedef void (APIENTRY * WXEGLMATERIALF)(GLenum,GLenum,GLfloat); -WXE_EXTERN WXEGLMATERIALF weglMaterialf; -typedef void (APIENTRY * WXEGLMATERIALFV)(GLenum,GLenum,const GLfloat *); -WXE_EXTERN WXEGLMATERIALFV weglMaterialfv; -typedef void (APIENTRY * WXEGLMATERIALI)(GLenum,GLenum,GLint); -WXE_EXTERN WXEGLMATERIALI weglMateriali; -typedef void (APIENTRY * WXEGLMATERIALIV)(GLenum,GLenum,const GLint *); -WXE_EXTERN WXEGLMATERIALIV weglMaterialiv; -typedef void (APIENTRY * WXEGLMATRIXMODE)(GLenum); -WXE_EXTERN WXEGLMATRIXMODE weglMatrixMode; -typedef void (APIENTRY * WXEGLMULTMATRIXD)(const GLdouble *); -WXE_EXTERN WXEGLMULTMATRIXD weglMultMatrixd; -typedef void (APIENTRY * WXEGLMULTMATRIXF)(const GLfloat *); -WXE_EXTERN WXEGLMULTMATRIXF weglMultMatrixf; -typedef void (APIENTRY * WXEGLNEWLIST)(GLuint,GLenum); -WXE_EXTERN WXEGLNEWLIST weglNewList; -typedef void (APIENTRY * WXEGLNORMAL3BV)(const GLbyte *); -WXE_EXTERN WXEGLNORMAL3BV weglNormal3bv; -typedef void (APIENTRY * WXEGLNORMAL3DV)(const GLdouble *); -WXE_EXTERN WXEGLNORMAL3DV weglNormal3dv; -typedef void (APIENTRY * WXEGLNORMAL3FV)(const GLfloat *); -WXE_EXTERN WXEGLNORMAL3FV weglNormal3fv; -typedef void (APIENTRY * WXEGLNORMAL3IV)(const GLint *); -WXE_EXTERN WXEGLNORMAL3IV weglNormal3iv; -typedef void (APIENTRY * WXEGLNORMAL3SV)(const GLshort *); -WXE_EXTERN WXEGLNORMAL3SV weglNormal3sv; -typedef void (APIENTRY * WXEGLNORMALPOINTER)(GLenum,GLsizei,const GLvoid *); -WXE_EXTERN WXEGLNORMALPOINTER weglNormalPointer; -typedef void (APIENTRY * WXEGLORTHO)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble); -WXE_EXTERN WXEGLORTHO weglOrtho; -typedef void (APIENTRY * WXEGLPASSTHROUGH)(GLfloat); -WXE_EXTERN WXEGLPASSTHROUGH weglPassThrough; -typedef void (APIENTRY * WXEGLPIXELMAPFV)(GLenum,GLsizei,const GLfloat *); -WXE_EXTERN WXEGLPIXELMAPFV weglPixelMapfv; -typedef void (APIENTRY * WXEGLPIXELMAPUIV)(GLenum,GLsizei,const GLuint *); -WXE_EXTERN WXEGLPIXELMAPUIV weglPixelMapuiv; -typedef void (APIENTRY * WXEGLPIXELMAPUSV)(GLenum,GLsizei,const GLushort *); -WXE_EXTERN WXEGLPIXELMAPUSV weglPixelMapusv; -typedef void (APIENTRY * WXEGLPIXELSTOREF)(GLenum,GLfloat); -WXE_EXTERN WXEGLPIXELSTOREF weglPixelStoref; -typedef void (APIENTRY * WXEGLPIXELSTOREI)(GLenum,GLint); -WXE_EXTERN WXEGLPIXELSTOREI weglPixelStorei; -typedef void (APIENTRY * WXEGLPIXELTRANSFERF)(GLenum,GLfloat); -WXE_EXTERN WXEGLPIXELTRANSFERF weglPixelTransferf; -typedef void (APIENTRY * WXEGLPIXELTRANSFERI)(GLenum,GLint); -WXE_EXTERN WXEGLPIXELTRANSFERI weglPixelTransferi; -typedef void (APIENTRY * WXEGLPIXELZOOM)(GLfloat,GLfloat); -WXE_EXTERN WXEGLPIXELZOOM weglPixelZoom; -typedef void (APIENTRY * WXEGLPOINTSIZE)(GLfloat); -WXE_EXTERN WXEGLPOINTSIZE weglPointSize; -typedef void (APIENTRY * WXEGLPOLYGONMODE)(GLenum,GLenum); -WXE_EXTERN WXEGLPOLYGONMODE weglPolygonMode; -typedef void (APIENTRY * WXEGLPOLYGONOFFSET)(GLfloat,GLfloat); -WXE_EXTERN WXEGLPOLYGONOFFSET weglPolygonOffset; -typedef void (APIENTRY * WXEGLPOLYGONSTIPPLE)(const GLubyte *); -WXE_EXTERN WXEGLPOLYGONSTIPPLE weglPolygonStipple; -typedef void (APIENTRY * WXEGLPOPATTRIB)(); -WXE_EXTERN WXEGLPOPATTRIB weglPopAttrib; -typedef void (APIENTRY * WXEGLPOPCLIENTATTRIB)(); -WXE_EXTERN WXEGLPOPCLIENTATTRIB weglPopClientAttrib; -typedef void (APIENTRY * WXEGLPOPMATRIX)(); -WXE_EXTERN WXEGLPOPMATRIX weglPopMatrix; -typedef void (APIENTRY * WXEGLPOPNAME)(); -WXE_EXTERN WXEGLPOPNAME weglPopName; -typedef void (APIENTRY * WXEGLPRIORITIZETEXTURES)(GLsizei,const GLuint *,const GLclampf *); -WXE_EXTERN WXEGLPRIORITIZETEXTURES weglPrioritizeTextures; -typedef void (APIENTRY * WXEGLPUSHATTRIB)(GLbitfield); -WXE_EXTERN WXEGLPUSHATTRIB weglPushAttrib; -typedef void (APIENTRY * WXEGLPUSHCLIENTATTRIB)(GLbitfield); -WXE_EXTERN WXEGLPUSHCLIENTATTRIB weglPushClientAttrib; -typedef void (APIENTRY * WXEGLPUSHMATRIX)(); -WXE_EXTERN WXEGLPUSHMATRIX weglPushMatrix; -typedef void (APIENTRY * WXEGLPUSHNAME)(GLuint); -WXE_EXTERN WXEGLPUSHNAME weglPushName; +typedef void (APIENTRY * WXEGLTEXCOORD1DV)(const GLdouble *); +WXE_EXTERN WXEGLTEXCOORD1DV weglTexCoord1dv; +typedef void (APIENTRY * WXEGLTEXCOORD1FV)(const GLfloat *); +WXE_EXTERN WXEGLTEXCOORD1FV weglTexCoord1fv; +typedef void (APIENTRY * WXEGLTEXCOORD1IV)(const GLint *); +WXE_EXTERN WXEGLTEXCOORD1IV weglTexCoord1iv; +typedef void (APIENTRY * WXEGLTEXCOORD1SV)(const GLshort *); +WXE_EXTERN WXEGLTEXCOORD1SV weglTexCoord1sv; +typedef void (APIENTRY * WXEGLTEXCOORD2DV)(const GLdouble *); +WXE_EXTERN WXEGLTEXCOORD2DV weglTexCoord2dv; +typedef void (APIENTRY * WXEGLTEXCOORD2FV)(const GLfloat *); +WXE_EXTERN WXEGLTEXCOORD2FV weglTexCoord2fv; +typedef void (APIENTRY * WXEGLTEXCOORD2IV)(const GLint *); +WXE_EXTERN WXEGLTEXCOORD2IV weglTexCoord2iv; +typedef void (APIENTRY * WXEGLTEXCOORD2SV)(const GLshort *); +WXE_EXTERN WXEGLTEXCOORD2SV weglTexCoord2sv; +typedef void (APIENTRY * WXEGLTEXCOORD3DV)(const GLdouble *); +WXE_EXTERN WXEGLTEXCOORD3DV weglTexCoord3dv; +typedef void (APIENTRY * WXEGLTEXCOORD3FV)(const GLfloat *); +WXE_EXTERN WXEGLTEXCOORD3FV weglTexCoord3fv; +typedef void (APIENTRY * WXEGLTEXCOORD3IV)(const GLint *); +WXE_EXTERN WXEGLTEXCOORD3IV weglTexCoord3iv; +typedef void (APIENTRY * WXEGLTEXCOORD3SV)(const GLshort *); +WXE_EXTERN WXEGLTEXCOORD3SV weglTexCoord3sv; +typedef void (APIENTRY * WXEGLTEXCOORD4DV)(const GLdouble *); +WXE_EXTERN WXEGLTEXCOORD4DV weglTexCoord4dv; +typedef void (APIENTRY * WXEGLTEXCOORD4FV)(const GLfloat *); +WXE_EXTERN WXEGLTEXCOORD4FV weglTexCoord4fv; +typedef void (APIENTRY * WXEGLTEXCOORD4IV)(const GLint *); +WXE_EXTERN WXEGLTEXCOORD4IV weglTexCoord4iv; +typedef void (APIENTRY * WXEGLTEXCOORD4SV)(const GLshort *); +WXE_EXTERN WXEGLTEXCOORD4SV weglTexCoord4sv; typedef void (APIENTRY * WXEGLRASTERPOS2DV)(const GLdouble *); WXE_EXTERN WXEGLRASTERPOS2DV weglRasterPos2dv; typedef void (APIENTRY * WXEGLRASTERPOS2FV)(const GLfloat *); @@ -415,150 +313,252 @@ typedef void (APIENTRY * WXEGLRASTERPOS4IV)(const GLint *); WXE_EXTERN WXEGLRASTERPOS4IV weglRasterPos4iv; typedef void (APIENTRY * WXEGLRASTERPOS4SV)(const GLshort *); WXE_EXTERN WXEGLRASTERPOS4SV weglRasterPos4sv; -typedef void (APIENTRY * WXEGLREADBUFFER)(GLenum); -WXE_EXTERN WXEGLREADBUFFER weglReadBuffer; +typedef void (APIENTRY * WXEGLRECTD)(GLdouble,GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLRECTD weglRectd; +typedef void (APIENTRY * WXEGLRECTF)(GLfloat,GLfloat,GLfloat,GLfloat); +WXE_EXTERN WXEGLRECTF weglRectf; +typedef void (APIENTRY * WXEGLRECTI)(GLint,GLint,GLint,GLint); +WXE_EXTERN WXEGLRECTI weglRecti; +typedef void (APIENTRY * WXEGLRECTS)(GLshort,GLshort,GLshort,GLshort); +WXE_EXTERN WXEGLRECTS weglRects; +typedef void (APIENTRY * WXEGLRECTDV)(const GLdouble *,const GLdouble *); +WXE_EXTERN WXEGLRECTDV weglRectdv; +typedef void (APIENTRY * WXEGLRECTFV)(const GLfloat *,const GLfloat *); +WXE_EXTERN WXEGLRECTFV weglRectfv; +typedef void (APIENTRY * WXEGLRECTIV)(const GLint *,const GLint *); +WXE_EXTERN WXEGLRECTIV weglRectiv; +typedef void (APIENTRY * WXEGLRECTSV)(const GLshort *,const GLshort *); +WXE_EXTERN WXEGLRECTSV weglRectsv; +typedef void (APIENTRY * WXEGLVERTEXPOINTER)(GLint,GLenum,GLsizei,const GLvoid *); +WXE_EXTERN WXEGLVERTEXPOINTER weglVertexPointer; +typedef void (APIENTRY * WXEGLNORMALPOINTER)(GLenum,GLsizei,const GLvoid *); +WXE_EXTERN WXEGLNORMALPOINTER weglNormalPointer; +typedef void (APIENTRY * WXEGLCOLORPOINTER)(GLint,GLenum,GLsizei,const GLvoid *); +WXE_EXTERN WXEGLCOLORPOINTER weglColorPointer; +typedef void (APIENTRY * WXEGLINDEXPOINTER)(GLenum,GLsizei,const GLvoid *); +WXE_EXTERN WXEGLINDEXPOINTER weglIndexPointer; +typedef void (APIENTRY * WXEGLTEXCOORDPOINTER)(GLint,GLenum,GLsizei,const GLvoid *); +WXE_EXTERN WXEGLTEXCOORDPOINTER weglTexCoordPointer; +typedef void (APIENTRY * WXEGLEDGEFLAGPOINTER)(GLsizei,const GLvoid *); +WXE_EXTERN WXEGLEDGEFLAGPOINTER weglEdgeFlagPointer; +typedef void (APIENTRY * WXEGLARRAYELEMENT)(GLint); +WXE_EXTERN WXEGLARRAYELEMENT weglArrayElement; +typedef void (APIENTRY * WXEGLDRAWARRAYS)(GLenum,GLint,GLsizei); +WXE_EXTERN WXEGLDRAWARRAYS weglDrawArrays; +typedef void (APIENTRY * WXEGLDRAWELEMENTS)(GLenum,GLsizei,GLenum,const GLvoid *); +WXE_EXTERN WXEGLDRAWELEMENTS weglDrawElements; +typedef void (APIENTRY * WXEGLINTERLEAVEDARRAYS)(GLenum,GLsizei,const GLvoid *); +WXE_EXTERN WXEGLINTERLEAVEDARRAYS weglInterleavedArrays; +typedef void (APIENTRY * WXEGLSHADEMODEL)(GLenum); +WXE_EXTERN WXEGLSHADEMODEL weglShadeModel; +typedef void (APIENTRY * WXEGLLIGHTF)(GLenum,GLenum,GLfloat); +WXE_EXTERN WXEGLLIGHTF weglLightf; +typedef void (APIENTRY * WXEGLLIGHTI)(GLenum,GLenum,GLint); +WXE_EXTERN WXEGLLIGHTI weglLighti; +typedef void (APIENTRY * WXEGLLIGHTFV)(GLenum,GLenum,const GLfloat *); +WXE_EXTERN WXEGLLIGHTFV weglLightfv; +typedef void (APIENTRY * WXEGLLIGHTIV)(GLenum,GLenum,const GLint *); +WXE_EXTERN WXEGLLIGHTIV weglLightiv; +typedef void (APIENTRY * WXEGLGETLIGHTFV)(GLenum,GLenum,GLfloat *); +WXE_EXTERN WXEGLGETLIGHTFV weglGetLightfv; +typedef void (APIENTRY * WXEGLGETLIGHTIV)(GLenum,GLenum,GLint *); +WXE_EXTERN WXEGLGETLIGHTIV weglGetLightiv; +typedef void (APIENTRY * WXEGLLIGHTMODELF)(GLenum,GLfloat); +WXE_EXTERN WXEGLLIGHTMODELF weglLightModelf; +typedef void (APIENTRY * WXEGLLIGHTMODELI)(GLenum,GLint); +WXE_EXTERN WXEGLLIGHTMODELI weglLightModeli; +typedef void (APIENTRY * WXEGLLIGHTMODELFV)(GLenum,const GLfloat *); +WXE_EXTERN WXEGLLIGHTMODELFV weglLightModelfv; +typedef void (APIENTRY * WXEGLLIGHTMODELIV)(GLenum,const GLint *); +WXE_EXTERN WXEGLLIGHTMODELIV weglLightModeliv; +typedef void (APIENTRY * WXEGLMATERIALF)(GLenum,GLenum,GLfloat); +WXE_EXTERN WXEGLMATERIALF weglMaterialf; +typedef void (APIENTRY * WXEGLMATERIALI)(GLenum,GLenum,GLint); +WXE_EXTERN WXEGLMATERIALI weglMateriali; +typedef void (APIENTRY * WXEGLMATERIALFV)(GLenum,GLenum,const GLfloat *); +WXE_EXTERN WXEGLMATERIALFV weglMaterialfv; +typedef void (APIENTRY * WXEGLMATERIALIV)(GLenum,GLenum,const GLint *); +WXE_EXTERN WXEGLMATERIALIV weglMaterialiv; +typedef void (APIENTRY * WXEGLGETMATERIALFV)(GLenum,GLenum,GLfloat *); +WXE_EXTERN WXEGLGETMATERIALFV weglGetMaterialfv; +typedef void (APIENTRY * WXEGLGETMATERIALIV)(GLenum,GLenum,GLint *); +WXE_EXTERN WXEGLGETMATERIALIV weglGetMaterialiv; +typedef void (APIENTRY * WXEGLCOLORMATERIAL)(GLenum,GLenum); +WXE_EXTERN WXEGLCOLORMATERIAL weglColorMaterial; +typedef void (APIENTRY * WXEGLPIXELZOOM)(GLfloat,GLfloat); +WXE_EXTERN WXEGLPIXELZOOM weglPixelZoom; +typedef void (APIENTRY * WXEGLPIXELSTOREF)(GLenum,GLfloat); +WXE_EXTERN WXEGLPIXELSTOREF weglPixelStoref; +typedef void (APIENTRY * WXEGLPIXELSTOREI)(GLenum,GLint); +WXE_EXTERN WXEGLPIXELSTOREI weglPixelStorei; +typedef void (APIENTRY * WXEGLPIXELTRANSFERF)(GLenum,GLfloat); +WXE_EXTERN WXEGLPIXELTRANSFERF weglPixelTransferf; +typedef void (APIENTRY * WXEGLPIXELTRANSFERI)(GLenum,GLint); +WXE_EXTERN WXEGLPIXELTRANSFERI weglPixelTransferi; +typedef void (APIENTRY * WXEGLPIXELMAPFV)(GLenum,GLsizei,const GLfloat *); +WXE_EXTERN WXEGLPIXELMAPFV weglPixelMapfv; +typedef void (APIENTRY * WXEGLPIXELMAPUIV)(GLenum,GLsizei,const GLuint *); +WXE_EXTERN WXEGLPIXELMAPUIV weglPixelMapuiv; +typedef void (APIENTRY * WXEGLPIXELMAPUSV)(GLenum,GLsizei,const GLushort *); +WXE_EXTERN WXEGLPIXELMAPUSV weglPixelMapusv; +typedef void (APIENTRY * WXEGLGETPIXELMAPFV)(GLenum,GLfloat *); +WXE_EXTERN WXEGLGETPIXELMAPFV weglGetPixelMapfv; +typedef void (APIENTRY * WXEGLGETPIXELMAPUIV)(GLenum,GLuint *); +WXE_EXTERN WXEGLGETPIXELMAPUIV weglGetPixelMapuiv; +typedef void (APIENTRY * WXEGLGETPIXELMAPUSV)(GLenum,GLushort *); +WXE_EXTERN WXEGLGETPIXELMAPUSV weglGetPixelMapusv; +typedef void (APIENTRY * WXEGLBITMAP)(GLsizei,GLsizei,GLfloat,GLfloat,GLfloat,GLfloat,const GLubyte *); +WXE_EXTERN WXEGLBITMAP weglBitmap; typedef void (APIENTRY * WXEGLREADPIXELS)(GLint,GLint,GLsizei,GLsizei,GLenum,GLenum,GLvoid *); WXE_EXTERN WXEGLREADPIXELS weglReadPixels; -typedef void (APIENTRY * WXEGLRECTD)(GLdouble,GLdouble,GLdouble,GLdouble); -WXE_EXTERN WXEGLRECTD weglRectd; -typedef void (APIENTRY * WXEGLRECTDV)(const GLdouble *,const GLdouble *); -WXE_EXTERN WXEGLRECTDV weglRectdv; -typedef void (APIENTRY * WXEGLRECTF)(GLfloat,GLfloat,GLfloat,GLfloat); -WXE_EXTERN WXEGLRECTF weglRectf; -typedef void (APIENTRY * WXEGLRECTFV)(const GLfloat *,const GLfloat *); -WXE_EXTERN WXEGLRECTFV weglRectfv; -typedef void (APIENTRY * WXEGLRECTI)(GLint,GLint,GLint,GLint); -WXE_EXTERN WXEGLRECTI weglRecti; -typedef void (APIENTRY * WXEGLRECTIV)(const GLint *,const GLint *); -WXE_EXTERN WXEGLRECTIV weglRectiv; -typedef void (APIENTRY * WXEGLRECTS)(GLshort,GLshort,GLshort,GLshort); -WXE_EXTERN WXEGLRECTS weglRects; -typedef void (APIENTRY * WXEGLRECTSV)(const GLshort *,const GLshort *); -WXE_EXTERN WXEGLRECTSV weglRectsv; -typedef GLint (APIENTRY * WXEGLRENDERMODE)(GLenum); -WXE_EXTERN WXEGLRENDERMODE weglRenderMode; -typedef void (APIENTRY * WXEGLROTATED)(GLdouble,GLdouble,GLdouble,GLdouble); -WXE_EXTERN WXEGLROTATED weglRotated; -typedef void (APIENTRY * WXEGLROTATEF)(GLfloat,GLfloat,GLfloat,GLfloat); -WXE_EXTERN WXEGLROTATEF weglRotatef; -typedef void (APIENTRY * WXEGLSCALED)(GLdouble,GLdouble,GLdouble); -WXE_EXTERN WXEGLSCALED weglScaled; -typedef void (APIENTRY * WXEGLSCALEF)(GLfloat,GLfloat,GLfloat); -WXE_EXTERN WXEGLSCALEF weglScalef; -typedef void (APIENTRY * WXEGLSCISSOR)(GLint,GLint,GLsizei,GLsizei); -WXE_EXTERN WXEGLSCISSOR weglScissor; -typedef void (APIENTRY * WXEGLSELECTBUFFER)(GLsizei,GLuint *); -WXE_EXTERN WXEGLSELECTBUFFER weglSelectBuffer; -typedef void (APIENTRY * WXEGLSHADEMODEL)(GLenum); -WXE_EXTERN WXEGLSHADEMODEL weglShadeModel; +typedef void (APIENTRY * WXEGLDRAWPIXELS)(GLsizei,GLsizei,GLenum,GLenum,const GLvoid *); +WXE_EXTERN WXEGLDRAWPIXELS weglDrawPixels; +typedef void (APIENTRY * WXEGLCOPYPIXELS)(GLint,GLint,GLsizei,GLsizei,GLenum); +WXE_EXTERN WXEGLCOPYPIXELS weglCopyPixels; typedef void (APIENTRY * WXEGLSTENCILFUNC)(GLenum,GLint,GLuint); WXE_EXTERN WXEGLSTENCILFUNC weglStencilFunc; typedef void (APIENTRY * WXEGLSTENCILMASK)(GLuint); WXE_EXTERN WXEGLSTENCILMASK weglStencilMask; typedef void (APIENTRY * WXEGLSTENCILOP)(GLenum,GLenum,GLenum); WXE_EXTERN WXEGLSTENCILOP weglStencilOp; -typedef void (APIENTRY * WXEGLTEXCOORD1DV)(const GLdouble *); -WXE_EXTERN WXEGLTEXCOORD1DV weglTexCoord1dv; -typedef void (APIENTRY * WXEGLTEXCOORD1FV)(const GLfloat *); -WXE_EXTERN WXEGLTEXCOORD1FV weglTexCoord1fv; -typedef void (APIENTRY * WXEGLTEXCOORD1IV)(const GLint *); -WXE_EXTERN WXEGLTEXCOORD1IV weglTexCoord1iv; -typedef void (APIENTRY * WXEGLTEXCOORD1SV)(const GLshort *); -WXE_EXTERN WXEGLTEXCOORD1SV weglTexCoord1sv; -typedef void (APIENTRY * WXEGLTEXCOORD2DV)(const GLdouble *); -WXE_EXTERN WXEGLTEXCOORD2DV weglTexCoord2dv; -typedef void (APIENTRY * WXEGLTEXCOORD2FV)(const GLfloat *); -WXE_EXTERN WXEGLTEXCOORD2FV weglTexCoord2fv; -typedef void (APIENTRY * WXEGLTEXCOORD2IV)(const GLint *); -WXE_EXTERN WXEGLTEXCOORD2IV weglTexCoord2iv; -typedef void (APIENTRY * WXEGLTEXCOORD2SV)(const GLshort *); -WXE_EXTERN WXEGLTEXCOORD2SV weglTexCoord2sv; -typedef void (APIENTRY * WXEGLTEXCOORD3DV)(const GLdouble *); -WXE_EXTERN WXEGLTEXCOORD3DV weglTexCoord3dv; -typedef void (APIENTRY * WXEGLTEXCOORD3FV)(const GLfloat *); -WXE_EXTERN WXEGLTEXCOORD3FV weglTexCoord3fv; -typedef void (APIENTRY * WXEGLTEXCOORD3IV)(const GLint *); -WXE_EXTERN WXEGLTEXCOORD3IV weglTexCoord3iv; -typedef void (APIENTRY * WXEGLTEXCOORD3SV)(const GLshort *); -WXE_EXTERN WXEGLTEXCOORD3SV weglTexCoord3sv; -typedef void (APIENTRY * WXEGLTEXCOORD4DV)(const GLdouble *); -WXE_EXTERN WXEGLTEXCOORD4DV weglTexCoord4dv; -typedef void (APIENTRY * WXEGLTEXCOORD4FV)(const GLfloat *); -WXE_EXTERN WXEGLTEXCOORD4FV weglTexCoord4fv; -typedef void (APIENTRY * WXEGLTEXCOORD4IV)(const GLint *); -WXE_EXTERN WXEGLTEXCOORD4IV weglTexCoord4iv; -typedef void (APIENTRY * WXEGLTEXCOORD4SV)(const GLshort *); -WXE_EXTERN WXEGLTEXCOORD4SV weglTexCoord4sv; -typedef void (APIENTRY * WXEGLTEXCOORDPOINTER)(GLint,GLenum,GLsizei,const GLvoid *); -WXE_EXTERN WXEGLTEXCOORDPOINTER weglTexCoordPointer; -typedef void (APIENTRY * WXEGLTEXENVF)(GLenum,GLenum,GLfloat); -WXE_EXTERN WXEGLTEXENVF weglTexEnvf; -typedef void (APIENTRY * WXEGLTEXENVFV)(GLenum,GLenum,const GLfloat *); -WXE_EXTERN WXEGLTEXENVFV weglTexEnvfv; -typedef void (APIENTRY * WXEGLTEXENVI)(GLenum,GLenum,GLint); -WXE_EXTERN WXEGLTEXENVI weglTexEnvi; -typedef void (APIENTRY * WXEGLTEXENVIV)(GLenum,GLenum,const GLint *); -WXE_EXTERN WXEGLTEXENVIV weglTexEnviv; +typedef void (APIENTRY * WXEGLCLEARSTENCIL)(GLint); +WXE_EXTERN WXEGLCLEARSTENCIL weglClearStencil; typedef void (APIENTRY * WXEGLTEXGEND)(GLenum,GLenum,GLdouble); WXE_EXTERN WXEGLTEXGEND weglTexGend; -typedef void (APIENTRY * WXEGLTEXGENDV)(GLenum,GLenum,const GLdouble *); -WXE_EXTERN WXEGLTEXGENDV weglTexGendv; typedef void (APIENTRY * WXEGLTEXGENF)(GLenum,GLenum,GLfloat); WXE_EXTERN WXEGLTEXGENF weglTexGenf; -typedef void (APIENTRY * WXEGLTEXGENFV)(GLenum,GLenum,const GLfloat *); -WXE_EXTERN WXEGLTEXGENFV weglTexGenfv; typedef void (APIENTRY * WXEGLTEXGENI)(GLenum,GLenum,GLint); WXE_EXTERN WXEGLTEXGENI weglTexGeni; +typedef void (APIENTRY * WXEGLTEXGENDV)(GLenum,GLenum,const GLdouble *); +WXE_EXTERN WXEGLTEXGENDV weglTexGendv; +typedef void (APIENTRY * WXEGLTEXGENFV)(GLenum,GLenum,const GLfloat *); +WXE_EXTERN WXEGLTEXGENFV weglTexGenfv; typedef void (APIENTRY * WXEGLTEXGENIV)(GLenum,GLenum,const GLint *); WXE_EXTERN WXEGLTEXGENIV weglTexGeniv; -typedef void (APIENTRY * WXEGLTEXIMAGE1D)(GLenum,GLint,GLint,GLsizei,GLint,GLenum,GLenum,const GLvoid *); -WXE_EXTERN WXEGLTEXIMAGE1D weglTexImage1D; -typedef void (APIENTRY * WXEGLTEXIMAGE2D)(GLenum,GLint,GLint,GLsizei,GLsizei,GLint,GLenum,GLenum,const GLvoid *); -WXE_EXTERN WXEGLTEXIMAGE2D weglTexImage2D; +typedef void (APIENTRY * WXEGLGETTEXGENDV)(GLenum,GLenum,GLdouble *); +WXE_EXTERN WXEGLGETTEXGENDV weglGetTexGendv; +typedef void (APIENTRY * WXEGLGETTEXGENFV)(GLenum,GLenum,GLfloat *); +WXE_EXTERN WXEGLGETTEXGENFV weglGetTexGenfv; +typedef void (APIENTRY * WXEGLGETTEXGENIV)(GLenum,GLenum,GLint *); +WXE_EXTERN WXEGLGETTEXGENIV weglGetTexGeniv; +typedef void (APIENTRY * WXEGLTEXENVF)(GLenum,GLenum,GLfloat); +WXE_EXTERN WXEGLTEXENVF weglTexEnvf; +typedef void (APIENTRY * WXEGLTEXENVI)(GLenum,GLenum,GLint); +WXE_EXTERN WXEGLTEXENVI weglTexEnvi; +typedef void (APIENTRY * WXEGLTEXENVFV)(GLenum,GLenum,const GLfloat *); +WXE_EXTERN WXEGLTEXENVFV weglTexEnvfv; +typedef void (APIENTRY * WXEGLTEXENVIV)(GLenum,GLenum,const GLint *); +WXE_EXTERN WXEGLTEXENVIV weglTexEnviv; +typedef void (APIENTRY * WXEGLGETTEXENVFV)(GLenum,GLenum,GLfloat *); +WXE_EXTERN WXEGLGETTEXENVFV weglGetTexEnvfv; +typedef void (APIENTRY * WXEGLGETTEXENVIV)(GLenum,GLenum,GLint *); +WXE_EXTERN WXEGLGETTEXENVIV weglGetTexEnviv; typedef void (APIENTRY * WXEGLTEXPARAMETERF)(GLenum,GLenum,GLfloat); WXE_EXTERN WXEGLTEXPARAMETERF weglTexParameterf; -typedef void (APIENTRY * WXEGLTEXPARAMETERFV)(GLenum,GLenum,const GLfloat *); -WXE_EXTERN WXEGLTEXPARAMETERFV weglTexParameterfv; typedef void (APIENTRY * WXEGLTEXPARAMETERI)(GLenum,GLenum,GLint); WXE_EXTERN WXEGLTEXPARAMETERI weglTexParameteri; +typedef void (APIENTRY * WXEGLTEXPARAMETERFV)(GLenum,GLenum,const GLfloat *); +WXE_EXTERN WXEGLTEXPARAMETERFV weglTexParameterfv; typedef void (APIENTRY * WXEGLTEXPARAMETERIV)(GLenum,GLenum,const GLint *); WXE_EXTERN WXEGLTEXPARAMETERIV weglTexParameteriv; +typedef void (APIENTRY * WXEGLGETTEXPARAMETERFV)(GLenum,GLenum,GLfloat *); +WXE_EXTERN WXEGLGETTEXPARAMETERFV weglGetTexParameterfv; +typedef void (APIENTRY * WXEGLGETTEXPARAMETERIV)(GLenum,GLenum,GLint *); +WXE_EXTERN WXEGLGETTEXPARAMETERIV weglGetTexParameteriv; +typedef void (APIENTRY * WXEGLGETTEXLEVELPARAMETERFV)(GLenum,GLint,GLenum,GLfloat *); +WXE_EXTERN WXEGLGETTEXLEVELPARAMETERFV weglGetTexLevelParameterfv; +typedef void (APIENTRY * WXEGLGETTEXLEVELPARAMETERIV)(GLenum,GLint,GLenum,GLint *); +WXE_EXTERN WXEGLGETTEXLEVELPARAMETERIV weglGetTexLevelParameteriv; +typedef void (APIENTRY * WXEGLTEXIMAGE1D)(GLenum,GLint,GLint,GLsizei,GLint,GLenum,GLenum,const GLvoid *); +WXE_EXTERN WXEGLTEXIMAGE1D weglTexImage1D; +typedef void (APIENTRY * WXEGLTEXIMAGE2D)(GLenum,GLint,GLint,GLsizei,GLsizei,GLint,GLenum,GLenum,const GLvoid *); +WXE_EXTERN WXEGLTEXIMAGE2D weglTexImage2D; +typedef void (APIENTRY * WXEGLGETTEXIMAGE)(GLenum,GLint,GLenum,GLenum,GLvoid *); +WXE_EXTERN WXEGLGETTEXIMAGE weglGetTexImage; +typedef void (APIENTRY * WXEGLGENTEXTURES)(GLsizei,GLuint *); +WXE_EXTERN WXEGLGENTEXTURES weglGenTextures; +typedef void (APIENTRY * WXEGLDELETETEXTURES)(GLsizei,const GLuint *); +WXE_EXTERN WXEGLDELETETEXTURES weglDeleteTextures; +typedef void (APIENTRY * WXEGLBINDTEXTURE)(GLenum,GLuint); +WXE_EXTERN WXEGLBINDTEXTURE weglBindTexture; +typedef void (APIENTRY * WXEGLPRIORITIZETEXTURES)(GLsizei,const GLuint *,const GLclampf *); +WXE_EXTERN WXEGLPRIORITIZETEXTURES weglPrioritizeTextures; +typedef GLboolean (APIENTRY * WXEGLARETEXTURESRESIDENT)(GLsizei,const GLuint *,GLboolean *); +WXE_EXTERN WXEGLARETEXTURESRESIDENT weglAreTexturesResident; +typedef GLboolean (APIENTRY * WXEGLISTEXTURE)(GLuint); +WXE_EXTERN WXEGLISTEXTURE weglIsTexture; typedef void (APIENTRY * WXEGLTEXSUBIMAGE1D)(GLenum,GLint,GLint,GLsizei,GLenum,GLenum,const GLvoid *); WXE_EXTERN WXEGLTEXSUBIMAGE1D weglTexSubImage1D; typedef void (APIENTRY * WXEGLTEXSUBIMAGE2D)(GLenum,GLint,GLint,GLint,GLsizei,GLsizei,GLenum,GLenum,const GLvoid *); WXE_EXTERN WXEGLTEXSUBIMAGE2D weglTexSubImage2D; -typedef void (APIENTRY * WXEGLTRANSLATED)(GLdouble,GLdouble,GLdouble); -WXE_EXTERN WXEGLTRANSLATED weglTranslated; -typedef void (APIENTRY * WXEGLTRANSLATEF)(GLfloat,GLfloat,GLfloat); -WXE_EXTERN WXEGLTRANSLATEF weglTranslatef; -typedef void (APIENTRY * WXEGLVERTEX2DV)(const GLdouble *); -WXE_EXTERN WXEGLVERTEX2DV weglVertex2dv; -typedef void (APIENTRY * WXEGLVERTEX2FV)(const GLfloat *); -WXE_EXTERN WXEGLVERTEX2FV weglVertex2fv; -typedef void (APIENTRY * WXEGLVERTEX2IV)(const GLint *); -WXE_EXTERN WXEGLVERTEX2IV weglVertex2iv; -typedef void (APIENTRY * WXEGLVERTEX2SV)(const GLshort *); -WXE_EXTERN WXEGLVERTEX2SV weglVertex2sv; -typedef void (APIENTRY * WXEGLVERTEX3DV)(const GLdouble *); -WXE_EXTERN WXEGLVERTEX3DV weglVertex3dv; -typedef void (APIENTRY * WXEGLVERTEX3FV)(const GLfloat *); -WXE_EXTERN WXEGLVERTEX3FV weglVertex3fv; -typedef void (APIENTRY * WXEGLVERTEX3IV)(const GLint *); -WXE_EXTERN WXEGLVERTEX3IV weglVertex3iv; -typedef void (APIENTRY * WXEGLVERTEX3SV)(const GLshort *); -WXE_EXTERN WXEGLVERTEX3SV weglVertex3sv; -typedef void (APIENTRY * WXEGLVERTEX4DV)(const GLdouble *); -WXE_EXTERN WXEGLVERTEX4DV weglVertex4dv; -typedef void (APIENTRY * WXEGLVERTEX4FV)(const GLfloat *); -WXE_EXTERN WXEGLVERTEX4FV weglVertex4fv; -typedef void (APIENTRY * WXEGLVERTEX4IV)(const GLint *); -WXE_EXTERN WXEGLVERTEX4IV weglVertex4iv; -typedef void (APIENTRY * WXEGLVERTEX4SV)(const GLshort *); -WXE_EXTERN WXEGLVERTEX4SV weglVertex4sv; -typedef void (APIENTRY * WXEGLVERTEXPOINTER)(GLint,GLenum,GLsizei,const GLvoid *); -WXE_EXTERN WXEGLVERTEXPOINTER weglVertexPointer; -typedef void (APIENTRY * WXEGLVIEWPORT)(GLint,GLint,GLsizei,GLsizei); -WXE_EXTERN WXEGLVIEWPORT weglViewport; +typedef void (APIENTRY * WXEGLCOPYTEXIMAGE1D)(GLenum,GLint,GLenum,GLint,GLint,GLsizei,GLint); +WXE_EXTERN WXEGLCOPYTEXIMAGE1D weglCopyTexImage1D; +typedef void (APIENTRY * WXEGLCOPYTEXIMAGE2D)(GLenum,GLint,GLenum,GLint,GLint,GLsizei,GLsizei,GLint); +WXE_EXTERN WXEGLCOPYTEXIMAGE2D weglCopyTexImage2D; +typedef void (APIENTRY * WXEGLCOPYTEXSUBIMAGE1D)(GLenum,GLint,GLint,GLint,GLint,GLsizei); +WXE_EXTERN WXEGLCOPYTEXSUBIMAGE1D weglCopyTexSubImage1D; +typedef void (APIENTRY * WXEGLCOPYTEXSUBIMAGE2D)(GLenum,GLint,GLint,GLint,GLint,GLint,GLsizei,GLsizei); +WXE_EXTERN WXEGLCOPYTEXSUBIMAGE2D weglCopyTexSubImage2D; +typedef void (APIENTRY * WXEGLMAP1D)(GLenum,GLdouble,GLdouble,GLint,GLint,const GLdouble *); +WXE_EXTERN WXEGLMAP1D weglMap1d; +typedef void (APIENTRY * WXEGLMAP1F)(GLenum,GLfloat,GLfloat,GLint,GLint,const GLfloat *); +WXE_EXTERN WXEGLMAP1F weglMap1f; +typedef void (APIENTRY * WXEGLMAP2D)(GLenum,GLdouble,GLdouble,GLint,GLint,GLdouble,GLdouble,GLint,GLint,const GLdouble *); +WXE_EXTERN WXEGLMAP2D weglMap2d; +typedef void (APIENTRY * WXEGLMAP2F)(GLenum,GLfloat,GLfloat,GLint,GLint,GLfloat,GLfloat,GLint,GLint,const GLfloat *); +WXE_EXTERN WXEGLMAP2F weglMap2f; +typedef void (APIENTRY * WXEGLGETMAPDV)(GLenum,GLenum,GLdouble *); +WXE_EXTERN WXEGLGETMAPDV weglGetMapdv; +typedef void (APIENTRY * WXEGLGETMAPFV)(GLenum,GLenum,GLfloat *); +WXE_EXTERN WXEGLGETMAPFV weglGetMapfv; +typedef void (APIENTRY * WXEGLGETMAPIV)(GLenum,GLenum,GLint *); +WXE_EXTERN WXEGLGETMAPIV weglGetMapiv; +typedef void (APIENTRY * WXEGLEVALCOORD1DV)(const GLdouble *); +WXE_EXTERN WXEGLEVALCOORD1DV weglEvalCoord1dv; +typedef void (APIENTRY * WXEGLEVALCOORD1FV)(const GLfloat *); +WXE_EXTERN WXEGLEVALCOORD1FV weglEvalCoord1fv; +typedef void (APIENTRY * WXEGLEVALCOORD2DV)(const GLdouble *); +WXE_EXTERN WXEGLEVALCOORD2DV weglEvalCoord2dv; +typedef void (APIENTRY * WXEGLEVALCOORD2FV)(const GLfloat *); +WXE_EXTERN WXEGLEVALCOORD2FV weglEvalCoord2fv; +typedef void (APIENTRY * WXEGLMAPGRID1D)(GLint,GLdouble,GLdouble); +WXE_EXTERN WXEGLMAPGRID1D weglMapGrid1d; +typedef void (APIENTRY * WXEGLMAPGRID1F)(GLint,GLfloat,GLfloat); +WXE_EXTERN WXEGLMAPGRID1F weglMapGrid1f; +typedef void (APIENTRY * WXEGLMAPGRID2D)(GLint,GLdouble,GLdouble,GLint,GLdouble,GLdouble); +WXE_EXTERN WXEGLMAPGRID2D weglMapGrid2d; +typedef void (APIENTRY * WXEGLMAPGRID2F)(GLint,GLfloat,GLfloat,GLint,GLfloat,GLfloat); +WXE_EXTERN WXEGLMAPGRID2F weglMapGrid2f; +typedef void (APIENTRY * WXEGLEVALPOINT1)(GLint); +WXE_EXTERN WXEGLEVALPOINT1 weglEvalPoint1; +typedef void (APIENTRY * WXEGLEVALPOINT2)(GLint,GLint); +WXE_EXTERN WXEGLEVALPOINT2 weglEvalPoint2; +typedef void (APIENTRY * WXEGLEVALMESH1)(GLenum,GLint,GLint); +WXE_EXTERN WXEGLEVALMESH1 weglEvalMesh1; +typedef void (APIENTRY * WXEGLEVALMESH2)(GLenum,GLint,GLint,GLint,GLint); +WXE_EXTERN WXEGLEVALMESH2 weglEvalMesh2; +typedef void (APIENTRY * WXEGLFOGF)(GLenum,GLfloat); +WXE_EXTERN WXEGLFOGF weglFogf; +typedef void (APIENTRY * WXEGLFOGI)(GLenum,GLint); +WXE_EXTERN WXEGLFOGI weglFogi; +typedef void (APIENTRY * WXEGLFOGFV)(GLenum,const GLfloat *); +WXE_EXTERN WXEGLFOGFV weglFogfv; +typedef void (APIENTRY * WXEGLFOGIV)(GLenum,const GLint *); +WXE_EXTERN WXEGLFOGIV weglFogiv; +typedef void (APIENTRY * WXEGLFEEDBACKBUFFER)(GLsizei,GLenum,GLfloat *); +WXE_EXTERN WXEGLFEEDBACKBUFFER weglFeedbackBuffer; +typedef void (APIENTRY * WXEGLPASSTHROUGH)(GLfloat); +WXE_EXTERN WXEGLPASSTHROUGH weglPassThrough; +typedef void (APIENTRY * WXEGLSELECTBUFFER)(GLsizei,GLuint *); +WXE_EXTERN WXEGLSELECTBUFFER weglSelectBuffer; +typedef void (APIENTRY * WXEGLINITNAMES)(); +WXE_EXTERN WXEGLINITNAMES weglInitNames; +typedef void (APIENTRY * WXEGLLOADNAME)(GLuint); +WXE_EXTERN WXEGLLOADNAME weglLoadName; +typedef void (APIENTRY * WXEGLPUSHNAME)(GLuint); +WXE_EXTERN WXEGLPUSHNAME weglPushName; +typedef void (APIENTRY * WXEGLPOPNAME)(); +WXE_EXTERN WXEGLPOPNAME weglPopName; typedef void (APIENTRY * WXEGLBLENDCOLOR)(GLclampf,GLclampf,GLclampf,GLclampf); WXE_EXTERN WXEGLBLENDCOLOR weglBlendColor; typedef void (APIENTRY * WXEGLBLENDEQUATION)(GLenum); @@ -681,13 +681,13 @@ typedef void (APIENTRY * WXEGLMULTITEXCOORD4IV)(GLenum,const GLint *); WXE_EXTERN WXEGLMULTITEXCOORD4IV weglMultiTexCoord4iv; typedef void (APIENTRY * WXEGLMULTITEXCOORD4SV)(GLenum,const GLshort *); WXE_EXTERN WXEGLMULTITEXCOORD4SV weglMultiTexCoord4sv; -typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXF)(const GLfloat *); +typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXF)(const GLfloat m[16]); WXE_EXTERN WXEGLLOADTRANSPOSEMATRIXF weglLoadTransposeMatrixf; -typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXD)(const GLdouble *); +typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXD)(const GLdouble m[16]); WXE_EXTERN WXEGLLOADTRANSPOSEMATRIXD weglLoadTransposeMatrixd; -typedef void (APIENTRY * WXEGLMULTTRANSPOSEMATRIXF)(const GLfloat *); +typedef void (APIENTRY * WXEGLMULTTRANSPOSEMATRIXF)(const GLfloat m[16]); WXE_EXTERN WXEGLMULTTRANSPOSEMATRIXF weglMultTransposeMatrixf; -typedef void (APIENTRY * WXEGLMULTTRANSPOSEMATRIXD)(const GLdouble *); +typedef void (APIENTRY * WXEGLMULTTRANSPOSEMATRIXD)(const GLdouble m[16]); WXE_EXTERN WXEGLMULTTRANSPOSEMATRIXD weglMultTransposeMatrixd; typedef void (APIENTRY * WXEGLBLENDFUNCSEPARATE)(GLenum,GLenum,GLenum,GLenum); WXE_EXTERN WXEGLBLENDFUNCSEPARATE weglBlendFuncSeparate; @@ -1589,16 +1589,28 @@ typedef GLuint (APIENTRY * WXEGLGETDEBUGMESSAGELOGARB)(GLuint,GLsizei,GLenum *,G WXE_EXTERN WXEGLGETDEBUGMESSAGELOGARB weglGetDebugMessageLogARB; typedef GLenum (APIENTRY * WXEGLGETGRAPHICSRESETSTATUSARB)(); WXE_EXTERN WXEGLGETGRAPHICSRESETSTATUSARB weglGetGraphicsResetStatusARB; -typedef void (APIENTRY * WXEGLRESIZEBUFFERSMESA)(); -WXE_EXTERN WXEGLRESIZEBUFFERSMESA weglResizeBuffersMESA; -typedef void (APIENTRY * WXEGLWINDOWPOS4DVMESA)(const GLdouble *); -WXE_EXTERN WXEGLWINDOWPOS4DVMESA weglWindowPos4dvMESA; -typedef void (APIENTRY * WXEGLWINDOWPOS4FVMESA)(const GLfloat *); -WXE_EXTERN WXEGLWINDOWPOS4FVMESA weglWindowPos4fvMESA; -typedef void (APIENTRY * WXEGLWINDOWPOS4IVMESA)(const GLint *); -WXE_EXTERN WXEGLWINDOWPOS4IVMESA weglWindowPos4ivMESA; -typedef void (APIENTRY * WXEGLWINDOWPOS4SVMESA)(const GLshort *); -WXE_EXTERN WXEGLWINDOWPOS4SVMESA weglWindowPos4svMESA; +typedef void (APIENTRY * WXEGLDRAWARRAYSINSTANCEDBASEINSTANCE)(GLenum,GLint,GLsizei,GLsizei,GLuint); +WXE_EXTERN WXEGLDRAWARRAYSINSTANCEDBASEINSTANCE weglDrawArraysInstancedBaseInstance; +typedef void (APIENTRY * WXEGLDRAWELEMENTSINSTANCEDBASEINSTANCE)(GLenum,GLsizei,GLenum,const void *,GLsizei,GLuint); +WXE_EXTERN WXEGLDRAWELEMENTSINSTANCEDBASEINSTANCE weglDrawElementsInstancedBaseInstance; +typedef void (APIENTRY * WXEGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCE)(GLenum,GLsizei,GLenum,const void *,GLsizei,GLint,GLuint); +WXE_EXTERN WXEGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCE weglDrawElementsInstancedBaseVertexBaseInstance; +typedef void (APIENTRY * WXEGLDRAWTRANSFORMFEEDBACKINSTANCED)(GLenum,GLuint,GLsizei); +WXE_EXTERN WXEGLDRAWTRANSFORMFEEDBACKINSTANCED weglDrawTransformFeedbackInstanced; +typedef void (APIENTRY * WXEGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCED)(GLenum,GLuint,GLuint,GLsizei); +WXE_EXTERN WXEGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCED weglDrawTransformFeedbackStreamInstanced; +typedef void (APIENTRY * WXEGLGETINTERNALFORMATIV)(GLenum,GLenum,GLenum,GLsizei,GLint *); +WXE_EXTERN WXEGLGETINTERNALFORMATIV weglGetInternalformativ; +typedef void (APIENTRY * WXEGLBINDIMAGETEXTURE)(GLuint,GLuint,GLint,GLboolean,GLint,GLenum,GLenum); +WXE_EXTERN WXEGLBINDIMAGETEXTURE weglBindImageTexture; +typedef void (APIENTRY * WXEGLMEMORYBARRIER)(GLbitfield); +WXE_EXTERN WXEGLMEMORYBARRIER weglMemoryBarrier; +typedef void (APIENTRY * WXEGLTEXSTORAGE1D)(GLenum,GLsizei,GLenum,GLsizei); +WXE_EXTERN WXEGLTEXSTORAGE1D weglTexStorage1D; +typedef void (APIENTRY * WXEGLTEXSTORAGE2D)(GLenum,GLsizei,GLenum,GLsizei,GLsizei); +WXE_EXTERN WXEGLTEXSTORAGE2D weglTexStorage2D; +typedef void (APIENTRY * WXEGLTEXSTORAGE3D)(GLenum,GLsizei,GLenum,GLsizei,GLsizei,GLsizei); +WXE_EXTERN WXEGLTEXSTORAGE3D weglTexStorage3D; typedef void (APIENTRY * WXEGLDEPTHBOUNDSEXT)(GLclampd,GLclampd); WXE_EXTERN WXEGLDEPTHBOUNDSEXT weglDepthBoundsEXT; typedef void (APIENTRY * WXEGLSTENCILCLEARTAGEXT)(GLsizei,GLuint); diff --git a/lib/wx/c_src/gen/gl_finit.h b/lib/wx/c_src/gen/gl_finit.h index 583e36faf7..afe947ed80 100644 --- a/lib/wx/c_src/gen/gl_finit.h +++ b/lib/wx/c_src/gen/gl_finit.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2010. All Rights Reserved. + * Copyright Ericsson AB 2008-2012. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -20,186 +20,135 @@ gl_fns_t gl_fns[] = { - {"glAccum", NULL, &weglAccum}, - {"glAlphaFunc", NULL, &weglAlphaFunc}, - {"glAreTexturesResident", NULL, &weglAreTexturesResident}, - {"glArrayElement", NULL, &weglArrayElement}, - {"glBegin", NULL, &weglBegin}, - {"glBindTexture", NULL, &weglBindTexture}, - {"glBitmap", NULL, &weglBitmap}, - {"glBlendFunc", NULL, &weglBlendFunc}, - {"glCallList", NULL, &weglCallList}, - {"glCallLists", NULL, &weglCallLists}, - {"glClear", NULL, &weglClear}, - {"glClearAccum", NULL, &weglClearAccum}, - {"glClearColor", NULL, &weglClearColor}, - {"glClearDepth", NULL, &weglClearDepth}, {"glClearIndex", NULL, &weglClearIndex}, - {"glClearStencil", NULL, &weglClearStencil}, - {"glClipPlane", NULL, &weglClipPlane}, - {"glColor3bv", NULL, &weglColor3bv}, - {"glColor3dv", NULL, &weglColor3dv}, - {"glColor3fv", NULL, &weglColor3fv}, - {"glColor3iv", NULL, &weglColor3iv}, - {"glColor3sv", NULL, &weglColor3sv}, - {"glColor3ubv", NULL, &weglColor3ubv}, - {"glColor3uiv", NULL, &weglColor3uiv}, - {"glColor3usv", NULL, &weglColor3usv}, - {"glColor4bv", NULL, &weglColor4bv}, - {"glColor4dv", NULL, &weglColor4dv}, - {"glColor4fv", NULL, &weglColor4fv}, - {"glColor4iv", NULL, &weglColor4iv}, - {"glColor4sv", NULL, &weglColor4sv}, - {"glColor4ubv", NULL, &weglColor4ubv}, - {"glColor4uiv", NULL, &weglColor4uiv}, - {"glColor4usv", NULL, &weglColor4usv}, + {"glClearColor", NULL, &weglClearColor}, + {"glClear", NULL, &weglClear}, + {"glIndexMask", NULL, &weglIndexMask}, {"glColorMask", NULL, &weglColorMask}, - {"glColorMaterial", NULL, &weglColorMaterial}, - {"glColorPointer", NULL, &weglColorPointer}, - {"glCopyPixels", NULL, &weglCopyPixels}, - {"glCopyTexImage1D", NULL, &weglCopyTexImage1D}, - {"glCopyTexImage2D", NULL, &weglCopyTexImage2D}, - {"glCopyTexSubImage1D", NULL, &weglCopyTexSubImage1D}, - {"glCopyTexSubImage2D", NULL, &weglCopyTexSubImage2D}, + {"glAlphaFunc", NULL, &weglAlphaFunc}, + {"glBlendFunc", NULL, &weglBlendFunc}, + {"glLogicOp", NULL, &weglLogicOp}, {"glCullFace", NULL, &weglCullFace}, - {"glDeleteLists", NULL, &weglDeleteLists}, - {"glDeleteTextures", NULL, &weglDeleteTextures}, - {"glDepthFunc", NULL, &weglDepthFunc}, - {"glDepthMask", NULL, &weglDepthMask}, - {"glDepthRange", NULL, &weglDepthRange}, - {"glDisable", NULL, &weglDisable}, - {"glDisableClientState", NULL, &weglDisableClientState}, - {"glDrawArrays", NULL, &weglDrawArrays}, - {"glDrawBuffer", NULL, &weglDrawBuffer}, - {"glDrawElements", NULL, &weglDrawElements}, - {"glDrawPixels", NULL, &weglDrawPixels}, + {"glFrontFace", NULL, &weglFrontFace}, + {"glPointSize", NULL, &weglPointSize}, + {"glLineWidth", NULL, &weglLineWidth}, + {"glLineStipple", NULL, &weglLineStipple}, + {"glPolygonMode", NULL, &weglPolygonMode}, + {"glPolygonOffset", NULL, &weglPolygonOffset}, + {"glPolygonStipple", NULL, &weglPolygonStipple}, + {"glGetPolygonStipple", NULL, &weglGetPolygonStipple}, {"glEdgeFlagv", NULL, &weglEdgeFlagv}, - {"glEdgeFlagPointer", NULL, &weglEdgeFlagPointer}, + {"glScissor", NULL, &weglScissor}, + {"glClipPlane", NULL, &weglClipPlane}, + {"glGetClipPlane", NULL, &weglGetClipPlane}, + {"glDrawBuffer", NULL, &weglDrawBuffer}, + {"glReadBuffer", NULL, &weglReadBuffer}, {"glEnable", NULL, &weglEnable}, + {"glDisable", NULL, &weglDisable}, + {"glIsEnabled", NULL, &weglIsEnabled}, {"glEnableClientState", NULL, &weglEnableClientState}, - {"glEnd", NULL, &weglEnd}, - {"glEndList", NULL, &weglEndList}, - {"glEvalCoord1dv", NULL, &weglEvalCoord1dv}, - {"glEvalCoord1fv", NULL, &weglEvalCoord1fv}, - {"glEvalCoord2dv", NULL, &weglEvalCoord2dv}, - {"glEvalCoord2fv", NULL, &weglEvalCoord2fv}, - {"glEvalMesh1", NULL, &weglEvalMesh1}, - {"glEvalMesh2", NULL, &weglEvalMesh2}, - {"glEvalPoint1", NULL, &weglEvalPoint1}, - {"glEvalPoint2", NULL, &weglEvalPoint2}, - {"glFeedbackBuffer", NULL, &weglFeedbackBuffer}, - {"glFinish", NULL, &weglFinish}, - {"glFlush", NULL, &weglFlush}, - {"glFogf", NULL, &weglFogf}, - {"glFogfv", NULL, &weglFogfv}, - {"glFogi", NULL, &weglFogi}, - {"glFogiv", NULL, &weglFogiv}, - {"glFrontFace", NULL, &weglFrontFace}, - {"glFrustum", NULL, &weglFrustum}, - {"glGenLists", NULL, &weglGenLists}, - {"glGenTextures", NULL, &weglGenTextures}, + {"glDisableClientState", NULL, &weglDisableClientState}, {"glGetBooleanv", NULL, &weglGetBooleanv}, - {"glGetClipPlane", NULL, &weglGetClipPlane}, {"glGetDoublev", NULL, &weglGetDoublev}, - {"glGetError", NULL, &weglGetError}, {"glGetFloatv", NULL, &weglGetFloatv}, {"glGetIntegerv", NULL, &weglGetIntegerv}, - {"glGetLightfv", NULL, &weglGetLightfv}, - {"glGetLightiv", NULL, &weglGetLightiv}, - {"glGetMapdv", NULL, &weglGetMapdv}, - {"glGetMapfv", NULL, &weglGetMapfv}, - {"glGetMapiv", NULL, &weglGetMapiv}, - {"glGetMaterialfv", NULL, &weglGetMaterialfv}, - {"glGetMaterialiv", NULL, &weglGetMaterialiv}, - {"glGetPixelMapfv", NULL, &weglGetPixelMapfv}, - {"glGetPixelMapuiv", NULL, &weglGetPixelMapuiv}, - {"glGetPixelMapusv", NULL, &weglGetPixelMapusv}, - {"glGetPolygonStipple", NULL, &weglGetPolygonStipple}, + {"glPushAttrib", NULL, &weglPushAttrib}, + {"glPopAttrib", NULL, &weglPopAttrib}, + {"glPushClientAttrib", NULL, &weglPushClientAttrib}, + {"glPopClientAttrib", NULL, &weglPopClientAttrib}, + {"glRenderMode", NULL, &weglRenderMode}, + {"glGetError", NULL, &weglGetError}, {"glGetString", NULL, &weglGetString}, - {"glGetTexEnvfv", NULL, &weglGetTexEnvfv}, - {"glGetTexEnviv", NULL, &weglGetTexEnviv}, - {"glGetTexGendv", NULL, &weglGetTexGendv}, - {"glGetTexGenfv", NULL, &weglGetTexGenfv}, - {"glGetTexGeniv", NULL, &weglGetTexGeniv}, - {"glGetTexImage", NULL, &weglGetTexImage}, - {"glGetTexLevelParameterfv", NULL, &weglGetTexLevelParameterfv}, - {"glGetTexLevelParameteriv", NULL, &weglGetTexLevelParameteriv}, - {"glGetTexParameterfv", NULL, &weglGetTexParameterfv}, - {"glGetTexParameteriv", NULL, &weglGetTexParameteriv}, + {"glFinish", NULL, &weglFinish}, + {"glFlush", NULL, &weglFlush}, {"glHint", NULL, &weglHint}, - {"glIndexMask", NULL, &weglIndexMask}, - {"glIndexPointer", NULL, &weglIndexPointer}, - {"glIndexdv", NULL, &weglIndexdv}, - {"glIndexfv", NULL, &weglIndexfv}, - {"glIndexiv", NULL, &weglIndexiv}, - {"glIndexsv", NULL, &weglIndexsv}, - {"glIndexubv", NULL, &weglIndexubv}, - {"glInitNames", NULL, &weglInitNames}, - {"glInterleavedArrays", NULL, &weglInterleavedArrays}, - {"glIsEnabled", NULL, &weglIsEnabled}, - {"glIsList", NULL, &weglIsList}, - {"glIsTexture", NULL, &weglIsTexture}, - {"glLightModelf", NULL, &weglLightModelf}, - {"glLightModelfv", NULL, &weglLightModelfv}, - {"glLightModeli", NULL, &weglLightModeli}, - {"glLightModeliv", NULL, &weglLightModeliv}, - {"glLightf", NULL, &weglLightf}, - {"glLightfv", NULL, &weglLightfv}, - {"glLighti", NULL, &weglLighti}, - {"glLightiv", NULL, &weglLightiv}, - {"glLineStipple", NULL, &weglLineStipple}, - {"glLineWidth", NULL, &weglLineWidth}, - {"glListBase", NULL, &weglListBase}, + {"glClearDepth", NULL, &weglClearDepth}, + {"glDepthFunc", NULL, &weglDepthFunc}, + {"glDepthMask", NULL, &weglDepthMask}, + {"glDepthRange", NULL, &weglDepthRange}, + {"glClearAccum", NULL, &weglClearAccum}, + {"glAccum", NULL, &weglAccum}, + {"glMatrixMode", NULL, &weglMatrixMode}, + {"glOrtho", NULL, &weglOrtho}, + {"glFrustum", NULL, &weglFrustum}, + {"glViewport", NULL, &weglViewport}, + {"glPushMatrix", NULL, &weglPushMatrix}, + {"glPopMatrix", NULL, &weglPopMatrix}, {"glLoadIdentity", NULL, &weglLoadIdentity}, {"glLoadMatrixd", NULL, &weglLoadMatrixd}, {"glLoadMatrixf", NULL, &weglLoadMatrixf}, - {"glLoadName", NULL, &weglLoadName}, - {"glLogicOp", NULL, &weglLogicOp}, - {"glMap1d", NULL, &weglMap1d}, - {"glMap1f", NULL, &weglMap1f}, - {"glMap2d", NULL, &weglMap2d}, - {"glMap2f", NULL, &weglMap2f}, - {"glMapGrid1d", NULL, &weglMapGrid1d}, - {"glMapGrid1f", NULL, &weglMapGrid1f}, - {"glMapGrid2d", NULL, &weglMapGrid2d}, - {"glMapGrid2f", NULL, &weglMapGrid2f}, - {"glMaterialf", NULL, &weglMaterialf}, - {"glMaterialfv", NULL, &weglMaterialfv}, - {"glMateriali", NULL, &weglMateriali}, - {"glMaterialiv", NULL, &weglMaterialiv}, - {"glMatrixMode", NULL, &weglMatrixMode}, {"glMultMatrixd", NULL, &weglMultMatrixd}, {"glMultMatrixf", NULL, &weglMultMatrixf}, + {"glRotated", NULL, &weglRotated}, + {"glRotatef", NULL, &weglRotatef}, + {"glScaled", NULL, &weglScaled}, + {"glScalef", NULL, &weglScalef}, + {"glTranslated", NULL, &weglTranslated}, + {"glTranslatef", NULL, &weglTranslatef}, + {"glIsList", NULL, &weglIsList}, + {"glDeleteLists", NULL, &weglDeleteLists}, + {"glGenLists", NULL, &weglGenLists}, {"glNewList", NULL, &weglNewList}, + {"glEndList", NULL, &weglEndList}, + {"glCallList", NULL, &weglCallList}, + {"glCallLists", NULL, &weglCallLists}, + {"glListBase", NULL, &weglListBase}, + {"glBegin", NULL, &weglBegin}, + {"glEnd", NULL, &weglEnd}, + {"glVertex2dv", NULL, &weglVertex2dv}, + {"glVertex2fv", NULL, &weglVertex2fv}, + {"glVertex2iv", NULL, &weglVertex2iv}, + {"glVertex2sv", NULL, &weglVertex2sv}, + {"glVertex3dv", NULL, &weglVertex3dv}, + {"glVertex3fv", NULL, &weglVertex3fv}, + {"glVertex3iv", NULL, &weglVertex3iv}, + {"glVertex3sv", NULL, &weglVertex3sv}, + {"glVertex4dv", NULL, &weglVertex4dv}, + {"glVertex4fv", NULL, &weglVertex4fv}, + {"glVertex4iv", NULL, &weglVertex4iv}, + {"glVertex4sv", NULL, &weglVertex4sv}, {"glNormal3bv", NULL, &weglNormal3bv}, {"glNormal3dv", NULL, &weglNormal3dv}, {"glNormal3fv", NULL, &weglNormal3fv}, {"glNormal3iv", NULL, &weglNormal3iv}, {"glNormal3sv", NULL, &weglNormal3sv}, - {"glNormalPointer", NULL, &weglNormalPointer}, - {"glOrtho", NULL, &weglOrtho}, - {"glPassThrough", NULL, &weglPassThrough}, - {"glPixelMapfv", NULL, &weglPixelMapfv}, - {"glPixelMapuiv", NULL, &weglPixelMapuiv}, - {"glPixelMapusv", NULL, &weglPixelMapusv}, - {"glPixelStoref", NULL, &weglPixelStoref}, - {"glPixelStorei", NULL, &weglPixelStorei}, - {"glPixelTransferf", NULL, &weglPixelTransferf}, - {"glPixelTransferi", NULL, &weglPixelTransferi}, - {"glPixelZoom", NULL, &weglPixelZoom}, - {"glPointSize", NULL, &weglPointSize}, - {"glPolygonMode", NULL, &weglPolygonMode}, - {"glPolygonOffset", NULL, &weglPolygonOffset}, - {"glPolygonStipple", NULL, &weglPolygonStipple}, - {"glPopAttrib", NULL, &weglPopAttrib}, - {"glPopClientAttrib", NULL, &weglPopClientAttrib}, - {"glPopMatrix", NULL, &weglPopMatrix}, - {"glPopName", NULL, &weglPopName}, - {"glPrioritizeTextures", NULL, &weglPrioritizeTextures}, - {"glPushAttrib", NULL, &weglPushAttrib}, - {"glPushClientAttrib", NULL, &weglPushClientAttrib}, - {"glPushMatrix", NULL, &weglPushMatrix}, - {"glPushName", NULL, &weglPushName}, + {"glIndexdv", NULL, &weglIndexdv}, + {"glIndexfv", NULL, &weglIndexfv}, + {"glIndexiv", NULL, &weglIndexiv}, + {"glIndexsv", NULL, &weglIndexsv}, + {"glIndexubv", NULL, &weglIndexubv}, + {"glColor3bv", NULL, &weglColor3bv}, + {"glColor3dv", NULL, &weglColor3dv}, + {"glColor3fv", NULL, &weglColor3fv}, + {"glColor3iv", NULL, &weglColor3iv}, + {"glColor3sv", NULL, &weglColor3sv}, + {"glColor3ubv", NULL, &weglColor3ubv}, + {"glColor3uiv", NULL, &weglColor3uiv}, + {"glColor3usv", NULL, &weglColor3usv}, + {"glColor4bv", NULL, &weglColor4bv}, + {"glColor4dv", NULL, &weglColor4dv}, + {"glColor4fv", NULL, &weglColor4fv}, + {"glColor4iv", NULL, &weglColor4iv}, + {"glColor4sv", NULL, &weglColor4sv}, + {"glColor4ubv", NULL, &weglColor4ubv}, + {"glColor4uiv", NULL, &weglColor4uiv}, + {"glColor4usv", NULL, &weglColor4usv}, + {"glTexCoord1dv", NULL, &weglTexCoord1dv}, + {"glTexCoord1fv", NULL, &weglTexCoord1fv}, + {"glTexCoord1iv", NULL, &weglTexCoord1iv}, + {"glTexCoord1sv", NULL, &weglTexCoord1sv}, + {"glTexCoord2dv", NULL, &weglTexCoord2dv}, + {"glTexCoord2fv", NULL, &weglTexCoord2fv}, + {"glTexCoord2iv", NULL, &weglTexCoord2iv}, + {"glTexCoord2sv", NULL, &weglTexCoord2sv}, + {"glTexCoord3dv", NULL, &weglTexCoord3dv}, + {"glTexCoord3fv", NULL, &weglTexCoord3fv}, + {"glTexCoord3iv", NULL, &weglTexCoord3iv}, + {"glTexCoord3sv", NULL, &weglTexCoord3sv}, + {"glTexCoord4dv", NULL, &weglTexCoord4dv}, + {"glTexCoord4fv", NULL, &weglTexCoord4fv}, + {"glTexCoord4iv", NULL, &weglTexCoord4iv}, + {"glTexCoord4sv", NULL, &weglTexCoord4sv}, {"glRasterPos2dv", NULL, &weglRasterPos2dv}, {"glRasterPos2fv", NULL, &weglRasterPos2fv}, {"glRasterPos2iv", NULL, &weglRasterPos2iv}, @@ -212,78 +161,129 @@ gl_fns_t gl_fns[] = {"glRasterPos4fv", NULL, &weglRasterPos4fv}, {"glRasterPos4iv", NULL, &weglRasterPos4iv}, {"glRasterPos4sv", NULL, &weglRasterPos4sv}, - {"glReadBuffer", NULL, &weglReadBuffer}, - {"glReadPixels", NULL, &weglReadPixels}, {"glRectd", NULL, &weglRectd}, - {"glRectdv", NULL, &weglRectdv}, {"glRectf", NULL, &weglRectf}, - {"glRectfv", NULL, &weglRectfv}, {"glRecti", NULL, &weglRecti}, - {"glRectiv", NULL, &weglRectiv}, {"glRects", NULL, &weglRects}, + {"glRectdv", NULL, &weglRectdv}, + {"glRectfv", NULL, &weglRectfv}, + {"glRectiv", NULL, &weglRectiv}, {"glRectsv", NULL, &weglRectsv}, - {"glRenderMode", NULL, &weglRenderMode}, - {"glRotated", NULL, &weglRotated}, - {"glRotatef", NULL, &weglRotatef}, - {"glScaled", NULL, &weglScaled}, - {"glScalef", NULL, &weglScalef}, - {"glScissor", NULL, &weglScissor}, - {"glSelectBuffer", NULL, &weglSelectBuffer}, + {"glVertexPointer", NULL, &weglVertexPointer}, + {"glNormalPointer", NULL, &weglNormalPointer}, + {"glColorPointer", NULL, &weglColorPointer}, + {"glIndexPointer", NULL, &weglIndexPointer}, + {"glTexCoordPointer", NULL, &weglTexCoordPointer}, + {"glEdgeFlagPointer", NULL, &weglEdgeFlagPointer}, + {"glArrayElement", NULL, &weglArrayElement}, + {"glDrawArrays", NULL, &weglDrawArrays}, + {"glDrawElements", NULL, &weglDrawElements}, + {"glInterleavedArrays", NULL, &weglInterleavedArrays}, {"glShadeModel", NULL, &weglShadeModel}, + {"glLightf", NULL, &weglLightf}, + {"glLighti", NULL, &weglLighti}, + {"glLightfv", NULL, &weglLightfv}, + {"glLightiv", NULL, &weglLightiv}, + {"glGetLightfv", NULL, &weglGetLightfv}, + {"glGetLightiv", NULL, &weglGetLightiv}, + {"glLightModelf", NULL, &weglLightModelf}, + {"glLightModeli", NULL, &weglLightModeli}, + {"glLightModelfv", NULL, &weglLightModelfv}, + {"glLightModeliv", NULL, &weglLightModeliv}, + {"glMaterialf", NULL, &weglMaterialf}, + {"glMateriali", NULL, &weglMateriali}, + {"glMaterialfv", NULL, &weglMaterialfv}, + {"glMaterialiv", NULL, &weglMaterialiv}, + {"glGetMaterialfv", NULL, &weglGetMaterialfv}, + {"glGetMaterialiv", NULL, &weglGetMaterialiv}, + {"glColorMaterial", NULL, &weglColorMaterial}, + {"glPixelZoom", NULL, &weglPixelZoom}, + {"glPixelStoref", NULL, &weglPixelStoref}, + {"glPixelStorei", NULL, &weglPixelStorei}, + {"glPixelTransferf", NULL, &weglPixelTransferf}, + {"glPixelTransferi", NULL, &weglPixelTransferi}, + {"glPixelMapfv", NULL, &weglPixelMapfv}, + {"glPixelMapuiv", NULL, &weglPixelMapuiv}, + {"glPixelMapusv", NULL, &weglPixelMapusv}, + {"glGetPixelMapfv", NULL, &weglGetPixelMapfv}, + {"glGetPixelMapuiv", NULL, &weglGetPixelMapuiv}, + {"glGetPixelMapusv", NULL, &weglGetPixelMapusv}, + {"glBitmap", NULL, &weglBitmap}, + {"glReadPixels", NULL, &weglReadPixels}, + {"glDrawPixels", NULL, &weglDrawPixels}, + {"glCopyPixels", NULL, &weglCopyPixels}, {"glStencilFunc", NULL, &weglStencilFunc}, {"glStencilMask", NULL, &weglStencilMask}, {"glStencilOp", NULL, &weglStencilOp}, - {"glTexCoord1dv", NULL, &weglTexCoord1dv}, - {"glTexCoord1fv", NULL, &weglTexCoord1fv}, - {"glTexCoord1iv", NULL, &weglTexCoord1iv}, - {"glTexCoord1sv", NULL, &weglTexCoord1sv}, - {"glTexCoord2dv", NULL, &weglTexCoord2dv}, - {"glTexCoord2fv", NULL, &weglTexCoord2fv}, - {"glTexCoord2iv", NULL, &weglTexCoord2iv}, - {"glTexCoord2sv", NULL, &weglTexCoord2sv}, - {"glTexCoord3dv", NULL, &weglTexCoord3dv}, - {"glTexCoord3fv", NULL, &weglTexCoord3fv}, - {"glTexCoord3iv", NULL, &weglTexCoord3iv}, - {"glTexCoord3sv", NULL, &weglTexCoord3sv}, - {"glTexCoord4dv", NULL, &weglTexCoord4dv}, - {"glTexCoord4fv", NULL, &weglTexCoord4fv}, - {"glTexCoord4iv", NULL, &weglTexCoord4iv}, - {"glTexCoord4sv", NULL, &weglTexCoord4sv}, - {"glTexCoordPointer", NULL, &weglTexCoordPointer}, - {"glTexEnvf", NULL, &weglTexEnvf}, - {"glTexEnvfv", NULL, &weglTexEnvfv}, - {"glTexEnvi", NULL, &weglTexEnvi}, - {"glTexEnviv", NULL, &weglTexEnviv}, + {"glClearStencil", NULL, &weglClearStencil}, {"glTexGend", NULL, &weglTexGend}, - {"glTexGendv", NULL, &weglTexGendv}, {"glTexGenf", NULL, &weglTexGenf}, - {"glTexGenfv", NULL, &weglTexGenfv}, {"glTexGeni", NULL, &weglTexGeni}, + {"glTexGendv", NULL, &weglTexGendv}, + {"glTexGenfv", NULL, &weglTexGenfv}, {"glTexGeniv", NULL, &weglTexGeniv}, - {"glTexImage1D", NULL, &weglTexImage1D}, - {"glTexImage2D", NULL, &weglTexImage2D}, + {"glGetTexGendv", NULL, &weglGetTexGendv}, + {"glGetTexGenfv", NULL, &weglGetTexGenfv}, + {"glGetTexGeniv", NULL, &weglGetTexGeniv}, + {"glTexEnvf", NULL, &weglTexEnvf}, + {"glTexEnvi", NULL, &weglTexEnvi}, + {"glTexEnvfv", NULL, &weglTexEnvfv}, + {"glTexEnviv", NULL, &weglTexEnviv}, + {"glGetTexEnvfv", NULL, &weglGetTexEnvfv}, + {"glGetTexEnviv", NULL, &weglGetTexEnviv}, {"glTexParameterf", NULL, &weglTexParameterf}, - {"glTexParameterfv", NULL, &weglTexParameterfv}, {"glTexParameteri", NULL, &weglTexParameteri}, + {"glTexParameterfv", NULL, &weglTexParameterfv}, {"glTexParameteriv", NULL, &weglTexParameteriv}, + {"glGetTexParameterfv", NULL, &weglGetTexParameterfv}, + {"glGetTexParameteriv", NULL, &weglGetTexParameteriv}, + {"glGetTexLevelParameterfv", NULL, &weglGetTexLevelParameterfv}, + {"glGetTexLevelParameteriv", NULL, &weglGetTexLevelParameteriv}, + {"glTexImage1D", NULL, &weglTexImage1D}, + {"glTexImage2D", NULL, &weglTexImage2D}, + {"glGetTexImage", NULL, &weglGetTexImage}, + {"glGenTextures", NULL, &weglGenTextures}, + {"glDeleteTextures", NULL, &weglDeleteTextures}, + {"glBindTexture", NULL, &weglBindTexture}, + {"glPrioritizeTextures", NULL, &weglPrioritizeTextures}, + {"glAreTexturesResident", NULL, &weglAreTexturesResident}, + {"glIsTexture", NULL, &weglIsTexture}, {"glTexSubImage1D", NULL, &weglTexSubImage1D}, {"glTexSubImage2D", NULL, &weglTexSubImage2D}, - {"glTranslated", NULL, &weglTranslated}, - {"glTranslatef", NULL, &weglTranslatef}, - {"glVertex2dv", NULL, &weglVertex2dv}, - {"glVertex2fv", NULL, &weglVertex2fv}, - {"glVertex2iv", NULL, &weglVertex2iv}, - {"glVertex2sv", NULL, &weglVertex2sv}, - {"glVertex3dv", NULL, &weglVertex3dv}, - {"glVertex3fv", NULL, &weglVertex3fv}, - {"glVertex3iv", NULL, &weglVertex3iv}, - {"glVertex3sv", NULL, &weglVertex3sv}, - {"glVertex4dv", NULL, &weglVertex4dv}, - {"glVertex4fv", NULL, &weglVertex4fv}, - {"glVertex4iv", NULL, &weglVertex4iv}, - {"glVertex4sv", NULL, &weglVertex4sv}, - {"glVertexPointer", NULL, &weglVertexPointer}, - {"glViewport", NULL, &weglViewport}, + {"glCopyTexImage1D", NULL, &weglCopyTexImage1D}, + {"glCopyTexImage2D", NULL, &weglCopyTexImage2D}, + {"glCopyTexSubImage1D", NULL, &weglCopyTexSubImage1D}, + {"glCopyTexSubImage2D", NULL, &weglCopyTexSubImage2D}, + {"glMap1d", NULL, &weglMap1d}, + {"glMap1f", NULL, &weglMap1f}, + {"glMap2d", NULL, &weglMap2d}, + {"glMap2f", NULL, &weglMap2f}, + {"glGetMapdv", NULL, &weglGetMapdv}, + {"glGetMapfv", NULL, &weglGetMapfv}, + {"glGetMapiv", NULL, &weglGetMapiv}, + {"glEvalCoord1dv", NULL, &weglEvalCoord1dv}, + {"glEvalCoord1fv", NULL, &weglEvalCoord1fv}, + {"glEvalCoord2dv", NULL, &weglEvalCoord2dv}, + {"glEvalCoord2fv", NULL, &weglEvalCoord2fv}, + {"glMapGrid1d", NULL, &weglMapGrid1d}, + {"glMapGrid1f", NULL, &weglMapGrid1f}, + {"glMapGrid2d", NULL, &weglMapGrid2d}, + {"glMapGrid2f", NULL, &weglMapGrid2f}, + {"glEvalPoint1", NULL, &weglEvalPoint1}, + {"glEvalPoint2", NULL, &weglEvalPoint2}, + {"glEvalMesh1", NULL, &weglEvalMesh1}, + {"glEvalMesh2", NULL, &weglEvalMesh2}, + {"glFogf", NULL, &weglFogf}, + {"glFogi", NULL, &weglFogi}, + {"glFogfv", NULL, &weglFogfv}, + {"glFogiv", NULL, &weglFogiv}, + {"glFeedbackBuffer", NULL, &weglFeedbackBuffer}, + {"glPassThrough", NULL, &weglPassThrough}, + {"glSelectBuffer", NULL, &weglSelectBuffer}, + {"glInitNames", NULL, &weglInitNames}, + {"glLoadName", NULL, &weglLoadName}, + {"glPushName", NULL, &weglPushName}, + {"glPopName", NULL, &weglPopName}, {"glBlendColor", NULL, &weglBlendColor}, {"glBlendEquation", NULL, &weglBlendEquation}, {"glDrawRangeElements", NULL, &weglDrawRangeElements}, @@ -367,14 +367,14 @@ gl_fns_t gl_fns[] = {"glSecondaryColor3uiv", NULL, &weglSecondaryColor3uiv}, {"glSecondaryColor3usv", NULL, &weglSecondaryColor3usv}, {"glSecondaryColorPointer", NULL, &weglSecondaryColorPointer}, - {"glWindowPos2dv", "glWindowPos2dvMESA", &weglWindowPos2dv}, - {"glWindowPos2fv", "glWindowPos2fvMESA", &weglWindowPos2fv}, - {"glWindowPos2iv", "glWindowPos2ivMESA", &weglWindowPos2iv}, - {"glWindowPos2sv", "glWindowPos2svMESA", &weglWindowPos2sv}, - {"glWindowPos3dv", "glWindowPos3dvMESA", &weglWindowPos3dv}, - {"glWindowPos3fv", "glWindowPos3fvMESA", &weglWindowPos3fv}, - {"glWindowPos3iv", "glWindowPos3ivMESA", &weglWindowPos3iv}, - {"glWindowPos3sv", "glWindowPos3svMESA", &weglWindowPos3sv}, + {"glWindowPos2dv", "glWindowPos2dvARB", &weglWindowPos2dv}, + {"glWindowPos2fv", "glWindowPos2fvARB", &weglWindowPos2fv}, + {"glWindowPos2iv", "glWindowPos2ivARB", &weglWindowPos2iv}, + {"glWindowPos2sv", "glWindowPos2svARB", &weglWindowPos2sv}, + {"glWindowPos3dv", "glWindowPos3dvARB", &weglWindowPos3dv}, + {"glWindowPos3fv", "glWindowPos3fvARB", &weglWindowPos3fv}, + {"glWindowPos3iv", "glWindowPos3ivARB", &weglWindowPos3iv}, + {"glWindowPos3sv", "glWindowPos3svARB", &weglWindowPos3sv}, {"glGenQueries", "glGenQueriesARB", &weglGenQueries}, {"glDeleteQueries", "glDeleteQueriesARB", &weglDeleteQueries}, {"glIsQuery", "glIsQueryARB", &weglIsQuery}, @@ -799,11 +799,17 @@ gl_fns_t gl_fns[] = {"glDebugMessageInsertARB", NULL, &weglDebugMessageInsertARB}, {"glGetDebugMessageLogARB", NULL, &weglGetDebugMessageLogARB}, {"glGetGraphicsResetStatusARB", NULL, &weglGetGraphicsResetStatusARB}, - {"glResizeBuffersMESA", NULL, &weglResizeBuffersMESA}, - {"glWindowPos4dvMESA", NULL, &weglWindowPos4dvMESA}, - {"glWindowPos4fvMESA", NULL, &weglWindowPos4fvMESA}, - {"glWindowPos4ivMESA", NULL, &weglWindowPos4ivMESA}, - {"glWindowPos4svMESA", NULL, &weglWindowPos4svMESA}, + {"glDrawArraysInstancedBaseInstance", NULL, &weglDrawArraysInstancedBaseInstance}, + {"glDrawElementsInstancedBaseInstance", NULL, &weglDrawElementsInstancedBaseInstance}, + {"glDrawElementsInstancedBaseVertexBaseInstance", NULL, &weglDrawElementsInstancedBaseVertexBaseInstance}, + {"glDrawTransformFeedbackInstanced", NULL, &weglDrawTransformFeedbackInstanced}, + {"glDrawTransformFeedbackStreamInstanced", NULL, &weglDrawTransformFeedbackStreamInstanced}, + {"glGetInternalformativ", NULL, &weglGetInternalformativ}, + {"glBindImageTexture", NULL, &weglBindImageTexture}, + {"glMemoryBarrier", NULL, &weglMemoryBarrier}, + {"glTexStorage1D", NULL, &weglTexStorage1D}, + {"glTexStorage2D", NULL, &weglTexStorage2D}, + {"glTexStorage3D", NULL, &weglTexStorage3D}, {"glDepthBoundsEXT", NULL, &weglDepthBoundsEXT}, {"glStencilClearTagEXT", NULL, &weglStencilClearTagEXT}, { NULL, NULL, NULL}}; diff --git a/lib/wx/c_src/gen/gl_funcs.cpp b/lib/wx/c_src/gen/gl_funcs.cpp index fa1476dba5..e1bd920e71 100644 --- a/lib/wx/c_src/gen/gl_funcs.cpp +++ b/lib/wx/c_src/gen/gl_funcs.cpp @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2011. All Rights Reserved. + * Copyright Ericsson AB 2008-2012. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -346,477 +346,157 @@ case 5036: { // gluUnProject4 rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5037: { // glAccum - GLenum *op = (GLenum *) bp; bp += 4; - GLfloat *value = (GLfloat *) bp; bp += 4; - weglAccum(*op,*value); -}; break; -case 5038: { // glAlphaFunc - GLenum *func = (GLenum *) bp; bp += 4; - GLclampf *ref = (GLclampf *) bp; bp += 4; - weglAlphaFunc(*func,*ref); -}; break; -case 5039: { // glAreTexturesResident - int * texturesLen = (int *) bp; bp += 4; - GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8; - GLboolean *residences; - residences = (GLboolean *) driver_alloc(sizeof(GLboolean) * *texturesLen); - GLboolean result = weglAreTexturesResident(*texturesLen,textures,residences); - int AP = 0; ErlDrvTermData *rt; - rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(11 + (*texturesLen)*2)); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; - for(int i=0; i < *texturesLen; i++) { - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) residences[i];} - rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*texturesLen)+1; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); - driver_free(rt); - driver_free(residences); -}; break; -case 5040: { // glArrayElement - GLint *i = (GLint *) bp; bp += 4; - weglArrayElement(*i); -}; break; -case 5041: { // glBegin - GLenum *mode = (GLenum *) bp; bp += 4; - weglBegin(*mode); -}; break; -case 5042: { // glBindTexture - GLenum *target = (GLenum *) bp; bp += 4; - GLuint *texture = (GLuint *) bp; bp += 4; - weglBindTexture(*target,*texture); -}; break; -case 5043: { // glBitmap - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - GLfloat *xorig = (GLfloat *) bp; bp += 4; - GLfloat *yorig = (GLfloat *) bp; bp += 4; - GLfloat *xmove = (GLfloat *) bp; bp += 4; - GLfloat *ymove = (GLfloat *) bp; bp += 4; - GLubyte *bitmap = (GLubyte *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap); -}; break; -case 5044: { // glBitmap - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - GLfloat *xorig = (GLfloat *) bp; bp += 4; - GLfloat *yorig = (GLfloat *) bp; bp += 4; - GLfloat *xmove = (GLfloat *) bp; bp += 4; - GLfloat *ymove = (GLfloat *) bp; bp += 4; - GLubyte *bitmap = (GLubyte *) bins[0]; - weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap); -}; break; -case 5045: { // glBlendFunc - GLenum *sfactor = (GLenum *) bp; bp += 4; - GLenum *dfactor = (GLenum *) bp; bp += 4; - weglBlendFunc(*sfactor,*dfactor); -}; break; -case 5046: { // glCallList - GLuint *list = (GLuint *) bp; bp += 4; - weglCallList(*list); -}; break; -case 5047: { // glCallLists - int * listsLen = (int *) bp; bp += 4; - GLuint * lists = (GLuint *) bp; bp += (8-((*listsLen*4+4)%8))%8; - weglCallLists(*listsLen,GL_UNSIGNED_INT,lists); -}; break; -case 5048: { // glClear - GLbitfield *mask = (GLbitfield *) bp; bp += 4; - weglClear(*mask); -}; break; -case 5049: { // glClearAccum - GLfloat *red = (GLfloat *) bp; bp += 4; - GLfloat *green = (GLfloat *) bp; bp += 4; - GLfloat *blue = (GLfloat *) bp; bp += 4; - GLfloat *alpha = (GLfloat *) bp; bp += 4; - weglClearAccum(*red,*green,*blue,*alpha); +case 5037: { // glClearIndex + GLfloat *c = (GLfloat *) bp; bp += 4; + weglClearIndex(*c); }; break; -case 5050: { // glClearColor +case 5038: { // glClearColor GLclampf *red = (GLclampf *) bp; bp += 4; GLclampf *green = (GLclampf *) bp; bp += 4; GLclampf *blue = (GLclampf *) bp; bp += 4; GLclampf *alpha = (GLclampf *) bp; bp += 4; weglClearColor(*red,*green,*blue,*alpha); }; break; -case 5051: { // glClearDepth - GLclampd *depth = (GLclampd *) bp; bp += 8; - weglClearDepth(*depth); -}; break; -case 5052: { // glClearIndex - GLfloat *c = (GLfloat *) bp; bp += 4; - weglClearIndex(*c); -}; break; -case 5053: { // glClearStencil - GLint *s = (GLint *) bp; bp += 4; - weglClearStencil(*s); -}; break; -case 5054: { // glClipPlane - GLenum *plane = (GLenum *) bp; bp += 4; - bp += 4; - GLdouble * equation = (GLdouble *) bp; bp += 32; - weglClipPlane(*plane,equation); -}; break; -case 5055: { // glColor3bv - GLbyte *v = (GLbyte *) bp; bp += 1; - weglColor3bv(v); -}; break; -case 5056: { // glColor3dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglColor3dv(v); -}; break; -case 5057: { // glColor3fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglColor3fv(v); -}; break; -case 5058: { // glColor3iv - GLint *v = (GLint *) bp; bp += 4; - weglColor3iv(v); -}; break; -case 5059: { // glColor3sv - GLshort *v = (GLshort *) bp; bp += 2; - weglColor3sv(v); -}; break; -case 5060: { // glColor3ubv - GLubyte *v = (GLubyte *) bp; bp += 1; - weglColor3ubv(v); -}; break; -case 5061: { // glColor3uiv - GLuint *v = (GLuint *) bp; bp += 4; - weglColor3uiv(v); +case 5039: { // glClear + GLbitfield *mask = (GLbitfield *) bp; bp += 4; + weglClear(*mask); }; break; -case 5062: { // glColor3usv - GLushort *v = (GLushort *) bp; bp += 2; - weglColor3usv(v); +case 5040: { // glIndexMask + GLuint *mask = (GLuint *) bp; bp += 4; + weglIndexMask(*mask); }; break; -case 5063: { // glColor4bv - GLbyte *v = (GLbyte *) bp; bp += 1; - weglColor4bv(v); +case 5041: { // glColorMask + GLboolean *red = (GLboolean *) bp; bp += 1; + GLboolean *green = (GLboolean *) bp; bp += 1; + GLboolean *blue = (GLboolean *) bp; bp += 1; + GLboolean *alpha = (GLboolean *) bp; bp += 1; + weglColorMask(*red,*green,*blue,*alpha); }; break; -case 5064: { // glColor4dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglColor4dv(v); +case 5042: { // glAlphaFunc + GLenum *func = (GLenum *) bp; bp += 4; + GLclampf *ref = (GLclampf *) bp; bp += 4; + weglAlphaFunc(*func,*ref); }; break; -case 5065: { // glColor4fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglColor4fv(v); +case 5043: { // glBlendFunc + GLenum *sfactor = (GLenum *) bp; bp += 4; + GLenum *dfactor = (GLenum *) bp; bp += 4; + weglBlendFunc(*sfactor,*dfactor); }; break; -case 5066: { // glColor4iv - GLint *v = (GLint *) bp; bp += 4; - weglColor4iv(v); +case 5044: { // glLogicOp + GLenum *opcode = (GLenum *) bp; bp += 4; + weglLogicOp(*opcode); }; break; -case 5067: { // glColor4sv - GLshort *v = (GLshort *) bp; bp += 2; - weglColor4sv(v); +case 5045: { // glCullFace + GLenum *mode = (GLenum *) bp; bp += 4; + weglCullFace(*mode); }; break; -case 5068: { // glColor4ubv - GLubyte *v = (GLubyte *) bp; bp += 1; - weglColor4ubv(v); +case 5046: { // glFrontFace + GLenum *mode = (GLenum *) bp; bp += 4; + weglFrontFace(*mode); }; break; -case 5069: { // glColor4uiv - GLuint *v = (GLuint *) bp; bp += 4; - weglColor4uiv(v); +case 5047: { // glPointSize + GLfloat *size = (GLfloat *) bp; bp += 4; + weglPointSize(*size); }; break; -case 5070: { // glColor4usv - GLushort *v = (GLushort *) bp; bp += 2; - weglColor4usv(v); +case 5048: { // glLineWidth + GLfloat *width = (GLfloat *) bp; bp += 4; + weglLineWidth(*width); }; break; -case 5071: { // glColorMask - GLboolean *red = (GLboolean *) bp; bp += 1; - GLboolean *green = (GLboolean *) bp; bp += 1; - GLboolean *blue = (GLboolean *) bp; bp += 1; - GLboolean *alpha = (GLboolean *) bp; bp += 1; - weglColorMask(*red,*green,*blue,*alpha); +case 5049: { // glLineStipple + GLint *factor = (GLint *) bp; bp += 4; + GLushort *pattern = (GLushort *) bp; bp += 2; + weglLineStipple(*factor,*pattern); }; break; -case 5072: { // glColorMaterial +case 5050: { // glPolygonMode GLenum *face = (GLenum *) bp; bp += 4; GLenum *mode = (GLenum *) bp; bp += 4; - weglColorMaterial(*face,*mode); + weglPolygonMode(*face,*mode); }; break; -case 5073: { // glColorPointer - GLint *size = (GLint *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglColorPointer(*size,*type,*stride,pointer); +case 5051: { // glPolygonOffset + GLfloat *factor = (GLfloat *) bp; bp += 4; + GLfloat *units = (GLfloat *) bp; bp += 4; + weglPolygonOffset(*factor,*units); }; break; -case 5074: { // glColorPointer - GLint *size = (GLint *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]; - weglColorPointer(*size,*type,*stride,pointer); +case 5052: { // glPolygonStipple + GLubyte *mask = (GLubyte *) bins[0]; + weglPolygonStipple(mask); }; break; -case 5075: { // glCopyPixels - GLint *x = (GLint *) bp; bp += 4; - GLint *y = (GLint *) bp; bp += 4; - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - weglCopyPixels(*x,*y,*width,*height,*type); +case 5053: { // glGetPolygonStipple + ErlDrvBinary *mask = driver_alloc_binary(128); + weglGetPolygonStipple((GLubyte*) mask->orig_bytes); + int AP = 0; ErlDrvTermData rt[8]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) mask; rt[AP++] = 128; rt[AP++] = 0; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free_binary(mask); }; break; -case 5076: { // glCopyTexImage1D - GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLenum *internalFormat = (GLenum *) bp; bp += 4; - GLint *x = (GLint *) bp; bp += 4; - GLint *y = (GLint *) bp; bp += 4; - GLsizei *width = (GLsizei *) bp; bp += 4; - GLint *border = (GLint *) bp; bp += 4; - weglCopyTexImage1D(*target,*level,*internalFormat,*x,*y,*width,*border); +case 5054: { // glEdgeFlagv + GLboolean *flag = (GLboolean *) bp; bp += 1; + weglEdgeFlagv(flag); }; break; -case 5077: { // glCopyTexImage2D - GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLenum *internalFormat = (GLenum *) bp; bp += 4; +case 5055: { // glScissor GLint *x = (GLint *) bp; bp += 4; GLint *y = (GLint *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; GLsizei *height = (GLsizei *) bp; bp += 4; - GLint *border = (GLint *) bp; bp += 4; - weglCopyTexImage2D(*target,*level,*internalFormat,*x,*y,*width,*height,*border); + weglScissor(*x,*y,*width,*height); }; break; -case 5078: { // glCopyTexSubImage1D - GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLint *xoffset = (GLint *) bp; bp += 4; - GLint *x = (GLint *) bp; bp += 4; - GLint *y = (GLint *) bp; bp += 4; - GLsizei *width = (GLsizei *) bp; bp += 4; - weglCopyTexSubImage1D(*target,*level,*xoffset,*x,*y,*width); +case 5056: { // glClipPlane + GLenum *plane = (GLenum *) bp; bp += 4; + bp += 4; + GLdouble * equation = (GLdouble *) bp; bp += 32; + weglClipPlane(*plane,equation); }; break; -case 5079: { // glCopyTexSubImage2D - GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLint *xoffset = (GLint *) bp; bp += 4; - GLint *yoffset = (GLint *) bp; bp += 4; - GLint *x = (GLint *) bp; bp += 4; - GLint *y = (GLint *) bp; bp += 4; - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - weglCopyTexSubImage2D(*target,*level,*xoffset,*yoffset,*x,*y,*width,*height); +case 5057: { // glGetClipPlane + GLenum *plane = (GLenum *) bp; bp += 4; + GLdouble equation[4] = {0.0,0.0,0.0,0.0}; + weglGetClipPlane(*plane,equation); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble *equationTmp = equation; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5080: { // glCullFace +case 5058: { // glDrawBuffer GLenum *mode = (GLenum *) bp; bp += 4; - weglCullFace(*mode); -}; break; -case 5081: { // glDeleteLists - GLuint *list = (GLuint *) bp; bp += 4; - GLsizei *range = (GLsizei *) bp; bp += 4; - weglDeleteLists(*list,*range); -}; break; -case 5082: { // glDeleteTextures - int * texturesLen = (int *) bp; bp += 4; - GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8; - weglDeleteTextures(*texturesLen,textures); -}; break; -case 5083: { // glDepthFunc - GLenum *func = (GLenum *) bp; bp += 4; - weglDepthFunc(*func); + weglDrawBuffer(*mode); }; break; -case 5084: { // glDepthMask - GLboolean *flag = (GLboolean *) bp; bp += 1; - weglDepthMask(*flag); +case 5059: { // glReadBuffer + GLenum *mode = (GLenum *) bp; bp += 4; + weglReadBuffer(*mode); }; break; -case 5085: { // glDepthRange - GLclampd *zNear = (GLclampd *) bp; bp += 8; - GLclampd *zFar = (GLclampd *) bp; bp += 8; - weglDepthRange(*zNear,*zFar); +case 5060: { // glEnable + GLenum *cap = (GLenum *) bp; bp += 4; + weglEnable(*cap); }; break; -case 5086: { // glDisable +case 5061: { // glDisable GLenum *cap = (GLenum *) bp; bp += 4; weglDisable(*cap); }; break; -case 5087: { // glDisableClientState - GLenum *array = (GLenum *) bp; bp += 4; - weglDisableClientState(*array); -}; break; -case 5088: { // glDrawArrays - GLenum *mode = (GLenum *) bp; bp += 4; - GLint *first = (GLint *) bp; bp += 4; - GLsizei *count = (GLsizei *) bp; bp += 4; - weglDrawArrays(*mode,*first,*count); -}; break; -case 5089: { // glDrawBuffer - GLenum *mode = (GLenum *) bp; bp += 4; - weglDrawBuffer(*mode); -}; break; -case 5090: { // glDrawElements - GLenum *mode = (GLenum *) bp; bp += 4; - GLsizei *count = (GLsizei *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglDrawElements(*mode,*count,*type,indices); -}; break; -case 5091: { // glDrawElements - GLenum *mode = (GLenum *) bp; bp += 4; - GLsizei *count = (GLsizei *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) bins[0]; - weglDrawElements(*mode,*count,*type,indices); -}; break; -case 5092: { // glDrawPixels - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - GLenum *format = (GLenum *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglDrawPixels(*width,*height,*format,*type,pixels); -}; break; -case 5093: { // glDrawPixels - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - GLenum *format = (GLenum *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]; - weglDrawPixels(*width,*height,*format,*type,pixels); -}; break; -case 5094: { // glEdgeFlagv - GLboolean *flag = (GLboolean *) bp; bp += 1; - weglEdgeFlagv(flag); -}; break; -case 5095: { // glEdgeFlagPointer - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglEdgeFlagPointer(*stride,pointer); -}; break; -case 5096: { // glEdgeFlagPointer - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]; - weglEdgeFlagPointer(*stride,pointer); -}; break; -case 5097: { // glEnable +case 5062: { // glIsEnabled GLenum *cap = (GLenum *) bp; bp += 4; - weglEnable(*cap); -}; break; -case 5098: { // glEnableClientState - GLenum *array = (GLenum *) bp; bp += 4; - weglEnableClientState(*array); -}; break; -case 5099: { // glEnd - weglEnd(); -}; break; -case 5100: { // glEndList - weglEndList(); -}; break; -case 5101: { // glEvalCoord1dv - GLdouble *u = (GLdouble *) bp; bp += 8; - weglEvalCoord1dv(u); -}; break; -case 5102: { // glEvalCoord1fv - GLfloat *u = (GLfloat *) bp; bp += 4; - weglEvalCoord1fv(u); -}; break; -case 5103: { // glEvalCoord2dv - GLdouble *u = (GLdouble *) bp; bp += 8; - weglEvalCoord2dv(u); -}; break; -case 5104: { // glEvalCoord2fv - GLfloat *u = (GLfloat *) bp; bp += 4; - weglEvalCoord2fv(u); -}; break; -case 5105: { // glEvalMesh1 - GLenum *mode = (GLenum *) bp; bp += 4; - GLint *i1 = (GLint *) bp; bp += 4; - GLint *i2 = (GLint *) bp; bp += 4; - weglEvalMesh1(*mode,*i1,*i2); -}; break; -case 5106: { // glEvalMesh2 - GLenum *mode = (GLenum *) bp; bp += 4; - GLint *i1 = (GLint *) bp; bp += 4; - GLint *i2 = (GLint *) bp; bp += 4; - GLint *j1 = (GLint *) bp; bp += 4; - GLint *j2 = (GLint *) bp; bp += 4; - weglEvalMesh2(*mode,*i1,*i2,*j1,*j2); -}; break; -case 5107: { // glEvalPoint1 - GLint *i = (GLint *) bp; bp += 4; - weglEvalPoint1(*i); -}; break; -case 5108: { // glEvalPoint2 - GLint *i = (GLint *) bp; bp += 4; - GLint *j = (GLint *) bp; bp += 4; - weglEvalPoint2(*i,*j); -}; break; -case 5109: { // glFeedbackBuffer - GLsizei *size = (GLsizei *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLfloat *buffer = (GLfloat *) bins[0]; - weglFeedbackBuffer(*size,*type,buffer); - int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); -}; break; -case 5110: { // glFinish - weglFinish(); -}; break; -case 5111: { // glFlush - weglFlush(); -}; break; -case 5112: { // glFogf - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat *param = (GLfloat *) bp; bp += 4; - weglFogf(*pname,*param); -}; break; -case 5113: { // glFogfv - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4; - weglFogfv(*pname,params); -}; break; -case 5114: { // glFogi - GLenum *pname = (GLenum *) bp; bp += 4; - GLint *param = (GLint *) bp; bp += 4; - weglFogi(*pname,*param); -}; break; -case 5115: { // glFogiv - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4; - weglFogiv(*pname,params); -}; break; -case 5116: { // glFrontFace - GLenum *mode = (GLenum *) bp; bp += 4; - weglFrontFace(*mode); -}; break; -case 5117: { // glFrustum - GLdouble *left = (GLdouble *) bp; bp += 8; - GLdouble *right = (GLdouble *) bp; bp += 8; - GLdouble *bottom = (GLdouble *) bp; bp += 8; - GLdouble *top = (GLdouble *) bp; bp += 8; - GLdouble *zNear = (GLdouble *) bp; bp += 8; - GLdouble *zFar = (GLdouble *) bp; bp += 8; - weglFrustum(*left,*right,*bottom,*top,*zNear,*zFar); -}; break; -case 5118: { // glGenLists - GLsizei *range = (GLsizei *) bp; bp += 4; - GLuint result = weglGenLists(*range); + GLboolean result = weglIsEnabled(*cap); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5119: { // glGenTextures - GLsizei *n = (GLsizei *) bp; bp += 4; - GLuint *textures; - textures = (GLuint *) driver_alloc(sizeof(GLuint) * *n); - weglGenTextures(*n,textures); - int AP = 0; ErlDrvTermData *rt; - rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*n)*2)); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - for(int i=0; i < *n; i++) { - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) textures[i];} - rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); - driver_free(rt); - driver_free(textures); +case 5063: { // glEnableClientState + GLenum *cap = (GLenum *) bp; bp += 4; + weglEnableClientState(*cap); +}; break; +case 5064: { // glDisableClientState + GLenum *cap = (GLenum *) bp; bp += 4; + weglDisableClientState(*cap); }; break; -case 5120: { // glGetBooleanv +case 5065: { // glGetBooleanv GLenum *pname = (GLenum *) bp; bp += 4; GLboolean params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; weglGetBooleanv(*pname,params); @@ -843,22 +523,7 @@ case 5120: { // glGetBooleanv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5121: { // glGetClipPlane - GLenum *plane = (GLenum *) bp; bp += 4; - GLdouble equation[4] = {0.0,0.0,0.0,0.0}; - weglGetClipPlane(*plane,equation); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLdouble *equationTmp = equation; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) equationTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); -}; break; -case 5122: { // glGetDoublev +case 5066: { // glGetDoublev GLenum *pname = (GLenum *) bp; bp += 4; GLdouble params[16] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; weglGetDoublev(*pname,params); @@ -885,15 +550,7 @@ case 5122: { // glGetDoublev rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5123: { // glGetError - GLenum result = weglGetError(); - int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); -}; break; -case 5124: { // glGetFloatv +case 5067: { // glGetFloatv GLenum *pname = (GLenum *) bp; bp += 4; GLfloat params[16] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; weglGetFloatv(*pname,params); @@ -921,7 +578,7 @@ case 5124: { // glGetFloatv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5125: { // glGetIntegerv +case 5068: { // glGetIntegerv GLenum *pname = (GLenum *) bp; bp += 4; GLint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; weglGetIntegerv(*pname,params); @@ -948,1262 +605,1605 @@ case 5125: { // glGetIntegerv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5126: { // glGetLightfv - GLenum *light = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat params[4] = {0.0,0.0,0.0,0.0}; - weglGetLightfv(*light,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLdouble paramsConv[4], *paramsTmp = paramsConv; - for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5069: { // glPushAttrib + GLbitfield *mask = (GLbitfield *) bp; bp += 4; + weglPushAttrib(*mask); }; break; -case 5127: { // glGetLightiv - GLenum *light = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint params[4] = {0,0,0,0}; - weglGetLightiv(*light,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLint *paramsTmp = params; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5070: { // glPopAttrib + weglPopAttrib(); }; break; -case 5128: { // glGetMapdv - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *query = (GLenum *) bp; bp += 4; - GLdouble *v = (GLdouble *) bins[0]; - weglGetMapdv(*target,*query,v); - int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5071: { // glPushClientAttrib + GLbitfield *mask = (GLbitfield *) bp; bp += 4; + weglPushClientAttrib(*mask); }; break; -case 5129: { // glGetMapfv - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *query = (GLenum *) bp; bp += 4; - GLfloat *v = (GLfloat *) bins[0]; - weglGetMapfv(*target,*query,v); +case 5072: { // glPopClientAttrib + weglPopClientAttrib(); +}; break; +case 5073: { // glRenderMode + GLenum *mode = (GLenum *) bp; bp += 4; + GLint result = weglRenderMode(*mode); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5130: { // glGetMapiv - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *query = (GLenum *) bp; bp += 4; - GLint *v = (GLint *) bins[0]; - weglGetMapiv(*target,*query,v); +case 5074: { // glGetError + GLenum result = weglGetError(); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5131: { // glGetMaterialfv - GLenum *face = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat params[4] = {0.0,0.0,0.0,0.0}; - weglGetMaterialfv(*face,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; +case 5075: { // glGetString + GLenum *name = (GLenum *) bp; bp += 4; + const GLubyte * result = weglGetString(*name); + int AP = 0; ErlDrvTermData rt[7]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLdouble paramsConv[4], *paramsTmp = paramsConv; - for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) result; rt[AP++] = strlen((char *) result); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5132: { // glGetMaterialiv - GLenum *face = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint params[4] = {0,0,0,0}; - weglGetMaterialiv(*face,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLint *paramsTmp = params; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5076: { // glFinish + weglFinish(); }; break; -case 5133: { // glGetPixelMapfv - GLenum *map = (GLenum *) bp; bp += 4; - GLfloat *values = (GLfloat *) bins[0]; - weglGetPixelMapfv(*map,values); - int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5077: { // glFlush + weglFlush(); }; break; -case 5134: { // glGetPixelMapuiv - GLenum *map = (GLenum *) bp; bp += 4; - GLuint *values = (GLuint *) bins[0]; - weglGetPixelMapuiv(*map,values); +case 5078: { // glHint + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *mode = (GLenum *) bp; bp += 4; + weglHint(*target,*mode); +}; break; +case 5079: { // glClearDepth + GLclampd *depth = (GLclampd *) bp; bp += 8; + weglClearDepth(*depth); +}; break; +case 5080: { // glDepthFunc + GLenum *func = (GLenum *) bp; bp += 4; + weglDepthFunc(*func); +}; break; +case 5081: { // glDepthMask + GLboolean *flag = (GLboolean *) bp; bp += 1; + weglDepthMask(*flag); +}; break; +case 5082: { // glDepthRange + GLclampd *near_val = (GLclampd *) bp; bp += 8; + GLclampd *far_val = (GLclampd *) bp; bp += 8; + weglDepthRange(*near_val,*far_val); +}; break; +case 5083: { // glClearAccum + GLfloat *red = (GLfloat *) bp; bp += 4; + GLfloat *green = (GLfloat *) bp; bp += 4; + GLfloat *blue = (GLfloat *) bp; bp += 4; + GLfloat *alpha = (GLfloat *) bp; bp += 4; + weglClearAccum(*red,*green,*blue,*alpha); +}; break; +case 5084: { // glAccum + GLenum *op = (GLenum *) bp; bp += 4; + GLfloat *value = (GLfloat *) bp; bp += 4; + weglAccum(*op,*value); +}; break; +case 5085: { // glMatrixMode + GLenum *mode = (GLenum *) bp; bp += 4; + weglMatrixMode(*mode); +}; break; +case 5086: { // glOrtho + GLdouble *left = (GLdouble *) bp; bp += 8; + GLdouble *right = (GLdouble *) bp; bp += 8; + GLdouble *bottom = (GLdouble *) bp; bp += 8; + GLdouble *top = (GLdouble *) bp; bp += 8; + GLdouble *near_val = (GLdouble *) bp; bp += 8; + GLdouble *far_val = (GLdouble *) bp; bp += 8; + weglOrtho(*left,*right,*bottom,*top,*near_val,*far_val); +}; break; +case 5087: { // glFrustum + GLdouble *left = (GLdouble *) bp; bp += 8; + GLdouble *right = (GLdouble *) bp; bp += 8; + GLdouble *bottom = (GLdouble *) bp; bp += 8; + GLdouble *top = (GLdouble *) bp; bp += 8; + GLdouble *near_val = (GLdouble *) bp; bp += 8; + GLdouble *far_val = (GLdouble *) bp; bp += 8; + weglFrustum(*left,*right,*bottom,*top,*near_val,*far_val); +}; break; +case 5088: { // glViewport + GLint *x = (GLint *) bp; bp += 4; + GLint *y = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + weglViewport(*x,*y,*width,*height); +}; break; +case 5089: { // glPushMatrix + weglPushMatrix(); +}; break; +case 5090: { // glPopMatrix + weglPopMatrix(); +}; break; +case 5091: { // glLoadIdentity + weglLoadIdentity(); +}; break; +case 5092: { // glLoadMatrixd + GLdouble * m = (GLdouble *) bp; bp += 128; + weglLoadMatrixd(m); +}; break; +case 5093: { // glLoadMatrixf + GLfloat * m = (GLfloat *) bp; bp += 64; + weglLoadMatrixf(m); +}; break; +case 5094: { // glMultMatrixd + GLdouble * m = (GLdouble *) bp; bp += 128; + weglMultMatrixd(m); +}; break; +case 5095: { // glMultMatrixf + GLfloat * m = (GLfloat *) bp; bp += 64; + weglMultMatrixf(m); +}; break; +case 5096: { // glRotated + GLdouble *angle = (GLdouble *) bp; bp += 8; + GLdouble *x = (GLdouble *) bp; bp += 8; + GLdouble *y = (GLdouble *) bp; bp += 8; + GLdouble *z = (GLdouble *) bp; bp += 8; + weglRotated(*angle,*x,*y,*z); +}; break; +case 5097: { // glRotatef + GLfloat *angle = (GLfloat *) bp; bp += 4; + GLfloat *x = (GLfloat *) bp; bp += 4; + GLfloat *y = (GLfloat *) bp; bp += 4; + GLfloat *z = (GLfloat *) bp; bp += 4; + weglRotatef(*angle,*x,*y,*z); +}; break; +case 5098: { // glScaled + GLdouble *x = (GLdouble *) bp; bp += 8; + GLdouble *y = (GLdouble *) bp; bp += 8; + GLdouble *z = (GLdouble *) bp; bp += 8; + weglScaled(*x,*y,*z); +}; break; +case 5099: { // glScalef + GLfloat *x = (GLfloat *) bp; bp += 4; + GLfloat *y = (GLfloat *) bp; bp += 4; + GLfloat *z = (GLfloat *) bp; bp += 4; + weglScalef(*x,*y,*z); +}; break; +case 5100: { // glTranslated + GLdouble *x = (GLdouble *) bp; bp += 8; + GLdouble *y = (GLdouble *) bp; bp += 8; + GLdouble *z = (GLdouble *) bp; bp += 8; + weglTranslated(*x,*y,*z); +}; break; +case 5101: { // glTranslatef + GLfloat *x = (GLfloat *) bp; bp += 4; + GLfloat *y = (GLfloat *) bp; bp += 4; + GLfloat *z = (GLfloat *) bp; bp += 4; + weglTranslatef(*x,*y,*z); +}; break; +case 5102: { // glIsList + GLuint *list = (GLuint *) bp; bp += 4; + GLboolean result = weglIsList(*list); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5135: { // glGetPixelMapusv - GLenum *map = (GLenum *) bp; bp += 4; - GLushort *values = (GLushort *) bins[0]; - weglGetPixelMapusv(*map,values); +case 5103: { // glDeleteLists + GLuint *list = (GLuint *) bp; bp += 4; + GLsizei *range = (GLsizei *) bp; bp += 4; + weglDeleteLists(*list,*range); +}; break; +case 5104: { // glGenLists + GLsizei *range = (GLsizei *) bp; bp += 4; + GLuint result = weglGenLists(*range); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5136: { // glGetPolygonStipple - ErlDrvBinary *mask = driver_alloc_binary(128); - weglGetPolygonStipple((GLubyte*) mask->orig_bytes); - int AP = 0; ErlDrvTermData rt[8]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) mask; rt[AP++] = 128; rt[AP++] = 0; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); - driver_free_binary(mask); +case 5105: { // glNewList + GLuint *list = (GLuint *) bp; bp += 4; + GLenum *mode = (GLenum *) bp; bp += 4; + weglNewList(*list,*mode); }; break; -case 5137: { // glGetString - GLenum *name = (GLenum *) bp; bp += 4; - const GLubyte * result = weglGetString(*name); - int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) result; rt[AP++] = strlen((char *) result); - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5106: { // glEndList + weglEndList(); }; break; -case 5138: { // glGetTexEnvfv - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat params[4] = {0.0,0.0,0.0,0.0}; - weglGetTexEnvfv(*target,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLdouble paramsConv[4], *paramsTmp = paramsConv; - for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5107: { // glCallList + GLuint *list = (GLuint *) bp; bp += 4; + weglCallList(*list); }; break; -case 5139: { // glGetTexEnviv - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint params[4] = {0,0,0,0}; - weglGetTexEnviv(*target,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLint *paramsTmp = params; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5108: { // glCallLists + int * listsLen = (int *) bp; bp += 4; + GLuint * lists = (GLuint *) bp; bp += (8-((*listsLen*4+4)%8))%8; + weglCallLists(*listsLen,GL_UNSIGNED_INT,lists); }; break; -case 5140: { // glGetTexGendv - GLenum *coord = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLdouble params[4] = {0.0,0.0,0.0,0.0}; - weglGetTexGendv(*coord,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLdouble *paramsTmp = params; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5109: { // glListBase + GLuint *base = (GLuint *) bp; bp += 4; + weglListBase(*base); }; break; -case 5141: { // glGetTexGenfv - GLenum *coord = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat params[4] = {0.0,0.0,0.0,0.0}; - weglGetTexGenfv(*coord,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLdouble paramsConv[4], *paramsTmp = paramsConv; - for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5110: { // glBegin + GLenum *mode = (GLenum *) bp; bp += 4; + weglBegin(*mode); }; break; -case 5142: { // glGetTexGeniv - GLenum *coord = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint params[4] = {0,0,0,0}; - weglGetTexGeniv(*coord,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLint *paramsTmp = params; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5111: { // glEnd + weglEnd(); }; break; -case 5143: { // glGetTexImage - GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLenum *format = (GLenum *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]; - weglGetTexImage(*target,*level,*format,*type,pixels); - int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5112: { // glVertex2dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertex2dv(v); }; break; -case 5144: { // glGetTexLevelParameterfv - GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat params[1] = {0.0}; - weglGetTexLevelParameterfv(*target,*level,*pname,params); - int AP = 0; ErlDrvTermData rt[8]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLdouble paramsConv[1], *paramsTmp = paramsConv; - for(int i=0; i < 1; i++) paramsConv[i] = (GLdouble) params[i]; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5113: { // glVertex2fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglVertex2fv(v); +}; break; +case 5114: { // glVertex2iv + GLint *v = (GLint *) bp; bp += 4; + weglVertex2iv(v); +}; break; +case 5115: { // glVertex2sv + GLshort *v = (GLshort *) bp; bp += 2; + weglVertex2sv(v); +}; break; +case 5116: { // glVertex3dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertex3dv(v); +}; break; +case 5117: { // glVertex3fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglVertex3fv(v); +}; break; +case 5118: { // glVertex3iv + GLint *v = (GLint *) bp; bp += 4; + weglVertex3iv(v); +}; break; +case 5119: { // glVertex3sv + GLshort *v = (GLshort *) bp; bp += 2; + weglVertex3sv(v); +}; break; +case 5120: { // glVertex4dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertex4dv(v); }; break; -case 5145: { // glGetTexLevelParameteriv - GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint params[1] = {0}; - weglGetTexLevelParameteriv(*target,*level,*pname,params); - int AP = 0; ErlDrvTermData rt[8]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLint *paramsTmp = params; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5121: { // glVertex4fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglVertex4fv(v); }; break; -case 5146: { // glGetTexParameterfv - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat params[4] = {0.0,0.0,0.0,0.0}; - weglGetTexParameterfv(*target,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLdouble paramsConv[4], *paramsTmp = paramsConv; - for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5122: { // glVertex4iv + GLint *v = (GLint *) bp; bp += 4; + weglVertex4iv(v); }; break; -case 5147: { // glGetTexParameteriv - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint params[4] = {0,0,0,0}; - weglGetTexParameteriv(*target,*pname,params); - int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - GLint *paramsTmp = params; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5123: { // glVertex4sv + GLshort *v = (GLshort *) bp; bp += 2; + weglVertex4sv(v); }; break; -case 5148: { // glHint - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *mode = (GLenum *) bp; bp += 4; - weglHint(*target,*mode); +case 5124: { // glNormal3bv + GLbyte *v = (GLbyte *) bp; bp += 1; + weglNormal3bv(v); }; break; -case 5149: { // glIndexMask - GLuint *mask = (GLuint *) bp; bp += 4; - weglIndexMask(*mask); +case 5125: { // glNormal3dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglNormal3dv(v); }; break; -case 5150: { // glIndexPointer - GLenum *type = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglIndexPointer(*type,*stride,pointer); +case 5126: { // glNormal3fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglNormal3fv(v); }; break; -case 5151: { // glIndexPointer - GLenum *type = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]; - weglIndexPointer(*type,*stride,pointer); +case 5127: { // glNormal3iv + GLint *v = (GLint *) bp; bp += 4; + weglNormal3iv(v); }; break; -case 5152: { // glIndexdv +case 5128: { // glNormal3sv + GLshort *v = (GLshort *) bp; bp += 2; + weglNormal3sv(v); +}; break; +case 5129: { // glIndexdv GLdouble *c = (GLdouble *) bp; bp += 8; weglIndexdv(c); }; break; -case 5153: { // glIndexfv +case 5130: { // glIndexfv GLfloat *c = (GLfloat *) bp; bp += 4; weglIndexfv(c); }; break; -case 5154: { // glIndexiv +case 5131: { // glIndexiv GLint *c = (GLint *) bp; bp += 4; weglIndexiv(c); }; break; -case 5155: { // glIndexsv +case 5132: { // glIndexsv GLshort *c = (GLshort *) bp; bp += 2; weglIndexsv(c); }; break; -case 5156: { // glIndexubv +case 5133: { // glIndexubv GLubyte *c = (GLubyte *) bp; bp += 1; weglIndexubv(c); }; break; -case 5157: { // glInitNames - weglInitNames(); +case 5134: { // glColor3bv + GLbyte *v = (GLbyte *) bp; bp += 1; + weglColor3bv(v); }; break; -case 5158: { // glInterleavedArrays - GLenum *format = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglInterleavedArrays(*format,*stride,pointer); +case 5135: { // glColor3dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglColor3dv(v); }; break; -case 5159: { // glInterleavedArrays - GLenum *format = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]; - weglInterleavedArrays(*format,*stride,pointer); +case 5136: { // glColor3fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglColor3fv(v); }; break; -case 5160: { // glIsEnabled - GLenum *cap = (GLenum *) bp; bp += 4; - GLboolean result = weglIsEnabled(*cap); - int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5137: { // glColor3iv + GLint *v = (GLint *) bp; bp += 4; + weglColor3iv(v); }; break; -case 5161: { // glIsList - GLuint *list = (GLuint *) bp; bp += 4; - GLboolean result = weglIsList(*list); - int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5138: { // glColor3sv + GLshort *v = (GLshort *) bp; bp += 2; + weglColor3sv(v); }; break; -case 5162: { // glIsTexture - GLuint *texture = (GLuint *) bp; bp += 4; - GLboolean result = weglIsTexture(*texture); - int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(port,caller,rt,AP); +case 5139: { // glColor3ubv + GLubyte *v = (GLubyte *) bp; bp += 1; + weglColor3ubv(v); }; break; -case 5163: { // glLightModelf - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat *param = (GLfloat *) bp; bp += 4; - weglLightModelf(*pname,*param); +case 5140: { // glColor3uiv + GLuint *v = (GLuint *) bp; bp += 4; + weglColor3uiv(v); }; break; -case 5164: { // glLightModelfv - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4; - weglLightModelfv(*pname,params); +case 5141: { // glColor3usv + GLushort *v = (GLushort *) bp; bp += 2; + weglColor3usv(v); }; break; -case 5165: { // glLightModeli - GLenum *pname = (GLenum *) bp; bp += 4; - GLint *param = (GLint *) bp; bp += 4; - weglLightModeli(*pname,*param); +case 5142: { // glColor4bv + GLbyte *v = (GLbyte *) bp; bp += 1; + weglColor4bv(v); }; break; -case 5166: { // glLightModeliv - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4; - weglLightModeliv(*pname,params); +case 5143: { // glColor4dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglColor4dv(v); }; break; -case 5167: { // glLightf - GLenum *light = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat *param = (GLfloat *) bp; bp += 4; - weglLightf(*light,*pname,*param); +case 5144: { // glColor4fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglColor4fv(v); }; break; -case 5168: { // glLightfv - GLenum *light = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglLightfv(*light,*pname,params); +case 5145: { // glColor4iv + GLint *v = (GLint *) bp; bp += 4; + weglColor4iv(v); }; break; -case 5169: { // glLighti - GLenum *light = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint *param = (GLint *) bp; bp += 4; - weglLighti(*light,*pname,*param); +case 5146: { // glColor4sv + GLshort *v = (GLshort *) bp; bp += 2; + weglColor4sv(v); }; break; -case 5170: { // glLightiv - GLenum *light = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglLightiv(*light,*pname,params); +case 5147: { // glColor4ubv + GLubyte *v = (GLubyte *) bp; bp += 1; + weglColor4ubv(v); }; break; -case 5171: { // glLineStipple - GLint *factor = (GLint *) bp; bp += 4; - GLushort *pattern = (GLushort *) bp; bp += 2; - weglLineStipple(*factor,*pattern); +case 5148: { // glColor4uiv + GLuint *v = (GLuint *) bp; bp += 4; + weglColor4uiv(v); }; break; -case 5172: { // glLineWidth - GLfloat *width = (GLfloat *) bp; bp += 4; - weglLineWidth(*width); +case 5149: { // glColor4usv + GLushort *v = (GLushort *) bp; bp += 2; + weglColor4usv(v); }; break; -case 5173: { // glListBase - GLuint *base = (GLuint *) bp; bp += 4; - weglListBase(*base); +case 5150: { // glTexCoord1dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglTexCoord1dv(v); }; break; -case 5174: { // glLoadIdentity - weglLoadIdentity(); +case 5151: { // glTexCoord1fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglTexCoord1fv(v); }; break; -case 5175: { // glLoadMatrixd - GLdouble * m = (GLdouble *) bp; bp += 128; - weglLoadMatrixd(m); +case 5152: { // glTexCoord1iv + GLint *v = (GLint *) bp; bp += 4; + weglTexCoord1iv(v); }; break; -case 5176: { // glLoadMatrixf - GLfloat * m = (GLfloat *) bp; bp += 64; - weglLoadMatrixf(m); +case 5153: { // glTexCoord1sv + GLshort *v = (GLshort *) bp; bp += 2; + weglTexCoord1sv(v); +}; break; +case 5154: { // glTexCoord2dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglTexCoord2dv(v); +}; break; +case 5155: { // glTexCoord2fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglTexCoord2fv(v); +}; break; +case 5156: { // glTexCoord2iv + GLint *v = (GLint *) bp; bp += 4; + weglTexCoord2iv(v); +}; break; +case 5157: { // glTexCoord2sv + GLshort *v = (GLshort *) bp; bp += 2; + weglTexCoord2sv(v); +}; break; +case 5158: { // glTexCoord3dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglTexCoord3dv(v); +}; break; +case 5159: { // glTexCoord3fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglTexCoord3fv(v); +}; break; +case 5160: { // glTexCoord3iv + GLint *v = (GLint *) bp; bp += 4; + weglTexCoord3iv(v); +}; break; +case 5161: { // glTexCoord3sv + GLshort *v = (GLshort *) bp; bp += 2; + weglTexCoord3sv(v); +}; break; +case 5162: { // glTexCoord4dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglTexCoord4dv(v); +}; break; +case 5163: { // glTexCoord4fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglTexCoord4fv(v); +}; break; +case 5164: { // glTexCoord4iv + GLint *v = (GLint *) bp; bp += 4; + weglTexCoord4iv(v); +}; break; +case 5165: { // glTexCoord4sv + GLshort *v = (GLshort *) bp; bp += 2; + weglTexCoord4sv(v); +}; break; +case 5166: { // glRasterPos2dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglRasterPos2dv(v); +}; break; +case 5167: { // glRasterPos2fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglRasterPos2fv(v); +}; break; +case 5168: { // glRasterPos2iv + GLint *v = (GLint *) bp; bp += 4; + weglRasterPos2iv(v); +}; break; +case 5169: { // glRasterPos2sv + GLshort *v = (GLshort *) bp; bp += 2; + weglRasterPos2sv(v); +}; break; +case 5170: { // glRasterPos3dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglRasterPos3dv(v); +}; break; +case 5171: { // glRasterPos3fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglRasterPos3fv(v); +}; break; +case 5172: { // glRasterPos3iv + GLint *v = (GLint *) bp; bp += 4; + weglRasterPos3iv(v); +}; break; +case 5173: { // glRasterPos3sv + GLshort *v = (GLshort *) bp; bp += 2; + weglRasterPos3sv(v); +}; break; +case 5174: { // glRasterPos4dv + GLdouble *v = (GLdouble *) bp; bp += 8; + weglRasterPos4dv(v); +}; break; +case 5175: { // glRasterPos4fv + GLfloat *v = (GLfloat *) bp; bp += 4; + weglRasterPos4fv(v); +}; break; +case 5176: { // glRasterPos4iv + GLint *v = (GLint *) bp; bp += 4; + weglRasterPos4iv(v); +}; break; +case 5177: { // glRasterPos4sv + GLshort *v = (GLshort *) bp; bp += 2; + weglRasterPos4sv(v); }; break; -case 5177: { // glLoadName - GLuint *name = (GLuint *) bp; bp += 4; - weglLoadName(*name); +case 5178: { // glRectd + GLdouble *x1 = (GLdouble *) bp; bp += 8; + GLdouble *y1 = (GLdouble *) bp; bp += 8; + GLdouble *x2 = (GLdouble *) bp; bp += 8; + GLdouble *y2 = (GLdouble *) bp; bp += 8; + weglRectd(*x1,*y1,*x2,*y2); }; break; -case 5178: { // glLogicOp - GLenum *opcode = (GLenum *) bp; bp += 4; - weglLogicOp(*opcode); +case 5179: { // glRectf + GLfloat *x1 = (GLfloat *) bp; bp += 4; + GLfloat *y1 = (GLfloat *) bp; bp += 4; + GLfloat *x2 = (GLfloat *) bp; bp += 4; + GLfloat *y2 = (GLfloat *) bp; bp += 4; + weglRectf(*x1,*y1,*x2,*y2); }; break; -case 5179: { // glMap1d - GLenum *target = (GLenum *) bp; bp += 4; - bp += 4; - GLdouble *u1 = (GLdouble *) bp; bp += 8; - GLdouble *u2 = (GLdouble *) bp; bp += 8; - GLint *stride = (GLint *) bp; bp += 4; - GLint *order = (GLint *) bp; bp += 4; - GLdouble *points = (GLdouble *) bins[0]; - weglMap1d(*target,*u1,*u2,*stride,*order,points); +case 5180: { // glRecti + GLint *x1 = (GLint *) bp; bp += 4; + GLint *y1 = (GLint *) bp; bp += 4; + GLint *x2 = (GLint *) bp; bp += 4; + GLint *y2 = (GLint *) bp; bp += 4; + weglRecti(*x1,*y1,*x2,*y2); }; break; -case 5180: { // glMap1f - GLenum *target = (GLenum *) bp; bp += 4; - GLfloat *u1 = (GLfloat *) bp; bp += 4; - GLfloat *u2 = (GLfloat *) bp; bp += 4; - GLint *stride = (GLint *) bp; bp += 4; - GLint *order = (GLint *) bp; bp += 4; - GLfloat *points = (GLfloat *) bins[0]; - weglMap1f(*target,*u1,*u2,*stride,*order,points); +case 5181: { // glRects + GLshort *x1 = (GLshort *) bp; bp += 2; + GLshort *y1 = (GLshort *) bp; bp += 2; + GLshort *x2 = (GLshort *) bp; bp += 2; + GLshort *y2 = (GLshort *) bp; bp += 2; + weglRects(*x1,*y1,*x2,*y2); }; break; -case 5181: { // glMap2d - GLenum *target = (GLenum *) bp; bp += 4; - bp += 4; - GLdouble *u1 = (GLdouble *) bp; bp += 8; - GLdouble *u2 = (GLdouble *) bp; bp += 8; - GLint *ustride = (GLint *) bp; bp += 4; - GLint *uorder = (GLint *) bp; bp += 4; - GLdouble *v1 = (GLdouble *) bp; bp += 8; - GLdouble *v2 = (GLdouble *) bp; bp += 8; - GLint *vstride = (GLint *) bp; bp += 4; - GLint *vorder = (GLint *) bp; bp += 4; - GLdouble *points = (GLdouble *) bins[0]; - weglMap2d(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points); +case 5182: { // glRectdv + GLdouble * v1 = (GLdouble *) bp; bp += 16; + GLdouble * v2 = (GLdouble *) bp; bp += 16; + weglRectdv(v1,v2); }; break; -case 5182: { // glMap2f - GLenum *target = (GLenum *) bp; bp += 4; - GLfloat *u1 = (GLfloat *) bp; bp += 4; - GLfloat *u2 = (GLfloat *) bp; bp += 4; - GLint *ustride = (GLint *) bp; bp += 4; - GLint *uorder = (GLint *) bp; bp += 4; - GLfloat *v1 = (GLfloat *) bp; bp += 4; - GLfloat *v2 = (GLfloat *) bp; bp += 4; - GLint *vstride = (GLint *) bp; bp += 4; - GLint *vorder = (GLint *) bp; bp += 4; - GLfloat *points = (GLfloat *) bins[0]; - weglMap2f(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points); +case 5183: { // glRectfv + GLfloat * v1 = (GLfloat *) bp; bp += 8; + GLfloat * v2 = (GLfloat *) bp; bp += 8; + weglRectfv(v1,v2); }; break; -case 5183: { // glMapGrid1d - GLint *un = (GLint *) bp; bp += 4; - bp += 4; - GLdouble *u1 = (GLdouble *) bp; bp += 8; - GLdouble *u2 = (GLdouble *) bp; bp += 8; - weglMapGrid1d(*un,*u1,*u2); +case 5184: { // glRectiv + GLint * v1 = (GLint *) bp; bp += 8; + GLint * v2 = (GLint *) bp; bp += 8; + weglRectiv(v1,v2); }; break; -case 5184: { // glMapGrid1f - GLint *un = (GLint *) bp; bp += 4; - GLfloat *u1 = (GLfloat *) bp; bp += 4; - GLfloat *u2 = (GLfloat *) bp; bp += 4; - weglMapGrid1f(*un,*u1,*u2); +case 5185: { // glRectsv + GLshort * v1 = (GLshort *) bp; bp += 4; + GLshort * v2 = (GLshort *) bp; bp += 4; + weglRectsv(v1,v2); }; break; -case 5185: { // glMapGrid2d - GLint *un = (GLint *) bp; bp += 4; - bp += 4; - GLdouble *u1 = (GLdouble *) bp; bp += 8; - GLdouble *u2 = (GLdouble *) bp; bp += 8; - GLint *vn = (GLint *) bp; bp += 4; - bp += 4; - GLdouble *v1 = (GLdouble *) bp; bp += 8; - GLdouble *v2 = (GLdouble *) bp; bp += 8; - weglMapGrid2d(*un,*u1,*u2,*vn,*v1,*v2); +case 5186: { // glVertexPointer + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglVertexPointer(*size,*type,*stride,ptr); }; break; -case 5186: { // glMapGrid2f - GLint *un = (GLint *) bp; bp += 4; - GLfloat *u1 = (GLfloat *) bp; bp += 4; - GLfloat *u2 = (GLfloat *) bp; bp += 4; - GLint *vn = (GLint *) bp; bp += 4; - GLfloat *v1 = (GLfloat *) bp; bp += 4; - GLfloat *v2 = (GLfloat *) bp; bp += 4; - weglMapGrid2f(*un,*u1,*u2,*vn,*v1,*v2); +case 5187: { // glVertexPointer + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) bins[0]; + weglVertexPointer(*size,*type,*stride,ptr); }; break; -case 5187: { // glMaterialf - GLenum *face = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat *param = (GLfloat *) bp; bp += 4; - weglMaterialf(*face,*pname,*param); +case 5188: { // glNormalPointer + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglNormalPointer(*type,*stride,ptr); }; break; -case 5188: { // glMaterialfv - GLenum *face = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglMaterialfv(*face,*pname,params); +case 5189: { // glNormalPointer + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) bins[0]; + weglNormalPointer(*type,*stride,ptr); }; break; -case 5189: { // glMateriali - GLenum *face = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint *param = (GLint *) bp; bp += 4; - weglMateriali(*face,*pname,*param); +case 5190: { // glColorPointer + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglColorPointer(*size,*type,*stride,ptr); }; break; -case 5190: { // glMaterialiv - GLenum *face = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglMaterialiv(*face,*pname,params); +case 5191: { // glColorPointer + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) bins[0]; + weglColorPointer(*size,*type,*stride,ptr); }; break; -case 5191: { // glMatrixMode - GLenum *mode = (GLenum *) bp; bp += 4; - weglMatrixMode(*mode); +case 5192: { // glIndexPointer + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglIndexPointer(*type,*stride,ptr); }; break; -case 5192: { // glMultMatrixd - GLdouble * m = (GLdouble *) bp; bp += 128; - weglMultMatrixd(m); +case 5193: { // glIndexPointer + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) bins[0]; + weglIndexPointer(*type,*stride,ptr); }; break; -case 5193: { // glMultMatrixf - GLfloat * m = (GLfloat *) bp; bp += 64; - weglMultMatrixf(m); +case 5194: { // glTexCoordPointer + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglTexCoordPointer(*size,*type,*stride,ptr); }; break; -case 5194: { // glNewList - GLuint *list = (GLuint *) bp; bp += 4; - GLenum *mode = (GLenum *) bp; bp += 4; - weglNewList(*list,*mode); +case 5195: { // glTexCoordPointer + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) bins[0]; + weglTexCoordPointer(*size,*type,*stride,ptr); }; break; -case 5195: { // glNormal3bv - GLbyte *v = (GLbyte *) bp; bp += 1; - weglNormal3bv(v); +case 5196: { // glEdgeFlagPointer + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglEdgeFlagPointer(*stride,ptr); }; break; -case 5196: { // glNormal3dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglNormal3dv(v); +case 5197: { // glEdgeFlagPointer + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *ptr = (GLvoid *) bins[0]; + weglEdgeFlagPointer(*stride,ptr); }; break; -case 5197: { // glNormal3fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglNormal3fv(v); +case 5198: { // glArrayElement + GLint *i = (GLint *) bp; bp += 4; + weglArrayElement(*i); }; break; -case 5198: { // glNormal3iv - GLint *v = (GLint *) bp; bp += 4; - weglNormal3iv(v); +case 5199: { // glDrawArrays + GLenum *mode = (GLenum *) bp; bp += 4; + GLint *first = (GLint *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + weglDrawArrays(*mode,*first,*count); }; break; -case 5199: { // glNormal3sv - GLshort *v = (GLshort *) bp; bp += 2; - weglNormal3sv(v); +case 5200: { // glDrawElements + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglDrawElements(*mode,*count,*type,indices); }; break; -case 5200: { // glNormalPointer +case 5201: { // glDrawElements + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) bins[0]; + weglDrawElements(*mode,*count,*type,indices); +}; break; +case 5202: { // glInterleavedArrays + GLenum *format = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglNormalPointer(*type,*stride,pointer); + weglInterleavedArrays(*format,*stride,pointer); }; break; -case 5201: { // glNormalPointer - GLenum *type = (GLenum *) bp; bp += 4; +case 5203: { // glInterleavedArrays + GLenum *format = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; GLvoid *pointer = (GLvoid *) bins[0]; - weglNormalPointer(*type,*stride,pointer); + weglInterleavedArrays(*format,*stride,pointer); }; break; -case 5202: { // glOrtho - GLdouble *left = (GLdouble *) bp; bp += 8; - GLdouble *right = (GLdouble *) bp; bp += 8; - GLdouble *bottom = (GLdouble *) bp; bp += 8; - GLdouble *top = (GLdouble *) bp; bp += 8; - GLdouble *zNear = (GLdouble *) bp; bp += 8; - GLdouble *zFar = (GLdouble *) bp; bp += 8; - weglOrtho(*left,*right,*bottom,*top,*zNear,*zFar); +case 5204: { // glShadeModel + GLenum *mode = (GLenum *) bp; bp += 4; + weglShadeModel(*mode); }; break; -case 5203: { // glPassThrough - GLfloat *token = (GLfloat *) bp; bp += 4; - weglPassThrough(*token); +case 5205: { // glLightf + GLenum *light = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglLightf(*light,*pname,*param); }; break; -case 5204: { // glPixelMapfv - GLenum *map = (GLenum *) bp; bp += 4; - GLsizei *mapsize = (GLsizei *) bp; bp += 4; - GLfloat *values = (GLfloat *) bins[0]; - weglPixelMapfv(*map,*mapsize,values); +case 5206: { // glLighti + GLenum *light = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglLighti(*light,*pname,*param); }; break; -case 5205: { // glPixelMapuiv - GLenum *map = (GLenum *) bp; bp += 4; - GLsizei *mapsize = (GLsizei *) bp; bp += 4; - GLuint *values = (GLuint *) bins[0]; - weglPixelMapuiv(*map,*mapsize,values); +case 5207: { // glLightfv + GLenum *light = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglLightfv(*light,*pname,params); }; break; -case 5206: { // glPixelMapusv - GLenum *map = (GLenum *) bp; bp += 4; - GLsizei *mapsize = (GLsizei *) bp; bp += 4; - GLushort *values = (GLushort *) bins[0]; - weglPixelMapusv(*map,*mapsize,values); +case 5208: { // glLightiv + GLenum *light = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglLightiv(*light,*pname,params); +}; break; +case 5209: { // glGetLightfv + GLenum *light = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat params[4] = {0.0,0.0,0.0,0.0}; + weglGetLightfv(*light,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble paramsConv[4], *paramsTmp = paramsConv; + for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5210: { // glGetLightiv + GLenum *light = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[4] = {0,0,0,0}; + weglGetLightiv(*light,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5207: { // glPixelStoref +case 5211: { // glLightModelf GLenum *pname = (GLenum *) bp; bp += 4; GLfloat *param = (GLfloat *) bp; bp += 4; - weglPixelStoref(*pname,*param); + weglLightModelf(*pname,*param); }; break; -case 5208: { // glPixelStorei +case 5212: { // glLightModeli GLenum *pname = (GLenum *) bp; bp += 4; GLint *param = (GLint *) bp; bp += 4; - weglPixelStorei(*pname,*param); + weglLightModeli(*pname,*param); }; break; -case 5209: { // glPixelTransferf +case 5213: { // glLightModelfv GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat *param = (GLfloat *) bp; bp += 4; - weglPixelTransferf(*pname,*param); + int *paramsLen = (int *) bp; bp += 4; + GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4; + weglLightModelfv(*pname,params); }; break; -case 5210: { // glPixelTransferi +case 5214: { // glLightModeliv GLenum *pname = (GLenum *) bp; bp += 4; - GLint *param = (GLint *) bp; bp += 4; - weglPixelTransferi(*pname,*param); -}; break; -case 5211: { // glPixelZoom - GLfloat *xfactor = (GLfloat *) bp; bp += 4; - GLfloat *yfactor = (GLfloat *) bp; bp += 4; - weglPixelZoom(*xfactor,*yfactor); -}; break; -case 5212: { // glPointSize - GLfloat *size = (GLfloat *) bp; bp += 4; - weglPointSize(*size); + int *paramsLen = (int *) bp; bp += 4; + GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4; + weglLightModeliv(*pname,params); }; break; -case 5213: { // glPolygonMode +case 5215: { // glMaterialf GLenum *face = (GLenum *) bp; bp += 4; - GLenum *mode = (GLenum *) bp; bp += 4; - weglPolygonMode(*face,*mode); -}; break; -case 5214: { // glPolygonOffset - GLfloat *factor = (GLfloat *) bp; bp += 4; - GLfloat *units = (GLfloat *) bp; bp += 4; - weglPolygonOffset(*factor,*units); -}; break; -case 5215: { // glPolygonStipple - GLubyte *mask = (GLubyte *) bins[0]; - weglPolygonStipple(mask); -}; break; -case 5216: { // glPopAttrib - weglPopAttrib(); -}; break; -case 5217: { // glPopClientAttrib - weglPopClientAttrib(); -}; break; -case 5218: { // glPopMatrix - weglPopMatrix(); -}; break; -case 5219: { // glPopName - weglPopName(); -}; break; -case 5220: { // glPrioritizeTextures - int * texturesLen = (int *) bp; bp += 4; - GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8; - int * prioritiesLen = (int *) bp; bp += 4; - GLclampf * priorities = (GLclampf *) bp; bp += (8-((*prioritiesLen*4+4)%8))%8; - weglPrioritizeTextures(*texturesLen,textures,priorities); -}; break; -case 5221: { // glPushAttrib - GLbitfield *mask = (GLbitfield *) bp; bp += 4; - weglPushAttrib(*mask); -}; break; -case 5222: { // glPushClientAttrib - GLbitfield *mask = (GLbitfield *) bp; bp += 4; - weglPushClientAttrib(*mask); -}; break; -case 5223: { // glPushMatrix - weglPushMatrix(); + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglMaterialf(*face,*pname,*param); }; break; -case 5224: { // glPushName - GLuint *name = (GLuint *) bp; bp += 4; - weglPushName(*name); +case 5216: { // glMateriali + GLenum *face = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglMateriali(*face,*pname,*param); }; break; -case 5225: { // glRasterPos2dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglRasterPos2dv(v); +case 5217: { // glMaterialfv + GLenum *face = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglMaterialfv(*face,*pname,params); }; break; -case 5226: { // glRasterPos2fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglRasterPos2fv(v); +case 5218: { // glMaterialiv + GLenum *face = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglMaterialiv(*face,*pname,params); }; break; -case 5227: { // glRasterPos2iv - GLint *v = (GLint *) bp; bp += 4; - weglRasterPos2iv(v); +case 5219: { // glGetMaterialfv + GLenum *face = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat params[4] = {0.0,0.0,0.0,0.0}; + weglGetMaterialfv(*face,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble paramsConv[4], *paramsTmp = paramsConv; + for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5228: { // glRasterPos2sv - GLshort *v = (GLshort *) bp; bp += 2; - weglRasterPos2sv(v); +case 5220: { // glGetMaterialiv + GLenum *face = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[4] = {0,0,0,0}; + weglGetMaterialiv(*face,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5229: { // glRasterPos3dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglRasterPos3dv(v); +case 5221: { // glColorMaterial + GLenum *face = (GLenum *) bp; bp += 4; + GLenum *mode = (GLenum *) bp; bp += 4; + weglColorMaterial(*face,*mode); }; break; -case 5230: { // glRasterPos3fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglRasterPos3fv(v); +case 5222: { // glPixelZoom + GLfloat *xfactor = (GLfloat *) bp; bp += 4; + GLfloat *yfactor = (GLfloat *) bp; bp += 4; + weglPixelZoom(*xfactor,*yfactor); }; break; -case 5231: { // glRasterPos3iv - GLint *v = (GLint *) bp; bp += 4; - weglRasterPos3iv(v); +case 5223: { // glPixelStoref + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglPixelStoref(*pname,*param); }; break; -case 5232: { // glRasterPos3sv - GLshort *v = (GLshort *) bp; bp += 2; - weglRasterPos3sv(v); +case 5224: { // glPixelStorei + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglPixelStorei(*pname,*param); }; break; -case 5233: { // glRasterPos4dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglRasterPos4dv(v); +case 5225: { // glPixelTransferf + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglPixelTransferf(*pname,*param); }; break; -case 5234: { // glRasterPos4fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglRasterPos4fv(v); +case 5226: { // glPixelTransferi + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglPixelTransferi(*pname,*param); }; break; -case 5235: { // glRasterPos4iv - GLint *v = (GLint *) bp; bp += 4; - weglRasterPos4iv(v); +case 5227: { // glPixelMapfv + GLenum *map = (GLenum *) bp; bp += 4; + GLsizei *mapsize = (GLsizei *) bp; bp += 4; + GLfloat *values = (GLfloat *) bins[0]; + weglPixelMapfv(*map,*mapsize,values); }; break; -case 5236: { // glRasterPos4sv - GLshort *v = (GLshort *) bp; bp += 2; - weglRasterPos4sv(v); +case 5228: { // glPixelMapuiv + GLenum *map = (GLenum *) bp; bp += 4; + GLsizei *mapsize = (GLsizei *) bp; bp += 4; + GLuint *values = (GLuint *) bins[0]; + weglPixelMapuiv(*map,*mapsize,values); }; break; -case 5237: { // glReadBuffer - GLenum *mode = (GLenum *) bp; bp += 4; - weglReadBuffer(*mode); +case 5229: { // glPixelMapusv + GLenum *map = (GLenum *) bp; bp += 4; + GLsizei *mapsize = (GLsizei *) bp; bp += 4; + GLushort *values = (GLushort *) bins[0]; + weglPixelMapusv(*map,*mapsize,values); }; break; -case 5238: { // glReadPixels - GLint *x = (GLint *) bp; bp += 4; - GLint *y = (GLint *) bp; bp += 4; - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - GLenum *format = (GLenum *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]; - weglReadPixels(*x,*y,*width,*height,*format,*type,pixels); +case 5230: { // glGetPixelMapfv + GLenum *map = (GLenum *) bp; bp += 4; + GLfloat *values = (GLfloat *) bins[0]; + weglGetPixelMapfv(*map,values); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5239: { // glRectd - GLdouble *x1 = (GLdouble *) bp; bp += 8; - GLdouble *y1 = (GLdouble *) bp; bp += 8; - GLdouble *x2 = (GLdouble *) bp; bp += 8; - GLdouble *y2 = (GLdouble *) bp; bp += 8; - weglRectd(*x1,*y1,*x2,*y2); -}; break; -case 5240: { // glRectdv - GLdouble * v1 = (GLdouble *) bp; bp += 16; - GLdouble * v2 = (GLdouble *) bp; bp += 16; - weglRectdv(v1,v2); -}; break; -case 5241: { // glRectf - GLfloat *x1 = (GLfloat *) bp; bp += 4; - GLfloat *y1 = (GLfloat *) bp; bp += 4; - GLfloat *x2 = (GLfloat *) bp; bp += 4; - GLfloat *y2 = (GLfloat *) bp; bp += 4; - weglRectf(*x1,*y1,*x2,*y2); -}; break; -case 5242: { // glRectfv - GLfloat * v1 = (GLfloat *) bp; bp += 8; - GLfloat * v2 = (GLfloat *) bp; bp += 8; - weglRectfv(v1,v2); -}; break; -case 5243: { // glRecti - GLint *x1 = (GLint *) bp; bp += 4; - GLint *y1 = (GLint *) bp; bp += 4; - GLint *x2 = (GLint *) bp; bp += 4; - GLint *y2 = (GLint *) bp; bp += 4; - weglRecti(*x1,*y1,*x2,*y2); -}; break; -case 5244: { // glRectiv - GLint * v1 = (GLint *) bp; bp += 8; - GLint * v2 = (GLint *) bp; bp += 8; - weglRectiv(v1,v2); -}; break; -case 5245: { // glRects - GLshort *x1 = (GLshort *) bp; bp += 2; - GLshort *y1 = (GLshort *) bp; bp += 2; - GLshort *x2 = (GLshort *) bp; bp += 2; - GLshort *y2 = (GLshort *) bp; bp += 2; - weglRects(*x1,*y1,*x2,*y2); -}; break; -case 5246: { // glRectsv - GLshort * v1 = (GLshort *) bp; bp += 4; - GLshort * v2 = (GLshort *) bp; bp += 4; - weglRectsv(v1,v2); -}; break; -case 5247: { // glRenderMode - GLenum *mode = (GLenum *) bp; bp += 4; - GLint result = weglRenderMode(*mode); +case 5231: { // glGetPixelMapuiv + GLenum *map = (GLenum *) bp; bp += 4; + GLuint *values = (GLuint *) bins[0]; + weglGetPixelMapuiv(*map,values); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5248: { // glRotated - GLdouble *angle = (GLdouble *) bp; bp += 8; - GLdouble *x = (GLdouble *) bp; bp += 8; - GLdouble *y = (GLdouble *) bp; bp += 8; - GLdouble *z = (GLdouble *) bp; bp += 8; - weglRotated(*angle,*x,*y,*z); -}; break; -case 5249: { // glRotatef - GLfloat *angle = (GLfloat *) bp; bp += 4; - GLfloat *x = (GLfloat *) bp; bp += 4; - GLfloat *y = (GLfloat *) bp; bp += 4; - GLfloat *z = (GLfloat *) bp; bp += 4; - weglRotatef(*angle,*x,*y,*z); +case 5232: { // glGetPixelMapusv + GLenum *map = (GLenum *) bp; bp += 4; + GLushort *values = (GLushort *) bins[0]; + weglGetPixelMapusv(*map,values); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5250: { // glScaled - GLdouble *x = (GLdouble *) bp; bp += 8; - GLdouble *y = (GLdouble *) bp; bp += 8; - GLdouble *z = (GLdouble *) bp; bp += 8; - weglScaled(*x,*y,*z); +case 5233: { // glBitmap + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLfloat *xorig = (GLfloat *) bp; bp += 4; + GLfloat *yorig = (GLfloat *) bp; bp += 4; + GLfloat *xmove = (GLfloat *) bp; bp += 4; + GLfloat *ymove = (GLfloat *) bp; bp += 4; + GLubyte *bitmap = (GLubyte *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap); }; break; -case 5251: { // glScalef - GLfloat *x = (GLfloat *) bp; bp += 4; - GLfloat *y = (GLfloat *) bp; bp += 4; - GLfloat *z = (GLfloat *) bp; bp += 4; - weglScalef(*x,*y,*z); +case 5234: { // glBitmap + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLfloat *xorig = (GLfloat *) bp; bp += 4; + GLfloat *yorig = (GLfloat *) bp; bp += 4; + GLfloat *xmove = (GLfloat *) bp; bp += 4; + GLfloat *ymove = (GLfloat *) bp; bp += 4; + GLubyte *bitmap = (GLubyte *) bins[0]; + weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap); }; break; -case 5252: { // glScissor +case 5235: { // glReadPixels GLint *x = (GLint *) bp; bp += 4; GLint *y = (GLint *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; GLsizei *height = (GLsizei *) bp; bp += 4; - weglScissor(*x,*y,*width,*height); -}; break; -case 5253: { // glSelectBuffer - GLsizei *size = (GLsizei *) bp; bp += 4; - GLuint *buffer = (GLuint *) bins[0]; - weglSelectBuffer(*size,buffer); + GLenum *format = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) bins[0]; + weglReadPixels(*x,*y,*width,*height,*format,*type,pixels); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5254: { // glShadeModel - GLenum *mode = (GLenum *) bp; bp += 4; - weglShadeModel(*mode); +case 5236: { // glDrawPixels + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLenum *format = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglDrawPixels(*width,*height,*format,*type,pixels); +}; break; +case 5237: { // glDrawPixels + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLenum *format = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) bins[0]; + weglDrawPixels(*width,*height,*format,*type,pixels); +}; break; +case 5238: { // glCopyPixels + GLint *x = (GLint *) bp; bp += 4; + GLint *y = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + weglCopyPixels(*x,*y,*width,*height,*type); }; break; -case 5255: { // glStencilFunc +case 5239: { // glStencilFunc GLenum *func = (GLenum *) bp; bp += 4; GLint *ref = (GLint *) bp; bp += 4; GLuint *mask = (GLuint *) bp; bp += 4; weglStencilFunc(*func,*ref,*mask); }; break; -case 5256: { // glStencilMask +case 5240: { // glStencilMask GLuint *mask = (GLuint *) bp; bp += 4; weglStencilMask(*mask); }; break; -case 5257: { // glStencilOp +case 5241: { // glStencilOp GLenum *fail = (GLenum *) bp; bp += 4; GLenum *zfail = (GLenum *) bp; bp += 4; GLenum *zpass = (GLenum *) bp; bp += 4; weglStencilOp(*fail,*zfail,*zpass); }; break; -case 5258: { // glTexCoord1dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglTexCoord1dv(v); +case 5242: { // glClearStencil + GLint *s = (GLint *) bp; bp += 4; + weglClearStencil(*s); }; break; -case 5259: { // glTexCoord1fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglTexCoord1fv(v); +case 5243: { // glTexGend + GLenum *coord = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLdouble *param = (GLdouble *) bp; bp += 8; + weglTexGend(*coord,*pname,*param); }; break; -case 5260: { // glTexCoord1iv - GLint *v = (GLint *) bp; bp += 4; - weglTexCoord1iv(v); +case 5244: { // glTexGenf + GLenum *coord = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglTexGenf(*coord,*pname,*param); }; break; -case 5261: { // glTexCoord1sv - GLshort *v = (GLshort *) bp; bp += 2; - weglTexCoord1sv(v); +case 5245: { // glTexGeni + GLenum *coord = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglTexGeni(*coord,*pname,*param); }; break; -case 5262: { // glTexCoord2dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglTexCoord2dv(v); +case 5246: { // glTexGendv + GLenum *coord = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 8; + GLdouble *params = (GLdouble *) bp; bp += *paramsLen*8; + weglTexGendv(*coord,*pname,params); }; break; -case 5263: { // glTexCoord2fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglTexCoord2fv(v); +case 5247: { // glTexGenfv + GLenum *coord = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglTexGenfv(*coord,*pname,params); }; break; -case 5264: { // glTexCoord2iv - GLint *v = (GLint *) bp; bp += 4; - weglTexCoord2iv(v); +case 5248: { // glTexGeniv + GLenum *coord = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglTexGeniv(*coord,*pname,params); }; break; -case 5265: { // glTexCoord2sv - GLshort *v = (GLshort *) bp; bp += 2; - weglTexCoord2sv(v); +case 5249: { // glGetTexGendv + GLenum *coord = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLdouble params[4] = {0.0,0.0,0.0,0.0}; + weglGetTexGendv(*coord,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble *paramsTmp = params; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5266: { // glTexCoord3dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglTexCoord3dv(v); +case 5250: { // glGetTexGenfv + GLenum *coord = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat params[4] = {0.0,0.0,0.0,0.0}; + weglGetTexGenfv(*coord,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble paramsConv[4], *paramsTmp = paramsConv; + for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5267: { // glTexCoord3fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglTexCoord3fv(v); +case 5251: { // glGetTexGeniv + GLenum *coord = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[4] = {0,0,0,0}; + weglGetTexGeniv(*coord,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5268: { // glTexCoord3iv - GLint *v = (GLint *) bp; bp += 4; - weglTexCoord3iv(v); +case 5252: { // glTexEnvf + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglTexEnvf(*target,*pname,*param); }; break; -case 5269: { // glTexCoord3sv - GLshort *v = (GLshort *) bp; bp += 2; - weglTexCoord3sv(v); +case 5253: { // glTexEnvi + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglTexEnvi(*target,*pname,*param); }; break; -case 5270: { // glTexCoord4dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglTexCoord4dv(v); +case 5254: { // glTexEnvfv + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglTexEnvfv(*target,*pname,params); }; break; -case 5271: { // glTexCoord4fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglTexCoord4fv(v); +case 5255: { // glTexEnviv + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglTexEnviv(*target,*pname,params); }; break; -case 5272: { // glTexCoord4iv - GLint *v = (GLint *) bp; bp += 4; - weglTexCoord4iv(v); +case 5256: { // glGetTexEnvfv + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat params[4] = {0.0,0.0,0.0,0.0}; + weglGetTexEnvfv(*target,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble paramsConv[4], *paramsTmp = paramsConv; + for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5273: { // glTexCoord4sv - GLshort *v = (GLshort *) bp; bp += 2; - weglTexCoord4sv(v); +case 5257: { // glGetTexEnviv + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[4] = {0,0,0,0}; + weglGetTexEnviv(*target,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5274: { // glTexCoordPointer - GLint *size = (GLint *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglTexCoordPointer(*size,*type,*stride,pointer); +case 5258: { // glTexParameterf + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglTexParameterf(*target,*pname,*param); +}; break; +case 5259: { // glTexParameteri + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglTexParameteri(*target,*pname,*param); +}; break; +case 5260: { // glTexParameterfv + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglTexParameterfv(*target,*pname,params); +}; break; +case 5261: { // glTexParameteriv + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; + weglTexParameteriv(*target,*pname,params); +}; break; +case 5262: { // glGetTexParameterfv + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat params[4] = {0.0,0.0,0.0,0.0}; + weglGetTexParameterfv(*target,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble paramsConv[4], *paramsTmp = paramsConv; + for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5263: { // glGetTexParameteriv + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[4] = {0,0,0,0}; + weglGetTexParameteriv(*target,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5264: { // glGetTexLevelParameterfv + GLenum *target = (GLenum *) bp; bp += 4; + GLint *level = (GLint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat params[1] = {0.0}; + weglGetTexLevelParameterfv(*target,*level,*pname,params); + int AP = 0; ErlDrvTermData rt[8]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble paramsConv[1], *paramsTmp = paramsConv; + for(int i=0; i < 1; i++) paramsConv[i] = (GLdouble) params[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5265: { // glGetTexLevelParameteriv + GLenum *target = (GLenum *) bp; bp += 4; + GLint *level = (GLint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[1] = {0}; + weglGetTexLevelParameteriv(*target,*level,*pname,params); + int AP = 0; ErlDrvTermData rt[8]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5275: { // glTexCoordPointer - GLint *size = (GLint *) bp; bp += 4; +case 5266: { // glTexImage1D + GLenum *target = (GLenum *) bp; bp += 4; + GLint *level = (GLint *) bp; bp += 4; + GLint *internalFormat = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLint *border = (GLint *) bp; bp += 4; + GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]; - weglTexCoordPointer(*size,*type,*stride,pointer); + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglTexImage1D(*target,*level,*internalFormat,*width,*border,*format,*type,pixels); }; break; -case 5276: { // glTexEnvf +case 5267: { // glTexImage1D GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat *param = (GLfloat *) bp; bp += 4; - weglTexEnvf(*target,*pname,*param); + GLint *level = (GLint *) bp; bp += 4; + GLint *internalFormat = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLint *border = (GLint *) bp; bp += 4; + GLenum *format = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) bins[0]; + weglTexImage1D(*target,*level,*internalFormat,*width,*border,*format,*type,pixels); }; break; -case 5277: { // glTexEnvfv +case 5268: { // glTexImage2D GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglTexEnvfv(*target,*pname,params); + GLint *level = (GLint *) bp; bp += 4; + GLint *internalFormat = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLint *border = (GLint *) bp; bp += 4; + GLenum *format = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; + weglTexImage2D(*target,*level,*internalFormat,*width,*height,*border,*format,*type,pixels); }; break; -case 5278: { // glTexEnvi +case 5269: { // glTexImage2D GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint *param = (GLint *) bp; bp += 4; - weglTexEnvi(*target,*pname,*param); + GLint *level = (GLint *) bp; bp += 4; + GLint *internalFormat = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLint *border = (GLint *) bp; bp += 4; + GLenum *format = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) bins[0]; + weglTexImage2D(*target,*level,*internalFormat,*width,*height,*border,*format,*type,pixels); }; break; -case 5279: { // glTexEnviv +case 5270: { // glGetTexImage GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglTexEnviv(*target,*pname,params); + GLint *level = (GLint *) bp; bp += 4; + GLenum *format = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *pixels = (GLvoid *) bins[0]; + weglGetTexImage(*target,*level,*format,*type,pixels); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5280: { // glTexGend - GLenum *coord = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLdouble *param = (GLdouble *) bp; bp += 8; - weglTexGend(*coord,*pname,*param); +case 5271: { // glGenTextures + GLsizei *n = (GLsizei *) bp; bp += 4; + GLuint *textures; + textures = (GLuint *) driver_alloc(sizeof(GLuint) * *n); + weglGenTextures(*n,textures); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*n)*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + for(int i=0; i < *n; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) textures[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(textures); }; break; -case 5281: { // glTexGendv - GLenum *coord = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 8; - GLdouble *params = (GLdouble *) bp; bp += *paramsLen*8; - weglTexGendv(*coord,*pname,params); +case 5272: { // glDeleteTextures + int * texturesLen = (int *) bp; bp += 4; + GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8; + weglDeleteTextures(*texturesLen,textures); }; break; -case 5282: { // glTexGenf - GLenum *coord = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat *param = (GLfloat *) bp; bp += 4; - weglTexGenf(*coord,*pname,*param); +case 5273: { // glBindTexture + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *texture = (GLuint *) bp; bp += 4; + weglBindTexture(*target,*texture); }; break; -case 5283: { // glTexGenfv - GLenum *coord = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglTexGenfv(*coord,*pname,params); +case 5274: { // glPrioritizeTextures + int * texturesLen = (int *) bp; bp += 4; + GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8; + int * prioritiesLen = (int *) bp; bp += 4; + GLclampf * priorities = (GLclampf *) bp; bp += (8-((*prioritiesLen*4+4)%8))%8; + weglPrioritizeTextures(*texturesLen,textures,priorities); }; break; -case 5284: { // glTexGeni - GLenum *coord = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint *param = (GLint *) bp; bp += 4; - weglTexGeni(*coord,*pname,*param); +case 5275: { // glAreTexturesResident + int * texturesLen = (int *) bp; bp += 4; + GLuint * textures = (GLuint *) bp; bp += (8-((*texturesLen*4+4)%8))%8; + GLboolean *residences; + residences = (GLboolean *) driver_alloc(sizeof(GLboolean) * *texturesLen); + GLboolean result = weglAreTexturesResident(*texturesLen,textures,residences); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(11 + (*texturesLen)*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + for(int i=0; i < *texturesLen; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) residences[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*texturesLen)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(residences); }; break; -case 5285: { // glTexGeniv - GLenum *coord = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglTexGeniv(*coord,*pname,params); +case 5276: { // glIsTexture + GLuint *texture = (GLuint *) bp; bp += 4; + GLboolean result = weglIsTexture(*texture); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5286: { // glTexImage1D +case 5277: { // glTexSubImage1D GLenum *target = (GLenum *) bp; bp += 4; GLint *level = (GLint *) bp; bp += 4; - GLint *internalformat = (GLint *) bp; bp += 4; + GLint *xoffset = (GLint *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; - GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglTexImage1D(*target,*level,*internalformat,*width,*border,*format,*type,pixels); + weglTexSubImage1D(*target,*level,*xoffset,*width,*format,*type,pixels); }; break; -case 5287: { // glTexImage1D +case 5278: { // glTexSubImage1D GLenum *target = (GLenum *) bp; bp += 4; GLint *level = (GLint *) bp; bp += 4; - GLint *internalformat = (GLint *) bp; bp += 4; + GLint *xoffset = (GLint *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; - GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLvoid *pixels = (GLvoid *) bins[0]; - weglTexImage1D(*target,*level,*internalformat,*width,*border,*format,*type,pixels); + weglTexSubImage1D(*target,*level,*xoffset,*width,*format,*type,pixels); }; break; -case 5288: { // glTexImage2D +case 5279: { // glTexSubImage2D GLenum *target = (GLenum *) bp; bp += 4; GLint *level = (GLint *) bp; bp += 4; - GLint *internalformat = (GLint *) bp; bp += 4; + GLint *xoffset = (GLint *) bp; bp += 4; + GLint *yoffset = (GLint *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; GLsizei *height = (GLsizei *) bp; bp += 4; - GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglTexImage2D(*target,*level,*internalformat,*width,*height,*border,*format,*type,pixels); + weglTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*type,pixels); }; break; -case 5289: { // glTexImage2D +case 5280: { // glTexSubImage2D GLenum *target = (GLenum *) bp; bp += 4; GLint *level = (GLint *) bp; bp += 4; - GLint *internalformat = (GLint *) bp; bp += 4; + GLint *xoffset = (GLint *) bp; bp += 4; + GLint *yoffset = (GLint *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; GLsizei *height = (GLsizei *) bp; bp += 4; - GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLvoid *pixels = (GLvoid *) bins[0]; - weglTexImage2D(*target,*level,*internalformat,*width,*height,*border,*format,*type,pixels); -}; break; -case 5290: { // glTexParameterf - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLfloat *param = (GLfloat *) bp; bp += 4; - weglTexParameterf(*target,*pname,*param); + weglTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*type,pixels); }; break; -case 5291: { // glTexParameterfv +case 5281: { // glCopyTexImage1D GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglTexParameterfv(*target,*pname,params); + GLint *level = (GLint *) bp; bp += 4; + GLenum *internalformat = (GLenum *) bp; bp += 4; + GLint *x = (GLint *) bp; bp += 4; + GLint *y = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLint *border = (GLint *) bp; bp += 4; + weglCopyTexImage1D(*target,*level,*internalformat,*x,*y,*width,*border); }; break; -case 5292: { // glTexParameteri +case 5282: { // glCopyTexImage2D GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint *param = (GLint *) bp; bp += 4; - weglTexParameteri(*target,*pname,*param); + GLint *level = (GLint *) bp; bp += 4; + GLenum *internalformat = (GLenum *) bp; bp += 4; + GLint *x = (GLint *) bp; bp += 4; + GLint *y = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLint *border = (GLint *) bp; bp += 4; + weglCopyTexImage2D(*target,*level,*internalformat,*x,*y,*width,*height,*border); }; break; -case 5293: { // glTexParameteriv +case 5283: { // glCopyTexSubImage1D GLenum *target = (GLenum *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - int *paramsLen = (int *) bp; bp += 4; - GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; - weglTexParameteriv(*target,*pname,params); + GLint *level = (GLint *) bp; bp += 4; + GLint *xoffset = (GLint *) bp; bp += 4; + GLint *x = (GLint *) bp; bp += 4; + GLint *y = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + weglCopyTexSubImage1D(*target,*level,*xoffset,*x,*y,*width); }; break; -case 5294: { // glTexSubImage1D +case 5284: { // glCopyTexSubImage2D GLenum *target = (GLenum *) bp; bp += 4; GLint *level = (GLint *) bp; bp += 4; GLint *xoffset = (GLint *) bp; bp += 4; + GLint *yoffset = (GLint *) bp; bp += 4; + GLint *x = (GLint *) bp; bp += 4; + GLint *y = (GLint *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; - GLenum *format = (GLenum *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglTexSubImage1D(*target,*level,*xoffset,*width,*format,*type,pixels); + GLsizei *height = (GLsizei *) bp; bp += 4; + weglCopyTexSubImage2D(*target,*level,*xoffset,*yoffset,*x,*y,*width,*height); +}; break; +case 5285: { // glMap1d + GLenum *target = (GLenum *) bp; bp += 4; + bp += 4; + GLdouble *u1 = (GLdouble *) bp; bp += 8; + GLdouble *u2 = (GLdouble *) bp; bp += 8; + GLint *stride = (GLint *) bp; bp += 4; + GLint *order = (GLint *) bp; bp += 4; + GLdouble *points = (GLdouble *) bins[0]; + weglMap1d(*target,*u1,*u2,*stride,*order,points); +}; break; +case 5286: { // glMap1f + GLenum *target = (GLenum *) bp; bp += 4; + GLfloat *u1 = (GLfloat *) bp; bp += 4; + GLfloat *u2 = (GLfloat *) bp; bp += 4; + GLint *stride = (GLint *) bp; bp += 4; + GLint *order = (GLint *) bp; bp += 4; + GLfloat *points = (GLfloat *) bins[0]; + weglMap1f(*target,*u1,*u2,*stride,*order,points); +}; break; +case 5287: { // glMap2d + GLenum *target = (GLenum *) bp; bp += 4; + bp += 4; + GLdouble *u1 = (GLdouble *) bp; bp += 8; + GLdouble *u2 = (GLdouble *) bp; bp += 8; + GLint *ustride = (GLint *) bp; bp += 4; + GLint *uorder = (GLint *) bp; bp += 4; + GLdouble *v1 = (GLdouble *) bp; bp += 8; + GLdouble *v2 = (GLdouble *) bp; bp += 8; + GLint *vstride = (GLint *) bp; bp += 4; + GLint *vorder = (GLint *) bp; bp += 4; + GLdouble *points = (GLdouble *) bins[0]; + weglMap2d(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points); +}; break; +case 5288: { // glMap2f + GLenum *target = (GLenum *) bp; bp += 4; + GLfloat *u1 = (GLfloat *) bp; bp += 4; + GLfloat *u2 = (GLfloat *) bp; bp += 4; + GLint *ustride = (GLint *) bp; bp += 4; + GLint *uorder = (GLint *) bp; bp += 4; + GLfloat *v1 = (GLfloat *) bp; bp += 4; + GLfloat *v2 = (GLfloat *) bp; bp += 4; + GLint *vstride = (GLint *) bp; bp += 4; + GLint *vorder = (GLint *) bp; bp += 4; + GLfloat *points = (GLfloat *) bins[0]; + weglMap2f(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points); +}; break; +case 5289: { // glGetMapdv + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *query = (GLenum *) bp; bp += 4; + GLdouble *v = (GLdouble *) bins[0]; + weglGetMapdv(*target,*query,v); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5295: { // glTexSubImage1D +case 5290: { // glGetMapfv GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLint *xoffset = (GLint *) bp; bp += 4; - GLsizei *width = (GLsizei *) bp; bp += 4; - GLenum *format = (GLenum *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]; - weglTexSubImage1D(*target,*level,*xoffset,*width,*format,*type,pixels); + GLenum *query = (GLenum *) bp; bp += 4; + GLfloat *v = (GLfloat *) bins[0]; + weglGetMapfv(*target,*query,v); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5296: { // glTexSubImage2D +case 5291: { // glGetMapiv GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLint *xoffset = (GLint *) bp; bp += 4; - GLint *yoffset = (GLint *) bp; bp += 4; - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - GLenum *format = (GLenum *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*type,pixels); + GLenum *query = (GLenum *) bp; bp += 4; + GLint *v = (GLint *) bins[0]; + weglGetMapiv(*target,*query,v); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5297: { // glTexSubImage2D - GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - GLint *xoffset = (GLint *) bp; bp += 4; - GLint *yoffset = (GLint *) bp; bp += 4; - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - GLenum *format = (GLenum *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]; - weglTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*type,pixels); +case 5292: { // glEvalCoord1dv + GLdouble *u = (GLdouble *) bp; bp += 8; + weglEvalCoord1dv(u); }; break; -case 5298: { // glTranslated - GLdouble *x = (GLdouble *) bp; bp += 8; - GLdouble *y = (GLdouble *) bp; bp += 8; - GLdouble *z = (GLdouble *) bp; bp += 8; - weglTranslated(*x,*y,*z); +case 5293: { // glEvalCoord1fv + GLfloat *u = (GLfloat *) bp; bp += 4; + weglEvalCoord1fv(u); }; break; -case 5299: { // glTranslatef - GLfloat *x = (GLfloat *) bp; bp += 4; - GLfloat *y = (GLfloat *) bp; bp += 4; - GLfloat *z = (GLfloat *) bp; bp += 4; - weglTranslatef(*x,*y,*z); +case 5294: { // glEvalCoord2dv + GLdouble *u = (GLdouble *) bp; bp += 8; + weglEvalCoord2dv(u); }; break; -case 5300: { // glVertex2dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglVertex2dv(v); +case 5295: { // glEvalCoord2fv + GLfloat *u = (GLfloat *) bp; bp += 4; + weglEvalCoord2fv(u); }; break; -case 5301: { // glVertex2fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglVertex2fv(v); +case 5296: { // glMapGrid1d + GLint *un = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *u1 = (GLdouble *) bp; bp += 8; + GLdouble *u2 = (GLdouble *) bp; bp += 8; + weglMapGrid1d(*un,*u1,*u2); }; break; -case 5302: { // glVertex2iv - GLint *v = (GLint *) bp; bp += 4; - weglVertex2iv(v); +case 5297: { // glMapGrid1f + GLint *un = (GLint *) bp; bp += 4; + GLfloat *u1 = (GLfloat *) bp; bp += 4; + GLfloat *u2 = (GLfloat *) bp; bp += 4; + weglMapGrid1f(*un,*u1,*u2); }; break; -case 5303: { // glVertex2sv - GLshort *v = (GLshort *) bp; bp += 2; - weglVertex2sv(v); +case 5298: { // glMapGrid2d + GLint *un = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *u1 = (GLdouble *) bp; bp += 8; + GLdouble *u2 = (GLdouble *) bp; bp += 8; + GLint *vn = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *v1 = (GLdouble *) bp; bp += 8; + GLdouble *v2 = (GLdouble *) bp; bp += 8; + weglMapGrid2d(*un,*u1,*u2,*vn,*v1,*v2); }; break; -case 5304: { // glVertex3dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglVertex3dv(v); +case 5299: { // glMapGrid2f + GLint *un = (GLint *) bp; bp += 4; + GLfloat *u1 = (GLfloat *) bp; bp += 4; + GLfloat *u2 = (GLfloat *) bp; bp += 4; + GLint *vn = (GLint *) bp; bp += 4; + GLfloat *v1 = (GLfloat *) bp; bp += 4; + GLfloat *v2 = (GLfloat *) bp; bp += 4; + weglMapGrid2f(*un,*u1,*u2,*vn,*v1,*v2); }; break; -case 5305: { // glVertex3fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglVertex3fv(v); +case 5300: { // glEvalPoint1 + GLint *i = (GLint *) bp; bp += 4; + weglEvalPoint1(*i); }; break; -case 5306: { // glVertex3iv - GLint *v = (GLint *) bp; bp += 4; - weglVertex3iv(v); +case 5301: { // glEvalPoint2 + GLint *i = (GLint *) bp; bp += 4; + GLint *j = (GLint *) bp; bp += 4; + weglEvalPoint2(*i,*j); }; break; -case 5307: { // glVertex3sv - GLshort *v = (GLshort *) bp; bp += 2; - weglVertex3sv(v); +case 5302: { // glEvalMesh1 + GLenum *mode = (GLenum *) bp; bp += 4; + GLint *i1 = (GLint *) bp; bp += 4; + GLint *i2 = (GLint *) bp; bp += 4; + weglEvalMesh1(*mode,*i1,*i2); }; break; -case 5308: { // glVertex4dv - GLdouble *v = (GLdouble *) bp; bp += 8; - weglVertex4dv(v); +case 5303: { // glEvalMesh2 + GLenum *mode = (GLenum *) bp; bp += 4; + GLint *i1 = (GLint *) bp; bp += 4; + GLint *i2 = (GLint *) bp; bp += 4; + GLint *j1 = (GLint *) bp; bp += 4; + GLint *j2 = (GLint *) bp; bp += 4; + weglEvalMesh2(*mode,*i1,*i2,*j1,*j2); }; break; -case 5309: { // glVertex4fv - GLfloat *v = (GLfloat *) bp; bp += 4; - weglVertex4fv(v); +case 5304: { // glFogf + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglFogf(*pname,*param); }; break; -case 5310: { // glVertex4iv - GLint *v = (GLint *) bp; bp += 4; - weglVertex4iv(v); +case 5305: { // glFogi + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglFogi(*pname,*param); }; break; -case 5311: { // glVertex4sv - GLshort *v = (GLshort *) bp; bp += 2; - weglVertex4sv(v); +case 5306: { // glFogfv + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLfloat *params = (GLfloat *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4; + weglFogfv(*pname,params); }; break; -case 5312: { // glVertexPointer - GLint *size = (GLint *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglVertexPointer(*size,*type,*stride,pointer); +case 5307: { // glFogiv + GLenum *pname = (GLenum *) bp; bp += 4; + int *paramsLen = (int *) bp; bp += 4; + GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+0)%2*4; + weglFogiv(*pname,params); }; break; -case 5313: { // glVertexPointer - GLint *size = (GLint *) bp; bp += 4; +case 5308: { // glFeedbackBuffer + GLsizei *size = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]; - weglVertexPointer(*size,*type,*stride,pointer); + GLfloat *buffer = (GLfloat *) bins[0]; + weglFeedbackBuffer(*size,*type,buffer); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); }; break; -case 5314: { // glViewport - GLint *x = (GLint *) bp; bp += 4; - GLint *y = (GLint *) bp; bp += 4; - GLsizei *width = (GLsizei *) bp; bp += 4; - GLsizei *height = (GLsizei *) bp; bp += 4; - weglViewport(*x,*y,*width,*height); +case 5309: { // glPassThrough + GLfloat *token = (GLfloat *) bp; bp += 4; + weglPassThrough(*token); +}; break; +case 5310: { // glSelectBuffer + GLsizei *size = (GLsizei *) bp; bp += 4; + GLuint *buffer = (GLuint *) bins[0]; + weglSelectBuffer(*size,buffer); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5311: { // glInitNames + weglInitNames(); +}; break; +case 5312: { // glLoadName + GLuint *name = (GLuint *) bp; bp += 4; + weglLoadName(*name); +}; break; +case 5313: { // glPushName + GLuint *name = (GLuint *) bp; bp += 4; + weglPushName(*name); +}; break; +case 5314: { // glPopName + weglPopName(); }; break; case 5315: { // glBlendColor GLclampf *red = (GLclampf *) bp; bp += 4; @@ -2237,7 +2237,7 @@ case 5318: { // glDrawRangeElements case 5319: { // glTexImage3D GLenum *target = (GLenum *) bp; bp += 4; GLint *level = (GLint *) bp; bp += 4; - GLint *internalformat = (GLint *) bp; bp += 4; + GLint *internalFormat = (GLint *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; GLsizei *height = (GLsizei *) bp; bp += 4; GLsizei *depth = (GLsizei *) bp; bp += 4; @@ -2245,12 +2245,12 @@ case 5319: { // glTexImage3D GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLvoid *pixels = (GLvoid *) (ErlDrvSInt) * (int *) bp; bp += 4; - weglTexImage3D(*target,*level,*internalformat,*width,*height,*depth,*border,*format,*type,pixels); + weglTexImage3D(*target,*level,*internalFormat,*width,*height,*depth,*border,*format,*type,pixels); }; break; case 5320: { // glTexImage3D GLenum *target = (GLenum *) bp; bp += 4; GLint *level = (GLint *) bp; bp += 4; - GLint *internalformat = (GLint *) bp; bp += 4; + GLint *internalFormat = (GLint *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; GLsizei *height = (GLsizei *) bp; bp += 4; GLsizei *depth = (GLsizei *) bp; bp += 4; @@ -2258,7 +2258,7 @@ case 5320: { // glTexImage3D GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLvoid *pixels = (GLvoid *) bins[0]; - weglTexImage3D(*target,*level,*internalformat,*width,*height,*depth,*border,*format,*type,pixels); + weglTexImage3D(*target,*level,*internalFormat,*width,*height,*depth,*border,*format,*type,pixels); }; break; case 5321: { // glTexSubImage3D GLenum *target = (GLenum *) bp; bp += 4; @@ -2591,9 +2591,9 @@ case 5351: { // glGetMinmax GLboolean *reset = (GLboolean *) bp; bp += 1; bp += 3; GLenum *format = (GLenum *) bp; bp += 4; - GLenum *type = (GLenum *) bp; bp += 4; + GLenum *types = (GLenum *) bp; bp += 4; GLvoid *values = (GLvoid *) bins[0]; - weglGetMinmax(*target,*reset,*format,*type,values); + weglGetMinmax(*target,*reset,*format,*types,values); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); @@ -2797,9 +2797,9 @@ case 5371: { // glCompressedTexSubImage1D }; break; case 5372: { // glGetCompressedTexImage GLenum *target = (GLenum *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; + GLint *lod = (GLint *) bp; bp += 4; GLvoid *img = (GLvoid *) bins[0]; - weglGetCompressedTexImage(*target,*level,img); + weglGetCompressedTexImage(*target,*lod,img); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); @@ -6927,31 +6927,129 @@ case 5856: { // glGetGraphicsResetStatusARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5857: { // glResizeBuffersMESA - weglResizeBuffersMESA(); +case 5857: { // glDrawArraysInstancedBaseInstance + GLenum *mode = (GLenum *) bp; bp += 4; + GLint *first = (GLint *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + GLuint *baseinstance = (GLuint *) bp; bp += 4; + weglDrawArraysInstancedBaseInstance(*mode,*first,*count,*primcount,*baseinstance); }; break; -case 5858: { // glWindowPos4dvMESA - GLdouble *v = (GLdouble *) bp; bp += 8; - weglWindowPos4dvMESA(v); +case 5858: { // glDrawElementsInstancedBaseInstance + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + void *indices = (void *) (ErlDrvSInt) * (int *) bp; bp += 4; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + GLuint *baseinstance = (GLuint *) bp; bp += 4; + weglDrawElementsInstancedBaseInstance(*mode,*count,*type,indices,*primcount,*baseinstance); }; break; -case 5859: { // glWindowPos4fvMESA - GLfloat *v = (GLfloat *) bp; bp += 4; - weglWindowPos4fvMESA(v); +case 5859: { // glDrawElementsInstancedBaseInstance + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + void *indices = (void *) bins[0]; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + GLuint *baseinstance = (GLuint *) bp; bp += 4; + weglDrawElementsInstancedBaseInstance(*mode,*count,*type,indices,*primcount,*baseinstance); }; break; -case 5860: { // glWindowPos4ivMESA - GLint *v = (GLint *) bp; bp += 4; - weglWindowPos4ivMESA(v); +case 5860: { // glDrawElementsInstancedBaseVertexBaseInstance + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + void *indices = (void *) (ErlDrvSInt) * (int *) bp; bp += 4; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + GLuint *baseinstance = (GLuint *) bp; bp += 4; + weglDrawElementsInstancedBaseVertexBaseInstance(*mode,*count,*type,indices,*primcount,*basevertex,*baseinstance); }; break; -case 5861: { // glWindowPos4svMESA - GLshort *v = (GLshort *) bp; bp += 2; - weglWindowPos4svMESA(v); +case 5861: { // glDrawElementsInstancedBaseVertexBaseInstance + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + void *indices = (void *) bins[0]; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + GLuint *baseinstance = (GLuint *) bp; bp += 4; + weglDrawElementsInstancedBaseVertexBaseInstance(*mode,*count,*type,indices,*primcount,*basevertex,*baseinstance); +}; break; +case 5862: { // glDrawTransformFeedbackInstanced + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + weglDrawTransformFeedbackInstanced(*mode,*id,*primcount); +}; break; +case 5863: { // glDrawTransformFeedbackStreamInstanced + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + GLuint *stream = (GLuint *) bp; bp += 4; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + weglDrawTransformFeedbackStreamInstanced(*mode,*id,*stream,*primcount); +}; break; +case 5864: { // glGetInternalformativ + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *internalformat = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLsizei *bufSize = (GLsizei *) bp; bp += 4; + GLint *params; + params = (GLint *) driver_alloc(sizeof(GLint) * *bufSize); + weglGetInternalformativ(*target,*internalformat,*pname,*bufSize,params); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*bufSize)*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + for(int i=0; i < *bufSize; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) params[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*bufSize)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(params); +}; break; +case 5865: { // glBindImageTexture + GLuint *unit = (GLuint *) bp; bp += 4; + GLuint *texture = (GLuint *) bp; bp += 4; + GLint *level = (GLint *) bp; bp += 4; + GLboolean *layered = (GLboolean *) bp; bp += 1; + bp += 3; + GLint *layer = (GLint *) bp; bp += 4; + GLenum *access = (GLenum *) bp; bp += 4; + GLenum *format = (GLenum *) bp; bp += 4; + weglBindImageTexture(*unit,*texture,*level,*layered,*layer,*access,*format); +}; break; +case 5866: { // glMemoryBarrier + GLbitfield *barriers = (GLbitfield *) bp; bp += 4; + weglMemoryBarrier(*barriers); +}; break; +case 5867: { // glTexStorage1D + GLenum *target = (GLenum *) bp; bp += 4; + GLsizei *levels = (GLsizei *) bp; bp += 4; + GLenum *internalformat = (GLenum *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + weglTexStorage1D(*target,*levels,*internalformat,*width); +}; break; +case 5868: { // glTexStorage2D + GLenum *target = (GLenum *) bp; bp += 4; + GLsizei *levels = (GLsizei *) bp; bp += 4; + GLenum *internalformat = (GLenum *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + weglTexStorage2D(*target,*levels,*internalformat,*width,*height); +}; break; +case 5869: { // glTexStorage3D + GLenum *target = (GLenum *) bp; bp += 4; + GLsizei *levels = (GLsizei *) bp; bp += 4; + GLenum *internalformat = (GLenum *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLsizei *depth = (GLsizei *) bp; bp += 4; + weglTexStorage3D(*target,*levels,*internalformat,*width,*height,*depth); }; break; -case 5862: { // glDepthBoundsEXT +case 5870: { // glDepthBoundsEXT GLclampd *zmin = (GLclampd *) bp; bp += 8; GLclampd *zmax = (GLclampd *) bp; bp += 8; weglDepthBoundsEXT(*zmin,*zmax); }; break; -case 5863: { // glStencilClearTagEXT +case 5871: { // glStencilClearTagEXT GLsizei *stencilTagBits = (GLsizei *) bp; bp += 4; GLuint *stencilClearTag = (GLuint *) bp; bp += 4; weglStencilClearTagEXT(*stencilTagBits,*stencilClearTag); diff --git a/lib/wx/c_src/gen/glu_finit.h b/lib/wx/c_src/gen/glu_finit.h index 63e9c2fc78..0e55d48a2a 100644 --- a/lib/wx/c_src/gen/glu_finit.h +++ b/lib/wx/c_src/gen/glu_finit.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2010. All Rights Reserved. + * Copyright Ericsson AB 2008-2012. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/wx/include/gl.hrl b/lib/wx/include/gl.hrl index 54eb551285..c643ae0962 100644 --- a/lib/wx/include/gl.hrl +++ b/lib/wx/include/gl.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2011. All Rights Reserved. +%% Copyright Ericsson AB 2008-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -445,6 +445,8 @@ -define(GL_TEXTURE_ENV_COLOR, 16#2201). -define(GL_TEXTURE_GEN_S, 16#C60). -define(GL_TEXTURE_GEN_T, 16#C61). +-define(GL_TEXTURE_GEN_R, 16#C62). +-define(GL_TEXTURE_GEN_Q, 16#C63). -define(GL_TEXTURE_GEN_MODE, 16#2500). -define(GL_TEXTURE_BORDER_COLOR, 16#1004). -define(GL_TEXTURE_WIDTH, 16#1000). @@ -475,8 +477,6 @@ -define(GL_T, 16#2001). -define(GL_R, 16#2002). -define(GL_Q, 16#2003). --define(GL_TEXTURE_GEN_R, 16#C62). --define(GL_TEXTURE_GEN_Q, 16#C63). -define(GL_VENDOR, 16#1F00). -define(GL_RENDERER, 16#1F01). -define(GL_VERSION, 16#1F02). @@ -828,7 +828,7 @@ -define(GL_ATI_blend_equation_separate, 1). -define(GL_ALPHA_BLEND_EQUATION_ATI, 16#883D). -define(GL_OES_EGL_image, 1). --define(GL_GLEXT_VERSION, 66). +-define(GL_GLEXT_VERSION, 75). -define(GL_BLEND_DST_RGB, 16#80C8). -define(GL_BLEND_SRC_RGB, 16#80C9). -define(GL_BLEND_DST_ALPHA, 16#80CA). @@ -1039,8 +1039,6 @@ -define(GL_MINOR_VERSION, 16#821C). -define(GL_NUM_EXTENSIONS, 16#821D). -define(GL_CONTEXT_FLAGS, 16#821E). --define(GL_DEPTH_BUFFER, 16#8223). --define(GL_STENCIL_BUFFER, 16#8224). -define(GL_COMPRESSED_RED, 16#8225). -define(GL_COMPRESSED_RG, 16#8226). -define(GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT, 16#1). @@ -1932,6 +1930,110 @@ -define(GL_UNKNOWN_CONTEXT_RESET_ARB, 16#8255). -define(GL_RESET_NOTIFICATION_STRATEGY_ARB, 16#8256). -define(GL_NO_RESET_NOTIFICATION_ARB, 16#8261). +-define(GL_UNPACK_COMPRESSED_BLOCK_WIDTH, 16#9127). +-define(GL_UNPACK_COMPRESSED_BLOCK_HEIGHT, 16#9128). +-define(GL_UNPACK_COMPRESSED_BLOCK_DEPTH, 16#9129). +-define(GL_UNPACK_COMPRESSED_BLOCK_SIZE, 16#912A). +-define(GL_PACK_COMPRESSED_BLOCK_WIDTH, 16#912B). +-define(GL_PACK_COMPRESSED_BLOCK_HEIGHT, 16#912C). +-define(GL_PACK_COMPRESSED_BLOCK_DEPTH, 16#912D). +-define(GL_PACK_COMPRESSED_BLOCK_SIZE, 16#912E). +-define(GL_NUM_SAMPLE_COUNTS, 16#9380). +-define(GL_MIN_MAP_BUFFER_ALIGNMENT, 16#90BC). +-define(GL_ATOMIC_COUNTER_BUFFER, 16#92C0). +-define(GL_ATOMIC_COUNTER_BUFFER_BINDING, 16#92C1). +-define(GL_ATOMIC_COUNTER_BUFFER_START, 16#92C2). +-define(GL_ATOMIC_COUNTER_BUFFER_SIZE, 16#92C3). +-define(GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE, 16#92C4). +-define(GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS, 16#92C5). +-define(GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES, 16#92C6). +-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER, 16#92C7). +-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER, 16#92C8). +-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER, 16#92C9). +-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER, 16#92CA). +-define(GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER, 16#92CB). +-define(GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS, 16#92CC). +-define(GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS, 16#92CD). +-define(GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS, 16#92CE). +-define(GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS, 16#92CF). +-define(GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS, 16#92D0). +-define(GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS, 16#92D1). +-define(GL_MAX_VERTEX_ATOMIC_COUNTERS, 16#92D2). +-define(GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS, 16#92D3). +-define(GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS, 16#92D4). +-define(GL_MAX_GEOMETRY_ATOMIC_COUNTERS, 16#92D5). +-define(GL_MAX_FRAGMENT_ATOMIC_COUNTERS, 16#92D6). +-define(GL_MAX_COMBINED_ATOMIC_COUNTERS, 16#92D7). +-define(GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE, 16#92D8). +-define(GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS, 16#92DC). +-define(GL_ACTIVE_ATOMIC_COUNTER_BUFFERS, 16#92D9). +-define(GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX, 16#92DA). +-define(GL_UNSIGNED_INT_ATOMIC_COUNTER, 16#92DB). +-define(GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT, 16#1). +-define(GL_ELEMENT_ARRAY_BARRIER_BIT, 16#2). +-define(GL_UNIFORM_BARRIER_BIT, 16#4). +-define(GL_TEXTURE_FETCH_BARRIER_BIT, 16#8). +-define(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT, 16#20). +-define(GL_COMMAND_BARRIER_BIT, 16#40). +-define(GL_PIXEL_BUFFER_BARRIER_BIT, 16#80). +-define(GL_TEXTURE_UPDATE_BARRIER_BIT, 16#100). +-define(GL_BUFFER_UPDATE_BARRIER_BIT, 16#200). +-define(GL_FRAMEBUFFER_BARRIER_BIT, 16#400). +-define(GL_TRANSFORM_FEEDBACK_BARRIER_BIT, 16#800). +-define(GL_ATOMIC_COUNTER_BARRIER_BIT, 16#1000). +-define(GL_ALL_BARRIER_BITS, 16#FFFFFFFF). +-define(GL_MAX_IMAGE_UNITS, 16#8F38). +-define(GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS, 16#8F39). +-define(GL_IMAGE_BINDING_NAME, 16#8F3A). +-define(GL_IMAGE_BINDING_LEVEL, 16#8F3B). +-define(GL_IMAGE_BINDING_LAYERED, 16#8F3C). +-define(GL_IMAGE_BINDING_LAYER, 16#8F3D). +-define(GL_IMAGE_BINDING_ACCESS, 16#8F3E). +-define(GL_IMAGE_1D, 16#904C). +-define(GL_IMAGE_2D, 16#904D). +-define(GL_IMAGE_3D, 16#904E). +-define(GL_IMAGE_2D_RECT, 16#904F). +-define(GL_IMAGE_CUBE, 16#9050). +-define(GL_IMAGE_BUFFER, 16#9051). +-define(GL_IMAGE_1D_ARRAY, 16#9052). +-define(GL_IMAGE_2D_ARRAY, 16#9053). +-define(GL_IMAGE_CUBE_MAP_ARRAY, 16#9054). +-define(GL_IMAGE_2D_MULTISAMPLE, 16#9055). +-define(GL_IMAGE_2D_MULTISAMPLE_ARRAY, 16#9056). +-define(GL_INT_IMAGE_1D, 16#9057). +-define(GL_INT_IMAGE_2D, 16#9058). +-define(GL_INT_IMAGE_3D, 16#9059). +-define(GL_INT_IMAGE_2D_RECT, 16#905A). +-define(GL_INT_IMAGE_CUBE, 16#905B). +-define(GL_INT_IMAGE_BUFFER, 16#905C). +-define(GL_INT_IMAGE_1D_ARRAY, 16#905D). +-define(GL_INT_IMAGE_2D_ARRAY, 16#905E). +-define(GL_INT_IMAGE_CUBE_MAP_ARRAY, 16#905F). +-define(GL_INT_IMAGE_2D_MULTISAMPLE, 16#9060). +-define(GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY, 16#9061). +-define(GL_UNSIGNED_INT_IMAGE_1D, 16#9062). +-define(GL_UNSIGNED_INT_IMAGE_2D, 16#9063). +-define(GL_UNSIGNED_INT_IMAGE_3D, 16#9064). +-define(GL_UNSIGNED_INT_IMAGE_2D_RECT, 16#9065). +-define(GL_UNSIGNED_INT_IMAGE_CUBE, 16#9066). +-define(GL_UNSIGNED_INT_IMAGE_BUFFER, 16#9067). +-define(GL_UNSIGNED_INT_IMAGE_1D_ARRAY, 16#9068). +-define(GL_UNSIGNED_INT_IMAGE_2D_ARRAY, 16#9069). +-define(GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY, 16#906A). +-define(GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE, 16#906B). +-define(GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY, 16#906C). +-define(GL_MAX_IMAGE_SAMPLES, 16#906D). +-define(GL_IMAGE_BINDING_FORMAT, 16#906E). +-define(GL_IMAGE_FORMAT_COMPATIBILITY_TYPE, 16#90C7). +-define(GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE, 16#90C8). +-define(GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS, 16#90C9). +-define(GL_MAX_VERTEX_IMAGE_UNIFORMS, 16#90CA). +-define(GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS, 16#90CB). +-define(GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS, 16#90CC). +-define(GL_MAX_GEOMETRY_IMAGE_UNIFORMS, 16#90CD). +-define(GL_MAX_FRAGMENT_IMAGE_UNIFORMS, 16#90CE). +-define(GL_MAX_COMBINED_IMAGE_UNIFORMS, 16#90CF). +-define(GL_TEXTURE_IMMUTABLE_FORMAT, 16#912F). -define(GL_ABGR_EXT, 16#8000). -define(GL_CONSTANT_COLOR_EXT, 16#8001). -define(GL_ONE_MINUS_CONSTANT_COLOR_EXT, 16#8002). @@ -3882,3 +3984,432 @@ -define(GL_WRITE_DISCARD_NV, 16#88BE). -define(GL_DEPTH_CLAMP_NEAR_AMD, 16#901E). -define(GL_DEPTH_CLAMP_FAR_AMD, 16#901F). +-define(GL_TEXTURE_SRGB_DECODE_EXT, 16#8A48). +-define(GL_DECODE_EXT, 16#8A49). +-define(GL_SKIP_DECODE_EXT, 16#8A4A). +-define(GL_TEXTURE_COVERAGE_SAMPLES_NV, 16#9045). +-define(GL_TEXTURE_COLOR_SAMPLES_NV, 16#9046). +-define(GL_FACTOR_MIN_AMD, 16#901C). +-define(GL_FACTOR_MAX_AMD, 16#901D). +-define(GL_SUBSAMPLE_DISTANCE_AMD, 16#883F). +-define(GL_SYNC_X11_FENCE_EXT, 16#90E1). +-define(GL_SCALED_RESOLVE_FASTEST_EXT, 16#90BA). +-define(GL_SCALED_RESOLVE_NICEST_EXT, 16#90BB). +-define(GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD, 16#9160). +-define(GL_SET_AMD, 16#874A). +-define(GL_REPLACE_VALUE_AMD, 16#874B). +-define(GL_STENCIL_OP_VALUE_AMD, 16#874C). +-define(GL_STENCIL_BACK_OP_VALUE_AMD, 16#874D). +-define(GL_VERSION_1_2_DEPRECATED, 1). +-define(GL_VERSION_1_3_DEPRECATED, 1). +-define(GL_VERSION_1_4, 1). +-define(GL_VERSION_1_4_DEPRECATED, 1). +-define(GL_VERSION_1_5, 1). +-define(GL_VERSION_2_0, 1). +-define(GL_VERSION_2_1, 1). +-define(GL_VERSION_3_0, 1). +-define(GL_VERSION_3_1, 1). +-define(GL_VERSION_3_2, 1). +-define(GL_VERSION_3_3, 1). +-define(GL_VERSION_4_0, 1). +-define(GL_VERSION_4_1, 1). +-define(GL_VERSION_4_2, 1). +-define(GL_ARB_transpose_matrix, 1). +-define(GL_ARB_multisample, 1). +-define(GL_ARB_texture_env_add, 1). +-define(GL_ARB_texture_cube_map, 1). +-define(GL_ARB_texture_compression, 1). +-define(GL_ARB_texture_border_clamp, 1). +-define(GL_ARB_point_parameters, 1). +-define(GL_ARB_vertex_blend, 1). +-define(GL_ARB_matrix_palette, 1). +-define(GL_ARB_texture_env_combine, 1). +-define(GL_ARB_texture_env_crossbar, 1). +-define(GL_ARB_texture_env_dot3, 1). +-define(GL_ARB_texture_mirrored_repeat, 1). +-define(GL_ARB_depth_texture, 1). +-define(GL_ARB_shadow, 1). +-define(GL_ARB_shadow_ambient, 1). +-define(GL_ARB_window_pos, 1). +-define(GL_ARB_vertex_program, 1). +-define(GL_ARB_fragment_program, 1). +-define(GL_ARB_vertex_buffer_object, 1). +-define(GL_ARB_occlusion_query, 1). +-define(GL_ARB_shader_objects, 1). +-define(GL_ARB_vertex_shader, 1). +-define(GL_ARB_fragment_shader, 1). +-define(GL_ARB_shading_language_100, 1). +-define(GL_ARB_texture_non_power_of_two, 1). +-define(GL_ARB_point_sprite, 1). +-define(GL_ARB_fragment_program_shadow, 1). +-define(GL_ARB_draw_buffers, 1). +-define(GL_ARB_texture_rectangle, 1). +-define(GL_ARB_color_buffer_float, 1). +-define(GL_ARB_half_float_pixel, 1). +-define(GL_ARB_texture_float, 1). +-define(GL_ARB_pixel_buffer_object, 1). +-define(GL_ARB_depth_buffer_float, 1). +-define(GL_ARB_draw_instanced, 1). +-define(GL_ARB_framebuffer_object, 1). +-define(GL_ARB_framebuffer_sRGB, 1). +-define(GL_ARB_geometry_shader4, 1). +-define(GL_ARB_half_float_vertex, 1). +-define(GL_ARB_instanced_arrays, 1). +-define(GL_ARB_map_buffer_range, 1). +-define(GL_ARB_texture_buffer_object, 1). +-define(GL_ARB_texture_compression_rgtc, 1). +-define(GL_ARB_texture_rg, 1). +-define(GL_ARB_vertex_array_object, 1). +-define(GL_ARB_uniform_buffer_object, 1). +-define(GL_ARB_compatibility, 1). +-define(GL_ARB_copy_buffer, 1). +-define(GL_ARB_shader_texture_lod, 1). +-define(GL_ARB_depth_clamp, 1). +-define(GL_ARB_draw_elements_base_vertex, 1). +-define(GL_ARB_fragment_coord_conventions, 1). +-define(GL_ARB_provoking_vertex, 1). +-define(GL_ARB_seamless_cube_map, 1). +-define(GL_ARB_sync, 1). +-define(GL_ARB_texture_multisample, 1). +-define(GL_ARB_vertex_array_bgra, 1). +-define(GL_ARB_draw_buffers_blend, 1). +-define(GL_ARB_sample_shading, 1). +-define(GL_ARB_texture_cube_map_array, 1). +-define(GL_ARB_texture_gather, 1). +-define(GL_ARB_texture_query_lod, 1). +-define(GL_ARB_shading_language_include, 1). +-define(GL_ARB_texture_compression_bptc, 1). +-define(GL_ARB_blend_func_extended, 1). +-define(GL_ARB_explicit_attrib_location, 1). +-define(GL_ARB_occlusion_query2, 1). +-define(GL_ARB_sampler_objects, 1). +-define(GL_ARB_shader_bit_encoding, 1). +-define(GL_ARB_texture_rgb10_a2ui, 1). +-define(GL_ARB_texture_swizzle, 1). +-define(GL_ARB_timer_query, 1). +-define(GL_ARB_vertex_type_2_10_10_10_rev, 1). +-define(GL_ARB_draw_indirect, 1). +-define(GL_ARB_gpu_shader5, 1). +-define(GL_ARB_gpu_shader_fp64, 1). +-define(GL_ARB_shader_subroutine, 1). +-define(GL_ARB_tessellation_shader, 1). +-define(GL_ARB_texture_buffer_object_rgb32, 1). +-define(GL_ARB_transform_feedback2, 1). +-define(GL_ARB_transform_feedback3, 1). +-define(GL_ARB_ES2_compatibility, 1). +-define(GL_ARB_get_program_binary, 1). +-define(GL_ARB_separate_shader_objects, 1). +-define(GL_ARB_vertex_attrib_64bit, 1). +-define(GL_ARB_viewport_array, 1). +-define(GL_ARB_cl_event, 1). +-define(GL_ARB_debug_output, 1). +-define(GL_ARB_robustness, 1). +-define(GL_ARB_shader_stencil_export, 1). +-define(GL_ARB_base_instance, 1). +-define(GL_ARB_shading_language_420pack, 1). +-define(GL_ARB_transform_feedback_instanced, 1). +-define(GL_ARB_compressed_texture_pixel_storage, 1). +-define(GL_ARB_conservative_depth, 1). +-define(GL_ARB_internalformat_query, 1). +-define(GL_ARB_map_buffer_alignment, 1). +-define(GL_ARB_shader_atomic_counters, 1). +-define(GL_ARB_shader_image_load_store, 1). +-define(GL_ARB_shading_language_packing, 1). +-define(GL_ARB_texture_storage, 1). +-define(GL_EXT_abgr, 1). +-define(GL_EXT_blend_color, 1). +-define(GL_EXT_polygon_offset, 1). +-define(GL_EXT_texture, 1). +-define(GL_EXT_texture3D, 1). +-define(GL_SGIS_texture_filter4, 1). +-define(GL_EXT_subtexture, 1). +-define(GL_EXT_copy_texture, 1). +-define(GL_EXT_histogram, 1). +-define(GL_EXT_convolution, 1). +-define(GL_SGI_color_matrix, 1). +-define(GL_SGI_color_table, 1). +-define(GL_SGIX_pixel_texture, 1). +-define(GL_SGIS_pixel_texture, 1). +-define(GL_SGIS_texture4D, 1). +-define(GL_SGI_texture_color_table, 1). +-define(GL_EXT_cmyka, 1). +-define(GL_EXT_texture_object, 1). +-define(GL_SGIS_detail_texture, 1). +-define(GL_SGIS_sharpen_texture, 1). +-define(GL_EXT_packed_pixels, 1). +-define(GL_SGIS_texture_lod, 1). +-define(GL_SGIS_multisample, 1). +-define(GL_EXT_rescale_normal, 1). +-define(GL_EXT_vertex_array, 1). +-define(GL_EXT_misc_attribute, 1). +-define(GL_SGIS_generate_mipmap, 1). +-define(GL_SGIX_clipmap, 1). +-define(GL_SGIX_shadow, 1). +-define(GL_SGIS_texture_edge_clamp, 1). +-define(GL_SGIS_texture_border_clamp, 1). +-define(GL_EXT_blend_minmax, 1). +-define(GL_EXT_blend_subtract, 1). +-define(GL_EXT_blend_logic_op, 1). +-define(GL_SGIX_interlace, 1). +-define(GL_SGIX_pixel_tiles, 1). +-define(GL_SGIX_texture_select, 1). +-define(GL_SGIX_sprite, 1). +-define(GL_SGIX_texture_multi_buffer, 1). +-define(GL_EXT_point_parameters, 1). +-define(GL_SGIS_point_parameters, 1). +-define(GL_SGIX_instruments, 1). +-define(GL_SGIX_texture_scale_bias, 1). +-define(GL_SGIX_framezoom, 1). +-define(GL_SGIX_tag_sample_buffer, 1). +-define(GL_SGIX_polynomial_ffd, 1). +-define(GL_SGIX_reference_plane, 1). +-define(GL_SGIX_flush_raster, 1). +-define(GL_SGIX_depth_texture, 1). +-define(GL_SGIS_fog_function, 1). +-define(GL_SGIX_fog_offset, 1). +-define(GL_HP_image_transform, 1). +-define(GL_HP_convolution_border_modes, 1). +-define(GL_SGIX_texture_add_env, 1). +-define(GL_EXT_color_subtable, 1). +-define(GL_PGI_vertex_hints, 1). +-define(GL_PGI_misc_hints, 1). +-define(GL_EXT_paletted_texture, 1). +-define(GL_EXT_clip_volume_hint, 1). +-define(GL_SGIX_list_priority, 1). +-define(GL_SGIX_ir_instrument1, 1). +-define(GL_SGIX_calligraphic_fragment, 1). +-define(GL_SGIX_texture_lod_bias, 1). +-define(GL_SGIX_shadow_ambient, 1). +-define(GL_EXT_index_texture, 1). +-define(GL_EXT_index_material, 1). +-define(GL_EXT_index_func, 1). +-define(GL_EXT_index_array_formats, 1). +-define(GL_EXT_compiled_vertex_array, 1). +-define(GL_EXT_cull_vertex, 1). +-define(GL_SGIX_ycrcb, 1). +-define(GL_SGIX_fragment_lighting, 1). +-define(GL_IBM_rasterpos_clip, 1). +-define(GL_HP_texture_lighting, 1). +-define(GL_EXT_draw_range_elements, 1). +-define(GL_WIN_phong_shading, 1). +-define(GL_WIN_specular_fog, 1). +-define(GL_EXT_light_texture, 1). +-define(GL_SGIX_blend_alpha_minmax, 1). +-define(GL_EXT_bgra, 1). +-define(GL_SGIX_async, 1). +-define(GL_SGIX_async_pixel, 1). +-define(GL_SGIX_async_histogram, 1). +-define(GL_INTEL_parallel_arrays, 1). +-define(GL_HP_occlusion_test, 1). +-define(GL_EXT_pixel_transform, 1). +-define(GL_EXT_pixel_transform_color_table, 1). +-define(GL_EXT_shared_texture_palette, 1). +-define(GL_EXT_separate_specular_color, 1). +-define(GL_EXT_secondary_color, 1). +-define(GL_EXT_texture_perturb_normal, 1). +-define(GL_EXT_multi_draw_arrays, 1). +-define(GL_EXT_fog_coord, 1). +-define(GL_REND_screen_coordinates, 1). +-define(GL_EXT_coordinate_frame, 1). +-define(GL_EXT_texture_env_combine, 1). +-define(GL_APPLE_specular_vector, 1). +-define(GL_APPLE_transform_hint, 1). +-define(GL_SGIX_fog_scale, 1). +-define(GL_SUNX_constant_data, 1). +-define(GL_SUN_global_alpha, 1). +-define(GL_SUN_triangle_list, 1). +-define(GL_SUN_vertex, 1). +-define(GL_EXT_blend_func_separate, 1). +-define(GL_INGR_blend_func_separate, 1). +-define(GL_INGR_color_clamp, 1). +-define(GL_INGR_interlace_read, 1). +-define(GL_EXT_stencil_wrap, 1). +-define(GL_EXT_422_pixels, 1). +-define(GL_NV_texgen_reflection, 1). +-define(GL_SUN_convolution_border_modes, 1). +-define(GL_EXT_texture_env_add, 1). +-define(GL_EXT_texture_lod_bias, 1). +-define(GL_EXT_texture_filter_anisotropic, 1). +-define(GL_EXT_vertex_weighting, 1). +-define(GL_NV_light_max_exponent, 1). +-define(GL_NV_vertex_array_range, 1). +-define(GL_NV_register_combiners, 1). +-define(GL_NV_fog_distance, 1). +-define(GL_NV_texgen_emboss, 1). +-define(GL_NV_blend_square, 1). +-define(GL_NV_texture_env_combine4, 1). +-define(GL_MESA_resize_buffers, 1). +-define(GL_MESA_window_pos, 1). +-define(GL_IBM_cull_vertex, 1). +-define(GL_IBM_multimode_draw_arrays, 1). +-define(GL_IBM_vertex_array_lists, 1). +-define(GL_SGIX_subsample, 1). +-define(GL_SGIX_ycrcba, 1). +-define(GL_SGIX_ycrcb_subsample, 1). +-define(GL_SGIX_depth_pass_instrument, 1). +-define(GL_3DFX_texture_compression_FXT1, 1). +-define(GL_3DFX_multisample, 1). +-define(GL_3DFX_tbuffer, 1). +-define(GL_EXT_multisample, 1). +-define(GL_SGIX_vertex_preclip, 1). +-define(GL_SGIX_convolution_accuracy, 1). +-define(GL_SGIX_resample, 1). +-define(GL_SGIS_point_line_texgen, 1). +-define(GL_SGIS_texture_color_mask, 1). +-define(GL_SGIX_igloo_interface, 1). +-define(GL_EXT_texture_env_dot3, 1). +-define(GL_ATI_texture_mirror_once, 1). +-define(GL_NV_fence, 1). +-define(GL_NV_evaluators, 1). +-define(GL_NV_packed_depth_stencil, 1). +-define(GL_NV_register_combiners2, 1). +-define(GL_NV_texture_compression_vtc, 1). +-define(GL_NV_texture_rectangle, 1). +-define(GL_NV_texture_shader, 1). +-define(GL_NV_texture_shader2, 1). +-define(GL_NV_vertex_array_range2, 1). +-define(GL_NV_vertex_program, 1). +-define(GL_SGIX_texture_coordinate_clamp, 1). +-define(GL_SGIX_scalebias_hint, 1). +-define(GL_OML_interlace, 1). +-define(GL_OML_subsample, 1). +-define(GL_OML_resample, 1). +-define(GL_NV_copy_depth_to_color, 1). +-define(GL_ATI_envmap_bumpmap, 1). +-define(GL_ATI_fragment_shader, 1). +-define(GL_ATI_pn_triangles, 1). +-define(GL_ATI_vertex_array_object, 1). +-define(GL_EXT_vertex_shader, 1). +-define(GL_ATI_vertex_streams, 1). +-define(GL_ATI_element_array, 1). +-define(GL_SUN_mesh_array, 1). +-define(GL_SUN_slice_accum, 1). +-define(GL_NV_multisample_filter_hint, 1). +-define(GL_NV_depth_clamp, 1). +-define(GL_NV_occlusion_query, 1). +-define(GL_NV_point_sprite, 1). +-define(GL_NV_texture_shader3, 1). +-define(GL_NV_vertex_program1_1, 1). +-define(GL_EXT_shadow_funcs, 1). +-define(GL_EXT_stencil_two_side, 1). +-define(GL_ATI_text_fragment_shader, 1). +-define(GL_APPLE_client_storage, 1). +-define(GL_APPLE_element_array, 1). +-define(GL_APPLE_fence, 1). +-define(GL_APPLE_vertex_array_object, 1). +-define(GL_APPLE_vertex_array_range, 1). +-define(GL_APPLE_ycbcr_422, 1). +-define(GL_S3_s3tc, 1). +-define(GL_ATI_draw_buffers, 1). +-define(GL_ATI_pixel_format_float, 1). +-define(GL_ATI_texture_env_combine3, 1). +-define(GL_ATI_texture_float, 1). +-define(GL_NV_float_buffer, 1). +-define(GL_NV_fragment_program, 1). +-define(GL_NV_half_float, 1). +-define(GL_NV_pixel_data_range, 1). +-define(GL_NV_primitive_restart, 1). +-define(GL_NV_texture_expand_normal, 1). +-define(GL_NV_vertex_program2, 1). +-define(GL_ATI_map_object_buffer, 1). +-define(GL_ATI_separate_stencil, 1). +-define(GL_ATI_vertex_attrib_array_object, 1). +-define(GL_OES_read_format, 1). +-define(GL_EXT_depth_bounds_test, 1). +-define(GL_EXT_texture_mirror_clamp, 1). +-define(GL_EXT_blend_equation_separate, 1). +-define(GL_MESA_pack_invert, 1). +-define(GL_MESA_ycbcr_texture, 1). +-define(GL_EXT_pixel_buffer_object, 1). +-define(GL_NV_fragment_program_option, 1). +-define(GL_NV_fragment_program2, 1). +-define(GL_NV_vertex_program2_option, 1). +-define(GL_NV_vertex_program3, 1). +-define(GL_EXT_framebuffer_object, 1). +-define(GL_GREMEDY_string_marker, 1). +-define(GL_EXT_packed_depth_stencil, 1). +-define(GL_EXT_stencil_clear_tag, 1). +-define(GL_EXT_texture_sRGB, 1). +-define(GL_EXT_framebuffer_blit, 1). +-define(GL_EXT_framebuffer_multisample, 1). +-define(GL_MESAX_texture_stack, 1). +-define(GL_EXT_timer_query, 1). +-define(GL_EXT_gpu_program_parameters, 1). +-define(GL_APPLE_flush_buffer_range, 1). +-define(GL_NV_gpu_program4, 1). +-define(GL_NV_geometry_program4, 1). +-define(GL_EXT_geometry_shader4, 1). +-define(GL_NV_vertex_program4, 1). +-define(GL_EXT_gpu_shader4, 1). +-define(GL_EXT_draw_instanced, 1). +-define(GL_EXT_packed_float, 1). +-define(GL_EXT_texture_array, 1). +-define(GL_EXT_texture_buffer_object, 1). +-define(GL_EXT_texture_compression_latc, 1). +-define(GL_EXT_texture_compression_rgtc, 1). +-define(GL_EXT_texture_shared_exponent, 1). +-define(GL_NV_depth_buffer_float, 1). +-define(GL_NV_fragment_program4, 1). +-define(GL_NV_framebuffer_multisample_coverage, 1). +-define(GL_EXT_framebuffer_sRGB, 1). +-define(GL_NV_geometry_shader4, 1). +-define(GL_NV_parameter_buffer_object, 1). +-define(GL_EXT_draw_buffers2, 1). +-define(GL_NV_transform_feedback, 1). +-define(GL_EXT_bindable_uniform, 1). +-define(GL_EXT_texture_integer, 1). +-define(GL_GREMEDY_frame_terminator, 1). +-define(GL_NV_conditional_render, 1). +-define(GL_NV_present_video, 1). +-define(GL_EXT_transform_feedback, 1). +-define(GL_EXT_direct_state_access, 1). +-define(GL_EXT_vertex_array_bgra, 1). +-define(GL_EXT_texture_swizzle, 1). +-define(GL_NV_explicit_multisample, 1). +-define(GL_NV_transform_feedback2, 1). +-define(GL_ATI_meminfo, 1). +-define(GL_AMD_performance_monitor, 1). +-define(GL_AMD_texture_texture4, 1). +-define(GL_AMD_vertex_shader_tesselator, 1). +-define(GL_EXT_provoking_vertex, 1). +-define(GL_EXT_texture_snorm, 1). +-define(GL_AMD_draw_buffers_blend, 1). +-define(GL_APPLE_texture_range, 1). +-define(GL_APPLE_float_pixels, 1). +-define(GL_APPLE_vertex_program_evaluators, 1). +-define(GL_APPLE_aux_depth_stencil, 1). +-define(GL_APPLE_object_purgeable, 1). +-define(GL_APPLE_row_bytes, 1). +-define(GL_APPLE_rgb_422, 1). +-define(GL_NV_video_capture, 1). +-define(GL_NV_copy_image, 1). +-define(GL_EXT_separate_shader_objects, 1). +-define(GL_NV_parameter_buffer_object2, 1). +-define(GL_NV_shader_buffer_load, 1). +-define(GL_NV_vertex_buffer_unified_memory, 1). +-define(GL_NV_texture_barrier, 1). +-define(GL_AMD_shader_stencil_export, 1). +-define(GL_AMD_seamless_cubemap_per_texture, 1). +-define(GL_AMD_conservative_depth, 1). +-define(GL_EXT_shader_image_load_store, 1). +-define(GL_EXT_vertex_attrib_64bit, 1). +-define(GL_NV_gpu_program5, 1). +-define(GL_NV_gpu_shader5, 1). +-define(GL_NV_shader_buffer_store, 1). +-define(GL_NV_tessellation_program5, 1). +-define(GL_NV_vertex_attrib_integer_64bit, 1). +-define(GL_NV_multisample_coverage, 1). +-define(GL_AMD_name_gen_delete, 1). +-define(GL_AMD_debug_output, 1). +-define(GL_NV_vdpau_interop, 1). +-define(GL_AMD_transform_feedback3_lines_triangles, 1). +-define(GL_AMD_depth_clamp_separate, 1). +-define(GL_EXT_texture_sRGB_decode, 1). +-define(GL_NV_texture_multisample, 1). +-define(GL_AMD_blend_minmax_factor, 1). +-define(GL_AMD_sample_positions, 1). +-define(GL_EXT_x11_sync_object, 1). +-define(GL_AMD_multi_draw_indirect, 1). +-define(GL_EXT_framebuffer_multisample_blit_scaled, 1). +-define(GL_AMD_pinned_memory, 1). +-define(GL_AMD_stencil_operation_extended, 1). diff --git a/lib/wx/src/gen/gl.erl b/lib/wx/src/gen/gl.erl index 0ebf51d28a..ff381683ee 100644 --- a/lib/wx/src/gen/gl.erl +++ b/lib/wx/src/gen/gl.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% Copyright Ericsson AB 2008-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,10 +25,6 @@ %% %% Booleans are represented by integers 0 and 1. -%% @type mem(). memory block -%% @type enum(). An integer defined in gl.hrl -%% @type offset(). An integer which is an offset in an array -%% @type clamp(). A float clamped between 0.0 - 1.0 -module(gl). -compile(inline). @@ -53,71 +49,75 @@ -define(GLsync,64/native-unsigned). -define(GLuint64,64/native-unsigned). -define(GLint64,64/native-signed). --type clamp() :: float(). --type offset() :: non_neg_integer(). --type enum() :: non_neg_integer(). --type mem() :: binary() | tuple(). - --export([accum/2,alphaFunc/2,areTexturesResident/1,arrayElement/1,'begin'/1, - bindTexture/2,bitmap/7,blendFunc/2,callList/1,callLists/1,clear/1,clearAccum/4, - clearColor/4,clearDepth/1,clearIndex/1,clearStencil/1,clipPlane/2, - color3b/3,color3bv/1,color3d/3,color3dv/1,color3f/3,color3fv/1,color3i/3, - color3iv/1,color3s/3,color3sv/1,color3ub/3,color3ubv/1,color3ui/3,color3uiv/1, - color3us/3,color3usv/1,color4b/4,color4bv/1,color4d/4,color4dv/1,color4f/4, - color4fv/1,color4i/4,color4iv/1,color4s/4,color4sv/1,color4ub/4,color4ubv/1, - color4ui/4,color4uiv/1,color4us/4,color4usv/1,colorMask/4,colorMaterial/2, - colorPointer/4,copyPixels/5,copyTexImage1D/7,copyTexImage2D/8,copyTexSubImage1D/6, - copyTexSubImage2D/8,cullFace/1,deleteLists/2,deleteTextures/1,depthFunc/1, - depthMask/1,depthRange/2,disable/1,disableClientState/1,drawArrays/3, - drawBuffer/1,drawElements/4,drawPixels/5,edgeFlag/1,edgeFlagPointer/2, - edgeFlagv/1,enable/1,enableClientState/1,'end'/0,endList/0,evalCoord1d/1, - evalCoord1dv/1,evalCoord1f/1,evalCoord1fv/1,evalCoord2d/2,evalCoord2dv/1, - evalCoord2f/2,evalCoord2fv/1,evalMesh1/3,evalMesh2/5,evalPoint1/1, - evalPoint2/2,feedbackBuffer/3,finish/0,flush/0,fogf/2,fogfv/2,fogi/2, - fogiv/2,frontFace/1,frustum/6,genLists/1,genTextures/1,getBooleanv/1, - getClipPlane/1,getDoublev/1,getError/0,getFloatv/1,getIntegerv/1,getLightfv/2, - getLightiv/2,getMapdv/3,getMapfv/3,getMapiv/3,getMaterialfv/2,getMaterialiv/2, - getPixelMapfv/2,getPixelMapuiv/2,getPixelMapusv/2,getPolygonStipple/0, - getString/1,getTexEnvfv/2,getTexEnviv/2,getTexGendv/2,getTexGenfv/2, - getTexGeniv/2,getTexImage/5,getTexLevelParameterfv/3,getTexLevelParameteriv/3, - getTexParameterfv/2,getTexParameteriv/2,hint/2,indexMask/1,indexPointer/3, - indexd/1,indexdv/1,indexf/1,indexfv/1,indexi/1,indexiv/1,indexs/1,indexsv/1, - indexub/1,indexubv/1,initNames/0,interleavedArrays/3,isEnabled/1,isList/1, - isTexture/1,lightModelf/2,lightModelfv/2,lightModeli/2,lightModeliv/2, - lightf/3,lightfv/3,lighti/3,lightiv/3,lineStipple/2,lineWidth/1,listBase/1, - loadIdentity/0,loadMatrixd/1,loadMatrixf/1,loadName/1,logicOp/1,map1d/6, - map1f/6,map2d/10,map2f/10,mapGrid1d/3,mapGrid1f/3,mapGrid2d/6,mapGrid2f/6, - materialf/3,materialfv/3,materiali/3,materialiv/3,matrixMode/1,multMatrixd/1, - multMatrixf/1,newList/2,normal3b/3,normal3bv/1,normal3d/3,normal3dv/1, - normal3f/3,normal3fv/1,normal3i/3,normal3iv/1,normal3s/3,normal3sv/1, - normalPointer/3,ortho/6,passThrough/1,pixelMapfv/3,pixelMapuiv/3,pixelMapusv/3, - pixelStoref/2,pixelStorei/2,pixelTransferf/2,pixelTransferi/2,pixelZoom/2, - pointSize/1,polygonMode/2,polygonOffset/2,polygonStipple/1,popAttrib/0, - popClientAttrib/0,popMatrix/0,popName/0,prioritizeTextures/2,pushAttrib/1, - pushClientAttrib/1,pushMatrix/0,pushName/1,rasterPos2d/2,rasterPos2dv/1, - rasterPos2f/2,rasterPos2fv/1,rasterPos2i/2,rasterPos2iv/1,rasterPos2s/2, - rasterPos2sv/1,rasterPos3d/3,rasterPos3dv/1,rasterPos3f/3,rasterPos3fv/1, - rasterPos3i/3,rasterPos3iv/1,rasterPos3s/3,rasterPos3sv/1,rasterPos4d/4, - rasterPos4dv/1,rasterPos4f/4,rasterPos4fv/1,rasterPos4i/4,rasterPos4iv/1, - rasterPos4s/4,rasterPos4sv/1,readBuffer/1,readPixels/7,rectd/4,rectdv/2, - rectf/4,rectfv/2,recti/4,rectiv/2,rects/4,rectsv/2,renderMode/1,rotated/4, - rotatef/4,scaled/3,scalef/3,scissor/4,selectBuffer/2,shadeModel/1,stencilFunc/3, - stencilMask/1,stencilOp/3,texCoord1d/1,texCoord1dv/1,texCoord1f/1, - texCoord1fv/1,texCoord1i/1,texCoord1iv/1,texCoord1s/1,texCoord1sv/1, - texCoord2d/2,texCoord2dv/1,texCoord2f/2,texCoord2fv/1,texCoord2i/2, - texCoord2iv/1,texCoord2s/2,texCoord2sv/1,texCoord3d/3,texCoord3dv/1, - texCoord3f/3,texCoord3fv/1,texCoord3i/3,texCoord3iv/1,texCoord3s/3, - texCoord3sv/1,texCoord4d/4,texCoord4dv/1,texCoord4f/4,texCoord4fv/1, - texCoord4i/4,texCoord4iv/1,texCoord4s/4,texCoord4sv/1,texCoordPointer/4, - texEnvf/3,texEnvfv/3,texEnvi/3,texEnviv/3,texGend/3,texGendv/3,texGenf/3, - texGenfv/3,texGeni/3,texGeniv/3,texImage1D/8,texImage2D/9,texParameterf/3, - texParameterfv/3,texParameteri/3,texParameteriv/3,texSubImage1D/7, - texSubImage2D/9,translated/3,translatef/3,vertex2d/2,vertex2dv/1,vertex2f/2, - vertex2fv/1,vertex2i/2,vertex2iv/1,vertex2s/2,vertex2sv/1,vertex3d/3, - vertex3dv/1,vertex3f/3,vertex3fv/1,vertex3i/3,vertex3iv/1,vertex3s/3, - vertex3sv/1,vertex4d/4,vertex4dv/1,vertex4f/4,vertex4fv/1,vertex4i/4, - vertex4iv/1,vertex4s/4,vertex4sv/1,vertexPointer/4,viewport/4,blendColor/4, - blendEquation/1,drawRangeElements/6,texImage3D/10,texSubImage3D/11, +-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 matrix() :: {float(),float(),float(),float(), + float(),float(),float(),float(), + float(),float(),float(),float(), + float(),float(),float(),float()}. +-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, @@ -267,9 +267,10 @@ 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,resizeBuffersMESA/0,windowPos4dMESA/4, - windowPos4dvMESA/1,windowPos4fMESA/4,windowPos4fvMESA/1,windowPos4iMESA/4, - windowPos4ivMESA/1,windowPos4sMESA/4,windowPos4svMESA/1,depthBoundsEXT/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]). @@ -306,2215 +307,8470 @@ send_bin(Tuple) when is_tuple(Tuple) -> %% API -%% @spec (Op::enum(),Value::float()) -> ok -%% @doc See external documentation. --spec accum(enum(),float()) -> ok. -accum(Op,Value) -> - cast(5037, <>). - -%% @spec (Func::enum(),Ref::clamp()) -> ok -%% @doc See external documentation. --spec alphaFunc(enum(),clamp()) -> ok. -alphaFunc(Func,Ref) -> - cast(5038, <>). - -%% @spec (Textures::[integer()]) -> {0|1,Residences::[0|1]} -%% @doc See external documentation. --spec areTexturesResident([integer()]) -> {0|1,[0|1]}. -areTexturesResident(Textures) -> - call(5039, <<(length(Textures)):?GLuint, - (<< <> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>). - -%% @spec (I::integer()) -> ok -%% @doc See external documentation. --spec arrayElement(integer()) -> ok. -arrayElement(I) -> - cast(5040, <>). - -%% @spec (Mode::enum()) -> ok -%% @doc See external documentation. --spec 'begin'(enum()) -> ok. -'begin'(Mode) -> - cast(5041, <>). - -%% @spec (Target::enum(),Texture::integer()) -> ok -%% @doc See external documentation. --spec bindTexture(enum(),integer()) -> ok. -bindTexture(Target,Texture) -> - cast(5042, <>). - -%% @spec (Width::integer(),Height::integer(),Xorig::float(),Yorig::float(),Xmove::float(),Ymove::float(),Bitmap::offset()|mem()) -> ok -%% @doc See external documentation. --spec bitmap(integer(),integer(),float(),float(),float(),float(),offset()|mem()) -> ok. -bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) when is_integer(Bitmap) -> - cast(5043, <>); -bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) -> - send_bin(Bitmap), - cast(5044, <>). - -%% @spec (Sfactor::enum(),Dfactor::enum()) -> ok -%% @doc See external documentation. --spec blendFunc(enum(),enum()) -> ok. -blendFunc(Sfactor,Dfactor) -> - cast(5045, <>). - -%% @spec (List::integer()) -> ok -%% @doc See external documentation. --spec callList(integer()) -> ok. -callList(List) -> - cast(5046, <>). - -%% @spec (Lists::[integer()]) -> ok -%% @doc See external documentation. --spec callLists([integer()]) -> ok. -callLists(Lists) -> - cast(5047, <<(length(Lists)):?GLuint, - (<< <> || C <- Lists>>)/binary,0:(((1+length(Lists)) rem 2)*32)>>). - -%% @spec (Mask::integer()) -> ok -%% @doc See external documentation. --spec clear(integer()) -> ok. -clear(Mask) -> - cast(5048, <>). - -%% @spec (Red::float(),Green::float(),Blue::float(),Alpha::float()) -> ok -%% @doc See external documentation. --spec clearAccum(float(),float(),float(),float()) -> ok. -clearAccum(Red,Green,Blue,Alpha) -> - cast(5049, <>). - -%% @spec (Red::clamp(),Green::clamp(),Blue::clamp(),Alpha::clamp()) -> ok -%% @doc See external documentation. --spec clearColor(clamp(),clamp(),clamp(),clamp()) -> ok. -clearColor(Red,Green,Blue,Alpha) -> - cast(5050, <>). - -%% @spec (Depth::clamp()) -> ok -%% @doc See external documentation. --spec clearDepth(clamp()) -> ok. -clearDepth(Depth) -> - cast(5051, <>). - -%% @spec (C::float()) -> ok -%% @doc See external documentation. --spec clearIndex(float()) -> ok. +%% @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(5052, <>). - -%% @spec (S::integer()) -> ok -%% @doc See external documentation. --spec clearStencil(integer()) -> ok. -clearStencil(S) -> - cast(5053, <>). + cast(5037, <>). -%% @spec (Plane::enum(),Equation::{float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec clipPlane(enum(),{float(),float(),float(),float()}) -> ok. -clipPlane(Plane,{E1,E2,E3,E4}) -> - cast(5054, <>). - -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec color3b(integer(),integer(),integer()) -> ok. -color3b(Red,Green,Blue) -> - cast(5055, <>). +%% @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, <>). -%% @spec ({Red,Green,Blue}) -> ok -%% @equiv color3b(Red,Green,Blue) --spec color3bv({integer(),integer(),integer()}) -> ok. -color3bv({Red,Green,Blue}) -> color3b(Red,Green,Blue). +%% @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} . +%% +%% The pixel ownership test, the scissor test, dithering, and the buffer writemasks affect +%% the operation of ``gl:clear''. The scissor box bounds the cleared region. Alpha function, +%% blend function, logical operation, stenciling, texture mapping, and depth-buffering are +%% ignored by ``gl:clear''. +%% +%% ``gl:clear'' takes a single argument that is the bitwise OR of several values indicating +%% which buffer is to be cleared. +%% +%% The values are as follows: +%% +%% `?GL_COLOR_BUFFER_BIT': Indicates the buffers currently enabled for color writing. +%% +%% `?GL_DEPTH_BUFFER_BIT': Indicates the depth buffer. +%% +%% `?GL_STENCIL_BUFFER_BIT': Indicates the stencil buffer. +%% +%% The value to which each buffer is cleared depends on the setting of the clear value for +%% that buffer. +%% +%% See external documentation. +-spec clear(Mask) -> ok when Mask :: integer(). +clear(Mask) -> + cast(5039, <>). -%% @spec (Red::float(),Green::float(),Blue::float()) -> ok -%% @doc See external documentation. --spec color3d(float(),float(),float()) -> ok. -color3d(Red,Green,Blue) -> - cast(5056, <>). +%% @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. +%% +%% This mask is used only in color index mode, and it affects only the buffers currently +%% selected for writing (see {@link gl:drawBuffer/1} ). Initially, all bits are enabled for +%% writing. +%% +%% See external documentation. +-spec indexMask(Mask) -> ok when Mask :: integer(). +indexMask(Mask) -> + cast(5040, <>). -%% @spec ({Red,Green,Blue}) -> ok -%% @equiv color3d(Red,Green,Blue) --spec color3dv({float(),float(),float()}) -> ok. -color3dv({Red,Green,Blue}) -> color3d(Red,Green,Blue). +%% @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. +%% +%% Changes to individual bits of components cannot be controlled. Rather, changes are either +%% enabled or disabled for entire color components. +%% +%% 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, <>). -%% @spec (Red::float(),Green::float(),Blue::float()) -> ok -%% @doc See external documentation. --spec color3f(float(),float(),float()) -> ok. -color3f(Red,Green,Blue) -> - cast(5057, <>). +%% @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'.) +%% +%% `Func' and `Ref' specify the conditions under which the pixel is drawn. The +%% incoming alpha value is compared to `Ref' using the function specified by `Func' . +%% If the value passes the comparison, the incoming fragment is drawn if it also passes subsequent +%% stencil and depth buffer tests. If the value fails the comparison, no change is made to +%% the frame buffer at that pixel location. The comparison functions are as follows: +%% +%% `?GL_NEVER': Never passes. +%% +%% `?GL_LESS': Passes if the incoming alpha value is less than the reference value. +%% +%% `?GL_EQUAL': Passes if the incoming alpha value is equal to the reference value. +%% +%% `?GL_LEQUAL': Passes if the incoming alpha value is less than or equal to the reference +%% value. +%% +%% `?GL_GREATER': Passes if the incoming alpha value is greater than the reference +%% value. +%% +%% `?GL_NOTEQUAL': Passes if the incoming alpha value is not equal to the reference +%% value. +%% +%% `?GL_GEQUAL': Passes if the incoming alpha value is greater than or equal to the +%% reference value. +%% +%% `?GL_ALWAYS': Always passes (initial value). +%% +%% ``gl:alphaFunc'' operates on all pixel write operations, including those resulting from +%% the scan conversion of points, lines, polygons, and bitmaps, and from pixel draw and copy +%% operations. ``gl:alphaFunc'' does not affect screen clear operations. +%% +%% See external documentation. +-spec alphaFunc(Func, Ref) -> ok when Func :: enum(),Ref :: clamp(). +alphaFunc(Func,Ref) -> + cast(5042, <>). -%% @spec ({Red,Green,Blue}) -> ok -%% @equiv color3f(Red,Green,Blue) --spec color3fv({float(),float(),float()}) -> ok. -color3fv({Red,Green,Blue}) -> color3f(Red,Green,Blue). +%% @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. +%% +%% ``gl:blendFunc'' defines the operation of blending for all draw buffers when it is enabled. +%% ``gl:blendFunci'' defines the operation of blending for a single draw buffer specified +%% by `Buf' when enabled for that draw buffer. `Sfactor' specifies which method +%% is used to scale the source color components. `Dfactor' specifies which method is +%% used to scale the destination color components. Both parameters must be one of the following +%% symbolic constants: `?GL_ZERO', `?GL_ONE', `?GL_SRC_COLOR', `?GL_ONE_MINUS_SRC_COLOR' +%% , `?GL_DST_COLOR', `?GL_ONE_MINUS_DST_COLOR', `?GL_SRC_ALPHA', `?GL_ONE_MINUS_SRC_ALPHA' +%% , `?GL_DST_ALPHA', `?GL_ONE_MINUS_DST_ALPHA', `?GL_CONSTANT_COLOR', `?GL_ONE_MINUS_CONSTANT_COLOR' +%% , `?GL_CONSTANT_ALPHA', `?GL_ONE_MINUS_CONSTANT_ALPHA', `?GL_SRC_ALPHA_SATURATE' +%% , `?GL_SRC1_COLOR', `?GL_ONE_MINUS_SRC1_COLOR', `?GL_SRC1_ALPHA', and `?GL_ONE_MINUS_SRC1_ALPHA' +%% . The possible methods are described in the following table. Each method defines four +%% scale factors, one each for red, green, blue, and alpha. In the table and in subsequent +%% equations, first source, second source and destination color components are referred to +%% as (R s0 G s0 B s0 A s0), (R s1 G s1 B s1 A s1) and (R d G d B d A d), respectively. The color specified by {@link gl:blendColor/4} is referred to +%% as (R c G c B c A c). They are understood to have integer values between 0 and (k R k G k B k A), where +%% +%% k c= 2(m c)-1 +%% +%% and (m R m G m B m A) is the number of red, green, blue, and alpha bitplanes. +%% +%% Source and destination scale factors are referred to as (s R s G s B s A) and (d R d G d B d A). The scale factors described +%% in the table, denoted (f R f G f B f A), represent either source or destination factors. All scale factors +%% have range [0 1]. +%% +%% +%% +%%
` Parameter '(f R f G f B f A)
`?GL_ZERO' +%% (0 0 0 0)
`?GL_ONE'(1 1 1 1)
`?GL_SRC_COLOR'(R s0 k/R G s0 k/G B s0 k/B A s0 k/A)
`?GL_ONE_MINUS_SRC_COLOR'(1 1 1 1)-(R s0 k/R G s0 k/G B s0 k/B +%% A s0 k/A)
`?GL_DST_COLOR' +%% (R d k/R G d k/G B d k/B A d k/A)
`?GL_ONE_MINUS_DST_COLOR'(1 1 1 1)-(R d k/R G d k/G B d k/B +%% A d k/A)
`?GL_SRC_ALPHA' +%% (A s0 k/A A s0 k/A A s0 k/A A s0 k/A)
`?GL_ONE_MINUS_SRC_ALPHA'(1 1 1 1)-(A s0 k/A A s0 k/A A s0 +%% k/A A s0 k/A)
`?GL_DST_ALPHA' +%% (A d k/A A d k/A A d k/A A d k/A)
`?GL_ONE_MINUS_DST_ALPHA'(1 1 1 1)-(A d k/A A d k/A A d k/A +%% A d k/A)
`?GL_CONSTANT_COLOR' +%% (R c G c B c A c)
`?GL_ONE_MINUS_CONSTANT_COLOR'(1 1 1 1)-(R c G c B c A c)
+%% `?GL_CONSTANT_ALPHA'(A c A c A c A c)
`?GL_ONE_MINUS_CONSTANT_ALPHA'(1 1 1 1)-(A c A c A c A c)
`?GL_SRC_ALPHA_SATURATE'(i i i 1)
`?GL_SRC1_COLOR' +%% (R s1 k/R G s1 k/G B s1 k/B A s1 k/A)
`?GL_ONE_MINUS_SRC1_COLOR'(1 1 1 1)-(R s1 k/R G s1 k/G B +%% s1 k/B A s1 k/A)
`?GL_SRC1_ALPHA' +%% (A s1 k/A A s1 k/A A s1 k/A A s1 k/A)
`?GL_ONE_MINUS_SRC1_ALPHA'(1 1 1 1)-(A s1 k/A A s1 k/A A +%% s1 k/A A s1 k/A)
+%% +%% +%% In the table, +%% +%% i= min(A s k A-A d) k/A +%% +%% To determine the blended RGBA values of a pixel, the system uses the following equations: +%% +%% +%% R d= min(k R R s s R+R d d R) G d= min(k G G s s G+G d d G) B d= min(k B B s s B+B d d B) A d= min(k A A s s A+A d d A) +%% +%% Despite the apparent precision of the above equations, blending arithmetic is not exactly +%% specified, because blending operates with imprecise integer color values. However, a blend +%% factor that should be equal to 1 is guaranteed not to modify its multiplicand, and a blend +%% factor equal to 0 reduces its multiplicand to 0. For example, when `Sfactor' is `?GL_SRC_ALPHA' +%% , `Dfactor' is `?GL_ONE_MINUS_SRC_ALPHA', and A s is equal to k A, the equations +%% reduce to simple replacement: +%% +%% R d= R s G d= G s B d= B s A d= A s +%% +%% +%% +%% See external documentation. +-spec blendFunc(Sfactor, Dfactor) -> ok when Sfactor :: enum(),Dfactor :: enum(). +blendFunc(Sfactor,Dfactor) -> + cast(5043, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec color3i(integer(),integer(),integer()) -> ok. -color3i(Red,Green,Blue) -> - cast(5058, <>). +%% @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. +%% +%% +%% +%% +%% +%% +%%
` Opcode '` Resulting Operation '
`?GL_CLEAR' 0
`?GL_SET' 1
`?GL_COPY' s
`?GL_COPY_INVERTED' +%% ~s
`?GL_NOOP' d
`?GL_INVERT' +%% ~d
`?GL_AND' s & d
`?GL_NAND' ~(s & d)
`?GL_OR' s | d
`?GL_NOR' +%% ~(s | d)
`?GL_XOR' s ^ d
`?GL_EQUIV' +%% ~(s ^ d)
`?GL_AND_REVERSE' s & ~d
`?GL_AND_INVERTED' ~s & d
`?GL_OR_REVERSE' +%% s | ~d
`?GL_OR_INVERTED' ~s | d
+%% +%% `Opcode' is a symbolic constant chosen from the list above. In the explanation of +%% the logical operations, `s' represents the incoming color and `d' represents +%% the color in the frame buffer. Standard C-language operators are used. As these bitwise +%% operators suggest, the logical operation is applied independently to each bit pair of +%% the source and destination colors. +%% +%% See external documentation. +-spec logicOp(Opcode) -> ok when Opcode :: enum(). +logicOp(Opcode) -> + cast(5044, <>). -%% @spec ({Red,Green,Blue}) -> ok -%% @equiv color3i(Red,Green,Blue) --spec color3iv({integer(),integer(),integer()}) -> ok. -color3iv({Red,Green,Blue}) -> color3i(Red,Green,Blue). +%% @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. +%% +%% {@link gl:frontFace/1} specifies which of the clockwise and counterclockwise facets are +%% front-facing and back-facing. See {@link gl:frontFace/1} . +%% +%% See external documentation. +-spec cullFace(Mode) -> ok when Mode :: enum(). +cullFace(Mode) -> + cast(5045, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec color3s(integer(),integer(),integer()) -> ok. -color3s(Red,Green,Blue) -> - cast(5059, <>). +%% @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'. +%% +%% The projection of a polygon to window coordinates is said to have clockwise winding if +%% an imaginary object following the path from its first vertex, its second vertex, and so +%% on, to its last vertex, and finally back to its first vertex, moves in a clockwise direction +%% about the interior of the polygon. The polygon's winding is said to be counterclockwise +%% if the imaginary object following the same path moves in a counterclockwise direction +%% about the interior of the polygon. ``gl:frontFace'' specifies whether polygons with +%% clockwise winding in window coordinates, or counterclockwise winding in window coordinates, +%% are taken to be front-facing. Passing `?GL_CCW' to `Mode' selects counterclockwise +%% polygons as front-facing; `?GL_CW' selects clockwise polygons as front-facing. By +%% default, counterclockwise polygons are taken to be front-facing. +%% +%% See external documentation. +-spec frontFace(Mode) -> ok when Mode :: enum(). +frontFace(Mode) -> + cast(5046, <>). -%% @spec ({Red,Green,Blue}) -> ok -%% @equiv color3s(Red,Green,Blue) --spec color3sv({integer(),integer(),integer()}) -> ok. -color3sv({Red,Green,Blue}) -> color3s(Red,Green,Blue). +%% @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, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec color3ub(integer(),integer(),integer()) -> ok. -color3ub(Red,Green,Blue) -> - cast(5060, <>). +%% @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. +%% +%% If line antialiasing is disabled, the actual width is determined by rounding the supplied +%% width to the nearest integer. (If the rounding results in the value 0, it is as if the +%% line width were 1.) If |&Delta; x|>=|&Delta; y|, `i' pixels are filled in each column that is rasterized, +%% where `i' is the rounded value of `Width' . Otherwise, `i' pixels are filled +%% in each row that is rasterized. +%% +%% If antialiasing is enabled, line rasterization produces a fragment for each pixel square +%% that intersects the region lying within the rectangle having width equal to the current +%% line width, length equal to the actual length of the line, and centered on the mathematical +%% line segment. The coverage value for each fragment is the window coordinate area of the +%% intersection of the rectangular region with the corresponding pixel square. This value +%% is saved and used in the final rasterization step. +%% +%% Not all widths can be supported when line antialiasing is enabled. If an unsupported +%% width is requested, the nearest supported width is used. Only width 1 is guaranteed to +%% be supported; others depend on the implementation. Likewise, there is a range for aliased +%% line widths as well. To query the range of supported widths and the size difference between +%% supported widths within the range, call {@link gl:getBooleanv/1} with arguments `?GL_ALIASED_LINE_WIDTH_RANGE' +%% , `?GL_SMOOTH_LINE_WIDTH_RANGE', and `?GL_SMOOTH_LINE_WIDTH_GRANULARITY'. +%% +%% See external documentation. +-spec lineWidth(Width) -> ok when Width :: float(). +lineWidth(Width) -> + cast(5048, <>). -%% @spec ({Red,Green,Blue}) -> ok -%% @equiv color3ub(Red,Green,Blue) --spec color3ubv({integer(),integer(),integer()}) -> ok. -color3ubv({Red,Green,Blue}) -> color3ub(Red,Green,Blue). +%% @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. +%% +%% Counter s is reset to 0 whenever {@link gl:'begin'/1} is called and before each line segment +%% of a {@link gl:'begin'/1} (`?GL_LINES')/ {@link gl:'begin'/1} sequence is generated. It is +%% incremented after each fragment of a unit width aliased line segment is generated or after +%% each i fragments of an i width line segment are generated. The i fragments associated +%% with count s are masked out if +%% +%% `Pattern' bit (s/factor)% 16 +%% +%% is 0, otherwise these fragments are sent to the frame buffer. Bit zero of `Pattern' +%% is the least significant bit. +%% +%% Antialiased lines are treated as a sequence of 1*width rectangles for purposes of stippling. +%% Whether rectangle s is rasterized or not depends on the fragment rule described for +%% aliased lines, counting rectangles rather than groups of fragments. +%% +%% To enable and disable line stippling, call {@link gl:enable/1} and {@link gl:enable/1} +%% with argument `?GL_LINE_STIPPLE'. When enabled, the line stipple pattern is applied +%% as described above. When disabled, it is as if the pattern were all 1's. Initially, line +%% stippling is disabled. +%% +%% See external documentation. +-spec lineStipple(Factor, Pattern) -> ok when Factor :: integer(),Pattern :: integer(). +lineStipple(Factor,Pattern) -> + cast(5049, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec color3ui(integer(),integer(),integer()) -> ok. -color3ui(Red,Green,Blue) -> - cast(5061, <>). +%% @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. +%% +%% Three modes are defined and can be specified in `Mode' : +%% +%% `?GL_POINT': Polygon vertices that are marked as the start of a boundary edge are +%% drawn as points. Point attributes such as `?GL_POINT_SIZE' and `?GL_POINT_SMOOTH' +%% control the rasterization of the points. Polygon rasterization attributes other than `?GL_POLYGON_MODE' +%% have no effect. +%% +%% `?GL_LINE': Boundary edges of the polygon are drawn as line segments. Line attributes +%% such as `?GL_LINE_WIDTH' and `?GL_LINE_SMOOTH' control the rasterization of +%% the lines. Polygon rasterization attributes other than `?GL_POLYGON_MODE' have no +%% effect. +%% +%% `?GL_FILL': The interior of the polygon is filled. Polygon attributes such as `?GL_POLYGON_SMOOTH' +%% control the rasterization of the polygon. +%% +%% See external documentation. +-spec polygonMode(Face, Mode) -> ok when Face :: enum(),Mode :: enum(). +polygonMode(Face,Mode) -> + cast(5050, <>). -%% @spec ({Red,Green,Blue}) -> ok -%% @equiv color3ui(Red,Green,Blue) --spec color3uiv({integer(),integer(),integer()}) -> ok. -color3uiv({Red,Green,Blue}) -> color3ui(Red,Green,Blue). +%% @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. +%% +%% ``gl:polygonOffset'' is useful for rendering hidden-line images, for applying decals +%% to surfaces, and for rendering solids with highlighted edges. +%% +%% See external documentation. +-spec polygonOffset(Factor, Units) -> ok when Factor :: float(),Units :: float(). +polygonOffset(Factor,Units) -> + cast(5051, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec color3us(integer(),integer(),integer()) -> ok. -color3us(Red,Green,Blue) -> - cast(5062, <>). +%% @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. +%% +%% `Pattern' is a pointer to a 32*32 stipple pattern that is stored in memory just +%% like the pixel data supplied to a {@link gl:drawPixels/5} call with height and `width' +%% both equal to 32, a pixel format of `?GL_COLOR_INDEX', and data type of `?GL_BITMAP' +%% . That is, the stipple pattern is represented as a 32*32 array of 1-bit color indices +%% packed in unsigned bytes. {@link gl:pixelStoref/2} parameters like `?GL_UNPACK_SWAP_BYTES' +%% and `?GL_UNPACK_LSB_FIRST' affect the assembling of the bits into a stipple pattern. +%% Pixel transfer operations (shift, offset, pixel map) are not applied to the stipple image, +%% however. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a stipple pattern is specified, `Pattern' is +%% treated as a byte offset into the buffer object's data store. +%% +%% To enable and disable polygon stippling, call {@link gl:enable/1} and {@link gl:enable/1} +%% with argument `?GL_POLYGON_STIPPLE'. Polygon stippling is initially disabled. If +%% it's enabled, a rasterized polygon fragment with window coordinates x w and y w is +%% sent to the next stage of the GL if and only if the ( x w% 32)th bit in the ( y w% 32)th +%% row of the stipple pattern is 1 (one). When polygon stippling is disabled, it is as if +%% the stipple pattern consists of all 1's. +%% +%% See external documentation. +-spec polygonStipple(Mask) -> ok when Mask :: binary(). +polygonStipple(Mask) -> + send_bin(Mask), + cast(5052, <<>>). -%% @spec ({Red,Green,Blue}) -> ok -%% @equiv color3us(Red,Green,Blue) --spec color3usv({integer(),integer(),integer()}) -> ok. -color3usv({Red,Green,Blue}) -> color3us(Red,Green,Blue). +%% @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. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a polygon stipple pattern is requested, `Pattern' +%% is treated as a byte offset into the buffer object's data store. +%% +%% See external documentation. +-spec getPolygonStipple() -> binary(). +getPolygonStipple() -> + call(5053, <<>>). -%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok -%% @doc See external documentation. --spec color4b(integer(),integer(),integer(),integer()) -> ok. -color4b(Red,Green,Blue,Alpha) -> - cast(5063, <>). +%% @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. +%% +%% The vertices of connected triangles and connected quadrilaterals are always marked as +%% boundary, regardless of the value of the edge flag. +%% +%% Boundary and nonboundary edge flags on vertices are significant only if `?GL_POLYGON_MODE' +%% is set to `?GL_POINT' or `?GL_LINE'. See {@link gl:polygonMode/2} . +%% +%% See external documentation. +-spec edgeFlag(Flag) -> ok when Flag :: 0|1. +edgeFlag(Flag) -> + cast(5054, <>). -%% @spec ({Red,Green,Blue,Alpha}) -> ok -%% @equiv color4b(Red,Green,Blue,Alpha) --spec color4bv({integer(),integer(),integer(),integer()}) -> ok. -color4bv({Red,Green,Blue,Alpha}) -> color4b(Red,Green,Blue,Alpha). +%% @equiv edgeFlag(Flag) +-spec edgeFlagv(Flag) -> ok when Flag :: {Flag :: 0|1}. +edgeFlagv({Flag}) -> edgeFlag(Flag). -%% @spec (Red::float(),Green::float(),Blue::float(),Alpha::float()) -> ok -%% @doc See external documentation. --spec color4d(float(),float(),float(),float()) -> ok. -color4d(Red,Green,Blue,Alpha) -> - cast(5064, <>). +%% @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. +%% +%% To enable and disable the scissor test, call {@link gl:enable/1} and {@link gl:enable/1} +%% with argument `?GL_SCISSOR_TEST'. The test is initially disabled. While the test +%% is enabled, only pixels that lie within the scissor box can be modified by drawing commands. +%% Window coordinates have integer values at the shared corners of frame buffer pixels. glScissor(0,0,1,1) +%% allows modification of only the lower left pixel in the window, and glScissor(0,0,0,0) +%% doesn't allow modification of any pixels in the window. +%% +%% When the scissor test is disabled, it is as though the scissor box includes the entire +%% window. +%% +%% 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, <>). -%% @spec ({Red,Green,Blue,Alpha}) -> ok -%% @equiv color4d(Red,Green,Blue,Alpha) --spec color4dv({float(),float(),float(),float()}) -> ok. -color4dv({Red,Green,Blue,Alpha}) -> color4d(Red,Green,Blue,Alpha). +%% @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. +%% +%% ``gl:clipPlane'' specifies a half-space using a four-component plane equation. When ``gl:clipPlane'' +%% is called, `Equation' is transformed by the inverse of the modelview matrix and +%% stored in the resulting eye coordinates. Subsequent changes to the modelview matrix have +%% no effect on the stored plane-equation components. If the dot product of the eye coordinates +%% of a vertex with the stored plane equation components is positive or zero, the vertex is `in' +%% with respect to that clipping plane. Otherwise, it is `out'. +%% +%% To enable and disable clipping planes, call {@link gl:enable/1} and {@link gl:enable/1} +%% with the argument `?GL_CLIP_PLANE'`i', where `i' is the plane number. +%% +%% All clipping planes are initially defined as (0, 0, 0, 0) in eye coordinates and are +%% disabled. +%% +%% See external documentation. +-spec clipPlane(Plane, Equation) -> ok when Plane :: enum(),Equation :: {float(),float(),float(),float()}. +clipPlane(Plane,{E1,E2,E3,E4}) -> + cast(5056, <>). -%% @spec (Red::float(),Green::float(),Blue::float(),Alpha::float()) -> ok -%% @doc See external documentation. --spec color4f(float(),float(),float(),float()) -> ok. -color4f(Red,Green,Blue,Alpha) -> - cast(5065, <>). +%% @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, <>). -%% @spec ({Red,Green,Blue,Alpha}) -> ok -%% @equiv color4f(Red,Green,Blue,Alpha) --spec color4fv({float(),float(),float(),float()}) -> ok. -color4fv({Red,Green,Blue,Alpha}) -> color4f(Red,Green,Blue,Alpha). +%% @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: +%% +%% `?GL_NONE': No color buffers are written. +%% +%% `?GL_FRONT_LEFT': Only the front left color buffer is written. +%% +%% `?GL_FRONT_RIGHT': Only the front right color buffer is written. +%% +%% `?GL_BACK_LEFT': Only the back left color buffer is written. +%% +%% `?GL_BACK_RIGHT': Only the back right color buffer is written. +%% +%% `?GL_FRONT': Only the front left and front right color buffers are written. If there +%% is no front right color buffer, only the front left color buffer is written. +%% +%% `?GL_BACK': Only the back left and back right color buffers are written. If there +%% is no back right color buffer, only the back left color buffer is written. +%% +%% `?GL_LEFT': Only the front left and back left color buffers are written. If there +%% is no back left color buffer, only the front left color buffer is written. +%% +%% `?GL_RIGHT': Only the front right and back right color buffers are written. If there +%% is no back right color buffer, only the front right color buffer is written. +%% +%% `?GL_FRONT_AND_BACK': All the front and back color buffers (front left, front right, +%% back left, back right) are written. If there are no back color buffers, only the front +%% left and front right color buffers are written. If there are no right color buffers, only +%% the front left and back left color buffers are written. If there are no right or back +%% color buffers, only the front left color buffer is written. +%% +%% If more than one color buffer is selected for drawing, then blending or logical operations +%% are computed and applied independently for each color buffer and can produce different +%% results in each buffer. +%% +%% Monoscopic contexts include only `left' buffers, and stereoscopic contexts include +%% both `left' and `right' buffers. Likewise, single-buffered contexts include +%% only `front' buffers, and double-buffered contexts include both `front' and `back' +%% buffers. The context is selected at GL initialization. +%% +%% See external documentation. +-spec drawBuffer(Mode) -> ok when Mode :: enum(). +drawBuffer(Mode) -> + cast(5058, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok -%% @doc See external documentation. --spec color4i(integer(),integer(),integer(),integer()) -> ok. -color4i(Red,Green,Blue,Alpha) -> - cast(5066, <>). +%% @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. +%% +%% Nonstereo double-buffered configurations have only a front left and a back left buffer. +%% Single-buffered configurations have a front left and a front right buffer if stereo, and +%% only a front left buffer if nonstereo. It is an error to specify a nonexistent buffer to ``gl:readBuffer'' +%% . +%% +%% `Mode' is initially `?GL_FRONT' in single-buffered configurations and `?GL_BACK' +%% in double-buffered configurations. +%% +%% See external documentation. +-spec readBuffer(Mode) -> ok when Mode :: enum(). +readBuffer(Mode) -> + cast(5059, <>). -%% @spec ({Red,Green,Blue,Alpha}) -> ok -%% @equiv color4i(Red,Green,Blue,Alpha) --spec color4iv({integer(),integer(),integer(),integer()}) -> ok. -color4iv({Red,Green,Blue,Alpha}) -> color4i(Red,Green,Blue,Alpha). +%% @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'. +%% +%% Both ``gl:enable'' and {@link gl:enable/1} take a single argument, `Cap' , which +%% can assume one of the following values: +%% +%% Some of the GL's capabilities are indexed. ``gl:enablei'' and ``gl:disablei'' enable +%% and disable indexed capabilities. +%% +%% `?GL_BLEND': If enabled, blend the computed fragment color values with the values +%% in the color buffers. See {@link gl:blendFunc/2} . +%% +%% `?GL_CLIP_DISTANCE'`i': If enabled, clip geometry against user-defined half +%% space `i'. +%% +%% `?GL_COLOR_LOGIC_OP': If enabled, apply the currently selected logical operation +%% to the computed fragment color and color buffer values. See {@link gl:logicOp/1} . +%% +%% `?GL_CULL_FACE': If enabled, cull polygons based on their winding in window coordinates. +%% See {@link gl:cullFace/1} . +%% +%% `?GL_DEPTH_CLAMP': If enabled, the -w c&le; z c&le; w c plane equation is +%% ignored by view volume clipping (effectively, there is no near or far plane clipping). +%% See {@link gl:depthRange/2} . +%% +%% `?GL_DEPTH_TEST': If enabled, do depth comparisons and update the depth buffer. +%% Note that even if the depth buffer exists and the depth mask is non-zero, the depth buffer +%% is not updated if the depth test is disabled. See {@link gl:depthFunc/1} and {@link gl:depthRange/2} +%% . +%% +%% `?GL_DITHER': If enabled, dither color components or indices before they are written +%% to the color buffer. +%% +%% `?GL_FRAMEBUFFER_SRGB': If enabled and the value of `?GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING' +%% for the framebuffer attachment corresponding to the destination buffer is `?GL_SRGB', +%% the R, G, and B destination color values (after conversion from fixed-point to floating-point) +%% are considered to be encoded for the sRGB color space and hence are linearized prior to +%% their use in blending. +%% +%% `?GL_LINE_SMOOTH': If enabled, draw lines with correct filtering. Otherwise, draw +%% aliased lines. See {@link gl:lineWidth/1} . +%% +%% `?GL_MULTISAMPLE': If enabled, use multiple fragment samples in computing the final +%% color of a pixel. See {@link gl:sampleCoverage/2} . +%% +%% `?GL_POLYGON_OFFSET_FILL': If enabled, and if the polygon is rendered in `?GL_FILL' +%% mode, an offset is added to depth values of a polygon's fragments before the depth comparison +%% is performed. See {@link gl:polygonOffset/2} . +%% +%% `?GL_POLYGON_OFFSET_LINE': If enabled, and if the polygon is rendered in `?GL_LINE' +%% mode, an offset is added to depth values of a polygon's fragments before the depth comparison +%% is performed. See {@link gl:polygonOffset/2} . +%% +%% `?GL_POLYGON_OFFSET_POINT': If enabled, an offset is added to depth values of a +%% polygon's fragments before the depth comparison is performed, if the polygon is rendered +%% in `?GL_POINT' mode. See {@link gl:polygonOffset/2} . +%% +%% `?GL_POLYGON_SMOOTH': If enabled, draw polygons with proper filtering. Otherwise, +%% draw aliased polygons. For correct antialiased polygons, an alpha buffer is needed and +%% the polygons must be sorted front to back. +%% +%% `?GL_PRIMITIVE_RESTART': Enables primitive restarting. If enabled, any one of the +%% draw commands which transfers a set of generic attribute array elements to the GL will +%% restart the primitive when the index of the vertex is equal to the primitive restart +%% index. See {@link gl:primitiveRestartIndex/1} . +%% +%% `?GL_SAMPLE_ALPHA_TO_COVERAGE': If enabled, compute a temporary coverage value where +%% each bit is determined by the alpha value at the corresponding sample location. The temporary +%% coverage value is then ANDed with the fragment coverage value. +%% +%% `?GL_SAMPLE_ALPHA_TO_ONE': If enabled, each sample alpha value is replaced by the +%% maximum representable alpha value. +%% +%% `?GL_SAMPLE_COVERAGE': If enabled, the fragment's coverage is ANDed with the temporary +%% coverage value. If `?GL_SAMPLE_COVERAGE_INVERT' is set to `?GL_TRUE', invert +%% the coverage value. See {@link gl:sampleCoverage/2} . +%% +%% `?GL_SAMPLE_SHADING': If enabled, the active fragment shader is run once for each +%% covered sample, or at fraction of this rate as determined by the current value of `?GL_MIN_SAMPLE_SHADING_VALUE' +%% . See {@link gl:minSampleShading/1} . +%% +%% `?GL_SAMPLE_MASK': If enabled, the sample coverage mask generated for a fragment +%% during rasterization will be ANDed with the value of `?GL_SAMPLE_MASK_VALUE' before +%% shading occurs. See {@link gl:sampleMaski/2} . +%% +%% `?GL_SCISSOR_TEST': If enabled, discard fragments that are outside the scissor rectangle. +%% See {@link gl:scissor/4} . +%% +%% `?GL_STENCIL_TEST': If enabled, do stencil testing and update the stencil buffer. +%% See {@link gl:stencilFunc/3} and {@link gl:stencilOp/3} . +%% +%% `?GL_TEXTURE_CUBE_MAP_SEAMLESS': If enabled, cubemap textures are sampled such that +%% when linearly sampling from the border between two adjacent faces, texels from both faces +%% are used to generate the final sample value. When disabled, texels from only a single +%% face are used to construct the final sample value. +%% +%% `?GL_PROGRAM_POINT_SIZE': If enabled and a vertex or geometry shader is active, +%% then the derived point size is taken from the (potentially clipped) shader builtin `?gl_PointSize' +%% and clamped to the implementation-dependent point size range. +%% +%% See external documentation. +-spec enable(Cap) -> ok when Cap :: enum(). +enable(Cap) -> + cast(5060, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok -%% @doc See external documentation. --spec color4s(integer(),integer(),integer(),integer()) -> ok. -color4s(Red,Green,Blue,Alpha) -> - cast(5067, <>). +%% @doc +%% See {@link enable/1} +-spec disable(Cap) -> ok when Cap :: enum(). +disable(Cap) -> + cast(5061, <>). -%% @spec ({Red,Green,Blue,Alpha}) -> ok -%% @equiv color4s(Red,Green,Blue,Alpha) --spec color4sv({integer(),integer(),integer(),integer()}) -> ok. -color4sv({Red,Green,Blue,Alpha}) -> color4s(Red,Green,Blue,Alpha). +%% @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. +%% +%% The following capabilities are accepted for `Cap' : +%% +%% +%%
` Constant ' +%% ` See '
`?GL_BLEND' {@link gl:blendFunc/2} +%% , {@link gl:logicOp/1}
`?GL_CLIP_DISTANCE'`i' {@link gl:enable/1} +%%
`?GL_COLOR_LOGIC_OP' {@link gl:logicOp/1}
`?GL_CULL_FACE' +%% {@link gl:cullFace/1}
`?GL_DEPTH_CLAMP' {@link gl:enable/1} +%%
`?GL_DEPTH_TEST' {@link gl:depthFunc/1} , {@link gl:depthRange/2} +%%
`?GL_DITHER' {@link gl:enable/1}
`?GL_FRAMEBUFFER_SRGB' +%% {@link gl:enable/1}
`?GL_LINE_SMOOTH' {@link gl:lineWidth/1} +%%
`?GL_MULTISAMPLE' {@link gl:sampleCoverage/2}
+%% `?GL_POLYGON_SMOOTH' {@link gl:polygonMode/2}
`?GL_POLYGON_OFFSET_FILL' +%% {@link gl:polygonOffset/2}
`?GL_POLYGON_OFFSET_LINE' +%% {@link gl:polygonOffset/2}
`?GL_POLYGON_OFFSET_POINT' {@link gl:polygonOffset/2} +%%
`?GL_PROGRAM_POINT_SIZE' {@link gl:enable/1}
+%% `?GL_PRIMITIVE_RESTART' {@link gl:enable/1} , {@link gl:primitiveRestartIndex/1}
`?GL_SAMPLE_ALPHA_TO_COVERAGE' {@link gl:sampleCoverage/2}
`?GL_SAMPLE_ALPHA_TO_ONE' {@link gl:sampleCoverage/2}
+%% `?GL_SAMPLE_COVERAGE' {@link gl:sampleCoverage/2}
`?GL_SAMPLE_MASK' +%% {@link gl:enable/1}
`?GL_SCISSOR_TEST' {@link gl:scissor/4} +%%
`?GL_STENCIL_TEST' {@link gl:stencilFunc/3} , {@link gl:stencilOp/3} +%%
`?GL_TEXTURE_CUBEMAP_SEAMLESS' {@link gl:enable/1}
+%% +%% +%% +%% See external documentation. +-spec isEnabled(Cap) -> 0|1 when Cap :: enum(). +isEnabled(Cap) -> + call(5062, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok -%% @doc See external documentation. --spec color4ub(integer(),integer(),integer(),integer()) -> ok. -color4ub(Red,Green,Blue,Alpha) -> - cast(5068, <>). +%% @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: +%% +%% `?GL_COLOR_ARRAY': If enabled, the color array is enabled for writing and used during +%% rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} , +%% {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements' +%% is called. See {@link gl:colorPointer/4} . +%% +%% `?GL_EDGE_FLAG_ARRAY': If enabled, the edge flag array is enabled for writing and +%% used during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} +%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements' +%% is called. See {@link gl:edgeFlagPointer/2} . +%% +%% `?GL_FOG_COORD_ARRAY': If enabled, the fog coordinate array is enabled for writing +%% and used during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} +%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements' +%% is called. See {@link gl:fogCoordPointer/3} . +%% +%% `?GL_INDEX_ARRAY': If enabled, the index array is enabled for writing and used during +%% rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} , +%% {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements' +%% is called. See {@link gl:indexPointer/3} . +%% +%% `?GL_NORMAL_ARRAY': If enabled, the normal array is enabled for writing and used +%% during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} +%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements' +%% is called. See {@link gl:normalPointer/3} . +%% +%% `?GL_SECONDARY_COLOR_ARRAY': If enabled, the secondary color array is enabled for +%% writing and used during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} +%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements' +%% is called. See {@link gl:colorPointer/4} . +%% +%% `?GL_TEXTURE_COORD_ARRAY': If enabled, the texture coordinate array is enabled for +%% writing and used during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} +%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements' +%% is called. See {@link gl:texCoordPointer/4} . +%% +%% `?GL_VERTEX_ARRAY': If enabled, the vertex array is enabled for writing and used +%% during rendering when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:drawElements/4} +%% , {@link gl:drawRangeElements/6} {@link gl:multiDrawArrays/3} , or see `glMultiDrawElements' +%% is called. See {@link gl:vertexPointer/4} . +%% +%% 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. +%% +%% Type conversion is performed if `Params' has a different type than the state variable +%% value being requested. If ``gl:getBooleanv'' is called, a floating-point (or integer) +%% value is converted to `?GL_FALSE' if and only if it is 0.0 (or 0). Otherwise, it +%% is converted to `?GL_TRUE'. If ``gl:getIntegerv'' is called, boolean values are +%% returned as `?GL_TRUE' or `?GL_FALSE', and most floating-point values are rounded +%% to the nearest integer value. Floating-point colors and normals, however, are returned +%% with a linear mapping that maps 1.0 to the most positive representable integer value and +%% -1.0 to the most negative representable integer value. If ``gl:getFloatv'' or ``gl:getDoublev'' +%% is called, boolean values are returned as `?GL_TRUE' or `?GL_FALSE', and integer +%% values are converted to floating-point values. +%% +%% The following symbolic constants are accepted by `Pname' : +%% +%% `?GL_ACTIVE_TEXTURE': `Params' returns a single value indicating the active +%% multitexture unit. The initial value is `?GL_TEXTURE0'. See {@link gl:activeTexture/1} . +%% +%% +%% `?GL_ALIASED_LINE_WIDTH_RANGE': `Params' returns a pair of values indicating +%% the range of widths supported for aliased lines. See {@link gl:lineWidth/1} . +%% +%% `?GL_ARRAY_BUFFER_BINDING': `Params' returns a single value, the name of the +%% buffer object currently bound to the target `?GL_ARRAY_BUFFER'. If no buffer object +%% is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindBuffer/2} . +%% +%% +%% `?GL_BLEND': `Params' returns a single boolean value indicating whether blending +%% is enabled. The initial value is `?GL_FALSE'. See {@link gl:blendFunc/2} . +%% +%% `?GL_BLEND_COLOR': `Params' returns four values, the red, green, blue, and alpha +%% values which are the components of the blend color. See {@link gl:blendColor/4} . +%% +%% `?GL_BLEND_DST_ALPHA': `Params' returns one value, the symbolic constant identifying +%% the alpha destination blend function. The initial value is `?GL_ZERO'. See {@link gl:blendFunc/2} +%% and {@link gl:blendFuncSeparate/4} . +%% +%% `?GL_BLEND_DST_RGB': `Params' returns one value, the symbolic constant identifying +%% the RGB destination blend function. The initial value is `?GL_ZERO'. See {@link gl:blendFunc/2} +%% and {@link gl:blendFuncSeparate/4} . +%% +%% `?GL_BLEND_EQUATION_RGB': `Params' returns one value, a symbolic constant indicating +%% whether the RGB blend equation is `?GL_FUNC_ADD', `?GL_FUNC_SUBTRACT', `?GL_FUNC_REVERSE_SUBTRACT' +%% , `?GL_MIN' or `?GL_MAX'. See {@link gl:blendEquationSeparate/2} . +%% +%% `?GL_BLEND_EQUATION_ALPHA': `Params' returns one value, a symbolic constant +%% indicating whether the Alpha blend equation is `?GL_FUNC_ADD', `?GL_FUNC_SUBTRACT' +%% , `?GL_FUNC_REVERSE_SUBTRACT', `?GL_MIN' or `?GL_MAX'. See {@link gl:blendEquationSeparate/2} +%% . +%% +%% `?GL_BLEND_SRC_ALPHA': `Params' returns one value, the symbolic constant identifying +%% the alpha source blend function. The initial value is `?GL_ONE'. See {@link gl:blendFunc/2} +%% and {@link gl:blendFuncSeparate/4} . +%% +%% `?GL_BLEND_SRC_RGB': `Params' returns one value, the symbolic constant identifying +%% the RGB source blend function. The initial value is `?GL_ONE'. See {@link gl:blendFunc/2} +%% and {@link gl:blendFuncSeparate/4} . +%% +%% `?GL_COLOR_CLEAR_VALUE': `Params' returns four values: the red, green, blue, +%% and alpha values used to clear the color buffers. Integer values, if requested, are linearly +%% mapped from the internal floating-point representation such that 1.0 returns the most +%% positive representable integer value, and -1.0 returns the most negative representable +%% integer value. The initial value is (0, 0, 0, 0). See {@link gl:clearColor/4} . +%% +%% `?GL_COLOR_LOGIC_OP': `Params' returns a single boolean value indicating whether +%% a fragment's RGBA color values are merged into the framebuffer using a logical operation. +%% The initial value is `?GL_FALSE'. See {@link gl:logicOp/1} . +%% +%% `?GL_COLOR_WRITEMASK': `Params' returns four boolean values: the red, green, +%% blue, and alpha write enables for the color buffers. The initial value is (`?GL_TRUE', +%% `?GL_TRUE', `?GL_TRUE', `?GL_TRUE'). See {@link gl:colorMask/4} . +%% +%% `?GL_COMPRESSED_TEXTURE_FORMATS': `Params' returns a list of symbolic constants +%% of length `?GL_NUM_COMPRESSED_TEXTURE_FORMATS' indicating which compressed texture +%% formats are available. See {@link gl:compressedTexImage2D/8} . +%% +%% `?GL_CONTEXT_FLAGS': `Params' returns one value, the flags with which the context +%% was created (such as debugging functionality). +%% +%% `?GL_CULL_FACE': `Params' returns a single boolean value indicating whether +%% polygon culling is enabled. The initial value is `?GL_FALSE'. See {@link gl:cullFace/1} +%% . +%% +%% `?GL_CURRENT_PROGRAM': `Params' returns one value, the name of the program object +%% that is currently active, or 0 if no program object is active. See {@link gl:useProgram/1} . +%% +%% +%% `?GL_DEPTH_CLEAR_VALUE': `Params' returns one value, the value that is used +%% to clear the depth buffer. Integer values, if requested, are linearly mapped from the +%% internal floating-point representation such that 1.0 returns the most positive representable +%% integer value, and -1.0 returns the most negative representable integer value. The initial +%% value is 1. See {@link gl:clearDepth/1} . +%% +%% `?GL_DEPTH_FUNC': `Params' returns one value, the symbolic constant that indicates +%% the depth comparison function. The initial value is `?GL_LESS'. See {@link gl:depthFunc/1} +%% . +%% +%% `?GL_DEPTH_RANGE': `Params' returns two values: the near and far mapping limits +%% for the depth buffer. Integer values, if requested, are linearly mapped from the internal +%% floating-point representation such that 1.0 returns the most positive representable integer +%% value, and -1.0 returns the most negative representable integer value. The initial value +%% is (0, 1). See {@link gl:depthRange/2} . +%% +%% `?GL_DEPTH_TEST': `Params' returns a single boolean value indicating whether +%% depth testing of fragments is enabled. The initial value is `?GL_FALSE'. See {@link gl:depthFunc/1} +%% and {@link gl:depthRange/2} . +%% +%% `?GL_DEPTH_WRITEMASK': `Params' returns a single boolean value indicating if +%% the depth buffer is enabled for writing. The initial value is `?GL_TRUE'. See {@link gl:depthMask/1} +%% . +%% +%% `?GL_DITHER': `Params' returns a single boolean value indicating whether dithering +%% of fragment colors and indices is enabled. The initial value is `?GL_TRUE'. +%% +%% `?GL_DOUBLEBUFFER': `Params' returns a single boolean value indicating whether +%% double buffering is supported. +%% +%% `?GL_DRAW_BUFFER': `Params' returns one value, a symbolic constant indicating +%% which buffers are being drawn to. See {@link gl:drawBuffer/1} . The initial value is `?GL_BACK' +%% if there are back buffers, otherwise it is `?GL_FRONT'. +%% +%% `?GL_DRAW_BUFFER'`i': `Params' returns one value, a symbolic constant indicating +%% which buffers are being drawn to by the corresponding output color. See {@link gl:drawBuffers/1} +%% . The initial value of `?GL_DRAW_BUFFER0' is `?GL_BACK' if there are back buffers, +%% otherwise it is `?GL_FRONT'. The initial values of draw buffers for all other output +%% colors is `?GL_NONE'. +%% +%% `?GL_DRAW_FRAMEBUFFER_BINDING': `Params' returns one value, the name of the +%% framebuffer object currently bound to the `?GL_DRAW_FRAMEBUFFER' target. If the default +%% framebuffer is bound, this value will be zero. The initial value is zero. See {@link gl:bindFramebuffer/2} +%% . +%% +%% `?GL_READ_FRAMEBUFFER_BINDING': `Params' returns one value, the name of the +%% framebuffer object currently bound to the `?GL_READ_FRAMEBUFFER' target. If the default +%% framebuffer is bound, this value will be zero. The initial value is zero. See {@link gl:bindFramebuffer/2} +%% . +%% +%% `?GL_ELEMENT_ARRAY_BUFFER_BINDING': `Params' returns a single value, the name +%% of the buffer object currently bound to the target `?GL_ELEMENT_ARRAY_BUFFER'. If +%% no buffer object is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindBuffer/2} +%% . +%% +%% `?GL_FRAGMENT_SHADER_DERIVATIVE_HINT': `Params' returns one value, a symbolic +%% constant indicating the mode of the derivative accuracy hint for fragment shaders. The +%% initial value is `?GL_DONT_CARE'. See {@link gl:hint/2} . +%% +%% `?GL_IMPLEMENTATION_COLOR_READ_FORMAT': `Params' returns a single GLenum value +%% indicating the implementation's preferred pixel data format. See {@link gl:readPixels/7} . +%% +%% `?GL_IMPLEMENTATION_COLOR_READ_TYPE': `Params' returns a single GLenum value +%% indicating the implementation's preferred pixel data type. See {@link gl:readPixels/7} . +%% +%% `?GL_LINE_SMOOTH': `Params' returns a single boolean value indicating whether +%% antialiasing of lines is enabled. The initial value is `?GL_FALSE'. See {@link gl:lineWidth/1} +%% . +%% +%% `?GL_LINE_SMOOTH_HINT': `Params' returns one value, a symbolic constant indicating +%% the mode of the line antialiasing hint. The initial value is `?GL_DONT_CARE'. See {@link gl:hint/2} +%% . +%% +%% `?GL_LINE_WIDTH': `Params' returns one value, the line width as specified with {@link gl:lineWidth/1} +%% . The initial value is 1. +%% +%% `?GL_LAYER_PROVOKING_VERTEX': `Params' returns one value, the implementation +%% dependent specifc vertex of a primitive that is used to select the rendering layer. If +%% the value returned is equivalent to `?GL_PROVOKING_VERTEX', then the vertex selection +%% follows the convention specified by {@link gl:provokingVertex/1} . If the value returned +%% is equivalent to `?GL_FIRST_VERTEX_CONVENTION', then the selection is always taken +%% from the first vertex in the primitive. If the value returned is equivalent to `?GL_LAST_VERTEX_CONVENTION' +%% , then the selection is always taken from the last vertex in the primitive. If the value +%% returned is equivalent to `?GL_UNDEFINED_VERTEX', then the selection is not guaranteed +%% to be taken from any specific vertex in the primitive. +%% +%% `?GL_LINE_WIDTH_GRANULARITY': `Params' returns one value, the width difference +%% between adjacent supported widths for antialiased lines. See {@link gl:lineWidth/1} . +%% +%% `?GL_LINE_WIDTH_RANGE': `Params' returns two values: the smallest and largest +%% supported widths for antialiased lines. See {@link gl:lineWidth/1} . +%% +%% `?GL_LOGIC_OP_MODE': `Params' returns one value, a symbolic constant indicating +%% the selected logic operation mode. The initial value is `?GL_COPY'. See {@link gl:logicOp/1} +%% . +%% +%% `?GL_MAJOR_VERSION': `Params' returns one value, the major version number of +%% the OpenGL API supported by the current context. +%% +%% `?GL_MAX_3D_TEXTURE_SIZE': `Params' returns one value, a rough estimate of the +%% largest 3D texture that the GL can handle. The value must be at least 64. Use `?GL_PROXY_TEXTURE_3D' +%% to determine if a texture is too large. See {@link gl:texImage3D/10} . +%% +%% `?GL_MAX_ARRAY_TEXTURE_LAYERS': `Params' returns one value. The value indicates +%% the maximum number of layers allowed in an array texture, and must be at least 256. See {@link gl:texImage2D/9} +%% . +%% +%% `?GL_MAX_CLIP_DISTANCES': `Params' returns one value, the maximum number of +%% application-defined clipping distances. The value must be at least 8. +%% +%% `?GL_MAX_COLOR_TEXTURE_SAMPLES': `Params' returns one value, the maximum number +%% of samples in a color multisample texture. +%% +%% `?GL_MAX_COMBINED_ATOMIC_COUNTERS': `Params' returns a single value, the maximum +%% number of atomic counters available to all active shaders. +%% +%% `?GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS': `Params' returns one value, +%% the number of words for fragment shader uniform variables in all uniform blocks (including +%% default). The value must be at least 1. See {@link gl:uniform1f/2} . +%% +%% `?GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS': `Params' returns one value, +%% the number of words for geometry shader uniform variables in all uniform blocks (including +%% default). The value must be at least 1. See {@link gl:uniform1f/2} . +%% +%% `?GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS': `Params' returns one value, the maximum +%% supported texture image units that can be used to access texture maps from the vertex +%% shader and the fragment processor combined. If both the vertex shader and the fragment +%% processing stage access the same texture image unit, then that counts as using two texture +%% image units against this limit. The value must be at least 48. See {@link gl:activeTexture/1} +%% . +%% +%% `?GL_MAX_COMBINED_UNIFORM_BLOCKS': `Params' returns one value, the maximum number +%% of uniform blocks per program. The value must be at least 36. See {@link gl:uniformBlockBinding/3} +%% . +%% +%% `?GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS': `Params' returns one value, the +%% number of words for vertex shader uniform variables in all uniform blocks (including default). +%% The value must be at least 1. See {@link gl:uniform1f/2} . +%% +%% `?GL_MAX_CUBE_MAP_TEXTURE_SIZE': `Params' returns one value. The value gives +%% a rough estimate of the largest cube-map texture that the GL can handle. The value must +%% be at least 1024. Use `?GL_PROXY_TEXTURE_CUBE_MAP' to determine if a texture is too +%% large. See {@link gl:texImage2D/9} . +%% +%% `?GL_MAX_DEPTH_TEXTURE_SAMPLES': `Params' returns one value, the maximum number +%% of samples in a multisample depth or depth-stencil texture. +%% +%% `?GL_MAX_DRAW_BUFFERS': `Params' returns one value, the maximum number of simultaneous +%% outputs that may be written in a fragment shader. The value must be at least 8. See {@link gl:drawBuffers/1} +%% . +%% +%% `?GL_MAX_DUALSOURCE_DRAW_BUFFERS': `Params' returns one value, the maximum number +%% of active draw buffers when using dual-source blending. The value must be at least 1. +%% See {@link gl:blendFunc/2} and {@link gl:blendFuncSeparate/4} . +%% +%% `?GL_MAX_ELEMENTS_INDICES': `Params' returns one value, the recommended maximum +%% number of vertex array indices. See {@link gl:drawRangeElements/6} . +%% +%% `?GL_MAX_ELEMENTS_VERTICES': `Params' returns one value, the recommended maximum +%% number of vertex array vertices. See {@link gl:drawRangeElements/6} . +%% +%% `?GL_MAX_FRAGMENT_ATOMIC_COUNTERS': `Params' returns a single value, the maximum +%% number of atomic counters available to fragment shaders. +%% +%% `?GL_MAX_FRAGMENT_INPUT_COMPONENTS': `Params' returns one value, the maximum +%% number of components of the inputs read by the fragment shader, which must be at least +%% 128. +%% +%% `?GL_MAX_FRAGMENT_UNIFORM_COMPONENTS': `Params' returns one value, the maximum +%% number of individual floating-point, integer, or boolean values that can be held in uniform +%% variable storage for a fragment shader. The value must be at least 1024. See {@link gl:uniform1f/2} +%% . +%% +%% `?GL_MAX_FRAGMENT_UNIFORM_VECTORS': `Params' returns one value, the maximum +%% number of individual 4-vectors of floating-point, integer, or boolean values that can +%% be held in uniform variable storage for a fragment shader. The value is equal to the value +%% of `?GL_MAX_FRAGMENT_UNIFORM_COMPONENTS' divided by 4 and must be at least 256. See {@link gl:uniform1f/2} +%% . +%% +%% `?GL_MAX_FRAGMENT_UNIFORM_BLOCKS': `Params' returns one value, the maximum number +%% of uniform blocks per fragment shader. The value must be at least 12. See {@link gl:uniformBlockBinding/3} +%% . +%% +%% `?GL_MAX_GEOMETRY_ATOMIC_COUNTERS': `Params' returns a single value, the maximum +%% number of atomic counters available to geometry shaders. +%% +%% `?GL_MAX_GEOMETRY_INPUT_COMPONENTS': `Params' returns one value, the maximum +%% number of components of inputs read by a geometry shader, which must be at least 64. +%% +%% `?GL_MAX_GEOMETRY_OUTPUT_COMPONENTS': `Params' returns one value, the maximum +%% number of components of outputs written by a geometry shader, which must be at least 128. +%% +%% +%% `?GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS': `Params' returns one value, the maximum +%% supported texture image units that can be used to access texture maps from the geometry +%% shader. The value must be at least 16. See {@link gl:activeTexture/1} . +%% +%% `?GL_MAX_GEOMETRY_UNIFORM_BLOCKS': `Params' returns one value, the maximum number +%% of uniform blocks per geometry shader. The value must be at least 12. See {@link gl:uniformBlockBinding/3} +%% . +%% +%% `?GL_MAX_GEOMETRY_UNIFORM_COMPONENTS': `Params' returns one value, the maximum +%% number of individual floating-point, integer, or boolean values that can be held in uniform +%% variable storage for a geometry shader. The value must be at least 1024. See {@link gl:uniform1f/2} +%% . +%% +%% `?GL_MAX_INTEGER_SAMPLES': `Params' returns one value, the maximum number of +%% samples supported in integer format multisample buffers. +%% +%% `?GL_MIN_MAP_BUFFER_ALIGNMENT': `Params' returns one value, the minimum alignment +%% in basic machine units of pointers returned fromsee `glMapBuffer' and see `glMapBufferRange' +%% . This value must be a power of two and must be at least 64. +%% +%% `?GL_MAX_PROGRAM_TEXEL_OFFSET': `Params' returns one value, the maximum texel +%% offset allowed in a texture lookup, which must be at least 7. +%% +%% `?GL_MIN_PROGRAM_TEXEL_OFFSET': `Params' returns one value, the minimum texel +%% offset allowed in a texture lookup, which must be at most -8. +%% +%% `?GL_MAX_RECTANGLE_TEXTURE_SIZE': `Params' returns one value. The value gives +%% a rough estimate of the largest rectangular texture that the GL can handle. The value +%% must be at least 1024. Use `?GL_PROXY_RECTANGLE_TEXTURE' to determine if a texture +%% is too large. See {@link gl:texImage2D/9} . +%% +%% `?GL_MAX_RENDERBUFFER_SIZE': `Params' returns one value. The value indicates +%% the maximum supported size for renderbuffers. See {@link gl:framebufferRenderbuffer/4} . +%% +%% `?GL_MAX_SAMPLE_MASK_WORDS': `Params' returns one value, the maximum number +%% of sample mask words. +%% +%% `?GL_MAX_SERVER_WAIT_TIMEOUT': `Params' returns one value, the maximum {@link gl:waitSync/3} +%% timeout interval. +%% +%% `?GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS': `Params' returns a single value, the +%% maximum number of atomic counters available to tessellation control shaders. +%% +%% `?GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS': `Params' returns a single value, +%% the maximum number of atomic counters available to tessellation evaluation shaders. +%% +%% `?GL_MAX_TEXTURE_BUFFER_SIZE': `Params' returns one value. The value gives the +%% maximum number of texels allowed in the texel array of a texture buffer object. Value +%% must be at least 65536. +%% +%% `?GL_MAX_TEXTURE_IMAGE_UNITS': `Params' returns one value, the maximum supported +%% texture image units that can be used to access texture maps from the fragment shader. +%% The value must be at least 16. See {@link gl:activeTexture/1} . +%% +%% `?GL_MAX_TEXTURE_LOD_BIAS': `Params' returns one value, the maximum, absolute +%% value of the texture level-of-detail bias. The value must be at least 2.0. +%% +%% `?GL_MAX_TEXTURE_SIZE': `Params' returns one value. The value gives a rough +%% estimate of the largest texture that the GL can handle. The value must be at least 1024. +%% Use a proxy texture target such as `?GL_PROXY_TEXTURE_1D' or `?GL_PROXY_TEXTURE_2D' +%% to determine if a texture is too large. See {@link gl:texImage1D/8} and {@link gl:texImage2D/9} +%% . +%% +%% `?GL_MAX_UNIFORM_BUFFER_BINDINGS': `Params' returns one value, the maximum number +%% of uniform buffer binding points on the context, which must be at least 36. +%% +%% `?GL_MAX_UNIFORM_BLOCK_SIZE': `Params' returns one value, the maximum size in +%% basic machine units of a uniform block, which must be at least 16384. +%% +%% `?GL_MAX_VARYING_COMPONENTS': `Params' returns one value, the number components +%% for varying variables, which must be at least 60. +%% +%% `?GL_MAX_VARYING_VECTORS': `Params' returns one value, the number 4-vectors +%% for varying variables, which is equal to the value of `?GL_MAX_VARYING_COMPONENTS' +%% and must be at least 15. +%% +%% `?GL_MAX_VARYING_FLOATS': `Params' returns one value, the maximum number of +%% interpolators available for processing varying variables used by vertex and fragment shaders. +%% This value represents the number of individual floating-point values that can be interpolated; +%% varying variables declared as vectors, matrices, and arrays will all consume multiple +%% interpolators. The value must be at least 32. +%% +%% `?GL_MAX_VERTEX_ATOMIC_COUNTERS': `Params' returns a single value, the maximum +%% number of atomic counters available to vertex shaders. +%% +%% `?GL_MAX_VERTEX_ATTRIBS': `Params' returns one value, the maximum number of +%% 4-component generic vertex attributes accessible to a vertex shader. The value must be +%% at least 16. See {@link gl:vertexAttrib1d/2} . +%% +%% `?GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS': `Params' returns one value, the maximum +%% supported texture image units that can be used to access texture maps from the vertex +%% shader. The value may be at least 16. See {@link gl:activeTexture/1} . +%% +%% `?GL_MAX_VERTEX_UNIFORM_COMPONENTS': `Params' returns one value, the maximum +%% number of individual floating-point, integer, or boolean values that can be held in uniform +%% variable storage for a vertex shader. The value must be at least 1024. See {@link gl:uniform1f/2} +%% . +%% +%% `?GL_MAX_VERTEX_UNIFORM_VECTORS': `Params' returns one value, the maximum number +%% of 4-vectors that may be held in uniform variable storage for the vertex shader. The value +%% of `?GL_MAX_VERTEX_UNIFORM_VECTORS' is equal to the value of `?GL_MAX_VERTEX_UNIFORM_COMPONENTS' +%% and must be at least 256. +%% +%% `?GL_MAX_VERTEX_OUTPUT_COMPONENTS': `Params' returns one value, the maximum +%% number of components of output written by a vertex shader, which must be at least 64. +%% +%% `?GL_MAX_VERTEX_UNIFORM_BLOCKS': `Params' returns one value, the maximum number +%% of uniform blocks per vertex shader. The value must be at least 12. See {@link gl:uniformBlockBinding/3} +%% . +%% +%% `?GL_MAX_VIEWPORT_DIMS': `Params' returns two values: the maximum supported +%% width and height of the viewport. These must be at least as large as the visible dimensions +%% of the display being rendered to. See {@link gl:viewport/4} . +%% +%% `?GL_MAX_VIEWPORTS': `Params' returns one value, the maximum number of simultaneous +%% viewports that are supported. The value must be at least 16. See {@link gl:viewportIndexedf/5} +%% . +%% +%% `?GL_MINOR_VERSION': `Params' returns one value, the minor version number of +%% the OpenGL API supported by the current context. +%% +%% `?GL_NUM_COMPRESSED_TEXTURE_FORMATS': `Params' returns a single integer value +%% indicating the number of available compressed texture formats. The minimum value is 4. +%% See {@link gl:compressedTexImage2D/8} . +%% +%% `?GL_NUM_EXTENSIONS': `Params' returns one value, the number of extensions supported +%% by the GL implementation for the current context. See {@link gl:getString/1} . +%% +%% `?GL_NUM_PROGRAM_BINARY_FORMATS': `Params' returns one value, the number of +%% program binary formats supported by the implementation. +%% +%% `?GL_NUM_SHADER_BINARY_FORMATS': `Params' returns one value, the number of binary +%% shader formats supported by the implementation. If this value is greater than zero, then +%% the implementation supports loading binary shaders. If it is zero, then the loading of +%% binary shaders by the implementation is not supported. +%% +%% `?GL_PACK_ALIGNMENT': `Params' returns one value, the byte alignment used for +%% writing pixel data to memory. The initial value is 4. See {@link gl:pixelStoref/2} . +%% +%% `?GL_PACK_IMAGE_HEIGHT': `Params' returns one value, the image height used for +%% writing pixel data to memory. The initial value is 0. See {@link gl:pixelStoref/2} . +%% +%% `?GL_PACK_LSB_FIRST': `Params' returns a single boolean value indicating whether +%% single-bit pixels being written to memory are written first to the least significant bit +%% of each unsigned byte. The initial value is `?GL_FALSE'. See {@link gl:pixelStoref/2} . +%% +%% +%% `?GL_PACK_ROW_LENGTH': `Params' returns one value, the row length used for writing +%% pixel data to memory. The initial value is 0. See {@link gl:pixelStoref/2} . +%% +%% `?GL_PACK_SKIP_IMAGES': `Params' returns one value, the number of pixel images +%% skipped before the first pixel is written into memory. The initial value is 0. See {@link gl:pixelStoref/2} +%% . +%% +%% `?GL_PACK_SKIP_PIXELS': `Params' returns one value, the number of pixel locations +%% skipped before the first pixel is written into memory. The initial value is 0. See {@link gl:pixelStoref/2} +%% . +%% +%% `?GL_PACK_SKIP_ROWS': `Params' returns one value, the number of rows of pixel +%% locations skipped before the first pixel is written into memory. The initial value is +%% 0. See {@link gl:pixelStoref/2} . +%% +%% `?GL_PACK_SWAP_BYTES': `Params' returns a single boolean value indicating whether +%% the bytes of two-byte and four-byte pixel indices and components are swapped before being +%% written to memory. The initial value is `?GL_FALSE'. See {@link gl:pixelStoref/2} . +%% +%% `?GL_PIXEL_PACK_BUFFER_BINDING': `Params' returns a single value, the name of +%% the buffer object currently bound to the target `?GL_PIXEL_PACK_BUFFER'. If no buffer +%% object is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindBuffer/2} +%% . +%% +%% `?GL_PIXEL_UNPACK_BUFFER_BINDING': `Params' returns a single value, the name +%% of the buffer object currently bound to the target `?GL_PIXEL_UNPACK_BUFFER'. If +%% no buffer object is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindBuffer/2} +%% . +%% +%% `?GL_POINT_FADE_THRESHOLD_SIZE': `Params' returns one value, the point size +%% threshold for determining the point size. See {@link gl:pointParameterf/2} . +%% +%% `?GL_PRIMITIVE_RESTART_INDEX': `Params' returns one value, the current primitive +%% restart index. The initial value is 0. See {@link gl:primitiveRestartIndex/1} . +%% +%% `?GL_PROGRAM_BINARY_FORMATS': `Params' an array of `?GL_NUM_PROGRAM_BINARY_FORMATS' +%% values, indicating the proram binary formats supported by the implementation. +%% +%% `?GL_PROGRAM_PIPELINE_BINDING': `Params' a single value, the name of the currently +%% bound program pipeline object, or zero if no program pipeline object is bound. See {@link gl:bindProgramPipeline/1} +%% . +%% +%% `?GL_PROVOKING_VERTEX': `Params' returns one value, the currently selected provoking +%% vertex convention. The initial value is `?GL_LAST_VERTEX_CONVENTION'. See {@link gl:provokingVertex/1} +%% . +%% +%% `?GL_POINT_SIZE': `Params' returns one value, the point size as specified by {@link gl:pointSize/1} +%% . The initial value is 1. +%% +%% `?GL_POINT_SIZE_GRANULARITY': `Params' returns one value, the size difference +%% between adjacent supported sizes for antialiased points. See {@link gl:pointSize/1} . +%% +%% `?GL_POINT_SIZE_RANGE': `Params' returns two values: the smallest and largest +%% supported sizes for antialiased points. The smallest size must be at most 1, and the largest +%% size must be at least 1. See {@link gl:pointSize/1} . +%% +%% `?GL_POLYGON_OFFSET_FACTOR': `Params' returns one value, the scaling factor +%% used to determine the variable offset that is added to the depth value of each fragment +%% generated when a polygon is rasterized. The initial value is 0. See {@link gl:polygonOffset/2} +%% . +%% +%% `?GL_POLYGON_OFFSET_UNITS': `Params' returns one value. This value is multiplied +%% by an implementation-specific value and then added to the depth value of each fragment +%% generated when a polygon is rasterized. The initial value is 0. See {@link gl:polygonOffset/2} +%% . +%% +%% `?GL_POLYGON_OFFSET_FILL': `Params' returns a single boolean value indicating +%% whether polygon offset is enabled for polygons in fill mode. The initial value is `?GL_FALSE' +%% . See {@link gl:polygonOffset/2} . +%% +%% `?GL_POLYGON_OFFSET_LINE': `Params' returns a single boolean value indicating +%% whether polygon offset is enabled for polygons in line mode. The initial value is `?GL_FALSE' +%% . See {@link gl:polygonOffset/2} . +%% +%% `?GL_POLYGON_OFFSET_POINT': `Params' returns a single boolean value indicating +%% whether polygon offset is enabled for polygons in point mode. The initial value is `?GL_FALSE' +%% . See {@link gl:polygonOffset/2} . +%% +%% `?GL_POLYGON_SMOOTH': `Params' returns a single boolean value indicating whether +%% antialiasing of polygons is enabled. The initial value is `?GL_FALSE'. See {@link gl:polygonMode/2} +%% . +%% +%% `?GL_POLYGON_SMOOTH_HINT': `Params' returns one value, a symbolic constant indicating +%% the mode of the polygon antialiasing hint. The initial value is `?GL_DONT_CARE'. +%% See {@link gl:hint/2} . +%% +%% `?GL_READ_BUFFER': `Params' returns one value, a symbolic constant indicating +%% which color buffer is selected for reading. The initial value is `?GL_BACK' if there +%% is a back buffer, otherwise it is `?GL_FRONT'. See {@link gl:readPixels/7} . +%% +%% `?GL_RENDERBUFFER_BINDING': `Params' returns a single value, the name of the +%% renderbuffer object currently bound to the target `?GL_RENDERBUFFER'. If no renderbuffer +%% object is bound to this target, 0 is returned. The initial value is 0. See {@link gl:bindRenderbuffer/2} +%% . +%% +%% `?GL_SAMPLE_BUFFERS': `Params' returns a single integer value indicating the +%% number of sample buffers associated with the framebuffer. See {@link gl:sampleCoverage/2} . +%% +%% +%% `?GL_SAMPLE_COVERAGE_VALUE': `Params' returns a single positive floating-point +%% value indicating the current sample coverage value. See {@link gl:sampleCoverage/2} . +%% +%% `?GL_SAMPLE_COVERAGE_INVERT': `Params' returns a single boolean value indicating +%% if the temporary coverage value should be inverted. See {@link gl:sampleCoverage/2} . +%% +%% `?GL_SAMPLER_BINDING': `Params' returns a single value, the name of the sampler +%% object currently bound to the active texture unit. The initial value is 0. See {@link gl:bindSampler/2} +%% . +%% +%% `?GL_SAMPLES': `Params' returns a single integer value indicating the coverage +%% mask size. See {@link gl:sampleCoverage/2} . +%% +%% `?GL_SCISSOR_BOX': `Params' returns four values: the x and y window coordinates +%% of the scissor box, followed by its width and height. Initially the x and y window +%% coordinates are both 0 and the width and height are set to the size of the window. See {@link gl:scissor/4} +%% . +%% +%% `?GL_SCISSOR_TEST': `Params' returns a single boolean value indicating whether +%% scissoring is enabled. The initial value is `?GL_FALSE'. See {@link gl:scissor/4} . +%% +%% `?GL_SHADER_COMPILER': `Params' returns a single boolean value indicating whether +%% an online shader compiler is present in the implementation. All desktop OpenGL implementations +%% must support online shader compilations, and therefore the value of `?GL_SHADER_COMPILER' +%% will always be `?GL_TRUE'. +%% +%% `?GL_SMOOTH_LINE_WIDTH_RANGE': `Params' returns a pair of values indicating +%% the range of widths supported for smooth (antialiased) lines. See {@link gl:lineWidth/1} . +%% +%% `?GL_SMOOTH_LINE_WIDTH_GRANULARITY': `Params' returns a single value indicating +%% the level of quantization applied to smooth line width parameters. +%% +%% `?GL_STENCIL_BACK_FAIL': `Params' returns one value, a symbolic constant indicating +%% what action is taken for back-facing polygons when the stencil test fails. The initial +%% value is `?GL_KEEP'. See {@link gl:stencilOpSeparate/4} . +%% +%% `?GL_STENCIL_BACK_FUNC': `Params' returns one value, a symbolic constant indicating +%% what function is used for back-facing polygons to compare the stencil reference value +%% with the stencil buffer value. The initial value is `?GL_ALWAYS'. See {@link gl:stencilFuncSeparate/4} +%% . +%% +%% `?GL_STENCIL_BACK_PASS_DEPTH_FAIL': `Params' returns one value, a symbolic constant +%% indicating what action is taken for back-facing polygons when the stencil test passes, +%% but the depth test fails. The initial value is `?GL_KEEP'. See {@link gl:stencilOpSeparate/4} +%% . +%% +%% `?GL_STENCIL_BACK_PASS_DEPTH_PASS': `Params' returns one value, a symbolic constant +%% indicating what action is taken for back-facing polygons when the stencil test passes +%% and the depth test passes. The initial value is `?GL_KEEP'. See {@link gl:stencilOpSeparate/4} +%% . +%% +%% `?GL_STENCIL_BACK_REF': `Params' returns one value, the reference value that +%% is compared with the contents of the stencil buffer for back-facing polygons. The initial +%% value is 0. See {@link gl:stencilFuncSeparate/4} . +%% +%% `?GL_STENCIL_BACK_VALUE_MASK': `Params' returns one value, the mask that is +%% used for back-facing polygons to mask both the stencil reference value and the stencil +%% buffer value before they are compared. The initial value is all 1's. See {@link gl:stencilFuncSeparate/4} +%% . +%% +%% `?GL_STENCIL_BACK_WRITEMASK': `Params' returns one value, the mask that controls +%% writing of the stencil bitplanes for back-facing polygons. The initial value is all 1's. +%% See {@link gl:stencilMaskSeparate/2} . +%% +%% `?GL_STENCIL_CLEAR_VALUE': `Params' returns one value, the index to which the +%% stencil bitplanes are cleared. The initial value is 0. See {@link gl:clearStencil/1} . +%% +%% `?GL_STENCIL_FAIL': `Params' returns one value, a symbolic constant indicating +%% what action is taken when the stencil test fails. The initial value is `?GL_KEEP'. +%% See {@link gl:stencilOp/3} . This stencil state only affects non-polygons and front-facing +%% polygons. Back-facing polygons use separate stencil state. See {@link gl:stencilOpSeparate/4} +%% . +%% +%% `?GL_STENCIL_FUNC': `Params' returns one value, a symbolic constant indicating +%% what function is used to compare the stencil reference value with the stencil buffer value. +%% The initial value is `?GL_ALWAYS'. See {@link gl:stencilFunc/3} . This stencil state +%% only affects non-polygons and front-facing polygons. Back-facing polygons use separate +%% stencil state. See {@link gl:stencilFuncSeparate/4} . +%% +%% `?GL_STENCIL_PASS_DEPTH_FAIL': `Params' returns one value, a symbolic constant +%% indicating what action is taken when the stencil test passes, but the depth test fails. +%% The initial value is `?GL_KEEP'. See {@link gl:stencilOp/3} . This stencil state only +%% affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil +%% state. See {@link gl:stencilOpSeparate/4} . +%% +%% `?GL_STENCIL_PASS_DEPTH_PASS': `Params' returns one value, a symbolic constant +%% indicating what action is taken when the stencil test passes and the depth test passes. +%% The initial value is `?GL_KEEP'. See {@link gl:stencilOp/3} . This stencil state only +%% affects non-polygons and front-facing polygons. Back-facing polygons use separate stencil +%% state. See {@link gl:stencilOpSeparate/4} . +%% +%% `?GL_STENCIL_REF': `Params' returns one value, the reference value that is compared +%% with the contents of the stencil buffer. The initial value is 0. See {@link gl:stencilFunc/3} +%% . This stencil state only affects non-polygons and front-facing polygons. Back-facing +%% polygons use separate stencil state. See {@link gl:stencilFuncSeparate/4} . +%% +%% `?GL_STENCIL_TEST': `Params' returns a single boolean value indicating whether +%% stencil testing of fragments is enabled. The initial value is `?GL_FALSE'. See {@link gl:stencilFunc/3} +%% and {@link gl:stencilOp/3} . +%% +%% `?GL_STENCIL_VALUE_MASK': `Params' returns one value, the mask that is used +%% to mask both the stencil reference value and the stencil buffer value before they are +%% compared. The initial value is all 1's. See {@link gl:stencilFunc/3} . This stencil state +%% only affects non-polygons and front-facing polygons. Back-facing polygons use separate +%% stencil state. See {@link gl:stencilFuncSeparate/4} . +%% +%% `?GL_STENCIL_WRITEMASK': `Params' returns one value, the mask that controls +%% writing of the stencil bitplanes. The initial value is all 1's. See {@link gl:stencilMask/1} +%% . This stencil state only affects non-polygons and front-facing polygons. Back-facing +%% polygons use separate stencil state. See {@link gl:stencilMaskSeparate/2} . +%% +%% `?GL_STEREO': `Params' returns a single boolean value indicating whether stereo +%% buffers (left and right) are supported. +%% +%% `?GL_SUBPIXEL_BITS': `Params' returns one value, an estimate of the number of +%% bits of subpixel resolution that are used to position rasterized geometry in window coordinates. +%% The value must be at least 4. +%% +%% `?GL_TEXTURE_BINDING_1D': `Params' returns a single value, the name of the texture +%% currently bound to the target `?GL_TEXTURE_1D'. The initial value is 0. See {@link gl:bindTexture/2} +%% . +%% +%% `?GL_TEXTURE_BINDING_1D_ARRAY': `Params' returns a single value, the name of +%% the texture currently bound to the target `?GL_TEXTURE_1D_ARRAY'. The initial value +%% is 0. See {@link gl:bindTexture/2} . +%% +%% `?GL_TEXTURE_BINDING_2D': `Params' returns a single value, the name of the texture +%% currently bound to the target `?GL_TEXTURE_2D'. The initial value is 0. See {@link gl:bindTexture/2} +%% . +%% +%% `?GL_TEXTURE_BINDING_2D_ARRAY': `Params' returns a single value, the name of +%% the texture currently bound to the target `?GL_TEXTURE_2D_ARRAY'. The initial value +%% is 0. See {@link gl:bindTexture/2} . +%% +%% `?GL_TEXTURE_BINDING_2D_MULTISAMPLE': `Params' returns a single value, the name +%% of the texture currently bound to the target `?GL_TEXTURE_2D_MULTISAMPLE'. The initial +%% value is 0. See {@link gl:bindTexture/2} . +%% +%% `?GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY': `Params' returns a single value, +%% the name of the texture currently bound to the target `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY' +%% . The initial value is 0. See {@link gl:bindTexture/2} . +%% +%% `?GL_TEXTURE_BINDING_3D': `Params' returns a single value, the name of the texture +%% currently bound to the target `?GL_TEXTURE_3D'. The initial value is 0. See {@link gl:bindTexture/2} +%% . +%% +%% `?GL_TEXTURE_BINDING_BUFFER': `Params' returns a single value, the name of the +%% texture currently bound to the target `?GL_TEXTURE_BUFFER'. The initial value is +%% 0. See {@link gl:bindTexture/2} . +%% +%% `?GL_TEXTURE_BINDING_CUBE_MAP': `Params' returns a single value, the name of +%% the texture currently bound to the target `?GL_TEXTURE_CUBE_MAP'. The initial value +%% is 0. See {@link gl:bindTexture/2} . +%% +%% `?GL_TEXTURE_BINDING_RECTANGLE': `Params' returns a single value, the name of +%% the texture currently bound to the target `?GL_TEXTURE_RECTANGLE'. The initial value +%% is 0. See {@link gl:bindTexture/2} . +%% +%% `?GL_TEXTURE_COMPRESSION_HINT': `Params' returns a single value indicating the +%% mode of the texture compression hint. The initial value is `?GL_DONT_CARE'. +%% +%% `?GL_TEXTURE_BUFFER_BINDING': `Params' returns a single value, the name of the +%% texture buffer object currently bound. The initial value is 0. See {@link gl:bindBuffer/2} . +%% +%% +%% `?GL_TIMESTAMP': `Params' returns a single value, the 64-bit value of the current +%% GL time. See {@link gl:queryCounter/2} . +%% +%% `?GL_TRANSFORM_FEEDBACK_BUFFER_BINDING': When used with non-indexed variants of ``gl:get'' +%% (such as ``gl:getIntegerv''), `Params' returns a single value, the name of the +%% buffer object currently bound to the target `?GL_TRANSFORM_FEEDBACK_BUFFER'. If no +%% buffer object is bound to this target, 0 is returned. When used with indexed variants of ``gl:get'' +%% (such as ``gl:getIntegeri_v''), `Params' returns a single value, the name of the +%% buffer object bound to the indexed transform feedback attribute stream. The initial value +%% is 0 for all targets. See {@link gl:bindBuffer/2} , {@link gl:bindBufferBase/3} , and {@link gl:bindBufferRange/5} +%% . +%% +%% `?GL_TRANSFORM_FEEDBACK_BUFFER_START': When used with indexed variants of ``gl:get'' +%% (such as ``gl:getInteger64i_v''), `Params' returns a single value, the start offset +%% of the binding range for each transform feedback attribute stream. The initial value is +%% 0 for all streams. See {@link gl:bindBufferRange/5} . +%% +%% `?GL_TRANSFORM_FEEDBACK_BUFFER_SIZE': When used with indexed variants of ``gl:get'' +%% (such as ``gl:getInteger64i_v''), `Params' returns a single value, the size of +%% the binding range for each transform feedback attribute stream. The initial value is 0 +%% for all streams. See {@link gl:bindBufferRange/5} . +%% +%% `?GL_UNIFORM_BUFFER_BINDING': When used with non-indexed variants of ``gl:get'' +%% (such as ``gl:getIntegerv''), `Params' returns a single value, the name of the +%% buffer object currently bound to the target `?GL_UNIFORM_BUFFER'. If no buffer object +%% is bound to this target, 0 is returned. When used with indexed variants of ``gl:get'' +%% (such as ``gl:getIntegeri_v''), `Params' returns a single value, the name of the +%% buffer object bound to the indexed uniform buffer binding point. The initial value is +%% 0 for all targets. See {@link gl:bindBuffer/2} , {@link gl:bindBufferBase/3} , and {@link gl:bindBufferRange/5} +%% . +%% +%% `?GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT': `Params' returns a single value, the +%% minimum required alignment for uniform buffer sizes and offset. The initial value is 1. +%% See {@link gl:uniformBlockBinding/3} . +%% +%% `?GL_UNIFORM_BUFFER_SIZE': When used with indexed variants of ``gl:get'' (such +%% as ``gl:getInteger64i_v''), `Params' returns a single value, the size of the binding +%% range for each indexed uniform buffer binding. The initial value is 0 for all bindings. +%% See {@link gl:bindBufferRange/5} . +%% +%% `?GL_UNIFORM_BUFFER_START': When used with indexed variants of ``gl:get'' (such +%% as ``gl:getInteger64i_v''), `Params' returns a single value, the start offset of +%% the binding range for each indexed uniform buffer binding. The initial value is 0 for +%% all bindings. See {@link gl:bindBufferRange/5} . +%% +%% `?GL_UNPACK_ALIGNMENT': `Params' returns one value, the byte alignment used +%% for reading pixel data from memory. The initial value is 4. See {@link gl:pixelStoref/2} . +%% +%% `?GL_UNPACK_IMAGE_HEIGHT': `Params' returns one value, the image height used +%% for reading pixel data from memory. The initial is 0. See {@link gl:pixelStoref/2} . +%% +%% `?GL_UNPACK_LSB_FIRST': `Params' returns a single boolean value indicating whether +%% single-bit pixels being read from memory are read first from the least significant bit +%% of each unsigned byte. The initial value is `?GL_FALSE'. See {@link gl:pixelStoref/2} . +%% +%% +%% `?GL_UNPACK_ROW_LENGTH': `Params' returns one value, the row length used for +%% reading pixel data from memory. The initial value is 0. See {@link gl:pixelStoref/2} . +%% +%% `?GL_UNPACK_SKIP_IMAGES': `Params' returns one value, the number of pixel images +%% skipped before the first pixel is read from memory. The initial value is 0. See {@link gl:pixelStoref/2} +%% . +%% +%% `?GL_UNPACK_SKIP_PIXELS': `Params' returns one value, the number of pixel locations +%% skipped before the first pixel is read from memory. The initial value is 0. See {@link gl:pixelStoref/2} +%% . +%% +%% `?GL_UNPACK_SKIP_ROWS': `Params' returns one value, the number of rows of pixel +%% locations skipped before the first pixel is read from memory. The initial value is 0. +%% See {@link gl:pixelStoref/2} . +%% +%% `?GL_UNPACK_SWAP_BYTES': `Params' returns a single boolean value indicating +%% whether the bytes of two-byte and four-byte pixel indices and components are swapped after +%% being read from memory. The initial value is `?GL_FALSE'. See {@link gl:pixelStoref/2} . +%% +%% +%% `?GL_VERTEX_PROGRAM_POINT_SIZE': `Params' returns a single boolean value indicating +%% whether vertex program point size mode is enabled. If enabled, and a vertex shader is +%% active, then the point size is taken from the shader built-in gl_PointSize. If disabled, +%% and a vertex shader is active, then the point size is taken from the point state as specified +%% by {@link gl:pointSize/1} . The initial value is `?GL_FALSE'. +%% +%% `?GL_VIEWPORT': When used with non-indexed variants of ``gl:get'' (such as ``gl:getIntegerv'' +%% ), `Params' returns four values: the x and y window coordinates of the viewport, +%% followed by its width and height. Initially the x and y window coordinates are both +%% set to 0, and the width and height are set to the width and height of the window into +%% which the GL will do its rendering. See {@link gl:viewport/4} . When used with indexed +%% variants of ``gl:get'' (such as ``gl:getIntegeri_v''), `Params' returns four +%% values: the x and y window coordinates of the indexed viewport, followed by its width +%% and height. Initially the x and y window coordinates are both set to 0, and the width +%% and height are set to the width and height of the window into which the GL will do its +%% rendering. See {@link gl:viewportIndexedf/5} . +%% +%% `?GL_VIEWPORT_BOUNDS_RANGE': `Params' returns two values, the minimum and maximum +%% viewport bounds range. The minimum range should be at least [-32768, 32767]. +%% +%% `?GL_VIEWPORT_INDEX_PROVOKING_VERTEX': `Params' returns one value, the implementation +%% dependent specifc vertex of a primitive that is used to select the viewport index. If +%% the value returned is equivalent to `?GL_PROVOKING_VERTEX', then the vertex selection +%% follows the convention specified by {@link gl:provokingVertex/1} . If the value returned +%% is equivalent to `?GL_FIRST_VERTEX_CONVENTION', then the selection is always taken +%% from the first vertex in the primitive. If the value returned is equivalent to `?GL_LAST_VERTEX_CONVENTION' +%% , then the selection is always taken from the last vertex in the primitive. If the value +%% returned is equivalent to `?GL_UNDEFINED_VERTEX', then the selection is not guaranteed +%% to be taken from any specific vertex in the primitive. +%% +%% `?GL_VIEWPORT_SUBPIXEL_BITS': `Params' returns a single value, the number of +%% bits of sub-pixel precision which the GL uses to interpret the floating point viewport +%% bounds. The minimum value is 0. +%% +%% Many of the boolean parameters can also be queried more easily using {@link gl:isEnabled/1} +%% . +%% +%% See external documentation. +-spec getBooleanv(Pname) -> [0|1] when Pname :: enum(). +getBooleanv(Pname) -> + call(5065, <>). -%% @spec ({Red,Green,Blue,Alpha}) -> ok -%% @equiv color4ub(Red,Green,Blue,Alpha) --spec color4ubv({integer(),integer(),integer(),integer()}) -> ok. -color4ubv({Red,Green,Blue,Alpha}) -> color4ub(Red,Green,Blue,Alpha). +%% @doc +%% See {@link getBooleanv/1} +-spec getDoublev(Pname) -> [float()] when Pname :: enum(). +getDoublev(Pname) -> + call(5066, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok -%% @doc See external documentation. --spec color4ui(integer(),integer(),integer(),integer()) -> ok. -color4ui(Red,Green,Blue,Alpha) -> - cast(5069, <>). +%% @doc +%% See {@link getBooleanv/1} +-spec getFloatv(Pname) -> [float()] when Pname :: enum(). +getFloatv(Pname) -> + call(5067, <>). -%% @spec ({Red,Green,Blue,Alpha}) -> ok -%% @equiv color4ui(Red,Green,Blue,Alpha) --spec color4uiv({integer(),integer(),integer(),integer()}) -> ok. -color4uiv({Red,Green,Blue,Alpha}) -> color4ui(Red,Green,Blue,Alpha). +%% @doc +%% See {@link getBooleanv/1} +-spec getIntegerv(Pname) -> [integer()] when Pname :: enum(). +getIntegerv(Pname) -> + call(5068, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok -%% @doc See external documentation. --spec color4us(integer(),integer(),integer(),integer()) -> ok. -color4us(Red,Green,Blue,Alpha) -> - cast(5070, <>). +%% @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. +%% +%% The symbolic mask constants and their associated GL state are as follows (the second +%% column lists which attributes are saved): +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%%
`?GL_ACCUM_BUFFER_BIT' Accumulation buffer clear value +%%
`?GL_COLOR_BUFFER_BIT'`?GL_ALPHA_TEST' enable bit
Alpha test function and reference value
+%% `?GL_BLEND' enable bit
Blending source and destination +%% functions
Constant blend color
+%% Blending equation
`?GL_DITHER' enable bit
+%% `?GL_DRAW_BUFFER' setting
`?GL_COLOR_LOGIC_OP' +%% enable bit
`?GL_INDEX_LOGIC_OP' enable bit
Logic op function
Color mode and index mode +%% clear values
Color mode and index mode writemasks
`?GL_CURRENT_BIT' Current RGBA color
Current +%% color index
Current normal vector
+%% Current texture coordinates
Current raster position
`?GL_CURRENT_RASTER_POSITION_VALID' flag
+%% RGBA color associated with current raster position
Color +%% index associated with current raster position
Texture coordinates +%% associated with current raster position
`?GL_EDGE_FLAG' +%% flag
`?GL_DEPTH_BUFFER_BIT'`?GL_DEPTH_TEST' enable +%% bit
Depth buffer test function
+%% Depth buffer clear value
`?GL_DEPTH_WRITEMASK' enable +%% bit
`?GL_ENABLE_BIT'`?GL_ALPHA_TEST' flag
`?GL_AUTO_NORMAL' flag
`?GL_BLEND' flag +%%
Enable bits for the user-definable clipping planes
`?GL_COLOR_MATERIAL'
`?GL_CULL_FACE' +%% flag
`?GL_DEPTH_TEST' flag
`?GL_DITHER' +%% flag
`?GL_FOG' flag
`?GL_LIGHT' +%% `i' where `?0' <= `i' < `?GL_MAX_LIGHTS'
`?GL_LIGHTING' flag
`?GL_LINE_SMOOTH' +%% flag
`?GL_LINE_STIPPLE' flag
`?GL_COLOR_LOGIC_OP' +%% flag
`?GL_INDEX_LOGIC_OP' flag
+%% `?GL_MAP1_'`x' where `x' is a map type
`?GL_MAP2_' +%% `x' where `x' is a map type
`?GL_MULTISAMPLE' +%% flag
`?GL_NORMALIZE' flag
`?GL_POINT_SMOOTH' +%% flag
`?GL_POLYGON_OFFSET_LINE' flag
`?GL_POLYGON_OFFSET_FILL' flag
`?GL_POLYGON_OFFSET_POINT' +%% flag
`?GL_POLYGON_SMOOTH' flag
+%% `?GL_POLYGON_STIPPLE' flag
`?GL_SAMPLE_ALPHA_TO_COVERAGE' +%% flag
`?GL_SAMPLE_ALPHA_TO_ONE' flag
`?GL_SAMPLE_COVERAGE' flag
`?GL_SCISSOR_TEST' +%% flag
`?GL_STENCIL_TEST' flag
`?GL_TEXTURE_1D' +%% flag
`?GL_TEXTURE_2D' flag
`?GL_TEXTURE_3D' +%% flag
Flags `?GL_TEXTURE_GEN_'`x' where `x' +%% is S, T, R, or Q
`?GL_EVAL_BIT'`?GL_MAP1_'`x' +%% enable bits, where `x' is a map type
`?GL_MAP2_'`x' +%% enable bits, where `x' is a map type
1D grid endpoints +%% and divisions
2D grid endpoints and divisions
+%% `?GL_AUTO_NORMAL' enable bit
`?GL_FOG_BIT'`?GL_FOG' +%% enable bit
Fog color
Fog density +%%
Linear fog start
Linear fog end
Fog index
`?GL_FOG_MODE' value
`?GL_HINT_BIT'`?GL_PERSPECTIVE_CORRECTION_HINT' setting
`?GL_POINT_SMOOTH_HINT' setting
`?GL_LINE_SMOOTH_HINT' +%% setting
`?GL_POLYGON_SMOOTH_HINT' setting
+%% `?GL_FOG_HINT' setting
`?GL_GENERATE_MIPMAP_HINT' +%% setting
`?GL_TEXTURE_COMPRESSION_HINT' setting
`?GL_LIGHTING_BIT'`?GL_COLOR_MATERIAL' enable bit
`?GL_COLOR_MATERIAL_FACE' value
Color material +%% parameters that are tracking the current color
Ambient scene +%% color
`?GL_LIGHT_MODEL_LOCAL_VIEWER' value
+%% `?GL_LIGHT_MODEL_TWO_SIDE' setting
`?GL_LIGHTING' +%% enable bit
Enable bit for each light
+%% Ambient, diffuse, and specular intensity for each light
Direction, +%% position, exponent, and cutoff angle for each light
Constant, +%% linear, and quadratic attenuation factors for each light
Ambient, +%% diffuse, specular, and emissive color for each material
Ambient, +%% diffuse, and specular color indices for each material
Specular +%% exponent for each material
`?GL_SHADE_MODEL' setting
`?GL_LINE_BIT'`?GL_LINE_SMOOTH' flag
`?GL_LINE_STIPPLE' enable bit
Line stipple pattern +%% and repeat counter
Line width
`?GL_LIST_BIT' +%% `?GL_LIST_BASE' setting
`?GL_MULTISAMPLE_BIT' +%% `?GL_MULTISAMPLE' flag
`?GL_SAMPLE_ALPHA_TO_COVERAGE' +%% flag
`?GL_SAMPLE_ALPHA_TO_ONE' flag
`?GL_SAMPLE_COVERAGE' flag
`?GL_SAMPLE_COVERAGE_VALUE' +%% value
`?GL_SAMPLE_COVERAGE_INVERT' value
+%% `?GL_PIXEL_MODE_BIT'`?GL_RED_BIAS' and `?GL_RED_SCALE' settings
`?GL_GREEN_BIAS' and `?GL_GREEN_SCALE' values
`?GL_BLUE_BIAS' and `?GL_BLUE_SCALE'
`?GL_ALPHA_BIAS' +%% and `?GL_ALPHA_SCALE'
`?GL_DEPTH_BIAS' and `?GL_DEPTH_SCALE' +%%
`?GL_INDEX_OFFSET' and `?GL_INDEX_SHIFT' values
`?GL_MAP_COLOR' and `?GL_MAP_STENCIL' flags
`?GL_ZOOM_X' and `?GL_ZOOM_Y' factors
`?GL_READ_BUFFER' +%% setting
`?GL_POINT_BIT'`?GL_POINT_SMOOTH' flag
Point size
`?GL_POLYGON_BIT'`?GL_CULL_FACE' +%% enable bit
`?GL_CULL_FACE_MODE' value
`?GL_FRONT_FACE' indicator
`?GL_POLYGON_MODE' +%% setting
`?GL_POLYGON_SMOOTH' flag
+%% `?GL_POLYGON_STIPPLE' enable bit
`?GL_POLYGON_OFFSET_FILL' +%% flag
`?GL_POLYGON_OFFSET_LINE' flag
`?GL_POLYGON_OFFSET_POINT' flag
`?GL_POLYGON_OFFSET_FACTOR' +%%
`?GL_POLYGON_OFFSET_UNITS'
`?GL_POLYGON_STIPPLE_BIT' +%% Polygon stipple image
`?GL_SCISSOR_BIT'`?GL_SCISSOR_TEST' +%% flag
Scissor box
`?GL_STENCIL_BUFFER_BIT' +%% `?GL_STENCIL_TEST' enable bit
Stencil function +%% and reference value
Stencil value mask
Stencil fail, pass, and depth buffer pass actions
Stencil +%% buffer clear value
Stencil buffer writemask
+%% `?GL_TEXTURE_BIT' Enable bits for the four texture coordinates
Border color for each texture image
Minification +%% function for each texture image
Magnification function for +%% each texture image
Texture coordinates and wrap mode for each +%% texture image
Color and mode for each texture environment
Enable bits `?GL_TEXTURE_GEN_'`x', `x' is S, T, +%% R, and Q
`?GL_TEXTURE_GEN_MODE' setting for S, T, R, and +%% Q
{@link gl:texGend/3} plane equations for S, T, R, and Q
Current texture bindings (for example, `?GL_TEXTURE_BINDING_2D')
`?GL_TRANSFORM_BIT' Coefficients of the six clipping planes
Enable bits for the user-definable clipping planes
+%% `?GL_MATRIX_MODE' value
`?GL_NORMALIZE' +%% flag
`?GL_RESCALE_NORMAL' flag
`?GL_VIEWPORT_BIT' +%% Depth range (near and far)
Viewport origin and extent +%%
+%% +%% {@link gl:pushAttrib/1} restores the values of the state variables saved with the last ``gl:pushAttrib'' +%% command. Those not saved are left unchanged. +%% +%% It is an error to push attributes onto a full stack or to pop attributes off an empty +%% stack. In either case, the error flag is set and no other change is made to GL state. +%% +%% Initially, the attribute stack is empty. +%% +%% See external documentation. +-spec pushAttrib(Mask) -> ok when Mask :: integer(). +pushAttrib(Mask) -> + cast(5069, <>). -%% @spec ({Red,Green,Blue,Alpha}) -> ok -%% @equiv color4us(Red,Green,Blue,Alpha) --spec color4usv({integer(),integer(),integer(),integer()}) -> ok. -color4usv({Red,Green,Blue,Alpha}) -> color4us(Red,Green,Blue,Alpha). +%% @doc +%% See {@link pushAttrib/1} +-spec popAttrib() -> ok. +popAttrib() -> + cast(5070, <<>>). -%% @spec (Red::0|1,Green::0|1,Blue::0|1,Alpha::0|1) -> ok -%% @doc See external documentation. --spec colorMask(0|1,0|1,0|1,0|1) -> ok. -colorMask(Red,Green,Blue,Alpha) -> - cast(5071, <>). +%% @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. +%% +%% The symbolic mask constants and their associated GL client state are as follows (the +%% second column lists which attributes are saved): +%% +%% `?GL_CLIENT_PIXEL_STORE_BIT' Pixel storage modes `?GL_CLIENT_VERTEX_ARRAY_BIT' +%% Vertex arrays (and enables) +%% +%% {@link gl:pushClientAttrib/1} restores the values of the client-state variables saved with +%% the last ``gl:pushClientAttrib''. Those not saved are left unchanged. +%% +%% It is an error to push attributes onto a full client attribute stack or to pop attributes +%% off an empty stack. In either case, the error flag is set, and no other change is made +%% to GL state. +%% +%% Initially, the client attribute stack is empty. +%% +%% See external documentation. +-spec pushClientAttrib(Mask) -> ok when Mask :: integer(). +pushClientAttrib(Mask) -> + cast(5071, <>). -%% @spec (Face::enum(),Mode::enum()) -> ok -%% @doc See external documentation. --spec colorMaterial(enum(),enum()) -> ok. -colorMaterial(Face,Mode) -> - cast(5072, <>). - -%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec colorPointer(integer(),enum(),integer(),offset()|mem()) -> ok. -colorPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) -> - cast(5073, <>); -colorPointer(Size,Type,Stride,Pointer) -> - send_bin(Pointer), - cast(5074, <>). +%% @doc +%% See {@link pushClientAttrib/1} +-spec popClientAttrib() -> ok. +popClientAttrib() -> + cast(5072, <<>>). -%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer(),Type::enum()) -> ok -%% @doc See external documentation. --spec copyPixels(integer(),integer(),integer(),integer(),enum()) -> ok. -copyPixels(X,Y,Width,Height,Type) -> - cast(5075, <>). - -%% @spec (Target::enum(),Level::integer(),InternalFormat::enum(),X::integer(),Y::integer(),Width::integer(),Border::integer()) -> ok -%% @doc See external documentation. --spec copyTexImage1D(enum(),integer(),enum(),integer(),integer(),integer(),integer()) -> ok. -copyTexImage1D(Target,Level,InternalFormat,X,Y,Width,Border) -> - cast(5076, <>). - -%% @spec (Target::enum(),Level::integer(),InternalFormat::enum(),X::integer(),Y::integer(),Width::integer(),Height::integer(),Border::integer()) -> ok -%% @doc See external documentation. --spec copyTexImage2D(enum(),integer(),enum(),integer(),integer(),integer(),integer(),integer()) -> ok. -copyTexImage2D(Target,Level,InternalFormat,X,Y,Width,Height,Border) -> - cast(5077, <>). - -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),X::integer(),Y::integer(),Width::integer()) -> ok -%% @doc See external documentation. --spec copyTexSubImage1D(enum(),integer(),integer(),integer(),integer(),integer()) -> ok. -copyTexSubImage1D(Target,Level,Xoffset,X,Y,Width) -> - cast(5078, <>). +%% @doc Set rasterization mode +%% +%% ``gl:renderMode'' sets the rasterization mode. It takes one argument, `Mode' , which +%% can assume one of three predefined values: +%% +%% `?GL_RENDER': Render mode. Primitives are rasterized, producing pixel fragments, +%% which are written into the frame buffer. This is the normal mode and also the default +%% mode. +%% +%% `?GL_SELECT': Selection mode. No pixel fragments are produced, and no change to +%% the frame buffer contents is made. Instead, a record of the names of primitives that would +%% have been drawn if the render mode had been `?GL_RENDER' is returned in a select +%% buffer, which must be created (see {@link gl:selectBuffer/2} ) before selection mode is +%% entered. +%% +%% `?GL_FEEDBACK': Feedback mode. No pixel fragments are produced, and no change to +%% the frame buffer contents is made. Instead, the coordinates and attributes of vertices +%% that would have been drawn if the render mode had been `?GL_RENDER' is returned in +%% a feedback buffer, which must be created (see {@link gl:feedbackBuffer/3} ) before feedback +%% mode is entered. +%% +%% The return value of ``gl:renderMode'' is determined by the render mode at the time ``gl:renderMode'' +%% is called, rather than by `Mode' . The values returned for the three render modes +%% are as follows: +%% +%% `?GL_RENDER': 0. +%% +%% `?GL_SELECT': The number of hit records transferred to the select buffer. +%% +%% `?GL_FEEDBACK': The number of values (not vertices) transferred to the feedback +%% buffer. +%% +%% See the {@link gl:selectBuffer/2} and {@link gl:feedbackBuffer/3} reference pages for more +%% details concerning selection and feedback operation. +%% +%% See external documentation. +-spec renderMode(Mode) -> integer() when Mode :: enum(). +renderMode(Mode) -> + call(5073, <>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok -%% @doc See external documentation. --spec copyTexSubImage2D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),integer()) -> ok. -copyTexSubImage2D(Target,Level,Xoffset,Yoffset,X,Y,Width,Height) -> - cast(5079, <>). +%% @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. +%% +%% To allow for distributed implementations, there may be several error flags. If any single +%% error flag has recorded an error, the value of that flag is returned and that flag is +%% reset to `?GL_NO_ERROR' when ``gl:getError'' is called. If more than one flag has +%% recorded an error, ``gl:getError'' returns and clears an arbitrary error flag value. +%% Thus, ``gl:getError'' should always be called in a loop, until it returns `?GL_NO_ERROR' +%% , if all error flags are to be reset. +%% +%% Initially, all error flags are set to `?GL_NO_ERROR'. +%% +%% The following errors are currently defined: +%% +%% `?GL_NO_ERROR': No error has been recorded. The value of this symbolic constant +%% is guaranteed to be 0. +%% +%% `?GL_INVALID_ENUM': An unacceptable value is specified for an enumerated argument. +%% The offending command is ignored and has no other side effect than to set the error flag. +%% +%% +%% `?GL_INVALID_VALUE': A numeric argument is out of range. The offending command is +%% ignored and has no other side effect than to set the error flag. +%% +%% `?GL_INVALID_OPERATION': The specified operation is not allowed in the current state. +%% The offending command is ignored and has no other side effect than to set the error flag. +%% +%% +%% `?GL_INVALID_FRAMEBUFFER_OPERATION': The framebuffer object is not complete. The +%% offending command is ignored and has no other side effect than to set the error flag. +%% +%% `?GL_OUT_OF_MEMORY': There is not enough memory left to execute the command. The +%% state of the GL is undefined, except for the state of the error flags, after this error +%% is recorded. +%% +%% When an error flag is set, results of a GL operation are undefined only if `?GL_OUT_OF_MEMORY' +%% has occurred. In all other cases, the command generating the error is ignored and has +%% no effect on the GL state or frame buffer contents. If the generating command returns +%% a value, it returns 0. If ``gl:getError'' itself generates an error, it returns 0. +%% +%% See external documentation. +-spec getError() -> enum(). +getError() -> + call(5074, <<>>). -%% @spec (Mode::enum()) -> ok -%% @doc See external documentation. --spec cullFace(enum()) -> ok. -cullFace(Mode) -> - cast(5080, <>). +%% @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: +%% +%% `?GL_VENDOR': Returns the company responsible for this GL implementation. This name +%% does not change from release to release. +%% +%% `?GL_RENDERER': Returns the name of the renderer. This name is typically specific +%% to a particular configuration of a hardware platform. It does not change from release +%% to release. +%% +%% `?GL_VERSION': Returns a version or release number. +%% +%% `?GL_SHADING_LANGUAGE_VERSION': Returns a version or release number for the shading +%% language. +%% +%% ``gl:getStringi'' returns a pointer to a static string indexed by `Index' . `Name' +%% can be one of the following: +%% +%% `?GL_EXTENSIONS': For ``gl:getStringi'' only, returns the extension string supported +%% by the implementation at `Index' . +%% +%% Strings `?GL_VENDOR' and `?GL_RENDERER' together uniquely specify a platform. +%% They do not change from release to release and should be used by platform-recognition +%% algorithms. +%% +%% The `?GL_VERSION' and `?GL_SHADING_LANGUAGE_VERSION' strings begin with a version +%% number. The version number uses one of these forms: +%% +%% `major_number.minor_number'`major_number.minor_number.release_number' +%% +%% Vendor-specific information may follow the version number. Its format depends on the +%% implementation, but a space always separates the version number and the vendor-specific +%% information. +%% +%% All strings are null-terminated. +%% +%% See external documentation. +-spec getString(Name) -> string() when Name :: enum(). +getString(Name) -> + call(5075, <>). -%% @spec (List::integer(),Range::integer()) -> ok -%% @doc See external documentation. --spec deleteLists(integer(),integer()) -> ok. -deleteLists(List,Range) -> - cast(5081, <>). +%% @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, <<>>). -%% @spec (Textures::[integer()]) -> ok -%% @doc See external documentation. --spec deleteTextures([integer()]) -> ok. -deleteTextures(Textures) -> - cast(5082, <<(length(Textures)):?GLuint, - (<< <> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>). +%% @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. +%% +%% Because any GL program might be executed over a network, or on an accelerator that buffers +%% commands, all programs should call ``gl:flush'' whenever they count on having all of +%% their previously issued commands completed. For example, call ``gl:flush'' before waiting +%% for user input that depends on the generated image. +%% +%% See external documentation. +-spec flush() -> ok. +flush() -> + cast(5077, <<>>). -%% @spec (Func::enum()) -> ok -%% @doc See external documentation. --spec depthFunc(enum()) -> ok. +%% @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: +%% +%% `?GL_FASTEST': The most efficient option should be chosen. +%% +%% `?GL_NICEST': The most correct, or highest quality, option should be chosen. +%% +%% `?GL_DONT_CARE': No preference. +%% +%% Though the implementation aspects that can be hinted are well defined, the interpretation +%% of the hints depends on the implementation. The hint aspects that can be specified with `Target' +%% , along with suggested semantics, are as follows: +%% +%% `?GL_FRAGMENT_SHADER_DERIVATIVE_HINT': Indicates the accuracy of the derivative +%% calculation for the GL shading language fragment processing built-in functions: `?dFdx' +%% , `?dFdy', and `?fwidth'. +%% +%% `?GL_LINE_SMOOTH_HINT': Indicates the sampling quality of antialiased lines. If +%% a larger filter function is applied, hinting `?GL_NICEST' can result in more pixel +%% fragments being generated during rasterization. +%% +%% `?GL_POLYGON_SMOOTH_HINT': Indicates the sampling quality of antialiased polygons. +%% Hinting `?GL_NICEST' can result in more pixel fragments being generated during rasterization, +%% if a larger filter function is applied. +%% +%% `?GL_TEXTURE_COMPRESSION_HINT': Indicates the quality and performance of the compressing +%% texture images. Hinting `?GL_FASTEST' indicates that texture images should be compressed +%% as quickly as possible, while `?GL_NICEST' indicates that texture images should be +%% compressed with as little image quality loss as possible. `?GL_NICEST' should be +%% selected if the texture is to be retrieved by {@link gl:getCompressedTexImage/3} for reuse. +%% +%% +%% 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' +%% .) +%% +%% `Func' specifies the conditions under which the pixel will be drawn. The comparison +%% functions are as follows: +%% +%% `?GL_NEVER': Never passes. +%% +%% `?GL_LESS': Passes if the incoming depth value is less than the stored depth value. +%% +%% +%% `?GL_EQUAL': Passes if the incoming depth value is equal to the stored depth value. +%% +%% +%% `?GL_LEQUAL': Passes if the incoming depth value is less than or equal to the stored +%% depth value. +%% +%% `?GL_GREATER': Passes if the incoming depth value is greater than the stored depth +%% value. +%% +%% `?GL_NOTEQUAL': Passes if the incoming depth value is not equal to the stored depth +%% value. +%% +%% `?GL_GEQUAL': Passes if the incoming depth value is greater than or equal to the +%% stored depth value. +%% +%% `?GL_ALWAYS': Always passes. +%% +%% The initial value of `Func' is `?GL_LESS'. Initially, depth testing is disabled. +%% If depth testing is disabled or if no depth buffer exists, it is as if the depth test +%% always passes. +%% +%% See external documentation. +-spec depthFunc(Func) -> ok when Func :: enum(). depthFunc(Func) -> - cast(5083, <>). + cast(5080, <>). -%% @spec (Flag::0|1) -> ok -%% @doc See external documentation. --spec depthMask(0|1) -> ok. +%% @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(5084, <>). + cast(5081, <>). -%% @spec (ZNear::clamp(),ZFar::clamp()) -> ok -%% @doc See external documentation. --spec depthRange(clamp(),clamp()) -> ok. -depthRange(ZNear,ZFar) -> - cast(5085, <>). +%% @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. +%% +%% The setting of (0,1) maps the near plane to 0 and the far plane to 1. With this mapping, +%% the depth buffer range is fully utilized. +%% +%% See external documentation. +-spec depthRange(Near_val, Far_val) -> ok when Near_val :: clamp(),Far_val :: clamp(). +depthRange(Near_val,Far_val) -> + cast(5082, <>). -%% @spec (Cap::enum()) -> ok -%% @doc See external documentation. --spec disable(enum()) -> ok. -disable(Cap) -> - cast(5086, <>). +%% @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. +%% +%% Values specified by ``gl:clearAccum'' are clamped to the range [-1 1]. +%% +%% 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, <>). -%% @spec (Array::enum()) -> ok -%% @doc See external documentation. --spec disableClientState(enum()) -> ok. -disableClientState(Array) -> - cast(5087, <>). +%% @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. +%% +%% Each pixel in the accumulation buffer consists of red, green, blue, and alpha values. +%% The number of bits per component in the accumulation buffer depends on the implementation. +%% You can examine this number by calling {@link gl:getBooleanv/1} four times, with arguments +%% `?GL_ACCUM_RED_BITS', `?GL_ACCUM_GREEN_BITS', `?GL_ACCUM_BLUE_BITS', and `?GL_ACCUM_ALPHA_BITS' +%% . Regardless of the number of bits per component, the range of values stored by each component +%% is [-1 1]. The accumulation buffer pixels are mapped one-to-one with frame buffer pixels. +%% +%% ``gl:accum'' operates on the accumulation buffer. The first argument, `Op' , is +%% a symbolic constant that selects an accumulation buffer operation. The second argument, `Value' +%% , is a floating-point value to be used in that operation. Five operations are specified: `?GL_ACCUM' +%% , `?GL_LOAD', `?GL_ADD', `?GL_MULT', and `?GL_RETURN'. +%% +%% All accumulation buffer operations are limited to the area of the current scissor box +%% and applied identically to the red, green, blue, and alpha components of each pixel. If +%% a ``gl:accum'' operation results in a value outside the range [-1 1], the contents of an +%% accumulation buffer pixel component are undefined. +%% +%% The operations are as follows: +%% +%% `?GL_ACCUM': Obtains R, G, B, and A values from the buffer currently selected for +%% reading (see {@link gl:readBuffer/1} ). Each component value is divided by 2 n-1, where +%% n is the number of bits allocated to each color component in the currently selected buffer. +%% The result is a floating-point value in the range [0 1], which is multiplied by `Value' +%% and added to the corresponding pixel component in the accumulation buffer, thereby updating +%% the accumulation buffer. +%% +%% `?GL_LOAD': Similar to `?GL_ACCUM', except that the current value in the accumulation +%% buffer is not used in the calculation of the new value. That is, the R, G, B, and A values +%% from the currently selected buffer are divided by 2 n-1, multiplied by `Value' , +%% and then stored in the corresponding accumulation buffer cell, overwriting the current +%% value. +%% +%% `?GL_ADD': Adds `Value' to each R, G, B, and A in the accumulation buffer. +%% +%% `?GL_MULT': Multiplies each R, G, B, and A in the accumulation buffer by `Value' +%% and returns the scaled component to its corresponding accumulation buffer location. +%% +%% `?GL_RETURN': Transfers accumulation buffer values to the color buffer or buffers +%% currently selected for writing. Each R, G, B, and A component is multiplied by `Value' +%% , then multiplied by 2 n-1, clamped to the range [0 2 n-1], and stored in the corresponding +%% display buffer cell. The only fragment operations that are applied to this transfer are +%% pixel ownership, scissor, dithering, and color writemasks. +%% +%% To clear the accumulation buffer, call {@link gl:clearAccum/4} with R, G, B, and A values +%% to set it to, then call {@link gl:clear/1} with the accumulation buffer enabled. +%% +%% See external documentation. +-spec accum(Op, Value) -> ok when Op :: enum(),Value :: float(). +accum(Op,Value) -> + cast(5084, <>). -%% @spec (Mode::enum(),First::integer(),Count::integer()) -> ok -%% @doc See external documentation. --spec drawArrays(enum(),integer(),integer()) -> ok. -drawArrays(Mode,First,Count) -> - cast(5088, <>). +%% @doc Specify which matrix is the current matrix +%% +%% ``gl:matrixMode'' sets the current matrix mode. `Mode' can assume one of four values: +%% +%% +%% `?GL_MODELVIEW': Applies subsequent matrix operations to the modelview matrix stack. +%% +%% +%% `?GL_PROJECTION': Applies subsequent matrix operations to the projection matrix +%% stack. +%% +%% `?GL_TEXTURE': Applies subsequent matrix operations to the texture matrix stack. +%% +%% `?GL_COLOR': Applies subsequent matrix operations to the color matrix stack. +%% +%% To find out which matrix stack is currently the target of all matrix operations, call {@link gl:getBooleanv/1} +%% with argument `?GL_MATRIX_MODE'. The initial value is `?GL_MODELVIEW'. +%% +%% See external documentation. +-spec matrixMode(Mode) -> ok when Mode :: enum(). +matrixMode(Mode) -> + cast(5085, <>). -%% @spec (Mode::enum()) -> ok -%% @doc See external documentation. --spec drawBuffer(enum()) -> ok. -drawBuffer(Mode) -> - cast(5089, <>). +%% @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: +%% +%% ((2/(right-left)) 0 0(t x) 0(2/(top-bottom)) 0(t y) 0 0(-2/(farVal-nearVal))(t z) 0 0 0 1) +%% +%% where t x=-((right+left)/(right-left)) t y=-((top+bottom)/(top-bottom)) t z=-((farVal+nearVal)/(farVal-nearVal)) +%% +%% Typically, the matrix mode is `?GL_PROJECTION', and (left bottom-nearVal) and (right top-nearVal) specify the points on +%% the near clipping plane that are mapped to the lower left and upper right corners of the +%% window, respectively, assuming that the eye is located at (0, 0, 0). -farVal specifies +%% the location of the far clipping plane. Both `NearVal' and `FarVal' can be either +%% positive or negative. +%% +%% Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0} to save and restore the current +%% matrix stack. +%% +%% 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, <>). -%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|mem()) -> ok -%% @doc See external documentation. --spec drawElements(enum(),integer(),enum(),offset()|mem()) -> ok. -drawElements(Mode,Count,Type,Indices) when is_integer(Indices) -> - cast(5090, <>); -drawElements(Mode,Count,Type,Indices) -> - send_bin(Indices), - cast(5091, <>). +%% @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: +%% +%% [((2 nearVal)/(right-left)) 0 A 0 0((2 nearVal)/(top-bottom)) B 0 0 0 C D 0 0 -1 0] +%% +%% A=(right+left)/(right-left) +%% +%% B=(top+bottom)/(top-bottom) +%% +%% C=-((farVal+nearVal)/(farVal-nearVal)) +%% +%% D=-((2 farVal nearVal)/(farVal-nearVal)) +%% +%% Typically, the matrix mode is `?GL_PROJECTION', and (left bottom-nearVal) and (right top-nearVal) specify the points on +%% the near clipping plane that are mapped to the lower left and upper right corners of the +%% window, assuming that the eye is located at (0, 0, 0). -farVal specifies the location +%% of the far clipping plane. Both `NearVal' and `FarVal' must be positive. +%% +%% Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0} to save and restore the current +%% matrix stack. +%% +%% 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, <>). -%% @spec (Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok -%% @doc See external documentation. --spec drawPixels(integer(),integer(),enum(),enum(),offset()|mem()) -> ok. -drawPixels(Width,Height,Format,Type,Pixels) when is_integer(Pixels) -> - cast(5092, <>); -drawPixels(Width,Height,Format,Type,Pixels) -> - send_bin(Pixels), - cast(5093, <>). +%% @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: +%% +%% x w=(x nd+1) (width/2)+x +%% +%% y w=(y nd+1) (height/2)+y +%% +%% Viewport width and height are silently clamped to a range that depends on the implementation. +%% To query this range, call {@link gl:getBooleanv/1} with argument `?GL_MAX_VIEWPORT_DIMS'. +%% +%% 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, <>). -%% @spec (Flag::0|1) -> ok -%% @doc See external documentation. --spec edgeFlag(0|1) -> ok. -edgeFlag(Flag) -> - cast(5094, <>). - -%% @spec (Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec edgeFlagPointer(integer(),offset()|mem()) -> ok. -edgeFlagPointer(Stride,Pointer) when is_integer(Pointer) -> - cast(5095, <>); -edgeFlagPointer(Stride,Pointer) -> - send_bin(Pointer), - cast(5096, <>). +%% @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. +%% +%% ``gl:pushMatrix'' pushes the current matrix stack down by one, duplicating the current +%% matrix. That is, after a ``gl:pushMatrix'' call, the matrix on top of the stack is identical +%% to the one below it. +%% +%% {@link gl:pushMatrix/0} pops the current matrix stack, replacing the current matrix with +%% the one below it on the stack. +%% +%% Initially, each of the stacks contains one matrix, an identity matrix. +%% +%% It is an error to push a full matrix stack or to pop a matrix stack that contains only +%% a single matrix. In either case, the error flag is set and no other change is made to +%% GL state. +%% +%% 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 +%% +%% ((1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1)) +%% +%% but in some cases it is more efficient. +%% +%% 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} ). +%% +%% The current matrix, M, defines a transformation of coordinates. For instance, assume +%% M refers to the modelview matrix. If v=(v[0] v[1] v[2] v[3]) is the set of object coordinates of a vertex, +%% and `M' points to an array of 16 single- or double-precision floating-point values +%% m={m[0] m[1] ... m[15]}, then the modelview transformation M(v) does the following: +%% +%% M(v)=(m[0] m[4] m[8] m[12] m[1] m[5] m[9] m[13] m[2] m[6] m[10] m[14] m[3] m[7] m[11] m[15])*(v[0] v[1] v[2] v[3]) +%% +%% Projection and texture transformations are similarly defined. +%% +%% 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. +%% +%% The current matrix is determined by the current matrix mode (see {@link gl:matrixMode/1} ). +%% It is either the projection matrix, modelview matrix, or the texture matrix. +%% +%% 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: +%% +%% (x 2(1-c)+c x y(1-c)-z s x z(1-c)+y s 0 y x(1-c)+z s y 2(1-c)+c y z(1-c)-x s 0 x z(1-c)-y s y z(1-c)+x s z 2(1-c)+c 0 0 0 0 +%% 1) +%% +%% Where c= cos(angle), s= sin(angle), and ||(x y z)||= 1 (if not, the GL will normalize this vector). +%% +%% If the matrix mode is either `?GL_MODELVIEW' or `?GL_PROJECTION', all objects +%% drawn after ``gl:rotate'' is called are rotated. Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0} +%% to save and restore the unrotated coordinate system. +%% +%% 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. +%% +%% +%% The current matrix (see {@link gl:matrixMode/1} ) is multiplied by this scale matrix, and +%% the product replaces the current matrix as if {@link gl:multMatrixd/1} were called with +%% the following matrix as its argument: +%% +%% (x 0 0 0 0 y 0 0 0 0 z 0 0 0 0 1) +%% +%% If the matrix mode is either `?GL_MODELVIEW' or `?GL_PROJECTION', all objects +%% drawn after ``gl:scale'' is called are scaled. +%% +%% Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0} to save and restore the unscaled +%% coordinate system. +%% +%% 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: +%% +%% (1 0 0 x 0 1 0 y 0 0 1 z 0 0 0 1) +%% +%% If the matrix mode is either `?GL_MODELVIEW' or `?GL_PROJECTION', all objects +%% drawn after a call to ``gl:translate'' are translated. +%% +%% Use {@link gl:pushMatrix/0} and {@link gl:pushMatrix/0} to save and restore the untranslated +%% coordinate system. +%% +%% 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. +%% +%% A name returned by {@link gl:genLists/1} , but not yet associated with a display list by +%% calling {@link gl:newList/2} , is not the name of a display list. +%% +%% 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. +%% +%% All storage locations allocated to the specified display lists are freed, and the names +%% are available for reuse at a later time. Names within the range that do not have an associated +%% display list are ignored. If `Range' is 0, nothing happens. +%% +%% 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. +%% +%% ``gl:newList'' has two arguments. The first argument, `List' , is a positive integer +%% that becomes the unique name for the display list. Names can be created and reserved with +%% {@link gl:genLists/1} and tested for uniqueness with {@link gl:isList/1} . The second argument, +%% `Mode' , is a symbolic constant that can assume one of two values: +%% +%% `?GL_COMPILE': Commands are merely compiled. +%% +%% `?GL_COMPILE_AND_EXECUTE': Commands are executed as they are compiled into the display +%% list. +%% +%% Certain commands are not compiled into the display list but are executed immediately, +%% regardless of the display-list mode. These commands are {@link gl:areTexturesResident/1} , {@link gl:colorPointer/4} +%% , {@link gl:deleteLists/2} , {@link gl:deleteTextures/1} , {@link gl:enableClientState/1} , {@link gl:edgeFlagPointer/2} +%% , {@link gl:enableClientState/1} , {@link gl:feedbackBuffer/3} , {@link gl:finish/0} , {@link gl:flush/0} +%% , {@link gl:genLists/1} , {@link gl:genTextures/1} , {@link gl:indexPointer/3} , {@link gl:interleavedArrays/3} +%% , {@link gl:isEnabled/1} , {@link gl:isList/1} , {@link gl:isTexture/1} , {@link gl:normalPointer/3} +%% , {@link gl:pushClientAttrib/1} , {@link gl:pixelStoref/2} , {@link gl:pushClientAttrib/1} , {@link gl:readPixels/7} +%% , {@link gl:renderMode/1} , {@link gl:selectBuffer/2} , {@link gl:texCoordPointer/4} , {@link gl:vertexPointer/4} +%% , and all of the {@link gl:getBooleanv/1} commands. +%% +%% Similarly, {@link gl:texImage1D/8} , {@link gl:texImage2D/9} , and {@link gl:texImage3D/10} +%% are executed immediately and not compiled into the display list when their first argument +%% is `?GL_PROXY_TEXTURE_1D', `?GL_PROXY_TEXTURE_1D', or `?GL_PROXY_TEXTURE_3D' +%% , respectively. +%% +%% When the ARB_imaging extension is supported, {@link gl:histogram/4} executes immediately +%% when its argument is `?GL_PROXY_HISTOGRAM'. Similarly, {@link gl:colorTable/6} executes +%% immediately when its first argument is `?GL_PROXY_COLOR_TABLE', `?GL_PROXY_POST_CONVOLUTION_COLOR_TABLE' +%% , or `?GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE'. +%% +%% For OpenGL versions 1.3 and greater, or when the ARB_multitexture extension is supported, +%% {@link gl:clientActiveTexture/1} is not compiled into display lists, but executed immediately. +%% +%% +%% When {@link gl:endList/0} is encountered, the display-list definition is completed by +%% associating the list with the unique name `List' (specified in the ``gl:newList'' +%% command). If a display list with name `List' already exists, it is replaced only +%% when {@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. +%% +%% +%% ``gl:callList'' can appear inside a display list. To avoid the possibility of infinite +%% recursion resulting from display lists calling one another, a limit is placed on the nesting +%% level of display lists during display-list execution. This limit is at least 64, and it +%% depends on the implementation. +%% +%% GL state is not saved and restored across a call to ``gl:callList''. Thus, changes +%% made to GL state during the execution of a display list remain after execution of the +%% display list is completed. Use {@link gl:pushAttrib/1} , {@link gl:pushAttrib/1} , {@link gl:pushMatrix/0} +%% , and {@link gl:pushMatrix/0} to preserve GL state across ``gl:callList'' calls. +%% +%% See external documentation. +-spec callList(List) -> ok when List :: integer(). +callList(List) -> + cast(5107, <>). -%% @spec ({Flag}) -> ok -%% @equiv edgeFlag(Flag) --spec edgeFlagv({0|1}) -> ok. -edgeFlagv({Flag}) -> edgeFlag(Flag). +%% @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. +%% +%% ``gl:callLists'' provides an efficient means for executing more than one display list. `Type' +%% allows lists with various name formats to be accepted. The formats are as follows: +%% +%% `?GL_BYTE': `Lists' is treated as an array of signed bytes, each in the range +%% -128 through 127. +%% +%% `?GL_UNSIGNED_BYTE': `Lists' is treated as an array of unsigned bytes, each +%% in the range 0 through 255. +%% +%% `?GL_SHORT': `Lists' is treated as an array of signed two-byte integers, each +%% in the range -32768 through 32767. +%% +%% `?GL_UNSIGNED_SHORT': `Lists' is treated as an array of unsigned two-byte integers, +%% each in the range 0 through 65535. +%% +%% `?GL_INT': `Lists' is treated as an array of signed four-byte integers. +%% +%% `?GL_UNSIGNED_INT': `Lists' is treated as an array of unsigned four-byte integers. +%% +%% +%% `?GL_FLOAT': `Lists' is treated as an array of four-byte floating-point values. +%% +%% +%% `?GL_2_BYTES': `Lists' is treated as an array of unsigned bytes. Each pair of +%% bytes specifies a single display-list name. The value of the pair is computed as 256 times +%% the unsigned value of the first byte plus the unsigned value of the second byte. +%% +%% `?GL_3_BYTES': `Lists' is treated as an array of unsigned bytes. Each triplet +%% of bytes specifies a single display-list name. The value of the triplet is computed as +%% 65536 times the unsigned value of the first byte, plus 256 times the unsigned value of +%% the second byte, plus the unsigned value of the third byte. +%% +%% `?GL_4_BYTES': `Lists' is treated as an array of unsigned bytes. Each quadruplet +%% of bytes specifies a single display-list name. The value of the quadruplet is computed +%% as 16777216 times the unsigned value of the first byte, plus 65536 times the unsigned +%% value of the second byte, plus 256 times the unsigned value of the third byte, plus the +%% unsigned value of the fourth byte. +%% +%% The list of display-list names is not null-terminated. Rather, `N' specifies how +%% many names are to be taken from `Lists' . +%% +%% An additional level of indirection is made available with the {@link gl:listBase/1} command, +%% which specifies an unsigned offset that is added to each display-list name specified in `Lists' +%% before that display list is executed. +%% +%% ``gl:callLists'' can appear inside a display list. To avoid the possibility of infinite +%% recursion resulting from display lists calling one another, a limit is placed on the nesting +%% level of display lists during display-list execution. This limit must be at least 64, +%% and it depends on the implementation. +%% +%% GL state is not saved and restored across a call to ``gl:callLists''. Thus, changes +%% made to GL state during the execution of the display lists remain after execution is completed. +%% Use {@link gl:pushAttrib/1} , {@link gl:pushAttrib/1} , {@link gl:pushMatrix/0} , and {@link gl:pushMatrix/0} +%% to preserve GL state across ``gl:callLists'' calls. +%% +%% See external documentation. +-spec callLists(Lists) -> ok when Lists :: [integer()]. +callLists(Lists) -> + cast(5108, <<(length(Lists)):?GLuint, + (<< <> || C <- Lists>>)/binary,0:(((1+length(Lists)) rem 2)*32)>>). -%% @spec (Cap::enum()) -> ok -%% @doc See external documentation. --spec enable(enum()) -> ok. -enable(Cap) -> - cast(5097, <>). +%% @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, <>). -%% @spec (Array::enum()) -> ok -%% @doc See external documentation. --spec enableClientState(enum()) -> ok. -enableClientState(Array) -> - cast(5098, <>). +%% @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: +%% +%% `?GL_POINTS': Treats each vertex as a single point. Vertex n defines point n. +%% N points are drawn. +%% +%% `?GL_LINES': Treats each pair of vertices as an independent line segment. Vertices +%% 2 n-1 and 2 n define line n. N/2 lines are drawn. +%% +%% `?GL_LINE_STRIP': Draws a connected group of line segments from the first vertex +%% to the last. Vertices n and n+1 define line n. N-1 lines are drawn. +%% +%% `?GL_LINE_LOOP': Draws a connected group of line segments from the first vertex +%% to the last, then back to the first. Vertices n and n+1 define line n. The last +%% line, however, is defined by vertices N and 1. N lines are drawn. +%% +%% `?GL_TRIANGLES': Treats each triplet of vertices as an independent triangle. Vertices +%% 3 n-2, 3 n-1, and 3 n define triangle n. N/3 triangles are drawn. +%% +%% `?GL_TRIANGLE_STRIP': Draws a connected group of triangles. One triangle is defined +%% for each vertex presented after the first two vertices. For odd n, vertices n, n+1, +%% and n+2 define triangle n. For even n, vertices n+1, n, and n+2 define triangle +%% n. N-2 triangles are drawn. +%% +%% `?GL_TRIANGLE_FAN': Draws a connected group of triangles. One triangle is defined +%% for each vertex presented after the first two vertices. Vertices 1, n+1, and n+2 +%% define triangle n. N-2 triangles are drawn. +%% +%% `?GL_QUADS': Treats each group of four vertices as an independent quadrilateral. +%% Vertices 4 n-3, 4 n-2, 4 n-1, and 4 n define quadrilateral n. N/4 quadrilaterals +%% are drawn. +%% +%% `?GL_QUAD_STRIP': Draws a connected group of quadrilaterals. One quadrilateral is +%% defined for each pair of vertices presented after the first pair. Vertices 2 n-1, 2 +%% n, 2 n+2, and 2 n+1 define quadrilateral n. N/2-1 quadrilaterals are drawn. Note +%% that the order in which vertices are used to construct a quadrilateral from strip data +%% is different from that used with independent data. +%% +%% `?GL_POLYGON': Draws a single, convex polygon. Vertices 1 through N define this +%% polygon. +%% +%% Only a subset of GL commands can be used between ``gl:'begin''' and {@link gl:'begin'/1} . +%% The commands are {@link gl:vertex2d/2} , {@link gl:color3b/3} , {@link gl:secondaryColor3b/3} , {@link gl:indexd/1} +%% , {@link gl:normal3b/3} , {@link gl:fogCoordf/1} , {@link gl:texCoord1d/1} , {@link gl:multiTexCoord1d/2} +%% , {@link gl:vertexAttrib1d/2} , {@link gl:evalCoord1d/1} , {@link gl:evalPoint1/1} , {@link gl:arrayElement/1} +%% , {@link gl:materialf/3} , and {@link gl:edgeFlag/1} . Also, it is acceptable to use {@link gl:callList/1} +%% or {@link gl:callLists/1} to execute display lists that include only the preceding commands. +%% If any other GL command is executed between ``gl:'begin''' and {@link gl:'begin'/1} , the error +%% flag is set and the command is ignored. +%% +%% Regardless of the value chosen for `Mode' , there is no limit to the number of vertices +%% that can be defined between ``gl:'begin''' and {@link gl:'begin'/1} . Lines, triangles, quadrilaterals, +%% and polygons that are incompletely specified are not drawn. Incomplete specification results +%% when either too few vertices are provided to specify even a single primitive or when an +%% incorrect multiple of vertices is specified. The incomplete primitive is ignored; the +%% rest are drawn. +%% +%% The minimum specification of vertices for each primitive is as follows: 1 for a point, +%% 2 for a line, 3 for a triangle, 4 for a quadrilateral, and 3 for a polygon. Modes that +%% require a certain multiple of vertices are `?GL_LINES' (2), `?GL_TRIANGLES' +%% (3), `?GL_QUADS' (4), and `?GL_QUAD_STRIP' (2). +%% +%% See external documentation. +-spec 'begin'(Mode) -> ok when Mode :: enum(). +'begin'(Mode) -> + cast(5110, <>). -%% @spec () -> ok -%% @doc See external documentation. +%% @doc +%% See {@link 'begin'/1} -spec 'end'() -> ok. 'end'() -> - cast(5099, <<>>). + cast(5111, <<>>). -%% @spec () -> ok -%% @doc See external documentation. --spec endList() -> ok. -endList() -> - cast(5100, <<>>). +%% @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. +%% +%% When only x and y are specified, z defaults to 0 and w defaults to 1. When x, +%% y, and z are specified, w defaults to 1. +%% +%% See external documentation. +-spec vertex2d(X, Y) -> ok when X :: float(),Y :: float(). +vertex2d(X,Y) -> + cast(5112, <>). -%% @spec (U::float()) -> ok -%% @doc See external documentation. --spec evalCoord1d(float()) -> ok. -evalCoord1d(U) -> - cast(5101, <>). +%% @doc +%% See {@link vertex2d/2} +-spec vertex2f(X, Y) -> ok when X :: float(),Y :: float(). +vertex2f(X,Y) -> + cast(5113, <>). -%% @spec ({U}) -> ok -%% @equiv evalCoord1d(U) --spec evalCoord1dv({float()}) -> ok. -evalCoord1dv({U}) -> evalCoord1d(U). +%% @doc +%% See {@link vertex2d/2} +-spec vertex2i(X, Y) -> ok when X :: integer(),Y :: integer(). +vertex2i(X,Y) -> + cast(5114, <>). -%% @spec (U::float()) -> ok -%% @doc See external documentation. --spec evalCoord1f(float()) -> ok. -evalCoord1f(U) -> - cast(5102, <>). +%% @doc +%% See {@link vertex2d/2} +-spec vertex2s(X, Y) -> ok when X :: integer(),Y :: integer(). +vertex2s(X,Y) -> + cast(5115, <>). -%% @spec ({U}) -> ok -%% @equiv evalCoord1f(U) --spec evalCoord1fv({float()}) -> ok. -evalCoord1fv({U}) -> evalCoord1f(U). +%% @doc +%% See {@link vertex2d/2} +-spec vertex3d(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float(). +vertex3d(X,Y,Z) -> + cast(5116, <>). -%% @spec (U::float(),V::float()) -> ok -%% @doc See external documentation. --spec evalCoord2d(float(),float()) -> ok. -evalCoord2d(U,V) -> - cast(5103, <>). +%% @doc +%% See {@link vertex2d/2} +-spec vertex3f(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float(). +vertex3f(X,Y,Z) -> + cast(5117, <>). -%% @spec ({U,V}) -> ok -%% @equiv evalCoord2d(U,V) --spec evalCoord2dv({float(),float()}) -> ok. -evalCoord2dv({U,V}) -> evalCoord2d(U,V). +%% @doc +%% See {@link vertex2d/2} +-spec vertex3i(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer(). +vertex3i(X,Y,Z) -> + cast(5118, <>). -%% @spec (U::float(),V::float()) -> ok -%% @doc See external documentation. --spec evalCoord2f(float(),float()) -> ok. -evalCoord2f(U,V) -> - cast(5104, <>). +%% @doc +%% See {@link vertex2d/2} +-spec vertex3s(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer(). +vertex3s(X,Y,Z) -> + cast(5119, <>). -%% @spec ({U,V}) -> ok -%% @equiv evalCoord2f(U,V) --spec evalCoord2fv({float(),float()}) -> ok. -evalCoord2fv({U,V}) -> evalCoord2f(U,V). +%% @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, <>). -%% @spec (Mode::enum(),I1::integer(),I2::integer()) -> ok -%% @doc See external documentation. --spec evalMesh1(enum(),integer(),integer()) -> ok. -evalMesh1(Mode,I1,I2) -> - cast(5105, <>). +%% @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, <>). -%% @spec (Mode::enum(),I1::integer(),I2::integer(),J1::integer(),J2::integer()) -> ok -%% @doc See external documentation. --spec evalMesh2(enum(),integer(),integer(),integer(),integer()) -> ok. -evalMesh2(Mode,I1,I2,J1,J2) -> - cast(5106, <>). +%% @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, <>). -%% @spec (I::integer()) -> ok -%% @doc See external documentation. --spec evalPoint1(integer()) -> ok. -evalPoint1(I) -> - cast(5107, <>). +%% @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, <>). -%% @spec (I::integer(),J::integer()) -> ok -%% @doc See external documentation. --spec evalPoint2(integer(),integer()) -> ok. -evalPoint2(I,J) -> - cast(5108, <>). +%% @equiv vertex2d(X,Y) +-spec vertex2dv(V) -> ok when V :: {X :: float(),Y :: float()}. +vertex2dv({X,Y}) -> vertex2d(X,Y). -%% @spec (Size::integer(),Type::enum(),Buffer::mem()) -> ok -%% @doc See external documentation. --spec feedbackBuffer(integer(),enum(),mem()) -> ok. -feedbackBuffer(Size,Type,Buffer) -> - send_bin(Buffer), - call(5109, <>). +%% @equiv vertex2f(X,Y) +-spec vertex2fv(V) -> ok when V :: {X :: float(),Y :: float()}. +vertex2fv({X,Y}) -> vertex2f(X,Y). -%% @spec () -> ok -%% @doc See external documentation. --spec finish() -> ok. -finish() -> - cast(5110, <<>>). +%% @equiv vertex2i(X,Y) +-spec vertex2iv(V) -> ok when V :: {X :: integer(),Y :: integer()}. +vertex2iv({X,Y}) -> vertex2i(X,Y). -%% @spec () -> ok -%% @doc See external documentation. --spec flush() -> ok. -flush() -> - cast(5111, <<>>). +%% @equiv vertex2s(X,Y) +-spec vertex2sv(V) -> ok when V :: {X :: integer(),Y :: integer()}. +vertex2sv({X,Y}) -> vertex2s(X,Y). -%% @spec (Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec fogf(enum(),float()) -> ok. -fogf(Pname,Param) -> - cast(5112, <>). +%% @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). -%% @spec (Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec fogfv(enum(),{float()}) -> ok. -fogfv(Pname,Params) -> - cast(5113, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). +%% @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). -%% @spec (Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec fogi(enum(),integer()) -> ok. -fogi(Pname,Param) -> - cast(5114, <>). +%% @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). -%% @spec (Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec fogiv(enum(),{integer()}) -> ok. -fogiv(Pname,Params) -> - cast(5115, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). +%% @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). -%% @spec (Mode::enum()) -> ok -%% @doc See external documentation. --spec frontFace(enum()) -> ok. -frontFace(Mode) -> - cast(5116, <>). +%% @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). -%% @spec (Left::float(),Right::float(),Bottom::float(),Top::float(),ZNear::float(),ZFar::float()) -> ok -%% @doc See external documentation. --spec frustum(float(),float(),float(),float(),float(),float()) -> ok. -frustum(Left,Right,Bottom,Top,ZNear,ZFar) -> - cast(5117, <>). +%% @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). -%% @spec (Range::integer()) -> integer() -%% @doc See external documentation. --spec genLists(integer()) -> integer(). -genLists(Range) -> - call(5118, <>). +%% @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). -%% @spec (N::integer()) -> [integer()] -%% @doc See external documentation. --spec genTextures(integer()) -> [integer()]. -genTextures(N) -> - call(5119, <>). +%% @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). -%% @spec (Pname::enum()) -> [0|1] -%% @doc See external documentation. --spec getBooleanv(enum()) -> [0|1]. -getBooleanv(Pname) -> - call(5120, <>). +%% @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. +%% +%% Normals specified with ``gl:normal'' need not have unit length. If `?GL_NORMALIZE' +%% is enabled, then normals of any length specified with ``gl:normal'' are normalized after +%% transformation. If `?GL_RESCALE_NORMAL' is enabled, normals are scaled by a scaling +%% factor derived from the modelview matrix. `?GL_RESCALE_NORMAL' requires that the +%% originally specified normals were of unit length, and that the modelview matrix contain +%% only uniform scales for proper results. To enable and disable normalization, call {@link gl:enable/1} +%% and {@link gl:enable/1} with either `?GL_NORMALIZE' or `?GL_RESCALE_NORMAL'. +%% Normalization is initially disabled. +%% +%% See external documentation. +-spec normal3b(Nx, Ny, Nz) -> ok when Nx :: integer(),Ny :: integer(),Nz :: integer(). +normal3b(Nx,Ny,Nz) -> + cast(5124, <>). -%% @spec (Plane::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getClipPlane(enum()) -> {float(),float(),float(),float()}. -getClipPlane(Plane) -> - call(5121, <>). +%% @doc +%% See {@link normal3b/3} +-spec normal3d(Nx, Ny, Nz) -> ok when Nx :: float(),Ny :: float(),Nz :: float(). +normal3d(Nx,Ny,Nz) -> + cast(5125, <>). -%% @spec (Pname::enum()) -> [float()] -%% @doc See external documentation. --spec getDoublev(enum()) -> [float()]. -getDoublev(Pname) -> - call(5122, <>). +%% @doc +%% See {@link normal3b/3} +-spec normal3f(Nx, Ny, Nz) -> ok when Nx :: float(),Ny :: float(),Nz :: float(). +normal3f(Nx,Ny,Nz) -> + cast(5126, <>). -%% @spec () -> enum() -%% @doc See external documentation. --spec getError() -> enum(). -getError() -> - call(5123, <<>>). +%% @doc +%% See {@link normal3b/3} +-spec normal3i(Nx, Ny, Nz) -> ok when Nx :: integer(),Ny :: integer(),Nz :: integer(). +normal3i(Nx,Ny,Nz) -> + cast(5127, <>). -%% @spec (Pname::enum()) -> [float()] -%% @doc See external documentation. --spec getFloatv(enum()) -> [float()]. -getFloatv(Pname) -> - call(5124, <>). +%% @doc +%% See {@link normal3b/3} +-spec normal3s(Nx, Ny, Nz) -> ok when Nx :: integer(),Ny :: integer(),Nz :: integer(). +normal3s(Nx,Ny,Nz) -> + cast(5128, <>). -%% @spec (Pname::enum()) -> [integer()] -%% @doc See external documentation. --spec getIntegerv(enum()) -> [integer()]. -getIntegerv(Pname) -> - call(5125, <>). +%% @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). -%% @spec (Light::enum(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getLightfv(enum(),enum()) -> {float(),float(),float(),float()}. -getLightfv(Light,Pname) -> - call(5126, <>). +%% @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). -%% @spec (Light::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getLightiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. -getLightiv(Light,Pname) -> - call(5127, <>). +%% @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). -%% @spec (Target::enum(),Query::enum(),V::mem()) -> ok -%% @doc See external documentation. --spec getMapdv(enum(),enum(),mem()) -> ok. -getMapdv(Target,Query,V) -> - send_bin(V), - call(5128, <>). +%% @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). -%% @spec (Target::enum(),Query::enum(),V::mem()) -> ok -%% @doc See external documentation. --spec getMapfv(enum(),enum(),mem()) -> ok. -getMapfv(Target,Query,V) -> - send_bin(V), - call(5129, <>). +%% @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). -%% @spec (Target::enum(),Query::enum(),V::mem()) -> ok -%% @doc See external documentation. --spec getMapiv(enum(),enum(),mem()) -> ok. -getMapiv(Target,Query,V) -> - send_bin(V), - call(5130, <>). +%% @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. +%% +%% The current index is stored as a floating-point value. Integer values are converted directly +%% to floating-point values, with no special mapping. The initial value is 1. +%% +%% Index values outside the representable range of the color index buffer are not clamped. +%% However, before an index is dithered (if enabled) and written to the frame buffer, it +%% is converted to fixed-point format. Any bits in the integer portion of the resulting fixed-point +%% value that do not correspond to bits in the frame buffer are masked out. +%% +%% See external documentation. +-spec indexd(C) -> ok when C :: float(). +indexd(C) -> + cast(5129, <>). -%% @spec (Face::enum(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getMaterialfv(enum(),enum()) -> {float(),float(),float(),float()}. -getMaterialfv(Face,Pname) -> - call(5131, <>). +%% @doc +%% See {@link indexd/1} +-spec indexf(C) -> ok when C :: float(). +indexf(C) -> + cast(5130, <>). -%% @spec (Face::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getMaterialiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. -getMaterialiv(Face,Pname) -> - call(5132, <>). +%% @doc +%% See {@link indexd/1} +-spec indexi(C) -> ok when C :: integer(). +indexi(C) -> + cast(5131, <>). -%% @spec (Map::enum(),Values::mem()) -> ok -%% @doc See external documentation. --spec getPixelMapfv(enum(),mem()) -> ok. -getPixelMapfv(Map,Values) -> - send_bin(Values), - call(5133, <>). +%% @doc +%% See {@link indexd/1} +-spec indexs(C) -> ok when C :: integer(). +indexs(C) -> + cast(5132, <>). -%% @spec (Map::enum(),Values::mem()) -> ok -%% @doc See external documentation. --spec getPixelMapuiv(enum(),mem()) -> ok. -getPixelMapuiv(Map,Values) -> - send_bin(Values), - call(5134, <>). +%% @doc +%% See {@link indexd/1} +-spec indexub(C) -> ok when C :: integer(). +indexub(C) -> + cast(5133, <>). -%% @spec (Map::enum(),Values::mem()) -> ok -%% @doc See external documentation. --spec getPixelMapusv(enum(),mem()) -> ok. -getPixelMapusv(Map,Values) -> - send_bin(Values), - call(5135, <>). +%% @equiv indexd(C) +-spec indexdv(C) -> ok when C :: {C :: float()}. +indexdv({C}) -> indexd(C). -%% @spec () -> binary() -%% @doc See external documentation. --spec getPolygonStipple() -> binary(). -getPolygonStipple() -> - call(5136, <<>>). +%% @equiv indexf(C) +-spec indexfv(C) -> ok when C :: {C :: float()}. +indexfv({C}) -> indexf(C). -%% @spec (Name::enum()) -> string() -%% @doc See external documentation. --spec getString(enum()) -> string(). -getString(Name) -> - call(5137, <>). +%% @equiv indexi(C) +-spec indexiv(C) -> ok when C :: {C :: integer()}. +indexiv({C}) -> indexi(C). -%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getTexEnvfv(enum(),enum()) -> {float(),float(),float(),float()}. -getTexEnvfv(Target,Pname) -> - call(5138, <>). +%% @equiv indexs(C) +-spec indexsv(C) -> ok when C :: {C :: integer()}. +indexsv({C}) -> indexs(C). -%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getTexEnviv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. -getTexEnviv(Target,Pname) -> - call(5139, <>). +%% @equiv indexub(C) +-spec indexubv(C) -> ok when C :: {C :: integer()}. +indexubv({C}) -> indexub(C). -%% @spec (Coord::enum(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getTexGendv(enum(),enum()) -> {float(),float(),float(),float()}. -getTexGendv(Coord,Pname) -> - call(5140, <>). +%% @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. +%% +%% ``gl:color3b'', ``gl:color4b'', ``gl:color3s'', ``gl:color4s'', ``gl:color3i'', +%% and ``gl:color4i'' take three or four signed byte, short, or long integers as arguments. +%% When `v' is appended to the name, the color commands can take a pointer to an array +%% of such values. +%% +%% Current color values are stored in floating-point format, with unspecified mantissa and +%% exponent sizes. Unsigned integer color components, when specified, are linearly mapped +%% to floating-point values such that the largest representable value maps to 1.0 (full intensity), +%% and 0 maps to 0.0 (zero intensity). Signed integer color components, when specified, are +%% linearly mapped to floating-point values such that the most positive representable value +%% maps to 1.0, and the most negative representable value maps to -1.0. (Note that this +%% mapping does not convert 0 precisely to 0.0.) Floating-point values are mapped directly. +%% +%% Neither floating-point nor signed integer values are clamped to the range [0 1] before the +%% current color is updated. However, color components are clamped to this range before they +%% are interpolated or written into a color buffer. +%% +%% See external documentation. +-spec color3b(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). +color3b(Red,Green,Blue) -> + cast(5134, <>). -%% @spec (Coord::enum(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getTexGenfv(enum(),enum()) -> {float(),float(),float(),float()}. -getTexGenfv(Coord,Pname) -> - call(5141, <>). +%% @doc +%% See {@link color3b/3} +-spec color3d(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float(). +color3d(Red,Green,Blue) -> + cast(5135, <>). -%% @spec (Coord::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getTexGeniv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. -getTexGeniv(Coord,Pname) -> - call(5142, <>). +%% @doc +%% See {@link color3b/3} +-spec color3f(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float(). +color3f(Red,Green,Blue) -> + cast(5136, <>). -%% @spec (Target::enum(),Level::integer(),Format::enum(),Type::enum(),Pixels::mem()) -> ok -%% @doc See external documentation. --spec getTexImage(enum(),integer(),enum(),enum(),mem()) -> ok. -getTexImage(Target,Level,Format,Type,Pixels) -> - send_bin(Pixels), - call(5143, <>). +%% @doc +%% See {@link color3b/3} +-spec color3i(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). +color3i(Red,Green,Blue) -> + cast(5137, <>). -%% @spec (Target::enum(),Level::integer(),Pname::enum()) -> {float()} -%% @doc See external documentation. --spec getTexLevelParameterfv(enum(),integer(),enum()) -> {float()}. -getTexLevelParameterfv(Target,Level,Pname) -> - call(5144, <>). +%% @doc +%% See {@link color3b/3} +-spec color3s(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). +color3s(Red,Green,Blue) -> + cast(5138, <>). -%% @spec (Target::enum(),Level::integer(),Pname::enum()) -> {integer()} -%% @doc See external documentation. --spec getTexLevelParameteriv(enum(),integer(),enum()) -> {integer()}. -getTexLevelParameteriv(Target,Level,Pname) -> - call(5145, <>). +%% @doc +%% See {@link color3b/3} +-spec color3ub(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). +color3ub(Red,Green,Blue) -> + cast(5139, <>). -%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getTexParameterfv(enum(),enum()) -> {float(),float(),float(),float()}. -getTexParameterfv(Target,Pname) -> - call(5146, <>). +%% @doc +%% See {@link color3b/3} +-spec color3ui(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). +color3ui(Red,Green,Blue) -> + cast(5140, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getTexParameteriv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. -getTexParameteriv(Target,Pname) -> - call(5147, <>). +%% @doc +%% See {@link color3b/3} +-spec color3us(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). +color3us(Red,Green,Blue) -> + cast(5141, <>). -%% @spec (Target::enum(),Mode::enum()) -> ok -%% @doc See external documentation. --spec hint(enum(),enum()) -> ok. -hint(Target,Mode) -> - cast(5148, <>). +%% @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, <>). -%% @spec (Mask::integer()) -> ok -%% @doc See external documentation. --spec indexMask(integer()) -> ok. -indexMask(Mask) -> - cast(5149, <>). - -%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec indexPointer(enum(),integer(),offset()|mem()) -> ok. -indexPointer(Type,Stride,Pointer) when is_integer(Pointer) -> - cast(5150, <>); -indexPointer(Type,Stride,Pointer) -> - send_bin(Pointer), - cast(5151, <>). +%% @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, <>). -%% @spec (C::float()) -> ok -%% @doc See external documentation. --spec indexd(float()) -> ok. -indexd(C) -> - cast(5152, <>). +%% @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, <>). -%% @spec ({C}) -> ok -%% @equiv indexd(C) --spec indexdv({float()}) -> ok. -indexdv({C}) -> indexd(C). +%% @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, <>). -%% @spec (C::float()) -> ok -%% @doc See external documentation. --spec indexf(float()) -> ok. -indexf(C) -> - cast(5153, <>). +%% @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, <>). -%% @spec ({C}) -> ok -%% @equiv indexf(C) --spec indexfv({float()}) -> ok. -indexfv({C}) -> indexf(C). +%% @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, <>). -%% @spec (C::integer()) -> ok -%% @doc See external documentation. --spec indexi(integer()) -> ok. -indexi(C) -> - cast(5154, <>). +%% @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, <>). -%% @spec ({C}) -> ok -%% @equiv indexi(C) --spec indexiv({integer()}) -> ok. -indexiv({C}) -> indexi(C). +%% @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, <>). -%% @spec (C::integer()) -> ok -%% @doc See external documentation. --spec indexs(integer()) -> ok. -indexs(C) -> - cast(5155, <>). +%% @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). -%% @spec ({C}) -> ok -%% @equiv indexs(C) --spec indexsv({integer()}) -> ok. -indexsv({C}) -> indexs(C). +%% @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). -%% @spec (C::integer()) -> ok -%% @doc See external documentation. --spec indexub(integer()) -> ok. -indexub(C) -> - cast(5156, <>). +%% @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). -%% @spec ({C}) -> ok -%% @equiv indexub(C) --spec indexubv({integer()}) -> ok. -indexubv({C}) -> indexub(C). +%% @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). -%% @spec () -> ok -%% @doc See external documentation. --spec initNames() -> ok. -initNames() -> - cast(5157, <<>>). +%% @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). -%% @spec (Format::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec interleavedArrays(enum(),integer(),offset()|mem()) -> ok. -interleavedArrays(Format,Stride,Pointer) when is_integer(Pointer) -> - cast(5158, <>); -interleavedArrays(Format,Stride,Pointer) -> - send_bin(Pointer), - cast(5159, <>). +%% @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). -%% @spec (Cap::enum()) -> 0|1 -%% @doc See external documentation. --spec isEnabled(enum()) -> 0|1. -isEnabled(Cap) -> - call(5160, <>). +%% @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). -%% @spec (List::integer()) -> 0|1 -%% @doc See external documentation. --spec isList(integer()) -> 0|1. -isList(List) -> - call(5161, <>). +%% @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). -%% @spec (Texture::integer()) -> 0|1 -%% @doc See external documentation. --spec isTexture(integer()) -> 0|1. -isTexture(Texture) -> - call(5162, <>). +%% @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). -%% @spec (Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec lightModelf(enum(),float()) -> ok. -lightModelf(Pname,Param) -> - cast(5163, <>). +%% @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). -%% @spec (Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec lightModelfv(enum(),{float()}) -> ok. -lightModelfv(Pname,Params) -> - cast(5164, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). +%% @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). -%% @spec (Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec lightModeli(enum(),integer()) -> ok. -lightModeli(Pname,Param) -> - cast(5165, <>). +%% @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). -%% @spec (Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec lightModeliv(enum(),{integer()}) -> ok. -lightModeliv(Pname,Params) -> - cast(5166, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). +%% @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). -%% @spec (Light::enum(),Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec lightf(enum(),enum(),float()) -> ok. -lightf(Light,Pname,Param) -> - cast(5167, <>). +%% @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). -%% @spec (Light::enum(),Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec lightfv(enum(),enum(),{float()}) -> ok. -lightfv(Light,Pname,Params) -> - cast(5168, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). +%% @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). -%% @spec (Light::enum(),Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec lighti(enum(),enum(),integer()) -> ok. -lighti(Light,Pname,Param) -> - cast(5169, <>). +%% @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). -%% @spec (Light::enum(),Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec lightiv(enum(),enum(),{integer()}) -> ok. -lightiv(Light,Pname,Params) -> - cast(5170, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). +%% @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). +%% +%% The current texture coordinates are part of the data that is associated with each vertex +%% and with the current raster position. Initially, the values for `s', `t', `r' +%% , and `q' are (0, 0, 0, 1). +%% +%% +%% +%% See external documentation. +-spec texCoord1d(S) -> ok when S :: float(). +texCoord1d(S) -> + cast(5150, <>). -%% @spec (Factor::integer(),Pattern::integer()) -> ok -%% @doc See external documentation. --spec lineStipple(integer(),integer()) -> ok. -lineStipple(Factor,Pattern) -> - cast(5171, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord1f(S) -> ok when S :: float(). +texCoord1f(S) -> + cast(5151, <>). -%% @spec (Width::float()) -> ok -%% @doc See external documentation. --spec lineWidth(float()) -> ok. -lineWidth(Width) -> - cast(5172, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord1i(S) -> ok when S :: integer(). +texCoord1i(S) -> + cast(5152, <>). -%% @spec (Base::integer()) -> ok -%% @doc See external documentation. --spec listBase(integer()) -> ok. -listBase(Base) -> - cast(5173, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord1s(S) -> ok when S :: integer(). +texCoord1s(S) -> + cast(5153, <>). -%% @spec () -> ok -%% @doc See external documentation. --spec loadIdentity() -> ok. -loadIdentity() -> - cast(5174, <<>>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord2d(S, T) -> ok when S :: float(),T :: float(). +texCoord2d(S,T) -> + cast(5154, <>). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec loadMatrixd({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. -loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - cast(5175, <>); -loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - cast(5175, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord2f(S, T) -> ok when S :: float(),T :: float(). +texCoord2f(S,T) -> + cast(5155, <>). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec loadMatrixf({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. -loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - cast(5176, <>); -loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - cast(5176, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord2i(S, T) -> ok when S :: integer(),T :: integer(). +texCoord2i(S,T) -> + cast(5156, <>). -%% @spec (Name::integer()) -> ok -%% @doc See external documentation. --spec loadName(integer()) -> ok. -loadName(Name) -> - cast(5177, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord2s(S, T) -> ok when S :: integer(),T :: integer(). +texCoord2s(S,T) -> + cast(5157, <>). -%% @spec (Opcode::enum()) -> ok -%% @doc See external documentation. --spec logicOp(enum()) -> ok. -logicOp(Opcode) -> - cast(5178, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord3d(S, T, R) -> ok when S :: float(),T :: float(),R :: float(). +texCoord3d(S,T,R) -> + cast(5158, <>). -%% @spec (Target::enum(),U1::float(),U2::float(),Stride::integer(),Order::integer(),Points::binary()) -> ok -%% @doc See external documentation. --spec map1d(enum(),float(),float(),integer(),integer(),binary()) -> ok. -map1d(Target,U1,U2,Stride,Order,Points) -> - send_bin(Points), - cast(5179, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord3f(S, T, R) -> ok when S :: float(),T :: float(),R :: float(). +texCoord3f(S,T,R) -> + cast(5159, <>). -%% @spec (Target::enum(),U1::float(),U2::float(),Stride::integer(),Order::integer(),Points::binary()) -> ok -%% @doc See external documentation. --spec map1f(enum(),float(),float(),integer(),integer(),binary()) -> ok. -map1f(Target,U1,U2,Stride,Order,Points) -> - send_bin(Points), - cast(5180, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord3i(S, T, R) -> ok when S :: integer(),T :: integer(),R :: integer(). +texCoord3i(S,T,R) -> + cast(5160, <>). -%% @spec (Target::enum(),U1::float(),U2::float(),Ustride::integer(),Uorder::integer(),V1::float(),V2::float(),Vstride::integer(),Vorder::integer(),Points::binary()) -> ok -%% @doc See external documentation. --spec map2d(enum(),float(),float(),integer(),integer(),float(),float(),integer(),integer(),binary()) -> ok. -map2d(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) -> - send_bin(Points), - cast(5181, <>). +%% @doc +%% See {@link texCoord1d/1} +-spec texCoord3s(S, T, R) -> ok when S :: integer(),T :: integer(),R :: integer(). +texCoord3s(S,T,R) -> + cast(5161, <>). -%% @spec (Target::enum(),U1::float(),U2::float(),Ustride::integer(),Uorder::integer(),V1::float(),V2::float(),Vstride::integer(),Vorder::integer(),Points::binary()) -> ok -%% @doc See external documentation. --spec map2f(enum(),float(),float(),integer(),integer(),float(),float(),integer(),integer(),binary()) -> ok. -map2f(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) -> - send_bin(Points), - cast(5182, <>). +%% @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, <>). -%% @spec (Un::integer(),U1::float(),U2::float()) -> ok -%% @doc See external documentation. --spec mapGrid1d(integer(),float(),float()) -> ok. -mapGrid1d(Un,U1,U2) -> - cast(5183, <>). +%% @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, <>). -%% @spec (Un::integer(),U1::float(),U2::float()) -> ok -%% @doc See external documentation. --spec mapGrid1f(integer(),float(),float()) -> ok. -mapGrid1f(Un,U1,U2) -> - cast(5184, <>). +%% @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, <>). -%% @spec (Un::integer(),U1::float(),U2::float(),Vn::integer(),V1::float(),V2::float()) -> ok -%% @doc See external documentation. --spec mapGrid2d(integer(),float(),float(),integer(),float(),float()) -> ok. -mapGrid2d(Un,U1,U2,Vn,V1,V2) -> - cast(5185, <>). +%% @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, <>). -%% @spec (Un::integer(),U1::float(),U2::float(),Vn::integer(),V1::float(),V2::float()) -> ok -%% @doc See external documentation. --spec mapGrid2f(integer(),float(),float(),integer(),float(),float()) -> ok. -mapGrid2f(Un,U1,U2,Vn,V1,V2) -> - cast(5186, <>). +%% @equiv texCoord1d(S) +-spec texCoord1dv(V) -> ok when V :: {S :: float()}. +texCoord1dv({S}) -> texCoord1d(S). -%% @spec (Face::enum(),Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec materialf(enum(),enum(),float()) -> ok. -materialf(Face,Pname,Param) -> - cast(5187, <>). +%% @equiv texCoord1f(S) +-spec texCoord1fv(V) -> ok when V :: {S :: float()}. +texCoord1fv({S}) -> texCoord1f(S). -%% @spec (Face::enum(),Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec materialfv(enum(),enum(),{float()}) -> ok. -materialfv(Face,Pname,Params) -> - cast(5188, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). +%% @equiv texCoord1i(S) +-spec texCoord1iv(V) -> ok when V :: {S :: integer()}. +texCoord1iv({S}) -> texCoord1i(S). -%% @spec (Face::enum(),Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec materiali(enum(),enum(),integer()) -> ok. -materiali(Face,Pname,Param) -> - cast(5189, <>). +%% @equiv texCoord1s(S) +-spec texCoord1sv(V) -> ok when V :: {S :: integer()}. +texCoord1sv({S}) -> texCoord1s(S). -%% @spec (Face::enum(),Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec materialiv(enum(),enum(),{integer()}) -> ok. -materialiv(Face,Pname,Params) -> - cast(5190, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). +%% @equiv texCoord2d(S,T) +-spec texCoord2dv(V) -> ok when V :: {S :: float(),T :: float()}. +texCoord2dv({S,T}) -> texCoord2d(S,T). -%% @spec (Mode::enum()) -> ok -%% @doc See external documentation. --spec matrixMode(enum()) -> ok. -matrixMode(Mode) -> - cast(5191, <>). +%% @equiv texCoord2f(S,T) +-spec texCoord2fv(V) -> ok when V :: {S :: float(),T :: float()}. +texCoord2fv({S,T}) -> texCoord2f(S,T). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec multMatrixd({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. -multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - cast(5192, <>); -multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - cast(5192, <>). +%% @equiv texCoord2i(S,T) +-spec texCoord2iv(V) -> ok when V :: {S :: integer(),T :: integer()}. +texCoord2iv({S,T}) -> texCoord2i(S,T). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec multMatrixf({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. -multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - cast(5193, <>); -multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - cast(5193, <>). +%% @equiv texCoord2s(S,T) +-spec texCoord2sv(V) -> ok when V :: {S :: integer(),T :: integer()}. +texCoord2sv({S,T}) -> texCoord2s(S,T). -%% @spec (List::integer(),Mode::enum()) -> ok -%% @doc See external documentation. --spec newList(integer(),enum()) -> ok. -newList(List,Mode) -> - cast(5194, <>). +%% @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). -%% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok -%% @doc See external documentation. --spec normal3b(integer(),integer(),integer()) -> ok. -normal3b(Nx,Ny,Nz) -> - cast(5195, <>). +%% @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). -%% @spec ({Nx,Ny,Nz}) -> ok -%% @equiv normal3b(Nx,Ny,Nz) --spec normal3bv({integer(),integer(),integer()}) -> ok. -normal3bv({Nx,Ny,Nz}) -> normal3b(Nx,Ny,Nz). +%% @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). -%% @spec (Nx::float(),Ny::float(),Nz::float()) -> ok -%% @doc See external documentation. --spec normal3d(float(),float(),float()) -> ok. -normal3d(Nx,Ny,Nz) -> - cast(5196, <>). +%% @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). -%% @spec ({Nx,Ny,Nz}) -> ok -%% @equiv normal3d(Nx,Ny,Nz) --spec normal3dv({float(),float(),float()}) -> ok. -normal3dv({Nx,Ny,Nz}) -> normal3d(Nx,Ny,Nz). +%% @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). -%% @spec (Nx::float(),Ny::float(),Nz::float()) -> ok -%% @doc See external documentation. --spec normal3f(float(),float(),float()) -> ok. -normal3f(Nx,Ny,Nz) -> - cast(5197, <>). +%% @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). -%% @spec ({Nx,Ny,Nz}) -> ok -%% @equiv normal3f(Nx,Ny,Nz) --spec normal3fv({float(),float(),float()}) -> ok. -normal3fv({Nx,Ny,Nz}) -> normal3f(Nx,Ny,Nz). +%% @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). -%% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok -%% @doc See external documentation. --spec normal3i(integer(),integer(),integer()) -> ok. -normal3i(Nx,Ny,Nz) -> - cast(5198, <>). +%% @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). -%% @spec ({Nx,Ny,Nz}) -> ok -%% @equiv normal3i(Nx,Ny,Nz) --spec normal3iv({integer(),integer(),integer()}) -> ok. -normal3iv({Nx,Ny,Nz}) -> normal3i(Nx,Ny,Nz). +%% @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} +%% . +%% +%% The current raster position consists of three window coordinates ( x, y, z), a clip +%% coordinate value ( w), an eye coordinate distance, a valid bit, and associated color +%% data and texture coordinates. The w coordinate is a clip coordinate, because w is +%% not projected to window coordinates. ``gl:rasterPos4'' specifies object coordinates x, +%% y, z, and w explicitly. ``gl:rasterPos3'' specifies object coordinate x, y, and +%% z explicitly, while w is implicitly set to 1. ``gl:rasterPos2'' uses the argument +%% values for x and y while implicitly setting z and w to 0 and 1. +%% +%% The object coordinates presented by ``gl:rasterPos'' are treated just like those of a {@link gl:vertex2d/2} +%% command: They are transformed by the current modelview and projection matrices and passed +%% to the clipping stage. If the vertex is not culled, then it is projected and scaled to +%% window coordinates, which become the new current raster position, and the `?GL_CURRENT_RASTER_POSITION_VALID' +%% flag is set. If the vertex `is' culled, then the valid bit is cleared and the current +%% raster position and associated color and texture coordinates are undefined. +%% +%% The current raster position also includes some associated color data and texture coordinates. +%% If lighting is enabled, then `?GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `?GL_CURRENT_RASTER_INDEX' +%% (in color index mode) is set to the color produced by the lighting calculation (see {@link gl:lightf/3} +%% , {@link gl:lightModelf/2} , and {@link gl:shadeModel/1} ). If lighting is disabled, current +%% color (in RGBA mode, state variable `?GL_CURRENT_COLOR') or color index (in color +%% index mode, state variable `?GL_CURRENT_INDEX') is used to update the current raster +%% color. `?GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated. +%% +%% Likewise, `?GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of `?GL_CURRENT_TEXTURE_COORDS' +%% , based on the texture matrix and the texture generation functions (see {@link gl:texGend/3} ). +%% Finally, the distance from the origin of the eye coordinate system to the vertex as transformed +%% by only the modelview matrix replaces `?GL_CURRENT_RASTER_DISTANCE'. +%% +%% Initially, the current raster position is (0, 0, 0, 1), the current raster distance is +%% 0, the valid bit is set, the associated RGBA color is (1, 1, 1, 1), the associated color +%% index is 1, and the associated texture coordinates are (0, 0, 0, 1). In RGBA mode, `?GL_CURRENT_RASTER_INDEX' +%% is always 1; in color index mode, the current raster RGBA color always maintains its +%% initial value. +%% +%% See external documentation. +-spec rasterPos2d(X, Y) -> ok when X :: float(),Y :: float(). +rasterPos2d(X,Y) -> + cast(5166, <>). -%% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok -%% @doc See external documentation. --spec normal3s(integer(),integer(),integer()) -> ok. -normal3s(Nx,Ny,Nz) -> - cast(5199, <>). +%% @doc +%% See {@link rasterPos2d/2} +-spec rasterPos2f(X, Y) -> ok when X :: float(),Y :: float(). +rasterPos2f(X,Y) -> + cast(5167, <>). -%% @spec ({Nx,Ny,Nz}) -> ok -%% @equiv normal3s(Nx,Ny,Nz) --spec normal3sv({integer(),integer(),integer()}) -> ok. -normal3sv({Nx,Ny,Nz}) -> normal3s(Nx,Ny,Nz). +%% @doc +%% See {@link rasterPos2d/2} +-spec rasterPos2i(X, Y) -> ok when X :: integer(),Y :: integer(). +rasterPos2i(X,Y) -> + cast(5168, <>). -%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec normalPointer(enum(),integer(),offset()|mem()) -> ok. -normalPointer(Type,Stride,Pointer) when is_integer(Pointer) -> - cast(5200, <>); -normalPointer(Type,Stride,Pointer) -> - send_bin(Pointer), - cast(5201, <>). +%% @doc +%% See {@link rasterPos2d/2} +-spec rasterPos2s(X, Y) -> ok when X :: integer(),Y :: integer(). +rasterPos2s(X,Y) -> + cast(5169, <>). -%% @spec (Left::float(),Right::float(),Bottom::float(),Top::float(),ZNear::float(),ZFar::float()) -> ok -%% @doc See external documentation. --spec ortho(float(),float(),float(),float(),float(),float()) -> ok. -ortho(Left,Right,Bottom,Top,ZNear,ZFar) -> - cast(5202, <>). +%% @doc +%% See {@link rasterPos2d/2} +-spec rasterPos3d(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float(). +rasterPos3d(X,Y,Z) -> + cast(5170, <>). -%% @spec (Token::float()) -> ok -%% @doc See external documentation. --spec passThrough(float()) -> ok. -passThrough(Token) -> - cast(5203, <>). +%% @doc +%% See {@link rasterPos2d/2} +-spec rasterPos3f(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float(). +rasterPos3f(X,Y,Z) -> + cast(5171, <>). -%% @spec (Map::enum(),Mapsize::integer(),Values::binary()) -> ok -%% @doc See external documentation. --spec pixelMapfv(enum(),integer(),binary()) -> ok. -pixelMapfv(Map,Mapsize,Values) -> - send_bin(Values), - cast(5204, <>). +%% @doc +%% See {@link rasterPos2d/2} +-spec rasterPos3i(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer(). +rasterPos3i(X,Y,Z) -> + cast(5172, <>). -%% @spec (Map::enum(),Mapsize::integer(),Values::binary()) -> ok -%% @doc See external documentation. --spec pixelMapuiv(enum(),integer(),binary()) -> ok. -pixelMapuiv(Map,Mapsize,Values) -> - send_bin(Values), - cast(5205, <>). +%% @doc +%% See {@link rasterPos2d/2} +-spec rasterPos3s(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer(). +rasterPos3s(X,Y,Z) -> + cast(5173, <>). -%% @spec (Map::enum(),Mapsize::integer(),Values::binary()) -> ok -%% @doc See external documentation. --spec pixelMapusv(enum(),integer(),binary()) -> ok. -pixelMapusv(Map,Mapsize,Values) -> - send_bin(Values), - cast(5206, <>). +%% @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, <>). -%% @spec (Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec pixelStoref(enum(),float()) -> ok. -pixelStoref(Pname,Param) -> - cast(5207, <>). +%% @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, <>). -%% @spec (Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec pixelStorei(enum(),integer()) -> ok. -pixelStorei(Pname,Param) -> - cast(5208, <>). +%% @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, <>). -%% @spec (Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec pixelTransferf(enum(),float()) -> ok. -pixelTransferf(Pname,Param) -> - cast(5209, <>). +%% @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, <>). -%% @spec (Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec pixelTransferi(enum(),integer()) -> ok. -pixelTransferi(Pname,Param) -> - cast(5210, <>). +%% @equiv rasterPos2d(X,Y) +-spec rasterPos2dv(V) -> ok when V :: {X :: float(),Y :: float()}. +rasterPos2dv({X,Y}) -> rasterPos2d(X,Y). -%% @spec (Xfactor::float(),Yfactor::float()) -> ok -%% @doc See external documentation. --spec pixelZoom(float(),float()) -> ok. -pixelZoom(Xfactor,Yfactor) -> - cast(5211, <>). +%% @equiv rasterPos2f(X,Y) +-spec rasterPos2fv(V) -> ok when V :: {X :: float(),Y :: float()}. +rasterPos2fv({X,Y}) -> rasterPos2f(X,Y). -%% @spec (Size::float()) -> ok -%% @doc See external documentation. --spec pointSize(float()) -> ok. -pointSize(Size) -> - cast(5212, <>). +%% @equiv rasterPos2i(X,Y) +-spec rasterPos2iv(V) -> ok when V :: {X :: integer(),Y :: integer()}. +rasterPos2iv({X,Y}) -> rasterPos2i(X,Y). -%% @spec (Face::enum(),Mode::enum()) -> ok -%% @doc See external documentation. --spec polygonMode(enum(),enum()) -> ok. -polygonMode(Face,Mode) -> - cast(5213, <>). +%% @equiv rasterPos2s(X,Y) +-spec rasterPos2sv(V) -> ok when V :: {X :: integer(),Y :: integer()}. +rasterPos2sv({X,Y}) -> rasterPos2s(X,Y). -%% @spec (Factor::float(),Units::float()) -> ok -%% @doc See external documentation. --spec polygonOffset(float(),float()) -> ok. -polygonOffset(Factor,Units) -> - cast(5214, <>). +%% @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). -%% @spec (Mask::binary()) -> ok -%% @doc See external documentation. --spec polygonStipple(binary()) -> ok. -polygonStipple(Mask) -> - send_bin(Mask), - cast(5215, <<>>). +%% @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). -%% @spec () -> ok -%% @doc See external documentation. --spec popAttrib() -> ok. -popAttrib() -> - cast(5216, <<>>). +%% @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). -%% @spec () -> ok -%% @doc See external documentation. --spec popClientAttrib() -> ok. -popClientAttrib() -> - cast(5217, <<>>). +%% @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). -%% @spec () -> ok -%% @doc See external documentation. --spec popMatrix() -> ok. -popMatrix() -> - cast(5218, <<>>). +%% @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). -%% @spec () -> ok -%% @doc See external documentation. --spec popName() -> ok. -popName() -> - cast(5219, <<>>). +%% @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). -%% @spec (Textures::[integer()],Priorities::[clamp()]) -> ok -%% @doc See external documentation. --spec prioritizeTextures([integer()],[clamp()]) -> ok. -prioritizeTextures(Textures,Priorities) -> - cast(5220, <<(length(Textures)):?GLuint, - (<< <> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32),(length(Priorities)):?GLuint, - (<< <> || C <- Priorities>>)/binary,0:(((1+length(Priorities)) rem 2)*32)>>). +%% @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). -%% @spec (Mask::integer()) -> ok -%% @doc See external documentation. --spec pushAttrib(integer()) -> ok. -pushAttrib(Mask) -> - cast(5221, <>). +%% @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). -%% @spec (Mask::integer()) -> ok -%% @doc See external documentation. --spec pushClientAttrib(integer()) -> ok. -pushClientAttrib(Mask) -> - cast(5222, <>). +%% @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. +%% +%% ``gl:rect''( `X1' , `Y1' , `X2' , `Y2' ) is exactly equivalent to the +%% following sequence: glBegin(`?GL_POLYGON'); glVertex2( `X1' , `Y1' ); glVertex2( +%% `X2' , `Y1' ); glVertex2( `X2' , `Y2' ); glVertex2( `X1' , `Y2' ); +%% glEnd(); Note that if the second vertex is above and to the right of the first vertex, +%% the rectangle is constructed with a counterclockwise winding. +%% +%% 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, <>). -%% @spec () -> ok -%% @doc See external documentation. --spec pushMatrix() -> ok. -pushMatrix() -> - cast(5223, <<>>). +%% @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, <>). -%% @spec (Name::integer()) -> ok -%% @doc See external documentation. --spec pushName(integer()) -> ok. -pushName(Name) -> - cast(5224, <>). +%% @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, <>). -%% @spec (X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec rasterPos2d(float(),float()) -> ok. -rasterPos2d(X,Y) -> - cast(5225, <>). +%% @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, <>). -%% @spec ({X,Y}) -> ok -%% @equiv rasterPos2d(X,Y) --spec rasterPos2dv({float(),float()}) -> ok. -rasterPos2dv({X,Y}) -> rasterPos2d(X,Y). +%% @doc +%% See {@link rectd/4} +-spec rectdv(V1, V2) -> ok when V1 :: {float(),float()},V2 :: {float(),float()}. +rectdv({V1,V2},{V1,V2}) -> + cast(5182, <>). -%% @spec (X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec rasterPos2f(float(),float()) -> ok. -rasterPos2f(X,Y) -> - cast(5226, <>). +%% @doc +%% See {@link rectd/4} +-spec rectfv(V1, V2) -> ok when V1 :: {float(),float()},V2 :: {float(),float()}. +rectfv({V1,V2},{V1,V2}) -> + cast(5183, <>). -%% @spec ({X,Y}) -> ok -%% @equiv rasterPos2f(X,Y) --spec rasterPos2fv({float(),float()}) -> ok. -rasterPos2fv({X,Y}) -> rasterPos2f(X,Y). +%% @doc +%% See {@link rectd/4} +-spec rectiv(V1, V2) -> ok when V1 :: {integer(),integer()},V2 :: {integer(),integer()}. +rectiv({V1,V2},{V1,V2}) -> + cast(5184, <>). -%% @spec (X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec rasterPos2i(integer(),integer()) -> ok. -rasterPos2i(X,Y) -> - cast(5227, <>). +%% @doc +%% See {@link rectd/4} +-spec rectsv(V1, V2) -> ok when V1 :: {integer(),integer()},V2 :: {integer(),integer()}. +rectsv({V1,V2},{V1,V2}) -> + cast(5185, <>). -%% @spec ({X,Y}) -> ok -%% @equiv rasterPos2i(X,Y) --spec rasterPos2iv({integer(),integer()}) -> ok. -rasterPos2iv({X,Y}) -> rasterPos2i(X,Y). +%% @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} .) +%% +%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2} +%% ) while a vertex array is specified, `Pointer' is treated as a byte offset into the +%% buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING' +%% ) is saved as vertex array client-side state (`?GL_VERTEX_ARRAY_BUFFER_BINDING'). +%% +%% When a vertex array is specified, `Size' , `Type' , `Stride' , and `Pointer' +%% are saved as client-side state, in addition to the current vertex array buffer object +%% binding. +%% +%% To enable and disable the vertex array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1} +%% with the argument `?GL_VERTEX_ARRAY'. If enabled, the vertex array is used when {@link gl:arrayElement/1} +%% , {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements' +%% , or {@link gl:drawRangeElements/6} is called. +%% +%% 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} .) +%% +%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2} +%% ) while a normal array is specified, `Pointer' is treated as a byte offset into the +%% buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING' +%% ) is saved as normal vertex array client-side state (`?GL_NORMAL_ARRAY_BUFFER_BINDING' +%% ). +%% +%% When a normal array is specified, `Type' , `Stride' , and `Pointer' are +%% saved as client-side state, in addition to the current vertex array buffer object binding. +%% +%% +%% To enable and disable the normal array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1} +%% with the argument `?GL_NORMAL_ARRAY'. If enabled, the normal array is used when {@link gl:drawArrays/3} +%% , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements', {@link gl:drawRangeElements/6} +%% , or {@link gl:arrayElement/1} is called. +%% +%% 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} .) +%% +%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2} +%% ) while a color array is specified, `Pointer' is treated as a byte offset into the +%% buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING' +%% ) is saved as color vertex array client-side state (`?GL_COLOR_ARRAY_BUFFER_BINDING'). +%% +%% +%% When a color array is specified, `Size' , `Type' , `Stride' , and `Pointer' +%% are saved as client-side state, in addition to the current vertex array buffer object +%% binding. +%% +%% To enable and disable the color array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1} +%% with the argument `?GL_COLOR_ARRAY'. If enabled, the color array is used when {@link gl:drawArrays/3} +%% , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements', {@link gl:drawRangeElements/6} +%% , or {@link gl:arrayElement/1} is called. +%% +%% 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. +%% +%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2} +%% ) while a color index array is specified, `Pointer' is treated as a byte offset into +%% the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING' +%% ) is saved as color index vertex array client-side state (`?GL_INDEX_ARRAY_BUFFER_BINDING' +%% ). +%% +%% When a color index array is specified, `Type' , `Stride' , and `Pointer' +%% are saved as client-side state, in addition to the current vertex array buffer object +%% binding. +%% +%% To enable and disable the color index array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1} +%% with the argument `?GL_INDEX_ARRAY'. If enabled, the color index array is used when +%% {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements' +%% , {@link gl:drawRangeElements/6} , or {@link gl:arrayElement/1} is called. +%% +%% 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} .) +%% +%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2} +%% ) while a texture coordinate array is specified, `Pointer' is treated as a byte offset +%% into the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING' +%% ) is saved as texture coordinate vertex array client-side state (`?GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING' +%% ). +%% +%% When a texture coordinate array is specified, `Size' , `Type' , `Stride' , +%% and `Pointer' are saved as client-side state, in addition to the current vertex array +%% buffer object binding. +%% +%% To enable and disable a texture coordinate array, call {@link gl:enableClientState/1} +%% and {@link gl:enableClientState/1} with the argument `?GL_TEXTURE_COORD_ARRAY'. If +%% enabled, the texture coordinate array is used when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} +%% , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements', +%% or {@link gl:drawRangeElements/6} is called. +%% +%% 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. +%% +%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2} +%% ) while an edge flag array is specified, `Pointer' is treated as a byte offset into +%% the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING' +%% ) is saved as edge flag vertex array client-side state (`?GL_EDGE_FLAG_ARRAY_BUFFER_BINDING' +%% ). +%% +%% When an edge flag array is specified, `Stride' and `Pointer' are saved as client-side +%% state, in addition to the current vertex array buffer object binding. +%% +%% To enable and disable the edge flag array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1} +%% with the argument `?GL_EDGE_FLAG_ARRAY'. If enabled, the edge flag array is used +%% when {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements' +%% , {@link gl:drawRangeElements/6} , or {@link gl:arrayElement/1} is called. +%% +%% 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. +%% +%% Use ``gl:arrayElement'' to construct primitives by indexing vertex data, rather than +%% by streaming through arrays of data in first-to-last order. Because each call specifies +%% only a single vertex, it is possible to explicitly specify per-primitive attributes such +%% as a single normal for each triangle. +%% +%% Changes made to array data between the execution of {@link gl:'begin'/1} and the corresponding +%% execution of {@link gl:'begin'/1} may affect calls to ``gl:arrayElement'' that are made within +%% the same {@link gl:'begin'/1} / {@link gl:'begin'/1} period in nonsequential ways. That is, a call +%% to ``gl:arrayElement'' that precedes a change to array data may access the changed data, +%% and a call that follows a change to array data may access original data. +%% +%% See external documentation. +-spec arrayElement(I) -> ok when I :: integer(). +arrayElement(I) -> + cast(5198, <>). -%% @spec (X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec rasterPos2s(integer(),integer()) -> ok. -rasterPos2s(X,Y) -> - cast(5228, <>). +%% @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'' +%% . +%% +%% When ``gl:drawArrays'' is called, it uses `Count' sequential elements from each +%% enabled array to construct a sequence of geometric primitives, beginning with element `First' +%% . `Mode' specifies what kind of primitives are constructed and how the array elements +%% construct those primitives. +%% +%% Vertex attributes that are modified by ``gl:drawArrays'' have an unspecified value +%% after ``gl:drawArrays'' returns. Attributes that aren't modified remain well defined. +%% +%% See external documentation. +-spec drawArrays(Mode, First, Count) -> ok when Mode :: enum(),First :: integer(),Count :: integer(). +drawArrays(Mode,First,Count) -> + cast(5199, <>). -%% @spec ({X,Y}) -> ok -%% @equiv rasterPos2s(X,Y) --spec rasterPos2sv({integer(),integer()}) -> ok. -rasterPos2sv({X,Y}) -> rasterPos2s(X,Y). +%% @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'' +%% . +%% +%% When ``gl:drawElements'' is called, it uses `Count' sequential elements from an +%% enabled array, starting at `Indices' to construct a sequence of geometric primitives. +%% `Mode' specifies what kind of primitives are constructed and how the array elements +%% construct these primitives. If more than one array is enabled, each is used. +%% +%% Vertex attributes that are modified by ``gl:drawElements'' have an unspecified value +%% after ``gl:drawElements'' returns. Attributes that aren't modified maintain their previous +%% values. +%% +%% 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, <>). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec rasterPos3d(float(),float(),float()) -> ok. -rasterPos3d(X,Y,Z) -> - cast(5229, <>). +%% @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. +%% +%% If `Stride' is 0, the aggregate elements are stored consecutively. Otherwise, `Stride' +%% bytes occur between the beginning of one aggregate array element and the beginning of +%% the next aggregate array element. +%% +%% `Format' serves as a ``key'' describing the extraction of individual arrays from +%% the aggregate array. If `Format' contains a T, then texture coordinates are extracted +%% from the interleaved array. If C is present, color values are extracted. If N is present, +%% normal coordinates are extracted. Vertex coordinates are always extracted. +%% +%% The digits 2, 3, and 4 denote how many values are extracted. F indicates that values +%% are extracted as floating-point values. Colors may also be extracted as 4 unsigned bytes +%% if 4UB follows the C. If a color is extracted as 4 unsigned bytes, the vertex array element +%% which follows is located at the first possible floating-point aligned address. +%% +%% 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, <>). -%% @spec ({X,Y,Z}) -> ok -%% @equiv rasterPos3d(X,Y,Z) --spec rasterPos3dv({float(),float(),float()}) -> ok. -rasterPos3dv({X,Y,Z}) -> rasterPos3d(X,Y,Z). +%% @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. +%% +%% Flat and smooth shading are indistinguishable for points. Starting when {@link gl:'begin'/1} +%% is issued and counting vertices and primitives from 1, the GL gives each flat-shaded line +%% segment i the computed color of vertex i+1, its second vertex. Counting similarly +%% from 1, the GL gives each flat-shaded polygon the computed color of the vertex listed +%% in the following table. This is the last vertex to specify the polygon in all cases except +%% single polygons, where the first vertex specifies the flat-shaded color. +%% +%% +%%
` Primitive Type of Polygon ' i` Vertex '
Single polygon ( i== 1) 1
Triangle +%% strip i+2
Triangle fan i+2
Independent +%% triangle 3 i
Quad strip 2 i+2
+%% Independent quad 4 i
+%% +%% Flat and smooth shading are specified by ``gl:shadeModel'' with `Mode' set to `?GL_FLAT' +%% and `?GL_SMOOTH', respectively. +%% +%% See external documentation. +-spec shadeModel(Mode) -> ok when Mode :: enum(). +shadeModel(Mode) -> + cast(5204, <>). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec rasterPos3f(float(),float(),float()) -> ok. -rasterPos3f(X,Y,Z) -> - cast(5230, <>). +%% @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. +%% +%% To enable and disable lighting calculation, call {@link gl:enable/1} and {@link gl:enable/1} +%% with argument `?GL_LIGHTING'. Lighting is initially disabled. When it is enabled, +%% light sources that are enabled contribute to the lighting calculation. Light source i +%% is enabled and disabled using {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_LIGHT' +%% i. +%% +%% The ten light parameters are as follows: +%% +%% `?GL_AMBIENT': `Params' contains four integer or floating-point values that +%% specify the ambient RGBA intensity of the light. Integer values are mapped linearly such +%% that the most positive representable value maps to 1.0, and the most negative representable +%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point +%% values are clamped. The initial ambient light intensity is (0, 0, 0, 1). +%% +%% `?GL_DIFFUSE': `Params' contains four integer or floating-point values that +%% specify the diffuse RGBA intensity of the light. Integer values are mapped linearly such +%% that the most positive representable value maps to 1.0, and the most negative representable +%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point +%% values are clamped. The initial value for `?GL_LIGHT0' is (1, 1, 1, 1); for other +%% lights, the initial value is (0, 0, 0, 1). +%% +%% `?GL_SPECULAR': `Params' contains four integer or floating-point values that +%% specify the specular RGBA intensity of the light. Integer values are mapped linearly such +%% that the most positive representable value maps to 1.0, and the most negative representable +%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point +%% values are clamped. The initial value for `?GL_LIGHT0' is (1, 1, 1, 1); for other +%% lights, the initial value is (0, 0, 0, 1). +%% +%% `?GL_POSITION': `Params' contains four integer or floating-point values that +%% specify the position of the light in homogeneous object coordinates. Both integer and +%% floating-point values are mapped directly. Neither integer nor floating-point values are +%% clamped. +%% +%% The position is transformed by the modelview matrix when ``gl:light'' is called (just +%% as if it were a point), and it is stored in eye coordinates. If the w component of the +%% position is 0, the light is treated as a directional source. Diffuse and specular lighting +%% calculations take the light's direction, but not its actual position, into account, and +%% attenuation is disabled. Otherwise, diffuse and specular lighting calculations are based +%% on the actual location of the light in eye coordinates, and attenuation is enabled. The +%% initial position is (0, 0, 1, 0); thus, the initial light source is directional, parallel +%% to, and in the direction of the -z axis. +%% +%% `?GL_SPOT_DIRECTION': `Params' contains three integer or floating-point values +%% that specify the direction of the light in homogeneous object coordinates. Both integer +%% and floating-point values are mapped directly. Neither integer nor floating-point values +%% are clamped. +%% +%% The spot direction is transformed by the upper 3x3 of the modelview matrix when ``gl:light'' +%% is called, and it is stored in eye coordinates. It is significant only when `?GL_SPOT_CUTOFF' +%% is not 180, which it is initially. The initial direction is (0 0 -1). +%% +%% `?GL_SPOT_EXPONENT': `Params' is a single integer or floating-point value that +%% specifies the intensity distribution of the light. Integer and floating-point values are +%% mapped directly. Only values in the range [0 128] are accepted. +%% +%% Effective light intensity is attenuated by the cosine of the angle between the direction +%% of the light and the direction from the light to the vertex being lighted, raised to the +%% power of the spot exponent. Thus, higher spot exponents result in a more focused light +%% source, regardless of the spot cutoff angle (see `?GL_SPOT_CUTOFF', next paragraph). +%% The initial spot exponent is 0, resulting in uniform light distribution. +%% +%% `?GL_SPOT_CUTOFF': `Params' is a single integer or floating-point value that +%% specifies the maximum spread angle of a light source. Integer and floating-point values +%% are mapped directly. Only values in the range [0 90] and the special value 180 are accepted. +%% If the angle between the direction of the light and the direction from the light to the +%% vertex being lighted is greater than the spot cutoff angle, the light is completely masked. +%% Otherwise, its intensity is controlled by the spot exponent and the attenuation factors. +%% The initial spot cutoff is 180, resulting in uniform light distribution. +%% +%% `?GL_CONSTANT_ATTENUATION' +%% +%% `?GL_LINEAR_ATTENUATION' +%% +%% `?GL_QUADRATIC_ATTENUATION': `Params' is a single integer or floating-point +%% value that specifies one of the three light attenuation factors. Integer and floating-point +%% values are mapped directly. Only nonnegative values are accepted. If the light is positional, +%% rather than directional, its intensity is attenuated by the reciprocal of the sum of the +%% constant factor, the linear factor times the distance between the light and the vertex +%% being lighted, and the quadratic factor times the square of the same distance. The initial +%% attenuation factors are (1, 0, 0), resulting in no attenuation. +%% +%% See external documentation. +-spec lightf(Light, Pname, Param) -> ok when Light :: enum(),Pname :: enum(),Param :: float(). +lightf(Light,Pname,Param) -> + cast(5205, <>). -%% @spec ({X,Y,Z}) -> ok -%% @equiv rasterPos3f(X,Y,Z) --spec rasterPos3fv({float(),float(),float()}) -> ok. -rasterPos3fv({X,Y,Z}) -> rasterPos3f(X,Y,Z). +%% @doc +%% See {@link lightf/3} +-spec lighti(Light, Pname, Param) -> ok when Light :: enum(),Pname :: enum(),Param :: integer(). +lighti(Light,Pname,Param) -> + cast(5206, <>). -%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec rasterPos3i(integer(),integer(),integer()) -> ok. -rasterPos3i(X,Y,Z) -> - cast(5231, <>). +%% @doc +%% See {@link lightf/3} +-spec lightfv(Light, Pname, Params) -> ok when Light :: enum(),Pname :: enum(),Params :: {float()}. +lightfv(Light,Pname,Params) -> + cast(5207, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec ({X,Y,Z}) -> ok -%% @equiv rasterPos3i(X,Y,Z) --spec rasterPos3iv({integer(),integer(),integer()}) -> ok. -rasterPos3iv({X,Y,Z}) -> rasterPos3i(X,Y,Z). +%% @doc +%% See {@link lightf/3} +-spec lightiv(Light, Pname, Params) -> ok when Light :: enum(),Pname :: enum(),Params :: {integer()}. +lightiv(Light,Pname,Params) -> + cast(5208, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec rasterPos3s(integer(),integer(),integer()) -> ok. -rasterPos3s(X,Y,Z) -> - cast(5232, <>). +%% @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. +%% +%% The following parameters are defined: +%% +%% `?GL_AMBIENT': `Params' returns four integer or floating-point values representing +%% the ambient intensity of the light source. Integer values, when requested, are linearly +%% mapped from the internal floating-point representation such that 1.0 maps to the most +%% positive representable integer value, and -1.0 maps to the most negative representable +%% integer value. If the internal value is outside the range [-1 1], the corresponding integer +%% return value is undefined. The initial value is (0, 0, 0, 1). +%% +%% `?GL_DIFFUSE': `Params' returns four integer or floating-point values representing +%% the diffuse intensity of the light source. Integer values, when requested, are linearly +%% mapped from the internal floating-point representation such that 1.0 maps to the most +%% positive representable integer value, and -1.0 maps to the most negative representable +%% integer value. If the internal value is outside the range [-1 1], the corresponding integer +%% return value is undefined. The initial value for `?GL_LIGHT0' is (1, 1, 1, 1); for +%% other lights, the initial value is (0, 0, 0, 0). +%% +%% `?GL_SPECULAR': `Params' returns four integer or floating-point values representing +%% the specular intensity of the light source. Integer values, when requested, are linearly +%% mapped from the internal floating-point representation such that 1.0 maps to the most +%% positive representable integer value, and -1.0 maps to the most negative representable +%% integer value. If the internal value is outside the range [-1 1], the corresponding integer +%% return value is undefined. The initial value for `?GL_LIGHT0' is (1, 1, 1, 1); for +%% other lights, the initial value is (0, 0, 0, 0). +%% +%% `?GL_POSITION': `Params' returns four integer or floating-point values representing +%% the position of the light source. Integer values, when requested, are computed by rounding +%% the internal floating-point values to the nearest integer value. The returned values are +%% those maintained in eye coordinates. They will not be equal to the values specified using +%% {@link gl:lightf/3} , unless the modelview matrix was identity at the time {@link gl:lightf/3} +%% was called. The initial value is (0, 0, 1, 0). +%% +%% `?GL_SPOT_DIRECTION': `Params' returns three integer or floating-point values +%% representing the direction of the light source. Integer values, when requested, are computed +%% by rounding the internal floating-point values to the nearest integer value. The returned +%% values are those maintained in eye coordinates. They will not be equal to the values specified +%% using {@link gl:lightf/3} , unless the modelview matrix was identity at the time {@link gl:lightf/3} +%% was called. Although spot direction is normalized before being used in the lighting equation, +%% the returned values are the transformed versions of the specified values prior to normalization. +%% The initial value is (0 0 -1). +%% +%% `?GL_SPOT_EXPONENT': `Params' returns a single integer or floating-point value +%% representing the spot exponent of the light. An integer value, when requested, is computed +%% by rounding the internal floating-point representation to the nearest integer. The initial +%% value is 0. +%% +%% `?GL_SPOT_CUTOFF': `Params' returns a single integer or floating-point value +%% representing the spot cutoff angle of the light. An integer value, when requested, is +%% computed by rounding the internal floating-point representation to the nearest integer. +%% The initial value is 180. +%% +%% `?GL_CONSTANT_ATTENUATION': `Params' returns a single integer or floating-point +%% value representing the constant (not distance-related) attenuation of the light. An integer +%% value, when requested, is computed by rounding the internal floating-point representation +%% to the nearest integer. The initial value is 1. +%% +%% `?GL_LINEAR_ATTENUATION': `Params' returns a single integer or floating-point +%% value representing the linear attenuation of the light. An integer value, when requested, +%% is computed by rounding the internal floating-point representation to the nearest integer. +%% The initial value is 0. +%% +%% `?GL_QUADRATIC_ATTENUATION': `Params' returns a single integer or floating-point +%% value representing the quadratic attenuation of the light. An integer value, when requested, +%% is computed by rounding the internal floating-point representation to the nearest integer. +%% The initial value is 0. +%% +%% See external documentation. +-spec getLightfv(Light, Pname) -> {float(),float(),float(),float()} when Light :: enum(),Pname :: enum(). +getLightfv(Light,Pname) -> + call(5209, <>). -%% @spec ({X,Y,Z}) -> ok -%% @equiv rasterPos3s(X,Y,Z) --spec rasterPos3sv({integer(),integer(),integer()}) -> ok. -rasterPos3sv({X,Y,Z}) -> rasterPos3s(X,Y,Z). +%% @doc +%% See {@link getLightfv/2} +-spec getLightiv(Light, Pname) -> {integer(),integer(),integer(),integer()} when Light :: enum(),Pname :: enum(). +getLightiv(Light,Pname) -> + call(5210, <>). -%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec rasterPos4d(float(),float(),float(),float()) -> ok. -rasterPos4d(X,Y,Z,W) -> - cast(5233, <>). +%% @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: +%% +%% `?GL_LIGHT_MODEL_AMBIENT': `Params' contains four integer or floating-point +%% values that specify the ambient RGBA intensity of the entire scene. Integer values are +%% mapped linearly such that the most positive representable value maps to 1.0, and the most +%% negative representable value maps to -1.0. Floating-point values are mapped directly. +%% Neither integer nor floating-point values are clamped. The initial ambient scene intensity +%% is (0.2, 0.2, 0.2, 1.0). +%% +%% `?GL_LIGHT_MODEL_COLOR_CONTROL': `Params' must be either `?GL_SEPARATE_SPECULAR_COLOR' +%% or `?GL_SINGLE_COLOR'. `?GL_SINGLE_COLOR' specifies that a single color is +%% generated from the lighting computation for a vertex. `?GL_SEPARATE_SPECULAR_COLOR' +%% specifies that the specular color computation of lighting be stored separately from the +%% remainder of the lighting computation. The specular color is summed into the generated +%% fragment's color after the application of texture mapping (if enabled). The initial value +%% is `?GL_SINGLE_COLOR'. +%% +%% `?GL_LIGHT_MODEL_LOCAL_VIEWER': `Params' is a single integer or floating-point +%% value that specifies how specular reflection angles are computed. If `Params' is +%% 0 (or 0.0), specular reflection angles take the view direction to be parallel to and in +%% the direction of the -`z' axis, regardless of the location of the vertex in eye coordinates. +%% Otherwise, specular reflections are computed from the origin of the eye coordinate system. +%% The initial value is 0. +%% +%% `?GL_LIGHT_MODEL_TWO_SIDE': `Params' is a single integer or floating-point value +%% that specifies whether one- or two-sided lighting calculations are done for polygons. +%% It has no effect on the lighting calculations for points, lines, or bitmaps. If `Params' +%% is 0 (or 0.0), one-sided lighting is specified, and only the `front' material parameters +%% are used in the lighting equation. Otherwise, two-sided lighting is specified. In this +%% case, vertices of back-facing polygons are lighted using the `back' material parameters +%% and have their normals reversed before the lighting equation is evaluated. Vertices of +%% front-facing polygons are always lighted using the `front' material parameters, with +%% no change to their normals. The initial value is 0. +%% +%% In RGBA mode, the lighted color of a vertex is the sum of the material emission intensity, +%% the product of the material ambient reflectance and the lighting model full-scene ambient +%% intensity, and the contribution of each enabled light source. Each light source contributes +%% the sum of three terms: ambient, diffuse, and specular. The ambient light source contribution +%% is the product of the material ambient reflectance and the light's ambient intensity. +%% The diffuse light source contribution is the product of the material diffuse reflectance, +%% the light's diffuse intensity, and the dot product of the vertex's normal with the normalized +%% vector from the vertex to the light source. The specular light source contribution is +%% the product of the material specular reflectance, the light's specular intensity, and +%% the dot product of the normalized vertex-to-eye and vertex-to-light vectors, raised to +%% the power of the shininess of the material. All three light source contributions are attenuated +%% equally based on the distance from the vertex to the light source and on light source +%% direction, spread exponent, and spread cutoff angle. All dot products are replaced with +%% 0 if they evaluate to a negative value. +%% +%% The alpha component of the resulting lighted color is set to the alpha value of the material +%% diffuse reflectance. +%% +%% In color index mode, the value of the lighted index of a vertex ranges from the ambient +%% to the specular values passed to {@link gl:materialf/3} using `?GL_COLOR_INDEXES'. +%% Diffuse and specular coefficients, computed with a (.30, .59, .11) weighting of the lights' +%% colors, the shininess of the material, and the same reflection and attenuation equations +%% as in the RGBA case, determine how much above ambient the resulting index is. +%% +%% See external documentation. +-spec lightModelf(Pname, Param) -> ok when Pname :: enum(),Param :: float(). +lightModelf(Pname,Param) -> + cast(5211, <>). -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv rasterPos4d(X,Y,Z,W) --spec rasterPos4dv({float(),float(),float(),float()}) -> ok. -rasterPos4dv({X,Y,Z,W}) -> rasterPos4d(X,Y,Z,W). +%% @doc +%% See {@link lightModelf/2} +-spec lightModeli(Pname, Param) -> ok when Pname :: enum(),Param :: integer(). +lightModeli(Pname,Param) -> + cast(5212, <>). -%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec rasterPos4f(float(),float(),float(),float()) -> ok. -rasterPos4f(X,Y,Z,W) -> - cast(5234, <>). +%% @doc +%% See {@link lightModelf/2} +-spec lightModelfv(Pname, Params) -> ok when Pname :: enum(),Params :: {float()}. +lightModelfv(Pname,Params) -> + cast(5213, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv rasterPos4f(X,Y,Z,W) --spec rasterPos4fv({float(),float(),float(),float()}) -> ok. -rasterPos4fv({X,Y,Z,W}) -> rasterPos4f(X,Y,Z,W). +%% @doc +%% See {@link lightModelf/2} +-spec lightModeliv(Pname, Params) -> ok when Pname :: enum(),Params :: {integer()}. +lightModeliv(Pname,Params) -> + cast(5214, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). -%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec rasterPos4i(integer(),integer(),integer(),integer()) -> ok. -rasterPos4i(X,Y,Z,W) -> - cast(5235, <>). +%% @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. +%% +%% ``gl:material'' takes three arguments. The first, `Face' , specifies whether the `?GL_FRONT' +%% materials, the `?GL_BACK' materials, or both `?GL_FRONT_AND_BACK' materials +%% will be modified. The second, `Pname' , specifies which of several parameters in one +%% or both sets will be modified. The third, `Params' , specifies what value or values +%% will be assigned to the specified parameter. +%% +%% Material parameters are used in the lighting equation that is optionally applied to each +%% vertex. The equation is discussed in the {@link gl:lightModelf/2} reference page. The parameters +%% that can be specified using ``gl:material'', and their interpretations by the lighting +%% equation, are as follows: +%% +%% `?GL_AMBIENT': `Params' contains four integer or floating-point values that +%% specify the ambient RGBA reflectance of the material. Integer values are mapped linearly +%% such that the most positive representable value maps to 1.0, and the most negative representable +%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point +%% values are clamped. The initial ambient reflectance for both front- and back-facing materials +%% is (0.2, 0.2, 0.2, 1.0). +%% +%% `?GL_DIFFUSE': `Params' contains four integer or floating-point values that +%% specify the diffuse RGBA reflectance of the material. Integer values are mapped linearly +%% such that the most positive representable value maps to 1.0, and the most negative representable +%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point +%% values are clamped. The initial diffuse reflectance for both front- and back-facing materials +%% is (0.8, 0.8, 0.8, 1.0). +%% +%% `?GL_SPECULAR': `Params' contains four integer or floating-point values that +%% specify the specular RGBA reflectance of the material. Integer values are mapped linearly +%% such that the most positive representable value maps to 1.0, and the most negative representable +%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point +%% values are clamped. The initial specular reflectance for both front- and back-facing materials +%% is (0, 0, 0, 1). +%% +%% `?GL_EMISSION': `Params' contains four integer or floating-point values that +%% specify the RGBA emitted light intensity of the material. Integer values are mapped linearly +%% such that the most positive representable value maps to 1.0, and the most negative representable +%% value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point +%% values are clamped. The initial emission intensity for both front- and back-facing materials +%% is (0, 0, 0, 1). +%% +%% `?GL_SHININESS': `Params' is a single integer or floating-point value that specifies +%% the RGBA specular exponent of the material. Integer and floating-point values are mapped +%% directly. Only values in the range [0 128] are accepted. The initial specular exponent for both +%% front- and back-facing materials is 0. +%% +%% `?GL_AMBIENT_AND_DIFFUSE': Equivalent to calling ``gl:material'' twice with the +%% same parameter values, once with `?GL_AMBIENT' and once with `?GL_DIFFUSE'. +%% +%% `?GL_COLOR_INDEXES': `Params' contains three integer or floating-point values +%% specifying the color indices for ambient, diffuse, and specular lighting. These three +%% values, and `?GL_SHININESS', are the only material values used by the color index +%% mode lighting equation. Refer to the {@link gl:lightModelf/2} reference page for a discussion +%% of color index lighting. +%% +%% See external documentation. +-spec materialf(Face, Pname, Param) -> ok when Face :: enum(),Pname :: enum(),Param :: float(). +materialf(Face,Pname,Param) -> + cast(5215, <>). -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv rasterPos4i(X,Y,Z,W) --spec rasterPos4iv({integer(),integer(),integer(),integer()}) -> ok. -rasterPos4iv({X,Y,Z,W}) -> rasterPos4i(X,Y,Z,W). +%% @doc +%% See {@link materialf/3} +-spec materiali(Face, Pname, Param) -> ok when Face :: enum(),Pname :: enum(),Param :: integer(). +materiali(Face,Pname,Param) -> + cast(5216, <>). -%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec rasterPos4s(integer(),integer(),integer(),integer()) -> ok. -rasterPos4s(X,Y,Z,W) -> - cast(5236, <>). +%% @doc +%% See {@link materialf/3} +-spec materialfv(Face, Pname, Params) -> ok when Face :: enum(),Pname :: enum(),Params :: {float()}. +materialfv(Face,Pname,Params) -> + cast(5217, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv rasterPos4s(X,Y,Z,W) --spec rasterPos4sv({integer(),integer(),integer(),integer()}) -> ok. -rasterPos4sv({X,Y,Z,W}) -> rasterPos4s(X,Y,Z,W). +%% @doc +%% See {@link materialf/3} +-spec materialiv(Face, Pname, Params) -> ok when Face :: enum(),Pname :: enum(),Params :: {integer()}. +materialiv(Face,Pname,Params) -> + cast(5218, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (Mode::enum()) -> ok -%% @doc See external documentation. --spec readBuffer(enum()) -> ok. -readBuffer(Mode) -> - cast(5237, <>). +%% @doc Return material parameters +%% +%% ``gl:getMaterial'' returns in `Params' the value or values of parameter `Pname' +%% of material `Face' . Six parameters are defined: +%% +%% `?GL_AMBIENT': `Params' returns four integer or floating-point values representing +%% the ambient reflectance of the material. Integer values, when requested, are linearly +%% mapped from the internal floating-point representation such that 1.0 maps to the most +%% positive representable integer value, and -1.0 maps to the most negative representable +%% integer value. If the internal value is outside the range [-1 1], the corresponding integer +%% return value is undefined. The initial value is (0.2, 0.2, 0.2, 1.0) +%% +%% `?GL_DIFFUSE': `Params' returns four integer or floating-point values representing +%% the diffuse reflectance of the material. Integer values, when requested, are linearly +%% mapped from the internal floating-point representation such that 1.0 maps to the most +%% positive representable integer value, and -1.0 maps to the most negative representable +%% integer value. If the internal value is outside the range [-1 1], the corresponding integer +%% return value is undefined. The initial value is (0.8, 0.8, 0.8, 1.0). +%% +%% `?GL_SPECULAR': `Params' returns four integer or floating-point values representing +%% the specular reflectance of the material. Integer values, when requested, are linearly +%% mapped from the internal floating-point representation such that 1.0 maps to the most +%% positive representable integer value, and -1.0 maps to the most negative representable +%% integer value. If the internal value is outside the range [-1 1], the corresponding integer +%% return value is undefined. The initial value is (0, 0, 0, 1). +%% +%% `?GL_EMISSION': `Params' returns four integer or floating-point values representing +%% the emitted light intensity of the material. Integer values, when requested, are linearly +%% mapped from the internal floating-point representation such that 1.0 maps to the most +%% positive representable integer value, and -1.0 maps to the most negative representable +%% integer value. If the internal value is outside the range [-1 1], the corresponding integer +%% return value is undefined. The initial value is (0, 0, 0, 1). +%% +%% `?GL_SHININESS': `Params' returns one integer or floating-point value representing +%% the specular exponent of the material. Integer values, when requested, are computed by +%% rounding the internal floating-point value to the nearest integer value. The initial value +%% is 0. +%% +%% `?GL_COLOR_INDEXES': `Params' returns three integer or floating-point values +%% representing the ambient, diffuse, and specular indices of the material. These indices +%% are used only for color index lighting. (All the other parameters are used only for RGBA +%% lighting.) Integer values, when requested, are computed by rounding the internal floating-point +%% values to the nearest integer values. +%% +%% See external documentation. +-spec getMaterialfv(Face, Pname) -> {float(),float(),float(),float()} when Face :: enum(),Pname :: enum(). +getMaterialfv(Face,Pname) -> + call(5219, <>). -%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::mem()) -> ok -%% @doc See external documentation. --spec readPixels(integer(),integer(),integer(),integer(),enum(),enum(),mem()) -> ok. -readPixels(X,Y,Width,Height,Format,Type,Pixels) -> - send_bin(Pixels), - call(5238, <>). +%% @doc +%% See {@link getMaterialfv/2} +-spec getMaterialiv(Face, Pname) -> {integer(),integer(),integer(),integer()} when Face :: enum(),Pname :: enum(). +getMaterialiv(Face,Pname) -> + call(5220, <>). -%% @spec (X1::float(),Y1::float(),X2::float(),Y2::float()) -> ok -%% @doc See external documentation. --spec rectd(float(),float(),float(),float()) -> ok. -rectd(X1,Y1,X2,Y2) -> - cast(5239, <>). +%% @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. +%% +%% To enable and disable `?GL_COLOR_MATERIAL', call {@link gl:enable/1} and {@link gl:enable/1} +%% with argument `?GL_COLOR_MATERIAL'. `?GL_COLOR_MATERIAL' is initially disabled. +%% +%% +%% See external documentation. +-spec colorMaterial(Face, Mode) -> ok when Face :: enum(),Mode :: enum(). +colorMaterial(Face,Mode) -> + cast(5221, <>). -%% @spec (V1::{float(),float()},V2::{float(),float()}) -> ok -%% @doc See external documentation. --spec rectdv({float(),float()},{float(),float()}) -> ok. -rectdv({V1,V2},{V1,V2}) -> - cast(5240, <>). +%% @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 +%% +%% ( xr+n. xfactor, yr+m. yfactor) +%% +%% ( xr+(n+1). xfactor, yr+(m+1). yfactor) +%% +%% are candidates for replacement. Any pixel whose center lies on the bottom or left edge +%% of this rectangular region is also modified. +%% +%% Pixel zoom factors are not limited to positive values. Negative zoom factors reflect +%% the resulting image about the current raster position. +%% +%% See external documentation. +-spec pixelZoom(Xfactor, Yfactor) -> ok when Xfactor :: float(),Yfactor :: float(). +pixelZoom(Xfactor,Yfactor) -> + cast(5222, <>). -%% @spec (X1::float(),Y1::float(),X2::float(),Y2::float()) -> ok -%% @doc See external documentation. --spec rectf(float(),float(),float(),float()) -> ok. -rectf(X1,Y1,X2,Y2) -> - cast(5241, <>). +%% @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} +%% . +%% +%% `Pname' is a symbolic constant indicating the parameter to be set, and `Param' +%% is the new value. Six of the twelve storage parameters affect how pixel data is returned +%% to client memory. They are as follows: +%% +%% `?GL_PACK_SWAP_BYTES': If true, byte ordering for multibyte color components, depth +%% components, or stencil indices is reversed. That is, if a four-byte component consists +%% of bytes b 0, b 1, b 2, b 3, it is stored in memory as b 3, b 2, b 1, b 0 if `?GL_PACK_SWAP_BYTES' +%% is true. `?GL_PACK_SWAP_BYTES' has no effect on the memory order of components within +%% a pixel, only on the order of bytes within components or indices. For example, the three +%% components of a `?GL_RGB' format pixel are always stored with red first, green second, +%% and blue third, regardless of the value of `?GL_PACK_SWAP_BYTES'. +%% +%% `?GL_PACK_LSB_FIRST': If true, bits are ordered within a byte from least significant +%% to most significant; otherwise, the first bit in each byte is the most significant one. +%% +%% `?GL_PACK_ROW_LENGTH': If greater than 0, `?GL_PACK_ROW_LENGTH' defines the +%% number of pixels in a row. If the first pixel of a row is placed at location p in memory, +%% then the location of the first pixel of the next row is obtained by skipping +%% +%% k={n l(a/s) |(s n l)/a| s>= a s< a) +%% +%% components or indices, where n is the number of components or indices in a pixel, l +%% is the number of pixels in a row (`?GL_PACK_ROW_LENGTH' if it is greater than 0, +%% the width argument to the pixel routine otherwise), a is the value of `?GL_PACK_ALIGNMENT' +%% , and s is the size, in bytes, of a single component (if a< s, then it is as if a= +%% s). In the case of 1-bit values, the location of the next row is obtained by skipping +%% +%% k= 8 a |(n l)/(8 a)| +%% +%% components or indices. +%% +%% The word `component' in this description refers to the nonindex values red, green, +%% blue, alpha, and depth. Storage format `?GL_RGB', for example, has three components +%% per pixel: first red, then green, and finally blue. +%% +%% `?GL_PACK_IMAGE_HEIGHT': If greater than 0, `?GL_PACK_IMAGE_HEIGHT' defines +%% the number of pixels in an image three-dimensional texture volume, where ``image'' is +%% defined by all pixels sharing the same third dimension index. If the first pixel of a +%% row is placed at location p in memory, then the location of the first pixel of the next +%% row is obtained by skipping +%% +%% k={n l h(a/s) |(s n l h)/a| s>= a s< a) +%% +%% components or indices, where n is the number of components or indices in a pixel, l +%% is the number of pixels in a row (`?GL_PACK_ROW_LENGTH' if it is greater than 0, +%% the width argument to {@link gl:texImage3D/10} otherwise), h is the number of rows in +%% a pixel image (`?GL_PACK_IMAGE_HEIGHT' if it is greater than 0, the height argument +%% to the {@link gl:texImage3D/10} routine otherwise), a is the value of `?GL_PACK_ALIGNMENT' +%% , and s is the size, in bytes, of a single component (if a< s, then it is as if +%% a= s). +%% +%% The word `component' in this description refers to the nonindex values red, green, +%% blue, alpha, and depth. Storage format `?GL_RGB', for example, has three components +%% per pixel: first red, then green, and finally blue. +%% +%% `?GL_PACK_SKIP_PIXELS', `?GL_PACK_SKIP_ROWS', and `?GL_PACK_SKIP_IMAGES' +%% +%% These values are provided as a convenience to the programmer; they provide no functionality +%% that cannot be duplicated simply by incrementing the pointer passed to {@link gl:readPixels/7} +%% . Setting `?GL_PACK_SKIP_PIXELS' to i is equivalent to incrementing the pointer +%% by i n components or indices, where n is the number of components or indices in each +%% pixel. Setting `?GL_PACK_SKIP_ROWS' to j is equivalent to incrementing the pointer +%% by j m components or indices, where m is the number of components or indices per +%% row, as just computed in the `?GL_PACK_ROW_LENGTH' section. Setting `?GL_PACK_SKIP_IMAGES' +%% to k is equivalent to incrementing the pointer by k p, where p is the number of +%% components or indices per image, as computed in the `?GL_PACK_IMAGE_HEIGHT' section. +%% +%% +%% `?GL_PACK_ALIGNMENT': Specifies the alignment requirements for the start of each +%% pixel row in memory. The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered +%% bytes), 4 (word-alignment), and 8 (rows start on double-word boundaries). +%% +%% The other six of the twelve storage parameters affect how pixel data is read from client +%% memory. These values are significant for {@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} +%% +%% They are as follows: +%% +%% `?GL_UNPACK_SWAP_BYTES': If true, byte ordering for multibyte color components, +%% depth components, or stencil indices is reversed. That is, if a four-byte component consists +%% of bytes b 0, b 1, b 2, b 3, it is taken from memory as b 3, b 2, b 1, b 0 if `?GL_UNPACK_SWAP_BYTES' +%% is true. `?GL_UNPACK_SWAP_BYTES' has no effect on the memory order of components +%% within a pixel, only on the order of bytes within components or indices. For example, +%% the three components of a `?GL_RGB' format pixel are always stored with red first, +%% green second, and blue third, regardless of the value of `?GL_UNPACK_SWAP_BYTES'. +%% +%% `?GL_UNPACK_LSB_FIRST': If true, bits are ordered within a byte from least significant +%% to most significant; otherwise, the first bit in each byte is the most significant one. +%% +%% `?GL_UNPACK_ROW_LENGTH': If greater than 0, `?GL_UNPACK_ROW_LENGTH' defines +%% the number of pixels in a row. If the first pixel of a row is placed at location p in +%% memory, then the location of the first pixel of the next row is obtained by skipping +%% +%% k={n l(a/s) |(s n l)/a| s>= a s< a) +%% +%% components or indices, where n is the number of components or indices in a pixel, l +%% is the number of pixels in a row (`?GL_UNPACK_ROW_LENGTH' if it is greater than 0, +%% the width argument to the pixel routine otherwise), a is the value of `?GL_UNPACK_ALIGNMENT' +%% , and s is the size, in bytes, of a single component (if a< s, then it is as if a= +%% s). In the case of 1-bit values, the location of the next row is obtained by skipping +%% +%% k= 8 a |(n l)/(8 a)| +%% +%% components or indices. +%% +%% The word `component' in this description refers to the nonindex values red, green, +%% blue, alpha, and depth. Storage format `?GL_RGB', for example, has three components +%% per pixel: first red, then green, and finally blue. +%% +%% `?GL_UNPACK_IMAGE_HEIGHT': If greater than 0, `?GL_UNPACK_IMAGE_HEIGHT' defines +%% the number of pixels in an image of a three-dimensional texture volume. Where ``image'' +%% is defined by all pixel sharing the same third dimension index. If the first pixel of +%% a row is placed at location p in memory, then the location of the first pixel of the +%% next row is obtained by skipping +%% +%% k={n l h(a/s) |(s n l h)/a| s>= a s< a) +%% +%% components or indices, where n is the number of components or indices in a pixel, l +%% is the number of pixels in a row (`?GL_UNPACK_ROW_LENGTH' if it is greater than 0, +%% the width argument to {@link gl:texImage3D/10} otherwise), h is the number of rows in +%% an image (`?GL_UNPACK_IMAGE_HEIGHT' if it is greater than 0, the height argument +%% to {@link gl:texImage3D/10} otherwise), a is the value of `?GL_UNPACK_ALIGNMENT', +%% and s is the size, in bytes, of a single component (if a< s, then it is as if a= +%% s). +%% +%% The word `component' in this description refers to the nonindex values red, green, +%% blue, alpha, and depth. Storage format `?GL_RGB', for example, has three components +%% per pixel: first red, then green, and finally blue. +%% +%% `?GL_UNPACK_SKIP_PIXELS' and `?GL_UNPACK_SKIP_ROWS' +%% +%% These values are provided as a convenience to the programmer; they provide no functionality +%% that cannot be duplicated by incrementing the pointer passed to {@link gl:texImage1D/8} , {@link gl:texImage2D/9} +%% , {@link gl:texSubImage1D/7} or {@link gl:texSubImage1D/7} . Setting `?GL_UNPACK_SKIP_PIXELS' +%% to i is equivalent to incrementing the pointer by i n components or indices, where +%% n is the number of components or indices in each pixel. Setting `?GL_UNPACK_SKIP_ROWS' +%% to j is equivalent to incrementing the pointer by j k components or indices, where +%% k is the number of components or indices per row, as just computed in the `?GL_UNPACK_ROW_LENGTH' +%% section. +%% +%% `?GL_UNPACK_ALIGNMENT': Specifies the alignment requirements for the start of each +%% pixel row in memory. The allowable values are 1 (byte-alignment), 2 (rows aligned to even-numbered +%% bytes), 4 (word-alignment), and 8 (rows start on double-word boundaries). +%% +%% The following table gives the type, initial value, and range of valid values for each +%% storage parameter that can be set with ``gl:pixelStore''. +%% +%% +%% +%% +%% +%%
`Pname' ` Type '` Initial Value '` Valid Range '
`?GL_PACK_SWAP_BYTES' +%% boolean false true or false
`?GL_PACK_LSB_FIRST' +%% boolean false true or false
`?GL_PACK_ROW_LENGTH' +%% integer 0 [0)
`?GL_PACK_IMAGE_HEIGHT' integer 0 [0)
`?GL_PACK_SKIP_ROWS' +%% integer 0 [0)
`?GL_PACK_SKIP_PIXELS' integer +%% 0 [0)
`?GL_PACK_SKIP_IMAGES' integer +%% 0 [0)
`?GL_PACK_ALIGNMENT' integer 4 1, 2, 4, or 8
`?GL_UNPACK_SWAP_BYTES' boolean +%% false true or false
`?GL_UNPACK_LSB_FIRST' +%% boolean false true or false
`?GL_UNPACK_ROW_LENGTH' +%% integer 0 [0)
`?GL_UNPACK_IMAGE_HEIGHT' integer 0 [0)
`?GL_UNPACK_SKIP_ROWS' +%% integer 0 [0)
`?GL_UNPACK_SKIP_PIXELS' +%% integer 0 [0)
`?GL_UNPACK_SKIP_IMAGES' +%% integer 0 [0)
`?GL_UNPACK_ALIGNMENT' integer +%% 4 1, 2, 4, or 8
+%% +%% ``gl:pixelStoref'' can be used to set any pixel store parameter. If the parameter type +%% is boolean, then if `Param' is 0, the parameter is false; otherwise it is set to +%% true. If `Pname' is a integer type parameter, `Param' is rounded to the nearest +%% integer. +%% +%% Likewise, ``gl:pixelStorei'' can also be used to set any of the pixel store parameters. +%% Boolean parameters are set to false if `Param' is 0 and true otherwise. +%% +%% See external documentation. +-spec pixelStoref(Pname, Param) -> ok when Pname :: enum(),Param :: float(). +pixelStoref(Pname,Param) -> + cast(5223, <>). -%% @spec (V1::{float(),float()},V2::{float(),float()}) -> ok -%% @doc See external documentation. --spec rectfv({float(),float()},{float(),float()}) -> ok. -rectfv({V1,V2},{V1,V2}) -> - cast(5242, <>). +%% @doc +%% See {@link pixelStoref/2} +-spec pixelStorei(Pname, Param) -> ok when Pname :: enum(),Param :: integer(). +pixelStorei(Pname,Param) -> + cast(5224, <>). -%% @spec (X1::integer(),Y1::integer(),X2::integer(),Y2::integer()) -> ok -%% @doc See external documentation. --spec recti(integer(),integer(),integer(),integer()) -> ok. -recti(X1,Y1,X2,Y2) -> - cast(5243, <>). +%% @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. +%% +%% Pixel transfer operations handle four fundamental pixel types: `color', `color index' +%% , `depth', and `stencil'. `Color' pixels consist of four floating-point +%% values with unspecified mantissa and exponent sizes, scaled such that 0 represents zero +%% intensity and 1 represents full intensity. `Color indices' comprise a single fixed-point +%% value, with unspecified precision to the right of the binary point. `Depth' pixels +%% comprise a single floating-point value, with unspecified mantissa and exponent sizes, +%% scaled such that 0.0 represents the minimum depth buffer value, and 1.0 represents the +%% maximum depth buffer value. Finally, `stencil' pixels comprise a single fixed-point +%% value, with unspecified precision to the right of the binary point. +%% +%% The pixel transfer operations performed on the four basic pixel types are as follows: +%% +%% `Color': Each of the four color components is multiplied by a scale factor, then +%% added to a bias factor. That is, the red component is multiplied by `?GL_RED_SCALE', +%% then added to `?GL_RED_BIAS'; the green component is multiplied by `?GL_GREEN_SCALE' +%% , then added to `?GL_GREEN_BIAS'; the blue component is multiplied by `?GL_BLUE_SCALE' +%% , then added to `?GL_BLUE_BIAS'; and the alpha component is multiplied by `?GL_ALPHA_SCALE' +%% , then added to `?GL_ALPHA_BIAS'. After all four color components are scaled and +%% biased, each is clamped to the range [0 1]. All color, scale, and bias values are specified +%% with ``gl:pixelTransfer''. +%% +%% If `?GL_MAP_COLOR' is true, each color component is scaled by the size of the corresponding +%% color-to-color map, then replaced by the contents of that map indexed by the scaled component. +%% That is, the red component is scaled by `?GL_PIXEL_MAP_R_TO_R_SIZE', then replaced +%% by the contents of `?GL_PIXEL_MAP_R_TO_R' indexed by itself. The green component +%% is scaled by `?GL_PIXEL_MAP_G_TO_G_SIZE', then replaced by the contents of `?GL_PIXEL_MAP_G_TO_G' +%% indexed by itself. The blue component is scaled by `?GL_PIXEL_MAP_B_TO_B_SIZE', +%% then replaced by the contents of `?GL_PIXEL_MAP_B_TO_B' indexed by itself. And the +%% alpha component is scaled by `?GL_PIXEL_MAP_A_TO_A_SIZE', then replaced by the contents +%% of `?GL_PIXEL_MAP_A_TO_A' indexed by itself. All components taken from the maps are +%% then clamped to the range [0 1]. `?GL_MAP_COLOR' is specified with ``gl:pixelTransfer''. +%% The contents of the various maps are specified with {@link gl:pixelMapfv/3} . +%% +%% If the ARB_imaging extension is supported, each of the four color components may be scaled +%% and biased after transformation by the color matrix. That is, the red component is multiplied +%% by `?GL_POST_COLOR_MATRIX_RED_SCALE', then added to `?GL_POST_COLOR_MATRIX_RED_BIAS' +%% ; the green component is multiplied by `?GL_POST_COLOR_MATRIX_GREEN_SCALE', then +%% added to `?GL_POST_COLOR_MATRIX_GREEN_BIAS'; the blue component is multiplied by `?GL_POST_COLOR_MATRIX_BLUE_SCALE' +%% , then added to `?GL_POST_COLOR_MATRIX_BLUE_BIAS'; and the alpha component is multiplied +%% by `?GL_POST_COLOR_MATRIX_ALPHA_SCALE', then added to `?GL_POST_COLOR_MATRIX_ALPHA_BIAS' +%% . After all four color components are scaled and biased, each is clamped to the range [0 +%% 1]. +%% +%% Similarly, if the ARB_imaging extension is supported, each of the four color components +%% may be scaled and biased after processing by the enabled convolution filter. That is, +%% the red component is multiplied by `?GL_POST_CONVOLUTION_RED_SCALE', then added to `?GL_POST_CONVOLUTION_RED_BIAS' +%% ; the green component is multiplied by `?GL_POST_CONVOLUTION_GREEN_SCALE', then added +%% to `?GL_POST_CONVOLUTION_GREEN_BIAS'; the blue component is multiplied by `?GL_POST_CONVOLUTION_BLUE_SCALE' +%% , then added to `?GL_POST_CONVOLUTION_BLUE_BIAS'; and the alpha component is multiplied +%% by `?GL_POST_CONVOLUTION_ALPHA_SCALE', then added to `?GL_POST_CONVOLUTION_ALPHA_BIAS' +%% . After all four color components are scaled and biased, each is clamped to the range [0 +%% 1]. +%% +%% `Color index': Each color index is shifted left by `?GL_INDEX_SHIFT' bits; +%% any bits beyond the number of fraction bits carried by the fixed-point index are filled +%% with zeros. If `?GL_INDEX_SHIFT' is negative, the shift is to the right, again zero +%% filled. Then `?GL_INDEX_OFFSET' is added to the index. `?GL_INDEX_SHIFT' and `?GL_INDEX_OFFSET' +%% are specified with ``gl:pixelTransfer''. +%% +%% From this point, operation diverges depending on the required format of the resulting +%% pixels. If the resulting pixels are to be written to a color index buffer, or if they +%% are being read back to client memory in `?GL_COLOR_INDEX' format, the pixels continue +%% to be treated as indices. If `?GL_MAP_COLOR' is true, each index is masked by 2 n-1 +%% , where n is `?GL_PIXEL_MAP_I_TO_I_SIZE', then replaced by the contents of `?GL_PIXEL_MAP_I_TO_I' +%% indexed by the masked value. `?GL_MAP_COLOR' is specified with ``gl:pixelTransfer'' +%% . The contents of the index map is specified with {@link gl:pixelMapfv/3} . +%% +%% If the resulting pixels are to be written to an RGBA color buffer, or if they are read +%% back to client memory in a format other than `?GL_COLOR_INDEX', the pixels are converted +%% from indices to colors by referencing the four maps `?GL_PIXEL_MAP_I_TO_R', `?GL_PIXEL_MAP_I_TO_G' +%% , `?GL_PIXEL_MAP_I_TO_B', and `?GL_PIXEL_MAP_I_TO_A'. Before being dereferenced, +%% the index is masked by 2 n-1, where n is `?GL_PIXEL_MAP_I_TO_R_SIZE' for the +%% red map, `?GL_PIXEL_MAP_I_TO_G_SIZE' for the green map, `?GL_PIXEL_MAP_I_TO_B_SIZE' +%% for the blue map, and `?GL_PIXEL_MAP_I_TO_A_SIZE' for the alpha map. All components +%% taken from the maps are then clamped to the range [0 1]. The contents of the four maps is +%% specified with {@link gl:pixelMapfv/3} . +%% +%% `Depth': Each depth value is multiplied by `?GL_DEPTH_SCALE', added to `?GL_DEPTH_BIAS' +%% , then clamped to the range [0 1]. +%% +%% `Stencil': Each index is shifted `?GL_INDEX_SHIFT' bits just as a color index +%% is, then added to `?GL_INDEX_OFFSET'. If `?GL_MAP_STENCIL' is true, each index +%% is masked by 2 n-1, where n is `?GL_PIXEL_MAP_S_TO_S_SIZE', then replaced by +%% the contents of `?GL_PIXEL_MAP_S_TO_S' indexed by the masked value. +%% +%% The following table gives the type, initial value, and range of valid values for each +%% of the pixel transfer parameters that are set with ``gl:pixelTransfer''. +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%%
`Pname' ` Type '` Initial Value '` Valid Range '
`?GL_MAP_COLOR' +%% boolean false true/false
`?GL_MAP_STENCIL' boolean false true/false
`?GL_INDEX_SHIFT' integer 0 (-)
`?GL_INDEX_OFFSET' integer +%% 0 (-)
`?GL_RED_SCALE' float 1 (-)
`?GL_GREEN_SCALE' float 1 (-)
`?GL_BLUE_SCALE' float 1 (-)
`?GL_ALPHA_SCALE' +%% float 1 (-)
`?GL_DEPTH_SCALE' +%% float 1 (-)
`?GL_RED_BIAS' float +%% 0 (-)
`?GL_GREEN_BIAS' float 0 (-)
`?GL_BLUE_BIAS' float 0 (-)
`?GL_ALPHA_BIAS' +%% float 0 (-)
`?GL_DEPTH_BIAS' +%% float 0 (-)
`?GL_POST_COLOR_MATRIX_RED_SCALE' +%% float 1 (-)
`?GL_POST_COLOR_MATRIX_GREEN_SCALE' float 1 (-)
`?GL_POST_COLOR_MATRIX_BLUE_SCALE' float 1 (-)
`?GL_POST_COLOR_MATRIX_ALPHA_SCALE' float 1 (-)
`?GL_POST_COLOR_MATRIX_RED_BIAS' float 0 (-)
`?GL_POST_COLOR_MATRIX_GREEN_BIAS' float 0 (-)
`?GL_POST_COLOR_MATRIX_BLUE_BIAS' float 0 (-)
`?GL_POST_COLOR_MATRIX_ALPHA_BIAS' float 0 (-)
`?GL_POST_CONVOLUTION_RED_SCALE' float 1 (-)
`?GL_POST_CONVOLUTION_GREEN_SCALE' float 1 (-)
`?GL_POST_CONVOLUTION_BLUE_SCALE' float 1 (-)
`?GL_POST_CONVOLUTION_ALPHA_SCALE' float 1 (-)
`?GL_POST_CONVOLUTION_RED_BIAS' float 0 (-)
`?GL_POST_CONVOLUTION_GREEN_BIAS' float 0 (-)
`?GL_POST_CONVOLUTION_BLUE_BIAS' float 0 (-)
`?GL_POST_CONVOLUTION_ALPHA_BIAS' float 0 (-)
+%% +%% ``gl:pixelTransferf'' can be used to set any pixel transfer parameter. If the parameter +%% type is boolean, 0 implies false and any other value implies true. If `Pname' is +%% an integer parameter, `Param' is rounded to the nearest integer. +%% +%% Likewise, ``gl:pixelTransferi'' can be used to set any of the pixel transfer parameters. +%% Boolean parameters are set to false if `Param' is 0 and to true otherwise. `Param' +%% is converted to floating point before being assigned to real-valued parameters. +%% +%% See external documentation. +-spec pixelTransferf(Pname, Param) -> ok when Pname :: enum(),Param :: float(). +pixelTransferf(Pname,Param) -> + cast(5225, <>). -%% @spec (V1::{integer(),integer()},V2::{integer(),integer()}) -> ok -%% @doc See external documentation. --spec rectiv({integer(),integer()},{integer(),integer()}) -> ok. -rectiv({V1,V2},{V1,V2}) -> - cast(5244, <>). +%% @doc +%% See {@link pixelTransferf/2} +-spec pixelTransferi(Pname, Param) -> ok when Pname :: enum(),Param :: integer(). +pixelTransferi(Pname,Param) -> + cast(5226, <>). -%% @spec (X1::integer(),Y1::integer(),X2::integer(),Y2::integer()) -> ok -%% @doc See external documentation. --spec rects(integer(),integer(),integer(),integer()) -> ok. -rects(X1,Y1,X2,Y2) -> - cast(5245, <>). +%% @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. +%% +%% `Map' is a symbolic map name, indicating one of ten maps to set. `Mapsize' specifies +%% the number of entries in the map, and `Values' is a pointer to an array of `Mapsize' +%% map values. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a pixel transfer map is specified, `Values' is +%% treated as a byte offset into the buffer object's data store. +%% +%% The ten maps are as follows: +%% +%% `?GL_PIXEL_MAP_I_TO_I': Maps color indices to color indices. +%% +%% `?GL_PIXEL_MAP_S_TO_S': Maps stencil indices to stencil indices. +%% +%% `?GL_PIXEL_MAP_I_TO_R': Maps color indices to red components. +%% +%% `?GL_PIXEL_MAP_I_TO_G': Maps color indices to green components. +%% +%% `?GL_PIXEL_MAP_I_TO_B': Maps color indices to blue components. +%% +%% `?GL_PIXEL_MAP_I_TO_A': Maps color indices to alpha components. +%% +%% `?GL_PIXEL_MAP_R_TO_R': Maps red components to red components. +%% +%% `?GL_PIXEL_MAP_G_TO_G': Maps green components to green components. +%% +%% `?GL_PIXEL_MAP_B_TO_B': Maps blue components to blue components. +%% +%% `?GL_PIXEL_MAP_A_TO_A': Maps alpha components to alpha components. +%% +%% The entries in a map can be specified as single-precision floating-point numbers, unsigned +%% short integers, or unsigned int integers. Maps that store color component values (all +%% but `?GL_PIXEL_MAP_I_TO_I' and `?GL_PIXEL_MAP_S_TO_S') retain their values in +%% floating-point format, with unspecified mantissa and exponent sizes. Floating-point values +%% specified by ``gl:pixelMapfv'' are converted directly to the internal floating-point +%% format of these maps, then clamped to the range [0,1]. Unsigned integer values specified +%% by ``gl:pixelMapusv'' and ``gl:pixelMapuiv'' are converted linearly such that the +%% largest representable integer maps to 1.0, and 0 maps to 0.0. +%% +%% Maps that store indices, `?GL_PIXEL_MAP_I_TO_I' and `?GL_PIXEL_MAP_S_TO_S', +%% retain their values in fixed-point format, with an unspecified number of bits to the right +%% of the binary point. Floating-point values specified by ``gl:pixelMapfv'' are converted +%% directly to the internal fixed-point format of these maps. Unsigned integer values specified +%% by ``gl:pixelMapusv'' and ``gl:pixelMapuiv'' specify integer values, with all 0's +%% to the right of the binary point. +%% +%% The following table shows the initial sizes and values for each of the maps. Maps that +%% are indexed by either color or stencil indices must have `Mapsize' = 2 n for some +%% n or the results are undefined. The maximum allowable size for each map depends on the +%% implementation and can be determined by calling {@link gl:getBooleanv/1} with argument `?GL_MAX_PIXEL_MAP_TABLE' +%% . The single maximum applies to all maps; it is at least 32. +%% +%% +%% +%% +%% +%% +%% +%% +%% +%%
`Map' +%% ` Lookup Index '` Lookup Value '` Initial Size '` Initial Value '
`?GL_PIXEL_MAP_I_TO_I' color index color index 1 0
`?GL_PIXEL_MAP_S_TO_S' +%% stencil index stencil index 1 0
+%% `?GL_PIXEL_MAP_I_TO_R' color index R 1 0
`?GL_PIXEL_MAP_I_TO_G' color index G 1 0
`?GL_PIXEL_MAP_I_TO_B' color index B 1 0
`?GL_PIXEL_MAP_I_TO_A' color index A 1 0
`?GL_PIXEL_MAP_R_TO_R' R R 1 0
`?GL_PIXEL_MAP_G_TO_G' G G 1 0
`?GL_PIXEL_MAP_B_TO_B' B B 1 0
`?GL_PIXEL_MAP_A_TO_A' A A 1 0
+%% +%% 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, <>). -%% @spec (V1::{integer(),integer()},V2::{integer(),integer()}) -> ok -%% @doc See external documentation. --spec rectsv({integer(),integer()},{integer(),integer()}) -> ok. -rectsv({V1,V2},{V1,V2}) -> - cast(5246, <>). +%% @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, <>). -%% @spec (Mode::enum()) -> integer() -%% @doc See external documentation. --spec renderMode(enum()) -> integer(). -renderMode(Mode) -> - call(5247, <>). +%% @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, <>). -%% @spec (Angle::float(),X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec rotated(float(),float(),float(),float()) -> ok. -rotated(Angle,X,Y,Z) -> - cast(5248, <>). +%% @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. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a pixel map is requested, `Data' is treated as +%% a byte offset into the buffer object's data store. +%% +%% Unsigned integer values, if requested, are linearly mapped from the internal fixed or +%% floating-point representation such that 1.0 maps to the largest representable integer +%% value, and 0.0 maps to 0. Return unsigned integer values are undefined if the map value +%% was not in the range [0,1]. +%% +%% To determine the required size of `Map' , call {@link gl:getBooleanv/1} with the appropriate +%% symbolic constant. +%% +%% See external documentation. +-spec getPixelMapfv(Map, Values) -> ok when Map :: enum(),Values :: mem(). +getPixelMapfv(Map,Values) -> + send_bin(Values), + call(5230, <>). -%% @spec (Angle::float(),X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec rotatef(float(),float(),float(),float()) -> ok. -rotatef(Angle,X,Y,Z) -> - cast(5249, <>). +%% @doc +%% See {@link getPixelMapfv/2} +-spec getPixelMapuiv(Map, Values) -> ok when Map :: enum(),Values :: mem(). +getPixelMapuiv(Map,Values) -> + send_bin(Values), + call(5231, <>). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec scaled(float(),float(),float()) -> ok. -scaled(X,Y,Z) -> - cast(5250, <>). +%% @doc +%% See {@link getPixelMapfv/2} +-spec getPixelMapusv(Map, Values) -> ok when Map :: enum(),Values :: mem(). +getPixelMapusv(Map,Values) -> + send_bin(Values), + call(5232, <>). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec scalef(float(),float(),float()) -> ok. -scalef(X,Y,Z) -> - cast(5251, <>). +%% @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. +%% +%% ``gl:bitmap'' takes seven arguments. The first pair specifies the width and height of +%% the bitmap image. The second pair specifies the location of the bitmap origin relative +%% to the lower left corner of the bitmap image. The third pair of arguments specifies `x' +%% and `y' offsets to be added to the current raster position after the bitmap has +%% been drawn. The final argument is a pointer to the bitmap image itself. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a bitmap image is specified, `Bitmap' is treated +%% as a byte offset into the buffer object's data store. +%% +%% The bitmap image is interpreted like image data for the {@link gl:drawPixels/5} command, +%% with `Width' and `Height' corresponding to the width and height arguments of +%% that command, and with `type' set to `?GL_BITMAP' and `format' set to `?GL_COLOR_INDEX' +%% . Modes specified using {@link gl:pixelStoref/2} affect the interpretation of bitmap image +%% data; modes specified using {@link gl:pixelTransferf/2} do not. +%% +%% If the current raster position is invalid, ``gl:bitmap'' is ignored. Otherwise, the +%% lower left corner of the bitmap image is positioned at the window coordinates +%% +%% x w=|x r-x o| +%% +%% y w=|y r-y o| +%% +%% where (x r y r) is the raster position and (x o y o) is the bitmap origin. Fragments are then generated +%% for each pixel corresponding to a 1 (one) in the bitmap image. These fragments are generated +%% using the current raster `z' coordinate, color or color index, and current raster +%% texture coordinates. They are then treated just as if they had been generated by a point, +%% line, or polygon, including texture mapping, fogging, and all per-fragment operations +%% such as alpha and depth testing. +%% +%% After the bitmap has been drawn, the `x' and `y' coordinates of the current +%% raster position are offset by `Xmove' and `Ymove' . No change is made to the `z' +%% coordinate of the current raster position, or to the current raster color, texture coordinates, +%% or index. +%% +%% 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, <>). -%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok -%% @doc See external documentation. --spec scissor(integer(),integer(),integer(),integer()) -> ok. -scissor(X,Y,Width,Height) -> - cast(5252, <>). +%% @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. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a block of pixels is requested, `Data' is treated +%% as a byte offset into the buffer object's data store rather than a pointer to client memory. +%% +%% +%% ``gl:readPixels'' returns values from each pixel with lower left corner at (x+i y+j) for 0<= +%% i< width and 0<= j< height. This pixel is said to be the ith pixel in the +%% jth row. Pixels are returned in row order from the lowest to the highest row, left to +%% right in each row. +%% +%% `Format' specifies the format for the returned pixel values; accepted values are: +%% +%% `?GL_STENCIL_INDEX': Stencil values are read from the stencil buffer. Each index +%% is converted to fixed point, shifted left or right depending on the value and sign of `?GL_INDEX_SHIFT' +%% , and added to `?GL_INDEX_OFFSET'. If `?GL_MAP_STENCIL' is `?GL_TRUE', +%% indices are replaced by their mappings in the table `?GL_PIXEL_MAP_S_TO_S'. +%% +%% `?GL_DEPTH_COMPONENT': Depth values are read from the depth buffer. Each component +%% is converted to floating point such that the minimum depth value maps to 0 and the maximum +%% value maps to 1. Each component is then multiplied by `?GL_DEPTH_SCALE', added to `?GL_DEPTH_BIAS' +%% , and finally clamped to the range [0 1]. +%% +%% `?GL_DEPTH_STENCIL': Values are taken from both the depth and stencil buffers. The `Type' +%% parameter must be `?GL_UNSIGNED_INT_24_8' or `?GL_FLOAT_32_UNSIGNED_INT_24_8_REV' +%% . +%% +%% `?GL_RED' +%% +%% `?GL_GREEN' +%% +%% `?GL_BLUE' +%% +%% `?GL_RGB' +%% +%% `?GL_BGR' +%% +%% `?GL_RGBA' +%% +%% `?GL_BGRA': Finally, the indices or components are converted to the proper format, +%% as specified by `Type' . If `Format' is `?GL_STENCIL_INDEX' and `Type' +%% is not `?GL_FLOAT', each index is masked with the mask value given in the following +%% table. If `Type' is `?GL_FLOAT', then each integer index is converted to single-precision +%% floating-point format. +%% +%% If `Format' is `?GL_RED', `?GL_GREEN', `?GL_BLUE', `?GL_RGB', `?GL_BGR' +%% , `?GL_RGBA', or `?GL_BGRA' and `Type' is not `?GL_FLOAT', each component +%% is multiplied by the multiplier shown in the following table. If type is `?GL_FLOAT', +%% then each component is passed as is (or converted to the client's single-precision floating-point +%% format if it is different from the one used by the GL). +%% +%% +%% +%% +%% +%% +%% +%% +%% +%%
`Type' ` Index Mask '` Component Conversion ' +%%
`?GL_UNSIGNED_BYTE' 2 8-1(2 8-1) c
`?GL_BYTE' 2 7-1((2 8-1) c-1)/2
`?GL_UNSIGNED_SHORT' +%% 2 16-1(2 16-1) c
`?GL_SHORT' 2 15-1((2 +%% 16-1) +%% c-1)/2
`?GL_UNSIGNED_INT' 2 32-1(2 32-1) c
`?GL_INT' +%% 2 31-1((2 32-1) c-1)/2
`?GL_HALF_FLOAT' none +%% c
`?GL_FLOAT' none c
`?GL_UNSIGNED_BYTE_3_3_2' +%% 2 N-1(2 N-1) c
`?GL_UNSIGNED_BYTE_2_3_3_REV' +%% 2 N-1(2 N-1) c
`?GL_UNSIGNED_SHORT_5_6_5' 2 N-1 +%% (2 N-1) c
`?GL_UNSIGNED_SHORT_5_6_5_REV' 2 N-1(2 N-1) c
`?GL_UNSIGNED_SHORT_4_4_4_4' 2 N-1(2 N-1) c
`?GL_UNSIGNED_SHORT_4_4_4_4_REV' +%% 2 N-1(2 N-1) c
`?GL_UNSIGNED_SHORT_5_5_5_1' 2 +%% N-1(2 N-1) c
`?GL_UNSIGNED_SHORT_1_5_5_5_REV' 2 N-1(2 N-1) c
`?GL_UNSIGNED_INT_8_8_8_8' 2 N-1(2 N-1) c
`?GL_UNSIGNED_INT_8_8_8_8_REV' 2 N-1(2 N-1) c
`?GL_UNSIGNED_INT_10_10_10_2' +%% 2 N-1(2 N-1) c
`?GL_UNSIGNED_INT_2_10_10_10_REV' +%% 2 N-1(2 N-1) c
`?GL_UNSIGNED_INT_24_8' 2 N-1(2 +%% N-1) +%% c
`?GL_UNSIGNED_INT_10F_11F_11F_REV' -- Special
`?GL_UNSIGNED_INT_5_9_9_9_REV' -- Special
`?GL_FLOAT_32_UNSIGNED_INT_24_8_REV' none c (Depth Only)
+%% +%% Return values are placed in memory as follows. If `Format' is `?GL_STENCIL_INDEX' +%% , `?GL_DEPTH_COMPONENT', `?GL_RED', `?GL_GREEN', or `?GL_BLUE', a +%% single value is returned and the data for the ith pixel in the jth row is placed in +%% location (j) width+i. `?GL_RGB' and `?GL_BGR' return three values, `?GL_RGBA' +%% and `?GL_BGRA' return four values for each pixel, with all values corresponding +%% to a single pixel occupying contiguous space in `Data' . Storage parameters set by {@link gl:pixelStoref/2} +%% , such as `?GL_PACK_LSB_FIRST' and `?GL_PACK_SWAP_BYTES', affect the way that +%% data is written into memory. See {@link gl:pixelStoref/2} for a description. +%% +%% 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, <>). -%% @spec (Size::integer(),Buffer::mem()) -> ok -%% @doc See external documentation. --spec selectBuffer(integer(),mem()) -> ok. -selectBuffer(Size,Buffer) -> - send_bin(Buffer), - call(5253, <>). +%% @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. +%% +%% Several parameters define the encoding of pixel data in memory and control the processing +%% of the pixel data before it is placed in the frame buffer. These parameters are set with +%% four commands: {@link gl:pixelStoref/2} , {@link gl:pixelTransferf/2} , {@link gl:pixelMapfv/3} , +%% and {@link gl:pixelZoom/2} . This reference page describes the effects on ``gl:drawPixels'' +%% of many, but not all, of the parameters specified by these four commands. +%% +%% Data is read from `Data' as a sequence of signed or unsigned bytes, signed or unsigned +%% shorts, signed or unsigned integers, or single-precision floating-point values, depending +%% on `Type' . When `Type' is one of `?GL_UNSIGNED_BYTE', `?GL_BYTE', `?GL_UNSIGNED_SHORT' +%% , `?GL_SHORT', `?GL_UNSIGNED_INT', `?GL_INT', or `?GL_FLOAT' each +%% of these bytes, shorts, integers, or floating-point values is interpreted as one color +%% or depth component, or one index, depending on `Format' . When `Type' is one of `?GL_UNSIGNED_BYTE_3_3_2' +%% , `?GL_UNSIGNED_SHORT_5_6_5', `?GL_UNSIGNED_SHORT_4_4_4_4', `?GL_UNSIGNED_SHORT_5_5_5_1' +%% , `?GL_UNSIGNED_INT_8_8_8_8', or `?GL_UNSIGNED_INT_10_10_10_2', each unsigned +%% value is interpreted as containing all the components for a single pixel, with the color +%% components arranged according to `Format' . When `Type' is one of `?GL_UNSIGNED_BYTE_2_3_3_REV' +%% , `?GL_UNSIGNED_SHORT_5_6_5_REV', `?GL_UNSIGNED_SHORT_4_4_4_4_REV', `?GL_UNSIGNED_SHORT_1_5_5_5_REV' +%% , `?GL_UNSIGNED_INT_8_8_8_8_REV', or `?GL_UNSIGNED_INT_2_10_10_10_REV', each +%% unsigned value is interpreted as containing all color components, specified by `Format' +%% , for a single pixel in a reversed order. Indices are always treated individually. Color +%% components are treated as groups of one, two, three, or four values, again based on `Format' +%% . Both individual indices and groups of components are referred to as pixels. If `Type' +%% is `?GL_BITMAP', the data must be unsigned bytes, and `Format' must be either `?GL_COLOR_INDEX' +%% or `?GL_STENCIL_INDEX'. Each unsigned byte is treated as eight 1-bit pixels, with +%% bit ordering determined by `?GL_UNPACK_LSB_FIRST' (see {@link gl:pixelStoref/2} ). +%% +%% width*height pixels are read from memory, starting at location `Data' . By default, +%% these pixels are taken from adjacent memory locations, except that after all `Width' +%% pixels are read, the read pointer is advanced to the next four-byte boundary. The four-byte +%% row alignment is specified by {@link gl:pixelStoref/2} with argument `?GL_UNPACK_ALIGNMENT' +%% , and it can be set to one, two, four, or eight bytes. Other pixel store parameters specify +%% different read pointer advancements, both before the first pixel is read and after all `Width' +%% pixels are read. See the {@link gl:pixelStoref/2} reference page for details on these options. +%% +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a block of pixels is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% The width*height pixels that are read from memory are each operated on in the same +%% way, based on the values of several parameters specified by {@link gl:pixelTransferf/2} +%% and {@link gl:pixelMapfv/3} . The details of these operations, as well as the target buffer +%% into which the pixels are drawn, are specific to the format of the pixels, as specified +%% by `Format' . `Format' can assume one of 13 symbolic values: +%% +%% `?GL_COLOR_INDEX': Each pixel is a single value, a color index. It is converted +%% to fixed-point format, with an unspecified number of bits to the right of the binary point, +%% regardless of the memory data type. Floating-point values convert to true fixed-point +%% values. Signed and unsigned integer data is converted with all fraction bits set to 0. +%% Bitmap data convert to either 0 or 1. +%% +%% Each fixed-point index is then shifted left by `?GL_INDEX_SHIFT' bits and added to `?GL_INDEX_OFFSET' +%% . If `?GL_INDEX_SHIFT' is negative, the shift is to the right. In either case, zero +%% bits fill otherwise unspecified bit locations in the result. +%% +%% If the GL is in RGBA mode, the resulting index is converted to an RGBA pixel with the +%% help of the `?GL_PIXEL_MAP_I_TO_R', `?GL_PIXEL_MAP_I_TO_G', `?GL_PIXEL_MAP_I_TO_B' +%% , and `?GL_PIXEL_MAP_I_TO_A' tables. If the GL is in color index mode, and if `?GL_MAP_COLOR' +%% is true, the index is replaced with the value that it references in lookup table `?GL_PIXEL_MAP_I_TO_I' +%% . Whether the lookup replacement of the index is done or not, the integer part of the +%% index is then ANDed with 2 b-1, where b is the number of bits in a color index buffer. +%% +%% +%% The GL then converts the resulting indices or RGBA colors to fragments by attaching the +%% current raster position `z' coordinate and texture coordinates to each pixel, then +%% assigning x and y window coordinates to the nth fragment such that x n= x r+n% +%% width +%% +%% y n= y r+|n/width| +%% +%% where (x r y r) is the current raster position. These pixel fragments are then treated just like +%% the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, +%% and all the fragment operations are applied before the fragments are written to the frame +%% buffer. +%% +%% `?GL_STENCIL_INDEX': Each pixel is a single value, a stencil index. It is converted +%% to fixed-point format, with an unspecified number of bits to the right of the binary point, +%% regardless of the memory data type. Floating-point values convert to true fixed-point +%% values. Signed and unsigned integer data is converted with all fraction bits set to 0. +%% Bitmap data convert to either 0 or 1. +%% +%% Each fixed-point index is then shifted left by `?GL_INDEX_SHIFT' bits, and added +%% to `?GL_INDEX_OFFSET'. If `?GL_INDEX_SHIFT' is negative, the shift is to the +%% right. In either case, zero bits fill otherwise unspecified bit locations in the result. +%% If `?GL_MAP_STENCIL' is true, the index is replaced with the value that it references +%% in lookup table `?GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement of the index +%% is done or not, the integer part of the index is then ANDed with 2 b-1, where b is +%% the number of bits in the stencil buffer. The resulting stencil indices are then written +%% to the stencil buffer such that the nth index is written to location +%% +%% x n= x r+n% width +%% +%% y n= y r+|n/width| +%% +%% where (x r y r) is the current raster position. Only the pixel ownership test, the scissor test, +%% and the stencil writemask affect these write operations. +%% +%% `?GL_DEPTH_COMPONENT': Each pixel is a single-depth component. Floating-point data +%% is converted directly to an internal floating-point format with unspecified precision. +%% Signed integer data is mapped linearly to the internal floating-point format such that +%% the most positive representable integer value maps to 1.0, and the most negative representable +%% value maps to -1.0. Unsigned integer data is mapped similarly: the largest integer value +%% maps to 1.0, and 0 maps to 0.0. The resulting floating-point depth value is then multiplied +%% by `?GL_DEPTH_SCALE' and added to `?GL_DEPTH_BIAS'. The result is clamped to +%% the range [0 1]. +%% +%% The GL then converts the resulting depth components to fragments by attaching the current +%% raster position color or color index and texture coordinates to each pixel, then assigning +%% x and y window coordinates to the nth fragment such that +%% +%% x n= x r+n% width +%% +%% y n= y r+|n/width| +%% +%% where (x r y r) is the current raster position. These pixel fragments are then treated just like +%% the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, +%% and all the fragment operations are applied before the fragments are written to the frame +%% buffer. +%% +%% `?GL_RGBA' +%% +%% `?GL_BGRA': Each pixel is a four-component group: For `?GL_RGBA', the red component +%% is first, followed by green, followed by blue, followed by alpha; for `?GL_BGRA' +%% the order is blue, green, red and then alpha. Floating-point values are converted directly +%% to an internal floating-point format with unspecified precision. Signed integer values +%% are mapped linearly to the internal floating-point format such that the most positive +%% representable integer value maps to 1.0, and the most negative representable value maps +%% to -1.0. (Note that this mapping does not convert 0 precisely to 0.0.) Unsigned integer +%% data is mapped similarly: The largest integer value maps to 1.0, and 0 maps to 0.0. The +%% resulting floating-point color values are then multiplied by `?GL_c_SCALE' and added +%% to `?GL_c_BIAS', where `c' is RED, GREEN, BLUE, and ALPHA for the respective +%% color components. The results are clamped to the range [0 1]. +%% +%% If `?GL_MAP_COLOR' is true, each color component is scaled by the size of lookup +%% table `?GL_PIXEL_MAP_c_TO_c', then replaced by the value that it references in that +%% table. `c' is R, G, B, or A respectively. +%% +%% The GL then converts the resulting RGBA colors to fragments by attaching the current +%% raster position `z' coordinate and texture coordinates to each pixel, then assigning +%% x and y window coordinates to the nth fragment such that +%% +%% x n= x r+n% width +%% +%% y n= y r+|n/width| +%% +%% where (x r y r) is the current raster position. These pixel fragments are then treated just like +%% the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, +%% and all the fragment operations are applied before the fragments are written to the frame +%% buffer. +%% +%% `?GL_RED': Each pixel is a single red component. This component is converted to +%% the internal floating-point format in the same way the red component of an RGBA pixel +%% is. It is then converted to an RGBA pixel with green and blue set to 0, and alpha set +%% to 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel. +%% +%% +%% `?GL_GREEN': Each pixel is a single green component. This component is converted +%% to the internal floating-point format in the same way the green component of an RGBA pixel +%% is. It is then converted to an RGBA pixel with red and blue set to 0, and alpha set to +%% 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel. +%% +%% `?GL_BLUE': Each pixel is a single blue component. This component is converted to +%% the internal floating-point format in the same way the blue component of an RGBA pixel +%% is. It is then converted to an RGBA pixel with red and green set to 0, and alpha set to +%% 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel. +%% +%% `?GL_ALPHA': Each pixel is a single alpha component. This component is converted +%% to the internal floating-point format in the same way the alpha component of an RGBA pixel +%% is. It is then converted to an RGBA pixel with red, green, and blue set to 0. After this +%% conversion, the pixel is treated as if it had been read as an RGBA pixel. +%% +%% `?GL_RGB' +%% +%% `?GL_BGR': Each pixel is a three-component group: red first, followed by green, +%% followed by blue; for `?GL_BGR', the first component is blue, followed by green and +%% then red. Each component is converted to the internal floating-point format in the same +%% way the red, green, and blue components of an RGBA pixel are. The color triple is converted +%% to an RGBA pixel with alpha set to 1. After this conversion, the pixel is treated as if +%% it had been read as an RGBA pixel. +%% +%% `?GL_LUMINANCE': Each pixel is a single luminance component. This component is converted +%% to the internal floating-point format in the same way the red component of an RGBA pixel +%% is. It is then converted to an RGBA pixel with red, green, and blue set to the converted +%% luminance value, and alpha set to 1. After this conversion, the pixel is treated as if +%% it had been read as an RGBA pixel. +%% +%% `?GL_LUMINANCE_ALPHA': Each pixel is a two-component group: luminance first, followed +%% by alpha. The two components are converted to the internal floating-point format in the +%% same way the red component of an RGBA pixel is. They are then converted to an RGBA pixel +%% with red, green, and blue set to the converted luminance value, and alpha set to the converted +%% alpha value. After this conversion, the pixel is treated as if it had been read as an +%% RGBA pixel. +%% +%% The following table summarizes the meaning of the valid constants for the `type' +%% parameter: +%% +%% +%% +%% +%% +%% +%% +%% +%%
` Type '` Corresponding Type '
`?GL_UNSIGNED_BYTE' unsigned 8-bit integer
`?GL_BYTE' +%% signed 8-bit integer
`?GL_BITMAP' single bits +%% in unsigned 8-bit integers
`?GL_UNSIGNED_SHORT' unsigned +%% 16-bit integer
`?GL_SHORT' signed 16-bit integer
`?GL_UNSIGNED_INT' unsigned 32-bit integer
`?GL_INT' +%% 32-bit integer
`?GL_FLOAT' single-precision +%% floating-point
`?GL_UNSIGNED_BYTE_3_3_2' unsigned 8-bit +%% integer
`?GL_UNSIGNED_BYTE_2_3_3_REV' unsigned 8-bit +%% integer with reversed component ordering
`?GL_UNSIGNED_SHORT_5_6_5' unsigned 16-bit integer
`?GL_UNSIGNED_SHORT_5_6_5_REV' +%% unsigned 16-bit integer with reversed component ordering
`?GL_UNSIGNED_SHORT_4_4_4_4' +%% unsigned 16-bit integer
`?GL_UNSIGNED_SHORT_4_4_4_4_REV' unsigned 16-bit integer with reversed component ordering
`?GL_UNSIGNED_SHORT_5_5_5_1' +%% unsigned 16-bit integer
`?GL_UNSIGNED_SHORT_1_5_5_5_REV' unsigned 16-bit integer with reversed component ordering
`?GL_UNSIGNED_INT_8_8_8_8' +%% unsigned 32-bit integer
`?GL_UNSIGNED_INT_8_8_8_8_REV' unsigned 32-bit integer with reversed component ordering
`?GL_UNSIGNED_INT_10_10_10_2' +%% unsigned 32-bit integer
`?GL_UNSIGNED_INT_2_10_10_10_REV' unsigned 32-bit integer with reversed component ordering
+%% +%% The rasterization described so far assumes pixel zoom factors of 1. If {@link gl:pixelZoom/2} +%% is used to change the x and y pixel zoom factors, pixels are converted to fragments +%% as follows. If (x r y r) is the current raster position, and a given pixel is in the nth column +%% and mth row of the pixel rectangle, then fragments are generated for pixels whose centers +%% are in the rectangle with corners at +%% +%% (x r+(zoom x) n y r+(zoom y) m) +%% +%% (x r+(zoom x)(n+1) y r+(zoom y)(m+1)) +%% +%% where zoom x is the value of `?GL_ZOOM_X' and zoom y is the value of `?GL_ZOOM_Y' +%% . +%% +%% 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, <>). -%% @spec (Mode::enum()) -> ok -%% @doc See external documentation. --spec shadeModel(enum()) -> ok. -shadeModel(Mode) -> - cast(5254, <>). +%% @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. +%% +%% `X' and `Y' specify the window coordinates of the lower left corner of the rectangular +%% region to be copied. `Width' and `Height' specify the dimensions of the rectangular +%% region to be copied. Both `Width' and `Height' must not be negative. +%% +%% Several parameters control the processing of the pixel data while it is being copied. +%% These parameters are set with three commands: {@link gl:pixelTransferf/2} , {@link gl:pixelMapfv/3} +%% , and {@link gl:pixelZoom/2} . This reference page describes the effects on ``gl:copyPixels'' +%% of most, but not all, of the parameters specified by these three commands. +%% +%% ``gl:copyPixels'' copies values from each pixel with the lower left-hand corner at (x+i +%% y+j) +%% for 0<= i< width and 0<= j< height. This pixel is said to be the ith +%% pixel in the jth row. Pixels are copied in row order from the lowest to the highest +%% row, left to right in each row. +%% +%% `Type' specifies whether color, depth, or stencil data is to be copied. The details +%% of the transfer for each data type are as follows: +%% +%% `?GL_COLOR': Indices or RGBA colors are read from the buffer currently specified +%% as the read source buffer (see {@link gl:readBuffer/1} ). If the GL is in color index mode, +%% each index that is read from this buffer is converted to a fixed-point format with an +%% unspecified number of bits to the right of the binary point. Each index is then shifted +%% left by `?GL_INDEX_SHIFT' bits, and added to `?GL_INDEX_OFFSET'. If `?GL_INDEX_SHIFT' +%% is negative, the shift is to the right. In either case, zero bits fill otherwise unspecified +%% bit locations in the result. If `?GL_MAP_COLOR' is true, the index is replaced with +%% the value that it references in lookup table `?GL_PIXEL_MAP_I_TO_I'. Whether the +%% lookup replacement of the index is done or not, the integer part of the index is then +%% ANDed with 2 b-1, where b is the number of bits in a color index buffer. +%% +%% If the GL is in RGBA mode, the red, green, blue, and alpha components of each pixel that +%% is read are converted to an internal floating-point format with unspecified precision. +%% The conversion maps the largest representable component value to 1.0, and component value +%% 0 to 0.0. The resulting floating-point color values are then multiplied by `?GL_c_SCALE' +%% and added to `?GL_c_BIAS', where `c' is RED, GREEN, BLUE, and ALPHA for the +%% respective color components. The results are clamped to the range [0,1]. If `?GL_MAP_COLOR' +%% is true, each color component is scaled by the size of lookup table `?GL_PIXEL_MAP_c_TO_c' +%% , then replaced by the value that it references in that table. `c' is R, G, B, or +%% A. +%% +%% If the ARB_imaging extension is supported, the color values may be additionally processed +%% by color-table lookups, color-matrix transformations, and convolution filters. +%% +%% The GL then converts the resulting indices or RGBA colors to fragments by attaching the +%% current raster position `z' coordinate and texture coordinates to each pixel, then +%% assigning window coordinates (x r+i y r+j), where (x r y r) is the current raster position, and the pixel was +%% the ith pixel in the jth row. These pixel fragments are then treated just like the +%% fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, and +%% all the fragment operations are applied before the fragments are written to the frame +%% buffer. +%% +%% `?GL_DEPTH': Depth values are read from the depth buffer and converted directly +%% to an internal floating-point format with unspecified precision. The resulting floating-point +%% depth value is then multiplied by `?GL_DEPTH_SCALE' and added to `?GL_DEPTH_BIAS' +%% . The result is clamped to the range [0,1]. +%% +%% The GL then converts the resulting depth components to fragments by attaching the current +%% raster position color or color index and texture coordinates to each pixel, then assigning +%% window coordinates (x r+i y r+j), where (x r y r) is the current raster position, and the pixel was the ith +%% pixel in the jth row. These pixel fragments are then treated just like the fragments +%% generated by rasterizing points, lines, or polygons. Texture mapping, fog, and all the +%% fragment operations are applied before the fragments are written to the frame buffer. +%% +%% `?GL_STENCIL': Stencil indices are read from the stencil buffer and converted to +%% an internal fixed-point format with an unspecified number of bits to the right of the +%% binary point. Each fixed-point index is then shifted left by `?GL_INDEX_SHIFT' bits, +%% and added to `?GL_INDEX_OFFSET'. If `?GL_INDEX_SHIFT' is negative, the shift +%% is to the right. In either case, zero bits fill otherwise unspecified bit locations in +%% the result. If `?GL_MAP_STENCIL' is true, the index is replaced with the value that +%% it references in lookup table `?GL_PIXEL_MAP_S_TO_S'. Whether the lookup replacement +%% of the index is done or not, the integer part of the index is then ANDed with 2 b-1, +%% where b is the number of bits in the stencil buffer. The resulting stencil indices are +%% then written to the stencil buffer such that the index read from the ith location of +%% the jth row is written to location (x r+i y r+j), where (x r y r) is the current raster position. Only the +%% pixel ownership test, the scissor test, and the stencil writemask affect these write operations. +%% +%% +%% The rasterization described thus far assumes pixel zoom factors of 1.0. If {@link gl:pixelZoom/2} +%% is used to change the x and y pixel zoom factors, pixels are converted to fragments +%% as follows. If (x r y r) is the current raster position, and a given pixel is in the ith location +%% in the jth row of the source pixel rectangle, then fragments are generated for pixels +%% whose centers are in the rectangle with corners at +%% +%% (x r+(zoom x) i y r+(zoom y) j) +%% +%% and +%% +%% (x r+(zoom x)(i+1) y r+(zoom y)(j+1)) +%% +%% where zoom x is the value of `?GL_ZOOM_X' and zoom y is the value of `?GL_ZOOM_Y' +%% . +%% +%% 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, <>). -%% @spec (Func::enum(),Ref::integer(),Mask::integer()) -> ok -%% @doc See external documentation. --spec stencilFunc(enum(),integer(),integer()) -> ok. +%% @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. +%% +%% The stencil test conditionally eliminates a pixel based on the outcome of a comparison +%% between the reference value and the value in the stencil buffer. To enable and disable +%% the test, call {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_STENCIL_TEST' +%% . To specify actions based on the outcome of the stencil test, call {@link gl:stencilOp/3} +%% or {@link gl:stencilOpSeparate/4} . +%% +%% There can be two separate sets of `Func' , `Ref' , and `Mask' parameters; +%% one affects back-facing polygons, and the other affects front-facing polygons as well +%% as other non-polygon primitives. {@link gl:stencilFunc/3} sets both front and back stencil +%% state to the same values. Use {@link gl:stencilFuncSeparate/4} to set front and back stencil +%% state to different values. +%% +%% `Func' is a symbolic constant that determines the stencil comparison function. It +%% accepts one of eight values, shown in the following list. `Ref' is an integer reference +%% value that is used in the stencil comparison. It is clamped to the range [0 2 n-1], where n +%% is the number of bitplanes in the stencil buffer. `Mask' is bitwise ANDed with both +%% the reference value and the stored stencil value, with the ANDed values participating +%% in the comparison. +%% +%% If `stencil' represents the value stored in the corresponding stencil buffer location, +%% the following list shows the effect of each comparison function that can be specified by `Func' +%% . Only if the comparison succeeds is the pixel passed through to the next stage in the +%% rasterization process (see {@link gl:stencilOp/3} ). All tests treat `stencil' values +%% as unsigned integers in the range [0 2 n-1], where n is the number of bitplanes in the stencil +%% buffer. +%% +%% The following values are accepted by `Func' : +%% +%% `?GL_NEVER': Always fails. +%% +%% `?GL_LESS': Passes if ( `Ref' & `Mask' ) < ( `stencil' & `Mask' +%% ). +%% +%% `?GL_LEQUAL': Passes if ( `Ref' & `Mask' ) <= ( `stencil' +%% & `Mask' ). +%% +%% `?GL_GREATER': Passes if ( `Ref' & `Mask' ) > ( `stencil' +%% & `Mask' ). +%% +%% `?GL_GEQUAL': Passes if ( `Ref' & `Mask' ) >= ( `stencil' +%% & `Mask' ). +%% +%% `?GL_EQUAL': Passes if ( `Ref' & `Mask' ) = ( `stencil' & `Mask' +%% ). +%% +%% `?GL_NOTEQUAL': Passes if ( `Ref' & `Mask' ) != ( `stencil' & +%% `Mask' ). +%% +%% `?GL_ALWAYS': Always passes. +%% +%% See external documentation. +-spec stencilFunc(Func, Ref, Mask) -> ok when Func :: enum(),Ref :: integer(),Mask :: integer(). stencilFunc(Func,Ref,Mask) -> - cast(5255, <>). + cast(5239, <>). -%% @spec (Mask::integer()) -> ok -%% @doc See external documentation. --spec stencilMask(integer()) -> ok. +%% @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. +%% +%% There can be two separate `Mask' writemasks; one affects back-facing polygons, and +%% the other affects front-facing polygons as well as other non-polygon primitives. {@link gl:stencilMask/1} +%% sets both front and back stencil writemasks to the same values. Use {@link gl:stencilMaskSeparate/2} +%% to set front and back stencil writemasks to different values. +%% +%% See external documentation. +-spec stencilMask(Mask) -> ok when Mask :: integer(). stencilMask(Mask) -> - cast(5256, <>). + cast(5240, <>). -%% @spec (Fail::enum(),Zfail::enum(),Zpass::enum()) -> ok -%% @doc See external documentation. --spec stencilOp(enum(),enum(),enum()) -> ok. +%% @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. +%% +%% The stencil test conditionally eliminates a pixel based on the outcome of a comparison +%% between the value in the stencil buffer and a reference value. To enable and disable the +%% test, call {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_STENCIL_TEST' +%% ; to control it, call {@link gl:stencilFunc/3} or {@link gl:stencilFuncSeparate/4} . +%% +%% There can be two separate sets of `Sfail' , `Dpfail' , and `Dppass' parameters; +%% one affects back-facing polygons, and the other affects front-facing polygons as well +%% as other non-polygon primitives. {@link gl:stencilOp/3} sets both front and back stencil +%% state to the same values. Use {@link gl:stencilOpSeparate/4} to set front and back stencil +%% state to different values. +%% +%% ``gl:stencilOp'' takes three arguments that indicate what happens to the stored stencil +%% value while stenciling is enabled. If the stencil test fails, no change is made to the +%% pixel's color or depth buffers, and `Sfail' specifies what happens to the stencil +%% buffer contents. The following eight actions are possible. +%% +%% `?GL_KEEP': Keeps the current value. +%% +%% `?GL_ZERO': Sets the stencil buffer value to 0. +%% +%% `?GL_REPLACE': Sets the stencil buffer value to `ref', as specified by {@link gl:stencilFunc/3} +%% . +%% +%% `?GL_INCR': Increments the current stencil buffer value. Clamps to the maximum representable +%% unsigned value. +%% +%% `?GL_INCR_WRAP': Increments the current stencil buffer value. Wraps stencil buffer +%% value to zero when incrementing the maximum representable unsigned value. +%% +%% `?GL_DECR': Decrements the current stencil buffer value. Clamps to 0. +%% +%% `?GL_DECR_WRAP': Decrements the current stencil buffer value. Wraps stencil buffer +%% value to the maximum representable unsigned value when decrementing a stencil buffer value +%% of zero. +%% +%% `?GL_INVERT': Bitwise inverts the current stencil buffer value. +%% +%% Stencil buffer values are treated as unsigned integers. When incremented and decremented, +%% values are clamped to 0 and 2 n-1, where n is the value returned by querying `?GL_STENCIL_BITS' +%% . +%% +%% The other two arguments to ``gl:stencilOp'' specify stencil buffer actions that depend +%% on whether subsequent depth buffer tests succeed ( `Dppass' ) or fail ( `Dpfail' ) +%% (see {@link gl:depthFunc/1} ). The actions are specified using the same eight symbolic constants +%% as `Sfail' . Note that `Dpfail' is ignored when there is no depth buffer, or +%% when the depth buffer is not enabled. In these cases, `Sfail' and `Dppass' specify +%% stencil action when the stencil test fails and passes, respectively. +%% +%% See external documentation. +-spec stencilOp(Fail, Zfail, Zpass) -> ok when Fail :: enum(),Zfail :: enum(),Zpass :: enum(). stencilOp(Fail,Zfail,Zpass) -> - cast(5257, <>). - -%% @spec (S::float()) -> ok -%% @doc See external documentation. --spec texCoord1d(float()) -> ok. -texCoord1d(S) -> - cast(5258, <>). - -%% @spec ({S}) -> ok -%% @equiv texCoord1d(S) --spec texCoord1dv({float()}) -> ok. -texCoord1dv({S}) -> texCoord1d(S). - -%% @spec (S::float()) -> ok -%% @doc See external documentation. --spec texCoord1f(float()) -> ok. -texCoord1f(S) -> - cast(5259, <>). - -%% @spec ({S}) -> ok -%% @equiv texCoord1f(S) --spec texCoord1fv({float()}) -> ok. -texCoord1fv({S}) -> texCoord1f(S). - -%% @spec (S::integer()) -> ok -%% @doc See external documentation. --spec texCoord1i(integer()) -> ok. -texCoord1i(S) -> - cast(5260, <>). + cast(5241, <>). -%% @spec ({S}) -> ok -%% @equiv texCoord1i(S) --spec texCoord1iv({integer()}) -> ok. -texCoord1iv({S}) -> texCoord1i(S). +%% @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, <>). -%% @spec (S::integer()) -> ok -%% @doc See external documentation. --spec texCoord1s(integer()) -> ok. -texCoord1s(S) -> - cast(5261, <>). +%% @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. +%% +%% If the texture generation function is `?GL_OBJECT_LINEAR', the function +%% +%% g= p 1*x o+p 2*y o+p 3*z o+p 4*w o +%% +%% is used, where g is the value computed for the coordinate named in `Coord' , p 1, +%% p 2, p 3, and p 4 are the four values supplied in `Params' , and x o, y o, z o, +%% and w o are the object coordinates of the vertex. This function can be used, for example, +%% to texture-map terrain using sea level as a reference plane (defined by p 1, p 2, p +%% 3, and p 4). The altitude of a terrain vertex is computed by the `?GL_OBJECT_LINEAR' +%% coordinate generation function as its distance from sea level; that altitude can then +%% be used to index the texture image to map white snow onto peaks and green grass onto foothills. +%% +%% +%% If the texture generation function is `?GL_EYE_LINEAR', the function +%% +%% g=(p 1)"*x e+(p 2)"*y e+(p 3)"*z e+(p 4)"*w e +%% +%% is used, where +%% +%% ((p 1)" (p 2)" (p 3)" (p 4)")=(p 1 p 2 p 3 p 4) M -1 +%% +%% and x e, y e, z e, and w e are the eye coordinates of the vertex, p 1, p 2, p 3, +%% and p 4 are the values supplied in `Params' , and M is the modelview matrix when ``gl:texGen'' +%% is invoked. If M is poorly conditioned or singular, texture coordinates generated by +%% the resulting function may be inaccurate or undefined. +%% +%% Note that the values in `Params' define a reference plane in eye coordinates. The +%% modelview matrix that is applied to them may not be the same one in effect when the polygon +%% vertices are transformed. This function establishes a field of texture coordinates that +%% can produce dynamic contour lines on moving objects. +%% +%% If the texture generation function is `?GL_SPHERE_MAP' and `Coord' is either `?GL_S' +%% or `?GL_T', s and t texture coordinates are generated as follows. Let `u' +%% be the unit vector pointing from the origin to the polygon vertex (in eye coordinates). +%% Let `n' sup prime be the current normal, after transformation to eye coordinates. +%% Let +%% +%% f=(f x f y f z) T be the reflection vector such that +%% +%% f= u-2 n" (n") T u +%% +%% Finally, let m= 2 ((f x) 2+(f y) 2+(f z+1) 2). Then the values assigned to the s and t texture coordinates +%% are +%% +%% s= f x/m+1/2 +%% +%% t= f y/m+1/2 +%% +%% To enable or disable a texture-coordinate generation function, call {@link gl:enable/1} +%% or {@link gl:enable/1} with one of the symbolic texture-coordinate names (`?GL_TEXTURE_GEN_S' +%% , `?GL_TEXTURE_GEN_T', `?GL_TEXTURE_GEN_R', or `?GL_TEXTURE_GEN_Q') as +%% the argument. When enabled, the specified texture coordinate is computed according to +%% the generating function associated with that coordinate. When disabled, subsequent vertices +%% take the specified texture coordinate from the current set of texture coordinates. Initially, +%% all texture generation functions are set to `?GL_EYE_LINEAR' and are disabled. Both +%% s plane equations are (1, 0, 0, 0), both t plane equations are (0, 1, 0, 0), and all +%% r and q plane equations are (0, 0, 0, 0). +%% +%% When the ARB_multitexture extension is supported, ``gl:texGen'' sets the texture generation +%% parameters for the currently active texture unit, selected with {@link gl:activeTexture/1} . +%% +%% +%% See external documentation. +-spec texGend(Coord, Pname, Param) -> ok when Coord :: enum(),Pname :: enum(),Param :: float(). +texGend(Coord,Pname,Param) -> + cast(5243, <>). -%% @spec ({S}) -> ok -%% @equiv texCoord1s(S) --spec texCoord1sv({integer()}) -> ok. -texCoord1sv({S}) -> texCoord1s(S). +%% @doc +%% See {@link texGend/3} +-spec texGenf(Coord, Pname, Param) -> ok when Coord :: enum(),Pname :: enum(),Param :: float(). +texGenf(Coord,Pname,Param) -> + cast(5244, <>). -%% @spec (S::float(),T::float()) -> ok -%% @doc See external documentation. --spec texCoord2d(float(),float()) -> ok. -texCoord2d(S,T) -> - cast(5262, <>). +%% @doc +%% See {@link texGend/3} +-spec texGeni(Coord, Pname, Param) -> ok when Coord :: enum(),Pname :: enum(),Param :: integer(). +texGeni(Coord,Pname,Param) -> + cast(5245, <>). -%% @spec ({S,T}) -> ok -%% @equiv texCoord2d(S,T) --spec texCoord2dv({float(),float()}) -> ok. -texCoord2dv({S,T}) -> texCoord2d(S,T). +%% @doc +%% See {@link texGend/3} +-spec texGendv(Coord, Pname, Params) -> ok when Coord :: enum(),Pname :: enum(),Params :: {float()}. +texGendv(Coord,Pname,Params) -> + cast(5246, <> ||C <- tuple_to_list(Params)>>)/binary>>). -%% @spec (S::float(),T::float()) -> ok -%% @doc See external documentation. --spec texCoord2f(float(),float()) -> ok. -texCoord2f(S,T) -> - cast(5263, <>). +%% @doc +%% See {@link texGend/3} +-spec texGenfv(Coord, Pname, Params) -> ok when Coord :: enum(),Pname :: enum(),Params :: {float()}. +texGenfv(Coord,Pname,Params) -> + cast(5247, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec ({S,T}) -> ok -%% @equiv texCoord2f(S,T) --spec texCoord2fv({float(),float()}) -> ok. -texCoord2fv({S,T}) -> texCoord2f(S,T). +%% @doc +%% See {@link texGend/3} +-spec texGeniv(Coord, Pname, Params) -> ok when Coord :: enum(),Pname :: enum(),Params :: {integer()}. +texGeniv(Coord,Pname,Params) -> + cast(5248, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (S::integer(),T::integer()) -> ok -%% @doc See external documentation. --spec texCoord2i(integer(),integer()) -> ok. -texCoord2i(S,T) -> - cast(5264, <>). +%% @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'. +%% +%% `Pname' specifies one of three symbolic names: +%% +%% `?GL_TEXTURE_GEN_MODE': `Params' returns the single-valued texture generation +%% function, a symbolic constant. The initial value is `?GL_EYE_LINEAR'. +%% +%% `?GL_OBJECT_PLANE': `Params' returns the four plane equation coefficients that +%% specify object linear-coordinate generation. Integer values, when requested, are mapped +%% directly from the internal floating-point representation. +%% +%% `?GL_EYE_PLANE': `Params' returns the four plane equation coefficients that +%% specify eye linear-coordinate generation. Integer values, when requested, are mapped directly +%% from the internal floating-point representation. The returned values are those maintained +%% in eye coordinates. They are not equal to the values specified using {@link gl:texGend/3} , +%% unless the modelview matrix was identity when {@link gl:texGend/3} was called. +%% +%% See external documentation. +-spec getTexGendv(Coord, Pname) -> {float(),float(),float(),float()} when Coord :: enum(),Pname :: enum(). +getTexGendv(Coord,Pname) -> + call(5249, <>). -%% @spec ({S,T}) -> ok -%% @equiv texCoord2i(S,T) --spec texCoord2iv({integer(),integer()}) -> ok. -texCoord2iv({S,T}) -> texCoord2i(S,T). +%% @doc +%% See {@link getTexGendv/2} +-spec getTexGenfv(Coord, Pname) -> {float(),float(),float(),float()} when Coord :: enum(),Pname :: enum(). +getTexGenfv(Coord,Pname) -> + call(5250, <>). -%% @spec (S::integer(),T::integer()) -> ok -%% @doc See external documentation. --spec texCoord2s(integer(),integer()) -> ok. -texCoord2s(S,T) -> - cast(5265, <>). +%% @doc +%% See {@link getTexGendv/2} +-spec getTexGeniv(Coord, Pname) -> {integer(),integer(),integer(),integer()} when Coord :: enum(),Pname :: enum(). +getTexGeniv(Coord,Pname) -> + call(5251, <>). -%% @spec ({S,T}) -> ok -%% @equiv texCoord2s(S,T) --spec texCoord2sv({integer(),integer()}) -> ok. -texCoord2sv({S,T}) -> texCoord2s(S,T). +%% @doc glTexEnvf +%% +%% See external documentation. +-spec texEnvf(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: float(). +texEnvf(Target,Pname,Param) -> + cast(5252, <>). -%% @spec (S::float(),T::float(),R::float()) -> ok -%% @doc See external documentation. --spec texCoord3d(float(),float(),float()) -> ok. -texCoord3d(S,T,R) -> - cast(5266, <>). +%% @doc glTexEnvi +%% +%% See external documentation. +-spec texEnvi(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: integer(). +texEnvi(Target,Pname,Param) -> + cast(5253, <>). -%% @spec ({S,T,R}) -> ok -%% @equiv texCoord3d(S,T,R) --spec texCoord3dv({float(),float(),float()}) -> ok. -texCoord3dv({S,T,R}) -> texCoord3d(S,T,R). +%% @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'. +%% +%% If `Pname' is `?GL_TEXTURE_ENV_MODE', then `Params' is (or points to) +%% the symbolic name of a texture function. Six texture functions may be specified: `?GL_ADD' +%% , `?GL_MODULATE', `?GL_DECAL', `?GL_BLEND', `?GL_REPLACE', or `?GL_COMBINE' +%% . +%% +%% The following table shows the correspondence of filtered texture values R t, G t, B t, +%% A t, L t, I t to texture source components. C s and A s are used by the texture functions +%% described below. +%% +%% +%% +%%
Texture Base Internal Format C s A s
`?GL_ALPHA' (0, 0, 0) A t
`?GL_LUMINANCE' +%% ( L t, L t, L t ) 1
`?GL_LUMINANCE_ALPHA' ( L t, L t, L t ) A t
`?GL_INTENSITY' ( +%% I t, I t, I t ) I t
`?GL_RGB' ( R t, G t, B +%% t ) 1
`?GL_RGBA' ( R t, G t, B t ) +%% A t
+%% +%% A texture function acts on the fragment to be textured using the texture image value +%% that applies to the fragment (see {@link gl:texParameterf/3} ) and produces an RGBA color +%% for that fragment. The following table shows how the RGBA color is produced for each of +%% the first five texture functions that can be chosen. C is a triple of color values (RGB) +%% and A is the associated alpha value. RGBA values extracted from a texture image are in +%% the range [0,1]. The subscript p refers to the color computed from the previous texture +%% stage (or the incoming fragment if processing texture stage 0), the subscript s to the +%% texture source color, the subscript c to the texture environment color, and the subscript +%% v indicates a value produced by the texture function. +%% +%% +%% +%% +%% +%% +%%
Texture Base Internal Format `?Value'`?GL_REPLACE' +%% Function `?GL_MODULATE' Function `?GL_DECAL' Function +%% `?GL_BLEND' Function `?GL_ADD' Function
+%% `?GL_ALPHA' C v= C p C p undefined C p C p
A v= A s A p A s +%% A v= A p A s A p A s
`?GL_LUMINANCE' C v= +%% C s C p C s undefined C p (1-C s)+C c C s C p+C s
(or 1) A v= A p A p A p A +%% p
`?GL_LUMINANCE_ALPHA' C v= C s C p C +%% s undefined C p (1-C s)+C c C s C p+C s
(or 2) A v= A s A p A s A p A s A p A s
`?GL_INTENSITY' C v= C s C p C s +%% undefined C p (1-C s)+C c C s C p+C s
A v= +%% A s A p A s A p (1-A s)+A c A s A p+A s
`?GL_RGB' +%% C v= C s C p C s C s C p (1-C s)+C c C s +%% C p+C s
(or 3) A v= A p A p A p A p A p
`?GL_RGBA' C v= C s +%% C p C s C p (1-A s)+C s A s C p (1-C s)+C c C s C p+C s
+%% (or 4) A v= A s A p A s A p A p A s +%% A p A s
+%% +%% If `Pname' is `?GL_TEXTURE_ENV_MODE', and `Params' is `?GL_COMBINE', +%% the form of the texture function depends on the values of `?GL_COMBINE_RGB' and `?GL_COMBINE_ALPHA' +%% . +%% +%% The following describes how the texture sources, as specified by `?GL_SRC0_RGB', `?GL_SRC1_RGB' +%% , `?GL_SRC2_RGB', `?GL_SRC0_ALPHA', `?GL_SRC1_ALPHA', and `?GL_SRC2_ALPHA' +%% , are combined to produce a final texture color. In the following tables, `?GL_SRC0_c' +%% is represented by Arg0, `?GL_SRC1_c' is represented by Arg1, and `?GL_SRC2_c' +%% is represented by Arg2. +%% +%% `?GL_COMBINE_RGB' accepts any of `?GL_REPLACE', `?GL_MODULATE', `?GL_ADD' +%% , `?GL_ADD_SIGNED', `?GL_INTERPOLATE', `?GL_SUBTRACT', `?GL_DOT3_RGB', +%% or `?GL_DOT3_RGBA'. +%% +%% +%% +%%
`?GL_COMBINE_RGB'` Texture Function '
`?GL_REPLACE' Arg0
`?GL_MODULATE' +%% Arg0*Arg1
`?GL_ADD' Arg0+Arg1
`?GL_ADD_SIGNED' +%% Arg0+Arg1-0.5
`?GL_INTERPOLATE' Arg0*Arg2+Arg1*(1- +%% Arg2)
`?GL_SUBTRACT' Arg0-Arg1
`?GL_DOT3_RGB' +%% or `?GL_DOT3_RGBA' 4*((((Arg0 r)-0.5)*((Arg1 r)-0.5))+(((Arg0 g)-0.5)*((Arg1 g)-0.5))+(((Arg0 b)-0.5)*((Arg1 b)-0.5)))
+%% +%% The scalar results for `?GL_DOT3_RGB' and `?GL_DOT3_RGBA' are placed into each +%% of the 3 (RGB) or 4 (RGBA) components on output. +%% +%% Likewise, `?GL_COMBINE_ALPHA' accepts any of `?GL_REPLACE', `?GL_MODULATE', +%% `?GL_ADD', `?GL_ADD_SIGNED', `?GL_INTERPOLATE', or `?GL_SUBTRACT'. +%% The following table describes how alpha values are combined: +%% +%% +%% +%%
`?GL_COMBINE_ALPHA'` Texture Function '
`?GL_REPLACE' Arg0
`?GL_MODULATE' +%% Arg0*Arg1
`?GL_ADD' Arg0+Arg1
`?GL_ADD_SIGNED' +%% Arg0+Arg1-0.5
`?GL_INTERPOLATE' Arg0*Arg2+Arg1*(1- +%% Arg2)
`?GL_SUBTRACT' Arg0-Arg1
+%% +%% In the following tables, the value C s represents the color sampled from the currently +%% bound texture, C c represents the constant texture-environment color, C f represents +%% the primary color of the incoming fragment, and C p represents the color computed from +%% the previous texture stage or C f if processing texture stage 0. Likewise, A s, A c, +%% A f, and A p represent the respective alpha values. +%% +%% The following table describes the values assigned to Arg0, Arg1, and Arg2 based upon +%% the RGB sources and operands: +%% +%% +%% +%% +%% +%% +%% +%% +%% +%%
`?GL_SRCn_RGB'`?GL_OPERANDn_RGB'` Argument Value ' +%%
`?GL_TEXTURE'`?GL_SRC_COLOR'(C +%% s)
`?GL_ONE_MINUS_SRC_COLOR' 1-(C s)
+%% `?GL_SRC_ALPHA'(A s)
`?GL_ONE_MINUS_SRC_ALPHA' 1-(A s)
`?GL_TEXTUREn'`?GL_SRC_COLOR'(C s)
`?GL_ONE_MINUS_SRC_COLOR' 1-(C s)
`?GL_SRC_ALPHA' +%% (A s)
`?GL_ONE_MINUS_SRC_ALPHA' 1-(A s)
`?GL_CONSTANT'`?GL_SRC_COLOR'(C c)
`?GL_ONE_MINUS_SRC_COLOR' +%% 1-(C c)
`?GL_SRC_ALPHA'(A c)
`?GL_ONE_MINUS_SRC_ALPHA' 1-(A c)
`?GL_PRIMARY_COLOR'`?GL_SRC_COLOR'(C f)
`?GL_ONE_MINUS_SRC_COLOR' 1-(C f)
`?GL_SRC_ALPHA'(A f)
+%% `?GL_ONE_MINUS_SRC_ALPHA' 1-(A f)
`?GL_PREVIOUS'`?GL_SRC_COLOR' +%% (C p)
`?GL_ONE_MINUS_SRC_COLOR' 1-(C p)
`?GL_SRC_ALPHA'(A p)
`?GL_ONE_MINUS_SRC_ALPHA' +%% 1-(A p)
+%% +%% For `?GL_TEXTUREn' sources, C s and A s represent the color and alpha, respectively, +%% produced from texture stage n. +%% +%% The follow table describes the values assigned to Arg0, Arg1, and Arg2 based upon +%% the alpha sources and operands: +%% +%% +%% +%% +%%
`?GL_SRCn_ALPHA'`?GL_OPERANDn_ALPHA'` Argument Value ' +%%
`?GL_TEXTURE'`?GL_SRC_ALPHA'(A +%% s)
`?GL_ONE_MINUS_SRC_ALPHA' 1-(A s)
`?GL_TEXTUREn' +%% `?GL_SRC_ALPHA'(A s)
`?GL_ONE_MINUS_SRC_ALPHA' +%% 1-(A s)
`?GL_CONSTANT'`?GL_SRC_ALPHA'(A +%% c)
`?GL_ONE_MINUS_SRC_ALPHA' 1-(A c)
`?GL_PRIMARY_COLOR' +%% `?GL_SRC_ALPHA'(A f)
`?GL_ONE_MINUS_SRC_ALPHA' +%% 1-(A f)
`?GL_PREVIOUS'`?GL_SRC_ALPHA'(A +%% p)
`?GL_ONE_MINUS_SRC_ALPHA' 1-(A p)
+%% +%% +%% The RGB and alpha results of the texture function are multipled by the values of `?GL_RGB_SCALE' +%% and `?GL_ALPHA_SCALE', respectively, and clamped to the range [0 1]. +%% +%% If `Pname' is `?GL_TEXTURE_ENV_COLOR', `Params' is a pointer to an array +%% that holds an RGBA color consisting of four values. Integer color components are interpreted +%% linearly such that the most positive integer maps to 1.0, and the most negative integer +%% maps to -1.0. The values are clamped to the range [0,1] when they are specified. C c +%% takes these four values. +%% +%% If `Pname' is `?GL_TEXTURE_LOD_BIAS', the value specified is added to the texture +%% level-of-detail parameter, that selects which mipmap, or mipmaps depending upon the selected +%% `?GL_TEXTURE_MIN_FILTER', will be sampled. +%% +%% `?GL_TEXTURE_ENV_MODE' defaults to `?GL_MODULATE' and `?GL_TEXTURE_ENV_COLOR' +%% defaults to (0, 0, 0, 0). +%% +%% If `Target' is `?GL_POINT_SPRITE' and `Pname' is `?GL_COORD_REPLACE', +%% the boolean value specified is used to either enable or disable point sprite texture coordinate +%% replacement. The default value is `?GL_FALSE'. +%% +%% See external documentation. +-spec texEnvfv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {float()}. +texEnvfv(Target,Pname,Params) -> + cast(5254, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (S::float(),T::float(),R::float()) -> ok -%% @doc See external documentation. --spec texCoord3f(float(),float(),float()) -> ok. -texCoord3f(S,T,R) -> - cast(5267, <>). +%% @doc +%% See {@link texEnvfv/3} +-spec texEnviv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}. +texEnviv(Target,Pname,Params) -> + cast(5255, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec ({S,T,R}) -> ok -%% @equiv texCoord3f(S,T,R) --spec texCoord3fv({float(),float(),float()}) -> ok. -texCoord3fv({S,T,R}) -> texCoord3f(S,T,R). +%% @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. +%% +%% When `Target' is `?GL_TEXTURE_FILTER_CONTROL', `Pname' must be `?GL_TEXTURE_LOD_BIAS' +%% . When `Target' is `?GL_POINT_SPRITE', `Pname' must be `?GL_COORD_REPLACE' +%% . 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'. +%% +%% `Pname' names a specific texture environment parameter, as follows: +%% +%% `?GL_TEXTURE_ENV_MODE': `Params' returns the single-valued texture environment +%% mode, a symbolic constant. The initial value is `?GL_MODULATE'. +%% +%% `?GL_TEXTURE_ENV_COLOR': `Params' returns four integer or floating-point values +%% that are the texture environment color. Integer values, when requested, are linearly mapped +%% from the internal floating-point representation such that 1.0 maps to the most positive +%% representable integer, and -1.0 maps to the most negative representable integer. The +%% initial value is (0, 0, 0, 0). +%% +%% `?GL_TEXTURE_LOD_BIAS': `Params' returns a single floating-point value that +%% is the texture level-of-detail bias. The initial value is 0. +%% +%% `?GL_COMBINE_RGB': `Params' returns a single symbolic constant value representing +%% the current RGB combine mode. The initial value is `?GL_MODULATE'. +%% +%% `?GL_COMBINE_ALPHA': `Params' returns a single symbolic constant value representing +%% the current alpha combine mode. The initial value is `?GL_MODULATE'. +%% +%% `?GL_SRC0_RGB': `Params' returns a single symbolic constant value representing +%% the texture combiner zero's RGB source. The initial value is `?GL_TEXTURE'. +%% +%% `?GL_SRC1_RGB': `Params' returns a single symbolic constant value representing +%% the texture combiner one's RGB source. The initial value is `?GL_PREVIOUS'. +%% +%% `?GL_SRC2_RGB': `Params' returns a single symbolic constant value representing +%% the texture combiner two's RGB source. The initial value is `?GL_CONSTANT'. +%% +%% `?GL_SRC0_ALPHA': `Params' returns a single symbolic constant value representing +%% the texture combiner zero's alpha source. The initial value is `?GL_TEXTURE'. +%% +%% `?GL_SRC1_ALPHA': `Params' returns a single symbolic constant value representing +%% the texture combiner one's alpha source. The initial value is `?GL_PREVIOUS'. +%% +%% `?GL_SRC2_ALPHA': `Params' returns a single symbolic constant value representing +%% the texture combiner two's alpha source. The initial value is `?GL_CONSTANT'. +%% +%% `?GL_OPERAND0_RGB': `Params' returns a single symbolic constant value representing +%% the texture combiner zero's RGB operand. The initial value is `?GL_SRC_COLOR'. +%% +%% `?GL_OPERAND1_RGB': `Params' returns a single symbolic constant value representing +%% the texture combiner one's RGB operand. The initial value is `?GL_SRC_COLOR'. +%% +%% `?GL_OPERAND2_RGB': `Params' returns a single symbolic constant value representing +%% the texture combiner two's RGB operand. The initial value is `?GL_SRC_ALPHA'. +%% +%% `?GL_OPERAND0_ALPHA': `Params' returns a single symbolic constant value representing +%% the texture combiner zero's alpha operand. The initial value is `?GL_SRC_ALPHA'. +%% +%% `?GL_OPERAND1_ALPHA': `Params' returns a single symbolic constant value representing +%% the texture combiner one's alpha operand. The initial value is `?GL_SRC_ALPHA'. +%% +%% `?GL_OPERAND2_ALPHA': `Params' returns a single symbolic constant value representing +%% the texture combiner two's alpha operand. The initial value is `?GL_SRC_ALPHA'. +%% +%% `?GL_RGB_SCALE': `Params' returns a single floating-point value representing +%% the current RGB texture combiner scaling factor. The initial value is 1.0. +%% +%% `?GL_ALPHA_SCALE': `Params' returns a single floating-point value representing +%% the current alpha texture combiner scaling factor. The initial value is 1.0. +%% +%% `?GL_COORD_REPLACE': `Params' returns a single boolean value representing the +%% current point sprite texture coordinate replacement enable state. The initial value is `?GL_FALSE' +%% . +%% +%% See external documentation. +-spec getTexEnvfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum(). +getTexEnvfv(Target,Pname) -> + call(5256, <>). -%% @spec (S::integer(),T::integer(),R::integer()) -> ok -%% @doc See external documentation. --spec texCoord3i(integer(),integer(),integer()) -> ok. -texCoord3i(S,T,R) -> - cast(5268, <>). +%% @doc +%% See {@link getTexEnvfv/2} +-spec getTexEnviv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum(). +getTexEnviv(Target,Pname) -> + call(5257, <>). -%% @spec ({S,T,R}) -> ok -%% @equiv texCoord3i(S,T,R) --spec texCoord3iv({integer(),integer(),integer()}) -> ok. -texCoord3iv({S,T,R}) -> texCoord3i(S,T,R). +%% @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' : +%% +%% `?GL_TEXTURE_BASE_LEVEL': Specifies the index of the lowest defined mipmap level. +%% This is an integer value. The initial value is 0. +%% +%% +%% +%% `?GL_TEXTURE_BORDER_COLOR': The data in `Params' specifies four values that +%% define the border values that should be used for border texels. If a texel is sampled +%% from the border of the texture, the values of `?GL_TEXTURE_BORDER_COLOR' are interpreted +%% as an RGBA color to match the texture's internal format and substituted for the non-existent +%% texel data. If the texture contains depth components, the first component of `?GL_TEXTURE_BORDER_COLOR' +%% is interpreted as a depth value. The initial value is ( 0.0, 0.0, 0.0, 0.0 ). +%% +%% If the values for `?GL_TEXTURE_BORDER_COLOR' are specified with ``gl:texParameterIiv'' +%% or ``gl:texParameterIuiv'', the values are stored unmodified with an internal data +%% type of integer. If specified with ``gl:texParameteriv'', they are converted to floating +%% point with the following equation: f= 2 c+1 2 b-/1. If specified with ``gl:texParameterfv'' +%% , they are stored unmodified as floating-point values. +%% +%% `?GL_TEXTURE_COMPARE_FUNC': Specifies the comparison operator used when `?GL_TEXTURE_COMPARE_MODE' +%% is set to `?GL_COMPARE_REF_TO_TEXTURE'. Permissible values are: +%%
+%% ` Texture Comparison Function '` Computed result '
`?GL_LEQUAL' result={1.0 0.0 &nbsp;&nbsp; r<=(D t) r>(D t))
`?GL_GEQUAL' +%% result={1.0 0.0 &nbsp;&nbsp; r>=(D t) r<(D t))
`?GL_LESS' result={1.0 0.0 &nbsp;&nbsp; r< +%% (D t) r>=(D t))
`?GL_GREATER' +%% result={1.0 0.0 &nbsp;&nbsp; r>(D t) r<=(D t))
`?GL_EQUAL' result={1.0 0.0 &nbsp;&nbsp; +%% r=(D t) r&ne;(D t))
`?GL_NOTEQUAL' +%% result={1.0 0.0 &nbsp;&nbsp; r&ne;(D t) r=(D t))
`?GL_ALWAYS' result= 1.0
+%% `?GL_NEVER' result= 0.0
where r is the current +%% interpolated texture coordinate, and D t is the depth texture value sampled from the +%% currently bound depth texture. result is assigned to the the red channel. +%% +%% `?GL_TEXTURE_COMPARE_MODE': Specifies the texture comparison mode for currently +%% bound depth textures. That is, a texture whose internal format is `?GL_DEPTH_COMPONENT_*' +%% ; see {@link gl:texImage2D/9} ) Permissible values are: +%% +%% `?GL_COMPARE_REF_TO_TEXTURE': Specifies that the interpolated and clamped r texture +%% coordinate should be compared to the value in the currently bound depth texture. See the +%% discussion of `?GL_TEXTURE_COMPARE_FUNC' for details of how the comparison is evaluated. +%% The result of the comparison is assigned to the red channel. +%% +%% `?GL_NONE': Specifies that the red channel should be assigned the appropriate value +%% from the currently bound depth texture. +%% +%% `?GL_TEXTURE_LOD_BIAS': `Params' specifies a fixed bias value that is to be +%% added to the level-of-detail parameter for the texture before texture sampling. The specified +%% value is added to the shader-supplied bias value (if any) and subsequently clamped into +%% the implementation-defined range [( - bias max)(bias max)], where bias max is the value of the implementation +%% defined constant `?GL_MAX_TEXTURE_LOD_BIAS'. The initial value is 0.0. +%% +%% `?GL_TEXTURE_MIN_FILTER': The texture minifying function is used whenever the level-of-detail +%% function used when sampling from the texture determines that the texture should be minified. +%% There are six defined minifying functions. Two of them use either the nearest texture +%% elements or a weighted average of multiple texture elements to compute the texture value. +%% The other four use mipmaps. +%% +%% A mipmap is an ordered set of arrays representing the same image at progressively lower +%% resolutions. If the texture has dimensions 2 n*2 m, there are max(n m)+1 mipmaps. The first +%% mipmap is the original texture, with dimensions 2 n*2 m. Each subsequent mipmap has +%% dimensions 2(k-1)*2(l-1), where 2 k*2 l are the dimensions of the previous mipmap, until either +%% k= 0 or l= 0. At that point, subsequent mipmaps have dimension 1*2(l-1) or 2(k-1)*1 until +%% the final mipmap, which has dimension 1*1. To define the mipmaps, call {@link gl:texImage1D/8} +%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} , {@link gl:copyTexImage1D/7} , or {@link gl:copyTexImage2D/8} +%% with the `level' argument indicating the order of the mipmaps. Level 0 is the original +%% texture; level max(n m) is the final 1*1 mipmap. +%% +%% `Params' supplies a function for minifying the texture as one of the following: +%% +%% `?GL_NEAREST': Returns the value of the texture element that is nearest (in Manhattan +%% distance) to the specified texture coordinates. +%% +%% `?GL_LINEAR': Returns the weighted average of the four texture elements that are +%% closest to the specified texture coordinates. These can include items wrapped or repeated +%% from other parts of a texture, depending on the values of `?GL_TEXTURE_WRAP_S' and `?GL_TEXTURE_WRAP_T' +%% , and on the exact mapping. +%% +%% `?GL_NEAREST_MIPMAP_NEAREST': Chooses the mipmap that most closely matches the size +%% of the pixel being textured and uses the `?GL_NEAREST' criterion (the texture element +%% closest to the specified texture coordinates) to produce a texture value. +%% +%% `?GL_LINEAR_MIPMAP_NEAREST': Chooses the mipmap that most closely matches the size +%% of the pixel being textured and uses the `?GL_LINEAR' criterion (a weighted average +%% of the four texture elements that are closest to the specified texture coordinates) to +%% produce a texture value. +%% +%% `?GL_NEAREST_MIPMAP_LINEAR': Chooses the two mipmaps that most closely match the +%% size of the pixel being textured and uses the `?GL_NEAREST' criterion (the texture +%% element closest to the specified texture coordinates ) to produce a texture value from +%% each mipmap. The final texture value is a weighted average of those two values. +%% +%% `?GL_LINEAR_MIPMAP_LINEAR': Chooses the two mipmaps that most closely match the +%% size of the pixel being textured and uses the `?GL_LINEAR' criterion (a weighted +%% average of the texture elements that are closest to the specified texture coordinates) +%% to produce a texture value from each mipmap. The final texture value is a weighted average +%% of those two values. +%% +%% As more texture elements are sampled in the minification process, fewer aliasing artifacts +%% will be apparent. While the `?GL_NEAREST' and `?GL_LINEAR' minification functions +%% can be faster than the other four, they sample only one or multiple texture elements to +%% determine the texture value of the pixel being rendered and can produce moire patterns +%% or ragged transitions. The initial value of `?GL_TEXTURE_MIN_FILTER' is `?GL_NEAREST_MIPMAP_LINEAR' +%% . +%% +%% +%% +%% `?GL_TEXTURE_MAG_FILTER': The texture magnification function is used whenever the +%% level-of-detail function used when sampling from the texture determines that the texture +%% should be magified. It sets the texture magnification function to either `?GL_NEAREST' +%% or `?GL_LINEAR' (see below). `?GL_NEAREST' is generally faster than `?GL_LINEAR' +%% , but it can produce textured images with sharper edges because the transition between +%% texture elements is not as smooth. The initial value of `?GL_TEXTURE_MAG_FILTER' is `?GL_LINEAR' +%% . +%% +%% `?GL_NEAREST': Returns the value of the texture element that is nearest (in Manhattan +%% distance) to the specified texture coordinates. +%% +%% `?GL_LINEAR': Returns the weighted average of the texture elements that are closest +%% to the specified texture coordinates. These can include items wrapped or repeated from +%% other parts of a texture, depending on the values of `?GL_TEXTURE_WRAP_S' and `?GL_TEXTURE_WRAP_T' +%% , and on the exact mapping. +%% +%% +%% +%% `?GL_TEXTURE_MIN_LOD': Sets the minimum level-of-detail parameter. This floating-point +%% value limits the selection of highest resolution mipmap (lowest mipmap level). The initial +%% value is -1000. +%% +%% +%% +%% `?GL_TEXTURE_MAX_LOD': Sets the maximum level-of-detail parameter. This floating-point +%% value limits the selection of the lowest resolution mipmap (highest mipmap level). The +%% initial value is 1000. +%% +%% +%% +%% `?GL_TEXTURE_MAX_LEVEL': Sets the index of the highest defined mipmap level. This +%% is an integer value. The initial value is 1000. +%% +%% +%% +%% `?GL_TEXTURE_SWIZZLE_R': Sets the swizzle that will be applied to the r component +%% of a texel before it is returned to the shader. Valid values for `Param' are `?GL_RED' +%% , `?GL_GREEN', `?GL_BLUE', `?GL_ALPHA', `?GL_ZERO' and `?GL_ONE'. +%% If `?GL_TEXTURE_SWIZZLE_R' is `?GL_RED', the value for r will be taken from +%% the first channel of the fetched texel. If `?GL_TEXTURE_SWIZZLE_R' is `?GL_GREEN' +%% , the value for r will be taken from the second channel of the fetched texel. If `?GL_TEXTURE_SWIZZLE_R' +%% is `?GL_BLUE', the value for r will be taken from the third channel of the fetched +%% texel. If `?GL_TEXTURE_SWIZZLE_R' is `?GL_ALPHA', the value for r will be taken +%% from the fourth channel of the fetched texel. If `?GL_TEXTURE_SWIZZLE_R' is `?GL_ZERO' +%% , the value for r will be subtituted with 0.0. If `?GL_TEXTURE_SWIZZLE_R' is `?GL_ONE' +%% , the value for r will be subtituted with 1.0. The initial value is `?GL_RED'. +%% +%% +%% +%% `?GL_TEXTURE_SWIZZLE_G': Sets the swizzle that will be applied to the g component +%% of a texel before it is returned to the shader. Valid values for `Param' and their +%% effects are similar to those of `?GL_TEXTURE_SWIZZLE_R'. The initial value is `?GL_GREEN' +%% . +%% +%% +%% +%% `?GL_TEXTURE_SWIZZLE_B': Sets the swizzle that will be applied to the b component +%% of a texel before it is returned to the shader. Valid values for `Param' and their +%% effects are similar to those of `?GL_TEXTURE_SWIZZLE_R'. The initial value is `?GL_BLUE' +%% . +%% +%% +%% +%% `?GL_TEXTURE_SWIZZLE_A': Sets the swizzle that will be applied to the a component +%% of a texel before it is returned to the shader. Valid values for `Param' and their +%% effects are similar to those of `?GL_TEXTURE_SWIZZLE_R'. The initial value is `?GL_ALPHA' +%% . +%% +%% +%% +%% `?GL_TEXTURE_SWIZZLE_RGBA': Sets the swizzles that will be applied to the r, g, +%% b, and a components of a texel before they are returned to the shader. Valid values for `Params' +%% and their effects are similar to those of `?GL_TEXTURE_SWIZZLE_R', except that all +%% channels are specified simultaneously. Setting the value of `?GL_TEXTURE_SWIZZLE_RGBA' +%% is equivalent (assuming no errors are generated) to setting the parameters of each of `?GL_TEXTURE_SWIZZLE_R' +%% , `?GL_TEXTURE_SWIZZLE_G', `?GL_TEXTURE_SWIZZLE_B', and `?GL_TEXTURE_SWIZZLE_A' +%% successively. +%% +%% +%% +%% `?GL_TEXTURE_WRAP_S': Sets the wrap parameter for texture coordinate s to either `?GL_CLAMP_TO_EDGE' +%% , `?GL_CLAMP_TO_BORDER', `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. `?GL_CLAMP_TO_EDGE' +%% causes s coordinates to be clamped to the range [(1 2/N) 1-(1 2/N)], where N is the size of the texture +%% in the direction of clamping. `?GL_CLAMP_TO_BORDER' evaluates s coordinates in a +%% similar manner to `?GL_CLAMP_TO_EDGE'. However, in cases where clamping would have +%% occurred in `?GL_CLAMP_TO_EDGE' mode, the fetched texel data is substituted with +%% the values specified by `?GL_TEXTURE_BORDER_COLOR'. `?GL_REPEAT' causes the +%% integer part of the s coordinate to be ignored; the GL uses only the fractional part, +%% thereby creating a repeating pattern. `?GL_MIRRORED_REPEAT' causes the s coordinate +%% to be set to the fractional part of the texture coordinate if the integer part of s +%% is even; if the integer part of s is odd, then the s texture coordinate is set to 1- +%% frac(s), where frac(s) represents the fractional part of s. Initially, `?GL_TEXTURE_WRAP_S' +%% is set to `?GL_REPEAT'. +%% +%% +%% +%% `?GL_TEXTURE_WRAP_T': Sets the wrap parameter for texture coordinate t to either `?GL_CLAMP_TO_EDGE' +%% , `?GL_CLAMP_TO_BORDER', `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. See the +%% discussion under `?GL_TEXTURE_WRAP_S'. Initially, `?GL_TEXTURE_WRAP_T' is set +%% to `?GL_REPEAT'. +%% +%% +%% +%% `?GL_TEXTURE_WRAP_R': Sets the wrap parameter for texture coordinate r to either `?GL_CLAMP_TO_EDGE' +%% , `?GL_CLAMP_TO_BORDER', `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. See the +%% discussion under `?GL_TEXTURE_WRAP_S'. Initially, `?GL_TEXTURE_WRAP_R' is set +%% to `?GL_REPEAT'. +%% +%% See external documentation. +-spec texParameterf(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: float(). +texParameterf(Target,Pname,Param) -> + cast(5258, <>). -%% @spec (S::integer(),T::integer(),R::integer()) -> ok -%% @doc See external documentation. --spec texCoord3s(integer(),integer(),integer()) -> ok. -texCoord3s(S,T,R) -> - cast(5269, <>). +%% @doc +%% See {@link texParameterf/3} +-spec texParameteri(Target, Pname, Param) -> ok when Target :: enum(),Pname :: enum(),Param :: integer(). +texParameteri(Target,Pname,Param) -> + cast(5259, <>). -%% @spec ({S,T,R}) -> ok -%% @equiv texCoord3s(S,T,R) --spec texCoord3sv({integer(),integer(),integer()}) -> ok. -texCoord3sv({S,T,R}) -> texCoord3s(S,T,R). +%% @doc +%% See {@link texParameterf/3} +-spec texParameterfv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {float()}. +texParameterfv(Target,Pname,Params) -> + cast(5260, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (S::float(),T::float(),R::float(),Q::float()) -> ok -%% @doc See external documentation. --spec texCoord4d(float(),float(),float(),float()) -> ok. -texCoord4d(S,T,R,Q) -> - cast(5270, <>). +%% @doc +%% See {@link texParameterf/3} +-spec texParameteriv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}. +texParameteriv(Target,Pname,Params) -> + cast(5261, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec ({S,T,R,Q}) -> ok -%% @equiv texCoord4d(S,T,R,Q) --spec texCoord4dv({float(),float(),float(),float()}) -> ok. -texCoord4dv({S,T,R,Q}) -> texCoord4d(S,T,R,Q). +%% @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: +%% +%% `?GL_TEXTURE_MAG_FILTER': Returns the single-valued texture magnification filter, +%% a symbolic constant. The initial value is `?GL_LINEAR'. +%% +%% `?GL_TEXTURE_MIN_FILTER': Returns the single-valued texture minification filter, +%% a symbolic constant. The initial value is `?GL_NEAREST_MIPMAP_LINEAR'. +%% +%% `?GL_TEXTURE_MIN_LOD': Returns the single-valued texture minimum level-of-detail +%% value. The initial value is -1000. +%% +%% `?GL_TEXTURE_MAX_LOD': Returns the single-valued texture maximum level-of-detail +%% value. The initial value is 1000. +%% +%% `?GL_TEXTURE_BASE_LEVEL': Returns the single-valued base texture mipmap level. The +%% initial value is 0. +%% +%% `?GL_TEXTURE_MAX_LEVEL': Returns the single-valued maximum texture mipmap array +%% level. The initial value is 1000. +%% +%% `?GL_TEXTURE_SWIZZLE_R': Returns the red component swizzle. The initial value is `?GL_RED' +%% . +%% +%% `?GL_TEXTURE_SWIZZLE_G': Returns the green component swizzle. The initial value is `?GL_GREEN' +%% . +%% +%% `?GL_TEXTURE_SWIZZLE_B': Returns the blue component swizzle. The initial value is `?GL_BLUE' +%% . +%% +%% `?GL_TEXTURE_SWIZZLE_A': Returns the alpha component swizzle. The initial value is `?GL_ALPHA' +%% . +%% +%% `?GL_TEXTURE_SWIZZLE_RGBA': Returns the component swizzle for all channels in a +%% single query. +%% +%% `?GL_TEXTURE_WRAP_S': Returns the single-valued wrapping function for texture coordinate +%% s, a symbolic constant. The initial value is `?GL_REPEAT'. +%% +%% `?GL_TEXTURE_WRAP_T': Returns the single-valued wrapping function for texture coordinate +%% t, a symbolic constant. The initial value is `?GL_REPEAT'. +%% +%% `?GL_TEXTURE_WRAP_R': Returns the single-valued wrapping function for texture coordinate +%% r, a symbolic constant. The initial value is `?GL_REPEAT'. +%% +%% `?GL_TEXTURE_BORDER_COLOR': Returns four integer or floating-point numbers that +%% comprise the RGBA color of the texture border. Floating-point values are returned in the +%% range [0 1]. Integer values are returned as a linear mapping of the internal floating-point +%% representation such that 1.0 maps to the most positive representable integer and -1.0 +%% maps to the most negative representable integer. The initial value is (0, 0, 0, 0). +%% +%% `?GL_TEXTURE_COMPARE_MODE': Returns a single-valued texture comparison mode, a symbolic +%% constant. The initial value is `?GL_NONE'. See {@link gl:texParameterf/3} . +%% +%% `?GL_TEXTURE_COMPARE_FUNC': Returns a single-valued texture comparison function, +%% a symbolic constant. The initial value is `?GL_LEQUAL'. See {@link gl:texParameterf/3} . +%% +%% +%% In addition to the parameters that may be set with {@link gl:texParameterf/3} , ``gl:getTexParameter'' +%% accepts the following read-only parameters: +%% +%% `?GL_TEXTURE_IMMUTABLE_FORMAT': Returns non-zero if the texture has an immutable +%% format. Textures become immutable if their storage is specified with {@link gl:texStorage1D/4} +%% , {@link gl:texStorage2D/5} or {@link gl:texStorage3D/6} . The initial value is `?GL_FALSE' +%% . +%% +%% See external documentation. +-spec getTexParameterfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum(). +getTexParameterfv(Target,Pname) -> + call(5262, <>). -%% @spec (S::float(),T::float(),R::float(),Q::float()) -> ok -%% @doc See external documentation. --spec texCoord4f(float(),float(),float(),float()) -> ok. -texCoord4f(S,T,R,Q) -> - cast(5271, <>). +%% @doc +%% See {@link getTexParameterfv/2} +-spec getTexParameteriv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum(). +getTexParameteriv(Target,Pname) -> + call(5263, <>). -%% @spec ({S,T,R,Q}) -> ok -%% @equiv texCoord4f(S,T,R,Q) --spec texCoord4fv({float(),float(),float(),float()}) -> ok. -texCoord4fv({S,T,R,Q}) -> texCoord4f(S,T,R,Q). +%% @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' +%% . +%% +%% `?GL_MAX_TEXTURE_SIZE', and `?GL_MAX_3D_TEXTURE_SIZE' are not really descriptive +%% enough. It has to report the largest square texture image that can be accommodated with +%% mipmaps and borders, but a long skinny texture, or a texture without mipmaps and borders, +%% may easily fit in texture memory. The proxy targets allow the user to more accurately +%% query whether the GL can accommodate a texture of a given configuration. If the texture +%% cannot be accommodated, the texture state variables, which may be queried with ``gl:getTexLevelParameter'' +%% , are set to 0. If the texture can be accommodated, the texture state values will be set +%% as they would be set for a non-proxy target. +%% +%% `Pname' specifies the texture parameter whose value or values will be returned. +%% +%% The accepted parameter names are as follows: +%% +%% `?GL_TEXTURE_WIDTH': `Params' returns a single value, the width of the texture +%% image. This value includes the border of the texture image. The initial value is 0. +%% +%% `?GL_TEXTURE_HEIGHT': `Params' returns a single value, the height of the texture +%% image. This value includes the border of the texture image. The initial value is 0. +%% +%% `?GL_TEXTURE_DEPTH': `Params' returns a single value, the depth of the texture +%% image. This value includes the border of the texture image. The initial value is 0. +%% +%% `?GL_TEXTURE_INTERNAL_FORMAT': `Params' returns a single value, the internal +%% format of the texture image. +%% +%% `?GL_TEXTURE_RED_TYPE', +%% +%% `?GL_TEXTURE_GREEN_TYPE', +%% +%% `?GL_TEXTURE_BLUE_TYPE', +%% +%% `?GL_TEXTURE_ALPHA_TYPE', +%% +%% `?GL_TEXTURE_DEPTH_TYPE': The data type used to store the component. The types `?GL_NONE' +%% , `?GL_SIGNED_NORMALIZED', `?GL_UNSIGNED_NORMALIZED', `?GL_FLOAT', `?GL_INT' +%% , and `?GL_UNSIGNED_INT' may be returned to indicate signed normalized fixed-point, +%% unsigned normalized fixed-point, floating-point, integer unnormalized, and unsigned integer +%% unnormalized components, respectively. +%% +%% `?GL_TEXTURE_RED_SIZE', +%% +%% `?GL_TEXTURE_GREEN_SIZE', +%% +%% `?GL_TEXTURE_BLUE_SIZE', +%% +%% `?GL_TEXTURE_ALPHA_SIZE', +%% +%% `?GL_TEXTURE_DEPTH_SIZE': The internal storage resolution of an individual component. +%% The resolution chosen by the GL will be a close match for the resolution requested by +%% the user with the component argument of {@link gl:texImage1D/8} , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} +%% , {@link gl:copyTexImage1D/7} , and {@link gl:copyTexImage2D/8} . The initial value is 0. +%% +%% `?GL_TEXTURE_COMPRESSED': `Params' returns a single boolean value indicating +%% if the texture image is stored in a compressed internal format. The initiali value is `?GL_FALSE' +%% . +%% +%% `?GL_TEXTURE_COMPRESSED_IMAGE_SIZE': `Params' returns a single integer value, +%% the number of unsigned bytes of the compressed texture image that would be returned from {@link gl:getCompressedTexImage/3} +%% . +%% +%% See external documentation. +-spec getTexLevelParameterfv(Target, Level, Pname) -> {float()} when Target :: enum(),Level :: integer(),Pname :: enum(). +getTexLevelParameterfv(Target,Level,Pname) -> + call(5264, <>). -%% @spec (S::integer(),T::integer(),R::integer(),Q::integer()) -> ok -%% @doc See external documentation. --spec texCoord4i(integer(),integer(),integer(),integer()) -> ok. -texCoord4i(S,T,R,Q) -> - cast(5272, <>). +%% @doc +%% See {@link getTexLevelParameterfv/3} +-spec getTexLevelParameteriv(Target, Level, Pname) -> {integer()} when Target :: enum(),Level :: integer(),Pname :: enum(). +getTexLevelParameteriv(Target,Level,Pname) -> + call(5265, <>). -%% @spec ({S,T,R,Q}) -> ok -%% @equiv texCoord4i(S,T,R,Q) --spec texCoord4iv({integer(),integer(),integer(),integer()}) -> ok. -texCoord4iv({S,T,R,Q}) -> texCoord4i(S,T,R,Q). +%% @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'. +%% +%% Texture images are defined with ``gl:texImage1D''. The arguments describe the parameters +%% of the texture image, such as width, width of the border, level-of-detail number (see {@link gl:texParameterf/3} +%% ), and the internal resolution and format used to store the image. The last three arguments +%% describe how the image is represented in memory. +%% +%% If `Target' is `?GL_PROXY_TEXTURE_1D', no data is read from `Data' , but +%% all of the texture image state is recalculated, checked for consistency, and checked against +%% the implementation's capabilities. If the implementation cannot handle a texture of the +%% requested texture size, it sets all of the image state to 0, but does not generate an +%% error (see {@link gl:getError/0} ). To query for an entire mipmap array, use an image array +%% level greater than or equal to 1. +%% +%% If `Target' is `?GL_TEXTURE_1D', data is read from `Data' as a sequence +%% of signed or unsigned bytes, shorts, or longs, or single-precision floating-point values, +%% depending on `Type' . These values are grouped into sets of one, two, three, or four +%% values, depending on `Format' , to form elements. Each data byte is treated as eight +%% 1-bit elements, with bit ordering determined by `?GL_UNPACK_LSB_FIRST' (see {@link gl:pixelStoref/2} +%% ). +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% The first element corresponds to the left end of the texture array. Subsequent elements +%% progress left-to-right through the remaining texels in the texture array. The final element +%% corresponds to the right end of the texture array. +%% +%% `Format' determines the composition of each element in `Data' . It can assume +%% one of these symbolic values: +%% +%% `?GL_RED': Each element is a single red component. The GL converts it to floating +%% point and assembles it into an RGBA element by attaching 0 for green and blue, and 1 for +%% alpha. Each component is then multiplied by the signed scale factor `?GL_c_SCALE', +%% added to the signed bias `?GL_c_BIAS', and clamped to the range [0,1]. +%% +%% `?GL_RG': Each element is a single red/green double The GL converts it to floating +%% point and assembles it into an RGBA element by attaching 0 for blue, and 1 for alpha. +%% Each component is then multiplied by the signed scale factor `?GL_c_SCALE', added +%% to the signed bias `?GL_c_BIAS', and clamped to the range [0,1]. +%% +%% `?GL_RGB' +%% +%% `?GL_BGR': Each element is an RGB triple. The GL converts it to floating point and +%% assembles it into an RGBA element by attaching 1 for alpha. Each component is then multiplied +%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS', +%% and clamped to the range [0,1]. +%% +%% `?GL_RGBA' +%% +%% `?GL_BGRA': Each element contains all four components. Each component is multiplied +%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS', +%% and clamped to the range [0,1]. +%% +%% `?GL_DEPTH_COMPONENT': Each element is a single depth value. The GL converts it +%% to floating point, multiplies by the signed scale factor `?GL_DEPTH_SCALE', adds +%% the signed bias `?GL_DEPTH_BIAS', and clamps to the range [0,1]. +%% +%% If an application wants to store the texture at a certain resolution or in a certain +%% format, it can request the resolution and format with `InternalFormat' . The GL will +%% choose an internal representation that closely approximates that requested by `InternalFormat' +%% , but it may not match exactly. (The representations specified by `?GL_RED', `?GL_RG' +%% , `?GL_RGB' and `?GL_RGBA' must match exactly.) +%% +%% `InternalFormat' may be one of the base internal formats shown in Table 1, below +%% +%% `InternalFormat' may also be one of the sized internal formats shown in Table 2, +%% below +%% +%% Finally, `InternalFormat' may also be one of the generic or compressed compressed +%% texture formats shown in Table 3 below +%% +%% If the `InternalFormat' parameter is one of the generic compressed formats, `?GL_COMPRESSED_RED' +%% , `?GL_COMPRESSED_RG', `?GL_COMPRESSED_RGB', or `?GL_COMPRESSED_RGBA', +%% the GL will replace the internal format with the symbolic constant for a specific internal +%% format and compress the texture before storage. If no corresponding internal format is +%% available, or the GL can not compress that image for any reason, the internal format is +%% instead replaced with a corresponding base internal format. +%% +%% If the `InternalFormat' parameter is `?GL_SRGB', `?GL_SRGB8', `?GL_SRGB_ALPHA' +%% or `?GL_SRGB8_ALPHA8', the texture is treated as if the red, green, or blue components +%% are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion +%% from the sRGB encoded component c s to a linear component c l is: +%% +%% c l={ c s/12.92if c s&le; 0.04045( c s+0.055/1.055) 2.4if c s> 0.04045 +%% +%% Assume c s is the sRGB component in the range [0,1]. +%% +%% Use the `?GL_PROXY_TEXTURE_1D' target to try out a resolution and format. The implementation +%% will update and recompute its best match for the requested storage resolution and format. +%% To then query this state, call {@link gl:getTexLevelParameterfv/3} . If the texture cannot +%% be accommodated, texture state is set to 0. +%% +%% A one-component texture image uses only the red component of the RGBA color from `Data' +%% . A two-component image uses the R and A values. A three-component image uses the R, G, +%% and B values. A four-component image uses all of the RGBA components. +%% +%% Image-based shadowing can be enabled by comparing texture r coordinates to depth texture +%% values to generate a boolean result. See {@link gl:texParameterf/3} for details on texture +%% comparison. +%% +%% 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, <>). -%% @spec (S::integer(),T::integer(),R::integer(),Q::integer()) -> ok -%% @doc See external documentation. --spec texCoord4s(integer(),integer(),integer(),integer()) -> ok. -texCoord4s(S,T,R,Q) -> - cast(5273, <>). +%% @doc Specify a two-dimensional texture image +%% +%% Texturing allows elements of an image array to be read by shaders. +%% +%% To define texture images, call ``gl:texImage2D''. The arguments describe the parameters +%% of the texture image, such as height, width, width of the border, level-of-detail number +%% (see {@link gl:texParameterf/3} ), and number of color components provided. The last three +%% arguments describe how the image is represented in memory. +%% +%% If `Target' is `?GL_PROXY_TEXTURE_2D', `?GL_PROXY_TEXTURE_1D_ARRAY', `?GL_PROXY_TEXTURE_CUBE_MAP' +%% , or `?GL_PROXY_TEXTURE_RECTANGLE', no data is read from `Data' , but all of +%% the texture image state is recalculated, checked for consistency, and checked against +%% the implementation's capabilities. If the implementation cannot handle a texture of the +%% requested texture size, it sets all of the image state to 0, but does not generate an +%% error (see {@link gl:getError/0} ). To query for an entire mipmap array, use an image array +%% level greater than or equal to 1. +%% +%% If `Target' is `?GL_TEXTURE_2D', `?GL_TEXTURE_RECTANGLE' or one of the `?GL_TEXTURE_CUBE_MAP' +%% targets, data is read from `Data' as a sequence of signed or unsigned bytes, shorts, +%% or longs, or single-precision floating-point values, depending on `Type' . These values +%% are grouped into sets of one, two, three, or four values, depending on `Format' , +%% to form elements. Each data byte is treated as eight 1-bit elements, with bit ordering +%% determined by `?GL_UNPACK_LSB_FIRST' (see {@link gl:pixelStoref/2} ). +%% +%% If `Target' is `?GL_TEXTURE_1D_ARRAY', data is interpreted as an array of one-dimensional +%% images. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% The first element corresponds to the lower left corner of the texture image. Subsequent +%% elements progress left-to-right through the remaining texels in the lowest row of the +%% texture image, and then in successively higher rows of the texture image. The final element +%% corresponds to the upper right corner of the texture image. +%% +%% `Format' determines the composition of each element in `Data' . It can assume +%% one of these symbolic values: +%% +%% `?GL_RED': Each element is a single red component. The GL converts it to floating +%% point and assembles it into an RGBA element by attaching 0 for green and blue, and 1 for +%% alpha. Each component is then multiplied by the signed scale factor `?GL_c_SCALE', +%% added to the signed bias `?GL_c_BIAS', and clamped to the range [0,1]. +%% +%% `?GL_RG': Each element is a red/green double. The GL converts it to floating point +%% and assembles it into an RGBA element by attaching 0 for blue, and 1 for alpha. Each component +%% is then multiplied by the signed scale factor `?GL_c_SCALE', added to the signed +%% bias `?GL_c_BIAS', and clamped to the range [0,1]. +%% +%% `?GL_RGB' +%% +%% `?GL_BGR': Each element is an RGB triple. The GL converts it to floating point and +%% assembles it into an RGBA element by attaching 1 for alpha. Each component is then multiplied +%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS', +%% and clamped to the range [0,1]. +%% +%% `?GL_RGBA' +%% +%% `?GL_BGRA': Each element contains all four components. Each component is multiplied +%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS', +%% and clamped to the range [0,1]. +%% +%% `?GL_DEPTH_COMPONENT': Each element is a single depth value. The GL converts it +%% to floating point, multiplies by the signed scale factor `?GL_DEPTH_SCALE', adds +%% the signed bias `?GL_DEPTH_BIAS', and clamps to the range [0,1]. +%% +%% `?GL_DEPTH_STENCIL': Each element is a pair of depth and stencil values. The depth +%% component of the pair is interpreted as in `?GL_DEPTH_COMPONENT'. The stencil component +%% is interpreted based on specified the depth + stencil internal format. +%% +%% If an application wants to store the texture at a certain resolution or in a certain +%% format, it can request the resolution and format with `InternalFormat' . The GL will +%% choose an internal representation that closely approximates that requested by `InternalFormat' +%% , but it may not match exactly. (The representations specified by `?GL_RED', `?GL_RG' +%% , `?GL_RGB', and `?GL_RGBA' must match exactly.) +%% +%% `InternalFormat' may be one of the base internal formats shown in Table 1, below +%% +%% `InternalFormat' may also be one of the sized internal formats shown in Table 2, +%% below +%% +%% Finally, `InternalFormat' may also be one of the generic or compressed compressed +%% texture formats shown in Table 3 below +%% +%% If the `InternalFormat' parameter is one of the generic compressed formats, `?GL_COMPRESSED_RED' +%% , `?GL_COMPRESSED_RG', `?GL_COMPRESSED_RGB', or `?GL_COMPRESSED_RGBA', +%% the GL will replace the internal format with the symbolic constant for a specific internal +%% format and compress the texture before storage. If no corresponding internal format is +%% available, or the GL can not compress that image for any reason, the internal format is +%% instead replaced with a corresponding base internal format. +%% +%% If the `InternalFormat' parameter is `?GL_SRGB', `?GL_SRGB8', `?GL_SRGB_ALPHA' +%% , or `?GL_SRGB8_ALPHA8', the texture is treated as if the red, green, or blue components +%% are encoded in the sRGB color space. Any alpha component is left unchanged. The conversion +%% from the sRGB encoded component c s to a linear component c l is: +%% +%% c l={ c s/12.92if c s&le; 0.04045( c s+0.055/1.055) 2.4if c s> 0.04045 +%% +%% Assume c s is the sRGB component in the range [0,1]. +%% +%% Use the `?GL_PROXY_TEXTURE_2D', `?GL_PROXY_TEXTURE_1D_ARRAY', `?GL_PROXY_TEXTURE_RECTANGLE' +%% , or `?GL_PROXY_TEXTURE_CUBE_MAP' target to try out a resolution and format. The +%% implementation will update and recompute its best match for the requested storage resolution +%% and format. To then query this state, call {@link gl:getTexLevelParameterfv/3} . If the texture +%% cannot be accommodated, texture state is set to 0. +%% +%% A one-component texture image uses only the red component of the RGBA color extracted +%% from `Data' . A two-component image uses the R and G values. A three-component image +%% uses the R, G, and B values. A four-component image uses all of the RGBA components. +%% +%% Image-based shadowing can be enabled by comparing texture r coordinates to depth texture +%% values to generate a boolean result. See {@link gl:texParameterf/3} for details on texture +%% comparison. +%% +%% 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, <>). -%% @spec ({S,T,R,Q}) -> ok -%% @equiv texCoord4s(S,T,R,Q) --spec texCoord4sv({integer(),integer(),integer(),integer()}) -> ok. -texCoord4sv({S,T,R,Q}) -> texCoord4s(S,T,R,Q). +%% @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. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is requested, `Img' is treated +%% as a byte offset into the buffer object's data store. +%% +%% To understand the operation of ``gl:getTexImage'', consider the selected internal four-component +%% texture image to be an RGBA color buffer the size of the image. The semantics of ``gl:getTexImage'' +%% are then identical to those of {@link gl:readPixels/7} , with the exception that no pixel +%% transfer operations are performed, when called with the same `Format' and `Type' , +%% with `x' and `y' set to 0, `width' set to the width of the texture image +%% and `height' set to 1 for 1D images, or to the height of the texture image for 2D +%% images. +%% +%% If the selected texture image does not contain four components, the following mappings +%% are applied. Single-component textures are treated as RGBA buffers with red set to the +%% single-component value, green set to 0, blue set to 0, and alpha set to 1. Two-component +%% textures are treated as RGBA buffers with red set to the value of component zero, alpha +%% set to the value of component one, and green and blue set to 0. Finally, three-component +%% textures are treated as RGBA buffers with red set to component zero, green set to component +%% one, blue set to component two, and alpha set to 1. +%% +%% To determine the required size of `Img' , use {@link gl:getTexLevelParameterfv/3} to +%% determine the dimensions of the internal texture image, then scale the required number +%% of pixels by the storage required for each pixel, based on `Format' and `Type' . +%% Be sure to take the pixel storage parameters into account, especially `?GL_PACK_ALIGNMENT' +%% . +%% +%% 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, <>). -%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec texCoordPointer(integer(),enum(),integer(),offset()|mem()) -> ok. -texCoordPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) -> - cast(5274, <>); -texCoordPointer(Size,Type,Stride,Pointer) -> - send_bin(Pointer), - cast(5275, <>). +%% @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''. +%% +%% The generated textures have no dimensionality; they assume the dimensionality of the +%% texture target to which they are first bound (see {@link gl:bindTexture/2} ). +%% +%% Texture names returned by a call to ``gl:genTextures'' are not returned by subsequent +%% calls, unless they are first deleted with {@link gl:deleteTextures/1} . +%% +%% See external documentation. +-spec genTextures(N) -> [integer()] when N :: integer(). +genTextures(N) -> + call(5271, <>). -%% @spec (Target::enum(),Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec texEnvf(enum(),enum(),float()) -> ok. -texEnvf(Target,Pname,Param) -> - cast(5276, <>). +%% @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). +%% +%% ``gl:deleteTextures'' silently ignores 0's and names that do not correspond to existing +%% textures. +%% +%% See external documentation. +-spec deleteTextures(Textures) -> ok when Textures :: [integer()]. +deleteTextures(Textures) -> + cast(5272, <<(length(Textures)):?GLuint, + (<< <> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>). -%% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec texEnvfv(enum(),enum(),{float()}) -> ok. -texEnvfv(Target,Pname,Params) -> - cast(5277, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) 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. +%% +%% Texture names are unsigned integers. The value zero is reserved to represent the default +%% texture for each texture target. Texture names and the corresponding texture contents +%% are local to the shared object space of the current GL rendering context; two rendering +%% contexts share texture names only if they explicitly enable sharing between contexts through +%% the appropriate GL windows interfaces functions. +%% +%% You must use {@link gl:genTextures/1} to generate a set of new texture names. +%% +%% When a texture is first bound, it assumes the specified target: A texture first bound +%% to `?GL_TEXTURE_1D' becomes one-dimensional texture, a texture first bound to `?GL_TEXTURE_2D' +%% becomes two-dimensional texture, a texture first bound to `?GL_TEXTURE_3D' becomes +%% three-dimensional texture, a texture first bound to `?GL_TEXTURE_1D_ARRAY' becomes +%% one-dimensional array texture, a texture first bound to `?GL_TEXTURE_2D_ARRAY' becomes +%% two-dimensional arary texture, a texture first bound to `?GL_TEXTURE_RECTANGLE' becomes +%% rectangle texture, a, texture first bound to `?GL_TEXTURE_CUBE_MAP' becomes a cube-mapped +%% texture, a texture first bound to `?GL_TEXTURE_2D_MULTISAMPLE' becomes a two-dimensional +%% multisampled texture, and a texture first bound to `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY' +%% becomes a two-dimensional multisampled array texture. The state of a one-dimensional texture +%% immediately after it is first bound is equivalent to the state of the default `?GL_TEXTURE_1D' +%% at GL initialization, and similarly for the other texture types. +%% +%% While a texture is bound, GL operations on the target to which it is bound affect the +%% bound texture, and queries of the target to which it is bound return state from the bound +%% texture. In effect, the texture targets become aliases for the textures currently bound +%% to them, and the texture name zero refers to the default textures that were bound to them +%% at initialization. +%% +%% A texture binding created with ``gl:bindTexture'' remains active until a different +%% texture is bound to the same target, or until the bound texture is deleted with {@link gl:deleteTextures/1} +%% . +%% +%% Once created, a named texture may be re-bound to its same original target as often as +%% needed. It is usually much faster to use ``gl:bindTexture'' to bind an existing named +%% texture to one of the texture targets than it is to reload the texture image using {@link gl:texImage1D/8} +%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} or another similar function. +%% +%% See external documentation. +-spec bindTexture(Target, Texture) -> ok when Target :: enum(),Texture :: integer(). +bindTexture(Target,Texture) -> + cast(5273, <>). -%% @spec (Target::enum(),Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec texEnvi(enum(),enum(),integer()) -> ok. -texEnvi(Target,Pname,Param) -> - cast(5278, <>). +%% @doc Set texture residence priority +%% +%% ``gl:prioritizeTextures'' assigns the `N' texture priorities given in `Priorities' +%% to the `N' textures named in `Textures' . +%% +%% The GL establishes a ``working set'' of textures that are resident in texture memory. +%% These textures may be bound to a texture target much more efficiently than textures that +%% are not resident. By specifying a priority for each texture, ``gl:prioritizeTextures'' +%% allows applications to guide the GL implementation in determining which textures should +%% be resident. +%% +%% The priorities given in `Priorities' are clamped to the range [0 1] before they are +%% assigned. 0 indicates the lowest priority; textures with priority 0 are least likely to +%% be resident. 1 indicates the highest priority; textures with priority 1 are most likely +%% to be resident. However, textures are not guaranteed to be resident until they are used. +%% +%% ``gl:prioritizeTextures'' silently ignores attempts to prioritize texture 0 or any texture +%% name that does not correspond to an existing texture. +%% +%% ``gl:prioritizeTextures'' does not require that any of the textures named by `Textures' +%% be bound to a texture target. {@link gl:texParameterf/3} may also be used to set a texture's +%% priority, but only if the texture is currently bound. This is the only way to set the +%% priority of a default texture. +%% +%% See external documentation. +-spec prioritizeTextures(Textures, Priorities) -> ok when Textures :: [integer()],Priorities :: [clamp()]. +prioritizeTextures(Textures,Priorities) -> + cast(5274, <<(length(Textures)):?GLuint, + (<< <> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32),(length(Priorities)):?GLuint, + (<< <> || C <- Priorities>>)/binary,0:(((1+length(Priorities)) rem 2)*32)>>). -%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec texEnviv(enum(),enum(),{integer()}) -> ok. -texEnviv(Target,Pname,Params) -> - cast(5279, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) 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. +%% +%% ``gl:areTexturesResident'' queries the texture residence status of the `N' textures +%% named by the elements of `Textures' . If all the named textures are resident, ``gl:areTexturesResident'' +%% returns `?GL_TRUE', and the contents of `Residences' are undisturbed. If not +%% all the named textures are resident, ``gl:areTexturesResident'' returns `?GL_FALSE', +%% and detailed status is returned in the `N' elements of `Residences' . If an element +%% of `Residences' is `?GL_TRUE', then the texture named by the corresponding element +%% of `Textures' is resident. +%% +%% The residence status of a single bound texture may also be queried by calling {@link gl:getTexParameterfv/2} +%% with the `target' argument set to the target to which the texture is bound, and +%% the `pname' argument set to `?GL_TEXTURE_RESIDENT'. This is the only way that +%% the residence status of a default texture can be queried. +%% +%% See external documentation. +-spec areTexturesResident(Textures) -> {0|1,Residences :: [0|1]} when Textures :: [integer()]. +areTexturesResident(Textures) -> + call(5275, <<(length(Textures)):?GLuint, + (<< <> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>). -%% @spec (Coord::enum(),Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec texGend(enum(),enum(),float()) -> ok. -texGend(Coord,Pname,Param) -> - cast(5280, <>). +%% @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'. +%% +%% A name returned by {@link gl:genTextures/1} , but not yet associated with a texture by +%% calling {@link gl:bindTexture/2} , is not the name of a texture. +%% +%% See external documentation. +-spec isTexture(Texture) -> 0|1 when Texture :: integer(). +isTexture(Texture) -> + call(5276, <>). -%% @spec (Coord::enum(),Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec texGendv(enum(),enum(),{float()}) -> ok. -texGendv(Coord,Pname,Params) -> - cast(5281, <> ||C <- tuple_to_list(Params)>>)/binary>>). +%% @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, <>). -%% @spec (Coord::enum(),Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec texGenf(enum(),enum(),float()) -> ok. -texGenf(Coord,Pname,Param) -> - cast(5282, <>). +%% @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, <>). -%% @spec (Coord::enum(),Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec texGenfv(enum(),enum(),{float()}) -> ok. -texGenfv(Coord,Pname,Params) -> - cast(5283, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). +%% @doc Copy pixels into a 1D texture image +%% +%% ``gl:copyTexImage1D'' defines a one-dimensional texture image with pixels from the current +%% `?GL_READ_BUFFER'. +%% +%% The screen-aligned pixel row with left corner at (x y) and with a length of width+2(border) defines +%% the texture array at the mipmap level specified by `Level' . `Internalformat' +%% specifies the internal format of the texture array. +%% +%% The pixels in the row are processed exactly as if {@link gl:readPixels/7} had been called, +%% but the process stops just before final conversion. At this point all pixel component +%% values are clamped to the range [0 1] and then converted to the texture's internal format +%% for storage in the texel array. +%% +%% Pixel ordering is such that lower x screen coordinates correspond to lower texture +%% coordinates. +%% +%% If any of the pixels within the specified row of the current `?GL_READ_BUFFER' are +%% outside the window associated with the current rendering context, then the values obtained +%% for those pixels are undefined. +%% +%% ``gl:copyTexImage1D'' defines a one-dimensional texture image with pixels from the current +%% `?GL_READ_BUFFER'. +%% +%% When `Internalformat' is one of the sRGB types, the GL does not automatically convert +%% the source pixels to the sRGB color space. In this case, the ``gl:pixelMap'' function +%% can be used to accomplish the conversion. +%% +%% 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, <>). -%% @spec (Coord::enum(),Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec texGeni(enum(),enum(),integer()) -> ok. -texGeni(Coord,Pname,Param) -> - cast(5284, <>). +%% @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'. +%% +%% The screen-aligned pixel rectangle with lower left corner at ( `X' , `Y' ) and +%% with a width of width+2(border) and a height of height+2(border) defines the texture array at the mipmap +%% level specified by `Level' . `Internalformat' specifies the internal format of +%% the texture array. +%% +%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been +%% called, but the process stops just before final conversion. At this point all pixel component +%% values are clamped to the range [0 1] and then converted to the texture's internal format +%% for storage in the texel array. +%% +%% Pixel ordering is such that lower x and y screen coordinates correspond to lower s +%% and t texture coordinates. +%% +%% If any of the pixels within the specified rectangle of the current `?GL_READ_BUFFER' +%% are outside the window associated with the current rendering context, then the values +%% obtained for those pixels are undefined. +%% +%% When `Internalformat' is one of the sRGB types, the GL does not automatically convert +%% the source pixels to the sRGB color space. In this case, the ``gl:pixelMap'' function +%% can be used to accomplish the conversion. +%% +%% 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, <>). -%% @spec (Coord::enum(),Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec texGeniv(enum(),enum(),{integer()}) -> ok. -texGeniv(Coord,Pname,Params) -> - cast(5285, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). +%% @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} ). +%% +%% The screen-aligned pixel row with left corner at ( `X' , `Y' ), and with length `Width' +%% replaces the portion of the texture array with x indices `Xoffset' through xoffset +%% +width-1, inclusive. The destination in the texture array may not include any texels outside +%% the texture array as it was originally specified. +%% +%% The pixels in the row are processed exactly as if {@link gl:readPixels/7} had been called, +%% but the process stops just before final conversion. At this point, all pixel component +%% values are clamped to the range [0 1] and then converted to the texture's internal format +%% for storage in the texel array. +%% +%% It is not an error to specify a subtexture with zero width, but such a specification +%% has no effect. If any of the pixels within the specified row of the current `?GL_READ_BUFFER' +%% are outside the read window associated with the current rendering context, then the values +%% obtained for those pixels are undefined. +%% +%% No change is made to the `internalformat', `width', or `border' parameters +%% of the specified texture array or to texel values outside the specified subregion. +%% +%% 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, <>). -%% @spec (Target::enum(),Level::integer(),Internalformat::integer(),Width::integer(),Border::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok -%% @doc See external documentation. --spec texImage1D(enum(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok. -texImage1D(Target,Level,Internalformat,Width,Border,Format,Type,Pixels) when is_integer(Pixels) -> - cast(5286, <>); -texImage1D(Target,Level,Internalformat,Width,Border,Format,Type,Pixels) -> - send_bin(Pixels), - cast(5287, <>). - -%% @spec (Target::enum(),Level::integer(),Internalformat::integer(),Width::integer(),Height::integer(),Border::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok -%% @doc See external documentation. --spec texImage2D(enum(),integer(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok. -texImage2D(Target,Level,Internalformat,Width,Height,Border,Format,Type,Pixels) when is_integer(Pixels) -> - cast(5288, <>); -texImage2D(Target,Level,Internalformat,Width,Height,Border,Format,Type,Pixels) -> - send_bin(Pixels), - cast(5289, <>). +%% @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} ). +%% +%% The screen-aligned pixel rectangle with lower left corner at (x y) and with width `Width' +%% and height `Height' replaces the portion of the texture array with x indices `Xoffset' +%% through xoffset+width-1, inclusive, and y indices `Yoffset' through yoffset+height +%% -1, inclusive, at the mipmap level specified by `Level' . +%% +%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been +%% called, but the process stops just before final conversion. At this point, all pixel component +%% values are clamped to the range [0 1] and then converted to the texture's internal format +%% for storage in the texel array. +%% +%% The destination rectangle in the texture array may not include any texels outside the +%% texture array as it was originally specified. It is not an error to specify a subtexture +%% with zero width or height, but such a specification has no effect. +%% +%% If any of the pixels within the specified rectangle of the current `?GL_READ_BUFFER' +%% are outside the read window associated with the current rendering context, then the values +%% obtained for those pixels are undefined. +%% +%% No change is made to the `internalformat', `width', `height', or `border' +%% parameters of the specified texture array or to texel values outside the specified subregion. +%% +%% +%% 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, <>). -%% @spec (Target::enum(),Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec texParameterf(enum(),enum(),float()) -> ok. -texParameterf(Target,Pname,Param) -> - cast(5290, <>). +%% @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, <>). -%% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec texParameterfv(enum(),enum(),{float()}) -> ok. -texParameterfv(Target,Pname,Params) -> - cast(5291, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). +%% @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, <>). -%% @spec (Target::enum(),Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec texParameteri(enum(),enum(),integer()) -> ok. -texParameteri(Target,Pname,Param) -> - cast(5292, <>). +%% @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, <>). -%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec texParameteriv(enum(),enum(),{integer()}) -> ok. -texParameteriv(Target,Pname,Params) -> - cast(5293, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). +%% @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, <>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Width::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok -%% @doc See external documentation. --spec texSubImage1D(enum(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok. -texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) when is_integer(Pixels) -> - cast(5294, <>); -texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) -> - send_bin(Pixels), - cast(5295, <>). +%% @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. +%% +%% The acceptable values for the `Target' parameter are described in the {@link gl:map1d/6} +%% and {@link gl:map1d/6} reference pages. +%% +%% `Query' can assume the following values: +%% +%% `?GL_COEFF': `V' returns the control points for the evaluator function. One-dimensional +%% evaluators return order control points, and two-dimensional evaluators return uorder*vorder +%% control points. Each control point consists of one, two, three, or four integer, single-precision +%% floating-point, or double-precision floating-point values, depending on the type of the +%% evaluator. The GL returns two-dimensional control points in row-major order, incrementing +%% the uorder index quickly and the vorder index after each row. Integer values, when +%% requested, are computed by rounding the internal floating-point values to the nearest +%% integer values. +%% +%% `?GL_ORDER': `V' returns the order of the evaluator function. One-dimensional +%% evaluators return a single value, order. The initial value is 1. Two-dimensional evaluators +%% return two values, uorder and vorder. The initial value is 1,1. +%% +%% `?GL_DOMAIN': `V' returns the linear u and v mapping parameters. One-dimensional +%% evaluators return two values, u1 and u2, as specified by {@link gl:map1d/6} . Two-dimensional +%% evaluators return four values ( u1, u2, v1, and v2) as specified by {@link gl:map1d/6} . +%% Integer values, when requested, are computed by rounding the internal floating-point values +%% to the nearest integer values. +%% +%% 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, <>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok -%% @doc See external documentation. --spec texSubImage2D(enum(),integer(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok. -texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) when is_integer(Pixels) -> - cast(5296, <>); -texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) -> - send_bin(Pixels), - cast(5297, <>). +%% @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, <>). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec translated(float(),float(),float()) -> ok. -translated(X,Y,Z) -> - cast(5298, <>). +%% @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, <>). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec translatef(float(),float(),float()) -> ok. -translatef(X,Y,Z) -> - cast(5299, <>). +%% @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} . +%% +%% When one of the ``gl:evalCoord'' commands is issued, all currently enabled maps of +%% the indicated dimension are evaluated. Then, for each enabled map, it is as if the corresponding +%% GL command had been issued with the computed value. That is, if `?GL_MAP1_INDEX' or `?GL_MAP2_INDEX' +%% is enabled, a {@link gl:indexd/1} command is simulated. If `?GL_MAP1_COLOR_4' or `?GL_MAP2_COLOR_4' +%% is enabled, a {@link gl:color3b/3} command is simulated. If `?GL_MAP1_NORMAL' or `?GL_MAP2_NORMAL' +%% is enabled, a normal vector is produced, and if any of `?GL_MAP1_TEXTURE_COORD_1', `?GL_MAP1_TEXTURE_COORD_2' +%% , `?GL_MAP1_TEXTURE_COORD_3', `?GL_MAP1_TEXTURE_COORD_4', `?GL_MAP2_TEXTURE_COORD_1' +%% , `?GL_MAP2_TEXTURE_COORD_2', `?GL_MAP2_TEXTURE_COORD_3', or `?GL_MAP2_TEXTURE_COORD_4' +%% is enabled, then an appropriate {@link gl:texCoord1d/1} command is simulated. +%% +%% For color, color index, normal, and texture coordinates the GL uses evaluated values +%% instead of current values for those evaluations that are enabled, and current values otherwise, +%% However, the evaluated values do not update the current values. Thus, if {@link gl:vertex2d/2} +%% commands are interspersed with ``gl:evalCoord'' commands, the color, normal, and texture +%% coordinates associated with the {@link gl:vertex2d/2} commands are not affected by the values +%% generated by the ``gl:evalCoord'' commands, but only by the most recent {@link gl:color3b/3} +%% , {@link gl:indexd/1} , {@link gl:normal3b/3} , and {@link gl:texCoord1d/1} commands. +%% +%% No commands are issued for maps that are not enabled. If more than one texture evaluation +%% is enabled for a particular dimension (for example, `?GL_MAP2_TEXTURE_COORD_1' and `?GL_MAP2_TEXTURE_COORD_2' +%% ), then only the evaluation of the map that produces the larger number of coordinates +%% (in this case, `?GL_MAP2_TEXTURE_COORD_2') is carried out. `?GL_MAP1_VERTEX_4' +%% overrides `?GL_MAP1_VERTEX_3', and `?GL_MAP2_VERTEX_4' overrides `?GL_MAP2_VERTEX_3' +%% , in the same manner. If neither a three- nor a four-component vertex map is enabled for +%% the specified dimension, the ``gl:evalCoord'' command is ignored. +%% +%% If you have enabled automatic normal generation, by calling {@link gl:enable/1} with argument +%% `?GL_AUTO_NORMAL', ``gl:evalCoord2'' generates surface normals analytically, regardless +%% of the contents or enabling of the `?GL_MAP2_NORMAL' map. Let +%% +%% m=((&PartialD; p)/(&PartialD; u))*((&PartialD; p)/(&PartialD; v)) +%% +%% Then the generated normal n is n= m/(||m||) +%% +%% If automatic normal generation is disabled, the corresponding normal map `?GL_MAP2_NORMAL' +%% , if enabled, is used to produce a normal. If neither automatic normal generation nor +%% a normal map is enabled, no normal is generated for ``gl:evalCoord2'' commands. +%% +%% See external documentation. +-spec evalCoord1d(U) -> ok when U :: float(). +evalCoord1d(U) -> + cast(5292, <>). -%% @spec (X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec vertex2d(float(),float()) -> ok. -vertex2d(X,Y) -> - cast(5300, <>). +%% @doc +%% See {@link evalCoord1d/1} +-spec evalCoord1f(U) -> ok when U :: float(). +evalCoord1f(U) -> + cast(5293, <>). -%% @spec ({X,Y}) -> ok -%% @equiv vertex2d(X,Y) --spec vertex2dv({float(),float()}) -> ok. -vertex2dv({X,Y}) -> vertex2d(X,Y). +%% @equiv evalCoord1d(U) +-spec evalCoord1dv(U) -> ok when U :: {U :: float()}. +evalCoord1dv({U}) -> evalCoord1d(U). -%% @spec (X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec vertex2f(float(),float()) -> ok. -vertex2f(X,Y) -> - cast(5301, <>). +%% @equiv evalCoord1f(U) +-spec evalCoord1fv(U) -> ok when U :: {U :: float()}. +evalCoord1fv({U}) -> evalCoord1f(U). -%% @spec ({X,Y}) -> ok -%% @equiv vertex2f(X,Y) --spec vertex2fv({float(),float()}) -> ok. -vertex2fv({X,Y}) -> vertex2f(X,Y). +%% @doc +%% See {@link evalCoord1d/1} +-spec evalCoord2d(U, V) -> ok when U :: float(),V :: float(). +evalCoord2d(U,V) -> + cast(5294, <>). -%% @spec (X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec vertex2i(integer(),integer()) -> ok. -vertex2i(X,Y) -> - cast(5302, <>). +%% @doc +%% See {@link evalCoord1d/1} +-spec evalCoord2f(U, V) -> ok when U :: float(),V :: float(). +evalCoord2f(U,V) -> + cast(5295, <>). -%% @spec ({X,Y}) -> ok -%% @equiv vertex2i(X,Y) --spec vertex2iv({integer(),integer()}) -> ok. -vertex2iv({X,Y}) -> vertex2i(X,Y). +%% @equiv evalCoord2d(U,V) +-spec evalCoord2dv(U) -> ok when U :: {U :: float(),V :: float()}. +evalCoord2dv({U,V}) -> evalCoord2d(U,V). -%% @spec (X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec vertex2s(integer(),integer()) -> ok. -vertex2s(X,Y) -> - cast(5303, <>). +%% @equiv evalCoord2f(U,V) +-spec evalCoord2fv(U) -> ok when U :: {U :: float(),V :: float()}. +evalCoord2fv({U,V}) -> evalCoord2f(U,V). -%% @spec ({X,Y}) -> ok -%% @equiv vertex2s(X,Y) --spec vertex2sv({integer(),integer()}) -> ok. -vertex2sv({X,Y}) -> vertex2s(X,Y). +%% @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} . +%% +%% ``gl:mapGrid1'' and ``gl:mapGrid2'' specify the linear grid mappings between the i +%% (or i and j) integer grid coordinates, to the u (or u and v) floating-point +%% evaluation map coordinates. See {@link gl:map1d/6} and {@link gl:map1d/6} for details of how +%% u and v coordinates are evaluated. +%% +%% ``gl:mapGrid1'' specifies a single linear mapping such that integer grid coordinate +%% 0 maps exactly to `U1' , and integer grid coordinate `Un' maps exactly to `U2' +%% . All other integer grid coordinates i are mapped so that +%% +%% u= i(u2-u1)/un+u1 +%% +%% ``gl:mapGrid2'' specifies two such linear mappings. One maps integer grid coordinate +%% i= 0 exactly to `U1' , and integer grid coordinate i= un exactly to `U2' . The +%% other maps integer grid coordinate j= 0 exactly to `V1' , and integer grid coordinate +%% j= vn exactly to `V2' . Other integer grid coordinates i and j are mapped such +%% that +%% +%% u= i(u2-u1)/un+u1 +%% +%% v= j(v2-v1)/vn+v1 +%% +%% The mappings specified by ``gl:mapGrid'' are used identically by {@link gl:evalMesh1/3} +%% and {@link gl:evalPoint1/1} . +%% +%% See external documentation. +-spec mapGrid1d(Un, U1, U2) -> ok when Un :: integer(),U1 :: float(),U2 :: float(). +mapGrid1d(Un,U1,U2) -> + cast(5296, <>). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec vertex3d(float(),float(),float()) -> ok. -vertex3d(X,Y,Z) -> - cast(5304, <>). +%% @doc +%% See {@link mapGrid1d/3} +-spec mapGrid1f(Un, U1, U2) -> ok when Un :: integer(),U1 :: float(),U2 :: float(). +mapGrid1f(Un,U1,U2) -> + cast(5297, <>). -%% @spec ({X,Y,Z}) -> ok -%% @equiv vertex3d(X,Y,Z) --spec vertex3dv({float(),float(),float()}) -> ok. -vertex3dv({X,Y,Z}) -> vertex3d(X,Y,Z). +%% @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, <>). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec vertex3f(float(),float(),float()) -> ok. -vertex3f(X,Y,Z) -> - cast(5305, <>). +%% @doc +%% See {@link mapGrid1d/3} +-spec mapGrid2f(Un, U1, U2, Vn, V1, V2) -> ok when Un :: integer(),U1 :: float(),U2 :: float(),Vn :: integer(),V1 :: float(),V2 :: float(). +mapGrid2f(Un,U1,U2,Vn,V1,V2) -> + cast(5299, <>). -%% @spec ({X,Y,Z}) -> ok -%% @equiv vertex3f(X,Y,Z) --spec vertex3fv({float(),float(),float()}) -> ok. -vertex3fv({X,Y,Z}) -> vertex3f(X,Y,Z). +%% @doc Generate and evaluate a single point in a mesh +%% +%% {@link gl:mapGrid1d/3} and {@link gl:evalMesh1/3} are used in tandem to efficiently generate +%% and evaluate a series of evenly spaced map domain values. ``gl:evalPoint'' can be used +%% to evaluate a single grid point in the same gridspace that is traversed by {@link gl:evalMesh1/3} +%% . Calling ``gl:evalPoint1'' is equivalent to calling glEvalCoord1( i.&Delta; u+u +%% 1 ); where &Delta; u=(u 2-u 1)/n +%% +%% and n, u 1, and u 2 are the arguments to the most recent {@link gl:mapGrid1d/3} command. +%% The one absolute numeric requirement is that if i= n, then the value computed from i.&Delta; +%% u+u 1 is exactly u 2. +%% +%% In the two-dimensional case, ``gl:evalPoint2'', let +%% +%% &Delta; u=(u 2-u 1)/n +%% +%% &Delta; v=(v 2-v 1)/m +%% +%% where n, u 1, u 2, m, v 1, and v 2 are the arguments to the most recent {@link gl:mapGrid1d/3} +%% command. Then the ``gl:evalPoint2'' command is equivalent to calling glEvalCoord2( i. +%% &Delta; u+u 1, j.&Delta; v+v 1 ); The only absolute numeric requirements are +%% that if i= n, then the value computed from i.&Delta; u+u 1 is exactly u 2, and +%% if j= m, then the value computed from j.&Delta; v+v 1 is exactly v 2. +%% +%% See external documentation. +-spec evalPoint1(I) -> ok when I :: integer(). +evalPoint1(I) -> + cast(5300, <>). -%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec vertex3i(integer(),integer(),integer()) -> ok. -vertex3i(X,Y,Z) -> - cast(5306, <>). +%% @doc +%% See {@link evalPoint1/1} +-spec evalPoint2(I, J) -> ok when I :: integer(),J :: integer(). +evalPoint2(I,J) -> + cast(5301, <>). -%% @spec ({X,Y,Z}) -> ok -%% @equiv vertex3i(X,Y,Z) --spec vertex3iv({integer(),integer(),integer()}) -> ok. -vertex3iv({X,Y,Z}) -> vertex3i(X,Y,Z). +%% @doc Compute a one- or two-dimensional grid of points or lines +%% +%% {@link gl:mapGrid1d/3} and ``gl:evalMesh'' are used in tandem to efficiently generate and +%% evaluate a series of evenly-spaced map domain values. ``gl:evalMesh'' 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} . `Mode' determines +%% whether the resulting vertices are connected as points, lines, or filled polygons. +%% +%% In the one-dimensional case, ``gl:evalMesh1'', the mesh is generated as if the following +%% code fragment were executed: +%% +%% glBegin( `Type' ); for ( i = `I1' ; i <= `I2' ; i += 1 ) glEvalCoord1( +%% i.&Delta; u+u 1 ); glEnd(); where +%% +%% &Delta; u=(u 2-u 1)/n +%% +%% and n, u 1, and u 2 are the arguments to the most recent {@link gl:mapGrid1d/3} command. +%% `type' is `?GL_POINTS' if `Mode' is `?GL_POINT', or `?GL_LINES' +%% if `Mode' is `?GL_LINE'. +%% +%% The one absolute numeric requirement is that if i= n, then the value computed from i. +%% &Delta; u+u 1 is exactly u 2. +%% +%% In the two-dimensional case, ``gl:evalMesh2'', let .cp &Delta; u=(u 2-u 1)/n +%% +%% &Delta; v=(v 2-v 1)/m +%% +%% where n, u 1, u 2, m, v 1, and v 2 are the arguments to the most recent {@link gl:mapGrid1d/3} +%% command. Then, if `Mode' is `?GL_FILL', the ``gl:evalMesh2'' command is equivalent +%% to: +%% +%% for ( j = `J1' ; j < `J2' ; j += 1 ) { glBegin( GL_QUAD_STRIP ); for ( i = `I1' +%% ; i <= `I2' ; i += 1 ) { glEvalCoord2( i.&Delta; u+u 1, j.&Delta; v+v 1 +%% ); glEvalCoord2( i.&Delta; u+u 1,(j+1).&Delta; v+v 1 ); } glEnd(); } +%% +%% If `Mode' is `?GL_LINE', then a call to ``gl:evalMesh2'' is equivalent to: +%% +%% for ( j = `J1' ; j <= `J2' ; j += 1 ) { glBegin( GL_LINE_STRIP ); for ( i = `I1' +%% ; i <= `I2' ; i += 1 ) glEvalCoord2( i.&Delta; u+u 1, j.&Delta; v+v 1 +%% ); glEnd(); } for ( i = `I1' ; i <= `I2' ; i += 1 ) { glBegin( GL_LINE_STRIP +%% ); for ( j = `J1' ; j <= `J1' ; j += 1 ) glEvalCoord2( i.&Delta; u+u 1, j. +%% &Delta; v+v 1 ); glEnd(); } +%% +%% And finally, if `Mode' is `?GL_POINT', then a call to ``gl:evalMesh2'' is +%% equivalent to: +%% +%% glBegin( GL_POINTS ); for ( j = `J1' ; j <= `J2' ; j += 1 ) for ( i = `I1' +%% ; i <= `I2' ; i += 1 ) glEvalCoord2( i.&Delta; u+u 1, j.&Delta; v+v 1 +%% ); glEnd(); +%% +%% In all three cases, the only absolute numeric requirements are that if i= n, then the +%% value computed from i.&Delta; u+u 1 is exactly u 2, and if j= m, then the value +%% computed from j.&Delta; v+v 1 is exactly v 2. +%% +%% See external documentation. +-spec evalMesh1(Mode, I1, I2) -> ok when Mode :: enum(),I1 :: integer(),I2 :: integer(). +evalMesh1(Mode,I1,I2) -> + cast(5302, <>). -%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec vertex3s(integer(),integer(),integer()) -> ok. -vertex3s(X,Y,Z) -> - cast(5307, <>). +%% @doc +%% See {@link evalMesh1/3} +-spec evalMesh2(Mode, I1, I2, J1, J2) -> ok when Mode :: enum(),I1 :: integer(),I2 :: integer(),J1 :: integer(),J2 :: integer(). +evalMesh2(Mode,I1,I2,J1,J2) -> + cast(5303, <>). -%% @spec ({X,Y,Z}) -> ok -%% @equiv vertex3s(X,Y,Z) --spec vertex3sv({integer(),integer(),integer()}) -> ok. -vertex3sv({X,Y,Z}) -> vertex3s(X,Y,Z). +%% @doc Specify fog parameters +%% +%% Fog is initially disabled. While enabled, fog affects rasterized geometry, bitmaps, and +%% pixel blocks, but not buffer clear operations. To enable and disable fog, call {@link gl:enable/1} +%% and {@link gl:enable/1} with argument `?GL_FOG'. +%% +%% ``gl:fog'' assigns the value or values in `Params' to the fog parameter specified +%% by `Pname' . The following values are accepted for `Pname' : +%% +%% `?GL_FOG_MODE': `Params' is a single integer or floating-point value that specifies +%% the equation to be used to compute the fog blend factor, f. Three symbolic constants +%% are accepted: `?GL_LINEAR', `?GL_EXP', and `?GL_EXP2'. The equations corresponding +%% to these symbolic constants are defined below. The initial fog mode is `?GL_EXP'. +%% +%% `?GL_FOG_DENSITY': `Params' is a single integer or floating-point value that +%% specifies density, the fog density used in both exponential fog equations. Only nonnegative +%% densities are accepted. The initial fog density is 1. +%% +%% `?GL_FOG_START': `Params' is a single integer or floating-point value that specifies +%% start, the near distance used in the linear fog equation. The initial near distance +%% is 0. +%% +%% `?GL_FOG_END': `Params' is a single integer or floating-point value that specifies +%% end, the far distance used in the linear fog equation. The initial far distance is 1. +%% +%% `?GL_FOG_INDEX': `Params' is a single integer or floating-point value that specifies +%% i f, the fog color index. The initial fog index is 0. +%% +%% `?GL_FOG_COLOR': `Params' contains four integer or floating-point values that +%% specify C f, the fog color. Integer values are mapped linearly such that the most positive +%% representable value maps to 1.0, and the most negative representable value maps to -1.0. +%% Floating-point values are mapped directly. After conversion, all color components are +%% clamped to the range [0 1]. The initial fog color is (0, 0, 0, 0). +%% +%% `?GL_FOG_COORD_SRC': `Params' contains either of the following symbolic constants: +%% `?GL_FOG_COORD' or `?GL_FRAGMENT_DEPTH'. `?GL_FOG_COORD' specifies that +%% the current fog coordinate should be used as distance value in the fog color computation. +%% `?GL_FRAGMENT_DEPTH' specifies that the current fragment depth should be used as +%% distance value in the fog computation. +%% +%% Fog blends a fog color with each rasterized pixel fragment's post-texturing color using +%% a blending factor f. Factor f is computed in one of three ways, depending on the fog +%% mode. Let c be either the distance in eye coordinate from the origin (in the case that +%% the `?GL_FOG_COORD_SRC' is `?GL_FRAGMENT_DEPTH') or the current fog coordinate +%% (in the case that `?GL_FOG_COORD_SRC' is `?GL_FOG_COORD'). The equation for `?GL_LINEAR' +%% fog is f=(end-c)/(end-start) +%% +%% The equation for `?GL_EXP' fog is f= e(-(density. c)) +%% +%% The equation for `?GL_EXP2' fog is f= e(-(density. c)) 2 +%% +%% Regardless of the fog mode, f is clamped to the range [0 1] after it is computed. Then, +%% if the GL is in RGBA color mode, the fragment's red, green, and blue colors, represented +%% by C r, are replaced by +%% +%% (C r)"= f*C r+(1-f)*C f +%% +%% Fog does not affect a fragment's alpha component. +%% +%% In color index mode, the fragment's color index i r is replaced by +%% +%% (i r)"= i r+(1-f)*i f +%% +%% +%% +%% See external documentation. +-spec fogf(Pname, Param) -> ok when Pname :: enum(),Param :: float(). +fogf(Pname,Param) -> + cast(5304, <>). -%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec vertex4d(float(),float(),float(),float()) -> ok. -vertex4d(X,Y,Z,W) -> - cast(5308, <>). +%% @doc +%% See {@link fogf/2} +-spec fogi(Pname, Param) -> ok when Pname :: enum(),Param :: integer(). +fogi(Pname,Param) -> + cast(5305, <>). -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv vertex4d(X,Y,Z,W) --spec vertex4dv({float(),float(),float(),float()}) -> ok. -vertex4dv({X,Y,Z,W}) -> vertex4d(X,Y,Z,W). +%% @doc +%% See {@link fogf/2} +-spec fogfv(Pname, Params) -> ok when Pname :: enum(),Params :: {float()}. +fogfv(Pname,Params) -> + cast(5306, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). -%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec vertex4f(float(),float(),float(),float()) -> ok. -vertex4f(X,Y,Z,W) -> - cast(5309, <>). +%% @doc +%% See {@link fogf/2} +-spec fogiv(Pname, Params) -> ok when Pname :: enum(),Params :: {integer()}. +fogiv(Pname,Params) -> + cast(5307, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv vertex4f(X,Y,Z,W) --spec vertex4fv({float(),float(),float(),float()}) -> ok. -vertex4fv({X,Y,Z,W}) -> vertex4f(X,Y,Z,W). +%% @doc Controls feedback mode +%% +%% The ``gl:feedbackBuffer'' function controls feedback. Feedback, like selection, is +%% a GL mode. The mode is selected by calling {@link gl:renderMode/1} with `?GL_FEEDBACK'. +%% When the GL is in feedback mode, no pixels are produced by rasterization. Instead, information +%% about primitives that would have been rasterized is fed back to the application using +%% the GL. +%% +%% ``gl:feedbackBuffer'' has three arguments: `Buffer' is a pointer to an array of +%% floating-point values into which feedback information is placed. `Size' indicates +%% the size of the array. `Type' is a symbolic constant describing the information that +%% is fed back for each vertex. ``gl:feedbackBuffer'' must be issued before feedback mode +%% is enabled (by calling {@link gl:renderMode/1} with argument `?GL_FEEDBACK'). Setting +%% `?GL_FEEDBACK' without establishing the feedback buffer, or calling ``gl:feedbackBuffer'' +%% while the GL is in feedback mode, is an error. +%% +%% When {@link gl:renderMode/1} is called while in feedback mode, it returns the number of +%% entries placed in the feedback array and resets the feedback array pointer to the base +%% of the feedback buffer. The returned value never exceeds `Size' . If the feedback +%% data required more room than was available in `Buffer' , {@link gl:renderMode/1} returns +%% a negative value. To take the GL out of feedback mode, call {@link gl:renderMode/1} with +%% a parameter value other than `?GL_FEEDBACK'. +%% +%% While in feedback mode, each primitive, bitmap, or pixel rectangle that would be rasterized +%% generates a block of values that are copied into the feedback array. If doing so would +%% cause the number of entries to exceed the maximum, the block is partially written so as +%% to fill the array (if there is any room left at all), and an overflow flag is set. Each +%% block begins with a code indicating the primitive type, followed by values that describe +%% the primitive's vertices and associated data. Entries are also written for bitmaps and +%% pixel rectangles. Feedback occurs after polygon culling and {@link gl:polygonMode/2} interpretation +%% of polygons has taken place, so polygons that are culled are not returned in the feedback +%% buffer. It can also occur after polygons with more than three edges are broken up into +%% triangles, if the GL implementation renders polygons by performing this decomposition. +%% +%% The {@link gl:passThrough/1} command can be used to insert a marker into the feedback +%% buffer. See {@link gl:passThrough/1} . +%% +%% Following is the grammar for the blocks of values written into the feedback buffer. Each +%% primitive is indicated with a unique identifying value followed by some number of vertices. +%% Polygon entries include an integer value indicating how many vertices follow. A vertex +%% is fed back as some number of floating-point values, as determined by `Type' . Colors +%% are fed back as four values in RGBA mode and one value in color index mode. +%% +%% feedbackList feedbackItem feedbackList | feedbackItem +%% +%% feedbackItem point | lineSegment | polygon | bitmap | pixelRectangle | passThru +%% +%% point `?GL_POINT_TOKEN' vertex +%% +%% lineSegment `?GL_LINE_TOKEN' vertex vertex | `?GL_LINE_RESET_TOKEN' vertex +%% vertex +%% +%% polygon `?GL_POLYGON_TOKEN' n polySpec +%% +%% polySpec polySpec vertex | vertex vertex vertex +%% +%% bitmap `?GL_BITMAP_TOKEN' vertex +%% +%% pixelRectangle `?GL_DRAW_PIXEL_TOKEN' vertex | `?GL_COPY_PIXEL_TOKEN' vertex +%% +%% passThru `?GL_PASS_THROUGH_TOKEN' value +%% +%% vertex 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture +%% +%% 2d value value +%% +%% 3d value value value +%% +%% 3dColor value value value color +%% +%% 3dColorTexture value value value color tex +%% +%% 4dColorTexture value value value value color tex +%% +%% color rgba | index +%% +%% rgba value value value value +%% +%% index value +%% +%% tex value value value value +%% +%% `value' is a floating-point number, and `n' is a floating-point integer giving +%% the number of vertices in the polygon. `?GL_POINT_TOKEN', `?GL_LINE_TOKEN', `?GL_LINE_RESET_TOKEN' +%% , `?GL_POLYGON_TOKEN', `?GL_BITMAP_TOKEN', `?GL_DRAW_PIXEL_TOKEN', `?GL_COPY_PIXEL_TOKEN' +%% and `?GL_PASS_THROUGH_TOKEN' are symbolic floating-point constants. `?GL_LINE_RESET_TOKEN' +%% is returned whenever the line stipple pattern is reset. The data returned as a vertex +%% depends on the feedback `Type' . +%% +%% The following table gives the correspondence between `Type' and the number of values +%% per vertex. `k' is 1 in color index mode and 4 in RGBA mode. +%% +%% +%% +%%
` Type '` Coordinates '` Color '` Texture '` Total Number of Values '
+%% `?GL_2D'`x', `y' 2
`?GL_3D' +%% `x', `y', `z' 3
`?GL_3D_COLOR' +%% `x', `y', `z' k 3+k
`?GL_3D_COLOR_TEXTURE' +%% `x', `y', `z' k 4 7+k
+%% `?GL_4D_COLOR_TEXTURE'`x', `y', `z', `w' k 4 8+k
+%% +%% Feedback vertex coordinates are in window coordinates, except `w', which is in clip +%% coordinates. Feedback colors are lighted, if lighting is enabled. Feedback texture coordinates +%% are generated, if texture coordinate generation is enabled. They are always transformed +%% by the texture matrix. +%% +%% See external documentation. +-spec feedbackBuffer(Size, Type, Buffer) -> ok when Size :: integer(),Type :: enum(),Buffer :: mem(). +feedbackBuffer(Size,Type,Buffer) -> + send_bin(Buffer), + call(5308, <>). -%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec vertex4i(integer(),integer(),integer(),integer()) -> ok. -vertex4i(X,Y,Z,W) -> - cast(5310, <>). +%% @doc Place a marker in the feedback buffer +%% +%% Feedback is a GL render mode. The mode is selected by calling {@link gl:renderMode/1} +%% with `?GL_FEEDBACK'. When the GL is in feedback mode, no pixels are produced by rasterization. +%% Instead, information about primitives that would have been rasterized is fed back to the +%% application using the GL. See the {@link gl:feedbackBuffer/3} reference page for a description +%% of the feedback buffer and the values in it. +%% +%% ``gl:passThrough'' inserts a user-defined marker in the feedback buffer when it is executed +%% in feedback mode. `Token' is returned as if it were a primitive; it is indicated +%% with its own unique identifying value: `?GL_PASS_THROUGH_TOKEN'. The order of ``gl:passThrough'' +%% commands with respect to the specification of graphics primitives is maintained. +%% +%% See external documentation. +-spec passThrough(Token) -> ok when Token :: float(). +passThrough(Token) -> + cast(5309, <>). -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv vertex4i(X,Y,Z,W) --spec vertex4iv({integer(),integer(),integer(),integer()}) -> ok. -vertex4iv({X,Y,Z,W}) -> vertex4i(X,Y,Z,W). +%% @doc Establish a buffer for selection mode values +%% +%% ``gl:selectBuffer'' has two arguments: `Buffer' is a pointer to an array of unsigned +%% integers, and `Size' indicates the size of the array. `Buffer' returns values +%% from the name stack (see {@link gl:initNames/0} , {@link gl:loadName/1} , {@link gl:pushName/1} ) +%% when the rendering mode is `?GL_SELECT' (see {@link gl:renderMode/1} ). ``gl:selectBuffer'' +%% must be issued before selection mode is enabled, and it must not be issued while the +%% rendering mode is `?GL_SELECT'. +%% +%% A programmer can use selection to determine which primitives are drawn into some region +%% of a window. The region is defined by the current modelview and perspective matrices. +%% +%% In selection mode, no pixel fragments are produced from rasterization. Instead, if a +%% primitive or a raster position intersects the clipping volume defined by the viewing frustum +%% and the user-defined clipping planes, this primitive causes a selection hit. (With polygons, +%% no hit occurs if the polygon is culled.) When a change is made to the name stack, or when +%% {@link gl:renderMode/1} is called, a hit record is copied to `Buffer' if any hits +%% have occurred since the last such event (name stack change or {@link gl:renderMode/1} call). +%% The hit record consists of the number of names in the name stack at the time of the event, +%% followed by the minimum and maximum depth values of all vertices that hit since the previous +%% event, followed by the name stack contents, bottom name first. +%% +%% Depth values (which are in the range [0,1]) are multiplied by 2 32-1, before being +%% placed in the hit record. +%% +%% An internal index into `Buffer' is reset to 0 whenever selection mode is entered. +%% Each time a hit record is copied into `Buffer' , the index is incremented to point +%% to the cell just past the end of the block of names(emthat is, to the next available cell +%% If the hit record is larger than the number of remaining locations in `Buffer' , as +%% much data as can fit is copied, and the overflow flag is set. If the name stack is empty +%% when a hit record is copied, that record consists of 0 followed by the minimum and maximum +%% depth values. +%% +%% To exit selection mode, call {@link gl:renderMode/1} with an argument other than `?GL_SELECT' +%% . Whenever {@link gl:renderMode/1} is called while the render mode is `?GL_SELECT', +%% it returns the number of hit records copied to `Buffer' , resets the overflow flag +%% and the selection buffer pointer, and initializes the name stack to be empty. If the overflow +%% bit was set when {@link gl:renderMode/1} was called, a negative hit record count is returned. +%% +%% +%% See external documentation. +-spec selectBuffer(Size, Buffer) -> ok when Size :: integer(),Buffer :: mem(). +selectBuffer(Size,Buffer) -> + send_bin(Buffer), + call(5310, <>). -%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec vertex4s(integer(),integer(),integer(),integer()) -> ok. -vertex4s(X,Y,Z,W) -> - cast(5311, <>). +%% @doc Initialize the name stack +%% +%% The name stack is used during selection mode to allow sets of rendering commands to be +%% uniquely identified. It consists of an ordered set of unsigned integers. ``gl:initNames'' +%% causes the name stack to be initialized to its default empty state. +%% +%% The name stack is always empty while the render mode is not `?GL_SELECT'. Calls to ``gl:initNames'' +%% while the render mode is not `?GL_SELECT' are ignored. +%% +%% See external documentation. +-spec initNames() -> ok. +initNames() -> + cast(5311, <<>>). -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv vertex4s(X,Y,Z,W) --spec vertex4sv({integer(),integer(),integer(),integer()}) -> ok. -vertex4sv({X,Y,Z,W}) -> vertex4s(X,Y,Z,W). +%% @doc Load a name onto the name stack +%% +%% The name stack is used during selection mode to allow sets of rendering commands to be +%% uniquely identified. It consists of an ordered set of unsigned integers and is initially +%% empty. +%% +%% ``gl:loadName'' causes `Name' to replace the value on the top of the name stack. +%% +%% The name stack is always empty while the render mode is not `?GL_SELECT'. Calls to ``gl:loadName'' +%% while the render mode is not `?GL_SELECT' are ignored. +%% +%% See external documentation. +-spec loadName(Name) -> ok when Name :: integer(). +loadName(Name) -> + cast(5312, <>). -%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec vertexPointer(integer(),enum(),integer(),offset()|mem()) -> ok. -vertexPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) -> - cast(5312, <>); -vertexPointer(Size,Type,Stride,Pointer) -> - send_bin(Pointer), - cast(5313, <>). +%% @doc Push and pop the name stack +%% +%% The name stack is used during selection mode to allow sets of rendering commands to be +%% uniquely identified. It consists of an ordered set of unsigned integers and is initially +%% empty. +%% +%% ``gl:pushName'' causes `Name' to be pushed onto the name stack. {@link gl:pushName/1} +%% pops one name off the top of the stack. +%% +%% The maximum name stack depth is implementation-dependent; call `?GL_MAX_NAME_STACK_DEPTH' +%% to find out the value for a particular implementation. It is an error to push a name +%% onto a full stack or to pop a name off an empty stack. It is also an error to manipulate +%% the name stack between the execution of {@link gl:'begin'/1} and the corresponding execution +%% of {@link gl:'begin'/1} . In any of these cases, the error flag is set and no other change is +%% made to GL state. +%% +%% The name stack is always empty while the render mode is not `?GL_SELECT'. Calls to ``gl:pushName'' +%% or {@link gl:pushName/1} while the render mode is not `?GL_SELECT' are ignored. +%% +%% See external documentation. +-spec pushName(Name) -> ok when Name :: integer(). +pushName(Name) -> + cast(5313, <>). -%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok -%% @doc See external documentation. --spec viewport(integer(),integer(),integer(),integer()) -> ok. -viewport(X,Y,Width,Height) -> - cast(5314, <>). +%% @doc +%% See {@link pushName/1} +-spec popName() -> ok. +popName() -> + cast(5314, <<>>). -%% @spec (Red::clamp(),Green::clamp(),Blue::clamp(),Alpha::clamp()) -> ok -%% @doc See external documentation. --spec blendColor(clamp(),clamp(),clamp(),clamp()) -> ok. +%% @doc Set the blend color +%% +%% The `?GL_BLEND_COLOR' may be used to calculate the source and destination blending +%% factors. The color components are clamped to the range [0 1] before being stored. See {@link gl:blendFunc/2} +%% for a complete description of the blending operations. Initially the `?GL_BLEND_COLOR' +%% is set to (0, 0, 0, 0). +%% +%% See external documentation. +-spec blendColor(Red, Green, Blue, Alpha) -> ok when Red :: clamp(),Green :: clamp(),Blue :: clamp(),Alpha :: clamp(). blendColor(Red,Green,Blue,Alpha) -> cast(5315, <>). -%% @spec (Mode::enum()) -> ok -%% @doc See external documentation. --spec blendEquation(enum()) -> ok. +%% @doc Specify the equation used for both the RGB blend equation and the Alpha blend equation +%% +%% The blend equations determine how a new pixel (the ''source'' color) is combined with +%% a pixel already in the framebuffer (the ''destination'' color). This function sets both +%% the RGB blend equation and the alpha blend equation to a single equation. ``gl:blendEquationi'' +%% specifies the blend equation for a single draw buffer whereas ``gl:blendEquation'' +%% sets the blend equation for all draw buffers. +%% +%% These equations use the source and destination blend factors specified by either {@link gl:blendFunc/2} +%% or {@link gl:blendFuncSeparate/4} . See {@link gl:blendFunc/2} or {@link gl:blendFuncSeparate/4} +%% for a description of the various blend factors. +%% +%% In the equations that follow, source and destination color components are referred to +%% as (R s G s B s A s) and (R d G d B d A d), respectively. The result color is referred to as (R r G r B r A r). The source and destination +%% blend factors are denoted (s R s G s B s A) and (d R d G d B d A), respectively. For these equations all color components +%% are understood to have values in the range [0 1]. +%%
` Mode ' +%% ` RGB Components '` Alpha Component '
`?GL_FUNC_ADD' +%% Rr= R s s R+R d d R Gr= G s s G+G d d G Br= B s s B+B d d B Ar= +%% A s s A+A d d A
`?GL_FUNC_SUBTRACT' Rr= R s s R-R d d +%% R Gr= G s s G-G d d G Br= B s s B-B d d B Ar= A s s A-A d d A
`?GL_FUNC_REVERSE_SUBTRACT' Rr= R d d R-R s s R Gr= G d d G-G s s G +%% Br= B d d B-B s s B Ar= A d d A-A s s A
`?GL_MIN' +%% Rr= min(R s R d) Gr= min(G s G d) Br= min(B s B d) Ar= min(A s A d)
`?GL_MAX' Rr= +%% max(R s R d) Gr= max(G s G d) Br= max(B s B d) Ar= max(A s A d)
+%% +%% The results of these equations are clamped to the range [0 1]. +%% +%% The `?GL_MIN' and `?GL_MAX' equations are useful for applications that analyze +%% image data (image thresholding against a constant color, for example). The `?GL_FUNC_ADD' +%% equation is useful for antialiasing and transparency, among other things. +%% +%% Initially, both the RGB blend equation and the alpha blend equation are set to `?GL_FUNC_ADD' +%% . +%% +%% +%% +%% See external documentation. +-spec blendEquation(Mode) -> ok when Mode :: enum(). blendEquation(Mode) -> cast(5316, <>). -%% @spec (Mode::enum(),Start::integer(),End::integer(),Count::integer(),Type::enum(),Indices::offset()|mem()) -> ok -%% @doc See external documentation. --spec drawRangeElements(enum(),integer(),integer(),integer(),enum(),offset()|mem()) -> ok. +%% @doc Render primitives from array data +%% +%% ``gl:drawRangeElements'' is a restricted form of {@link gl:drawElements/4} . `Mode' , +%% `Start' , `End' , and `Count' match the corresponding arguments to {@link gl:drawElements/4} +%% , with the additional constraint that all values in the arrays `Count' must lie between +%% `Start' and `End' , inclusive. +%% +%% Implementations denote recommended maximum amounts of vertex and index data, which may +%% be queried by calling {@link gl:getBooleanv/1} with argument `?GL_MAX_ELEMENTS_VERTICES' and `?GL_MAX_ELEMENTS_INDICES' +%% . If end-start+1 is greater than the value of `?GL_MAX_ELEMENTS_VERTICES', or if `Count' +%% is greater than the value of `?GL_MAX_ELEMENTS_INDICES', then the call may operate +%% at reduced performance. There is no requirement that all vertices in the range [start end] be referenced. +%% However, the implementation may partially process unused vertices, reducing performance +%% from what could be achieved with an optimal index set. +%% +%% When ``gl:drawRangeElements'' is called, it uses `Count' sequential elements from +%% an enabled array, starting at `Start' to construct a sequence of geometric primitives. +%% `Mode' specifies what kind of primitives are constructed, and how the array elements +%% construct these primitives. If more than one array is enabled, each is used. +%% +%% Vertex attributes that are modified by ``gl:drawRangeElements'' have an unspecified +%% value after ``gl:drawRangeElements'' returns. Attributes that aren't modified maintain +%% their previous values. +%% +%% See external documentation. +-spec drawRangeElements(Mode, Start, End, Count, Type, Indices) -> ok when Mode :: enum(),Start :: integer(),End :: integer(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(). drawRangeElements(Mode,Start,End,Count,Type,Indices) when is_integer(Indices) -> cast(5317, <>); drawRangeElements(Mode,Start,End,Count,Type,Indices) -> send_bin(Indices), cast(5318, <>). -%% @spec (Target::enum(),Level::integer(),Internalformat::integer(),Width::integer(),Height::integer(),Depth::integer(),Border::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok -%% @doc See external documentation. --spec texImage3D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok. -texImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,Format,Type,Pixels) when is_integer(Pixels) -> - cast(5319, <>); -texImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,Format,Type,Pixels) -> +%% @doc Specify a three-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 three-dimensional texturing, call {@link gl:enable/1} +%% and {@link gl:enable/1} with argument `?GL_TEXTURE_3D'. +%% +%% To define texture images, call ``gl:texImage3D''. The arguments describe the parameters +%% of the texture image, such as height, width, depth, width of the border, level-of-detail +%% number (see {@link gl:texParameterf/3} ), and number of color components provided. The last +%% three arguments describe how the image is represented in memory. +%% +%% If `Target' is `?GL_PROXY_TEXTURE_3D', no data is read from `Data' , but +%% all of the texture image state is recalculated, checked for consistency, and checked against +%% the implementation's capabilities. If the implementation cannot handle a texture of the +%% requested texture size, it sets all of the image state to 0, but does not generate an +%% error (see {@link gl:getError/0} ). To query for an entire mipmap array, use an image array +%% level greater than or equal to 1. +%% +%% If `Target' is `?GL_TEXTURE_3D', data is read from `Data' as a sequence +%% of signed or unsigned bytes, shorts, or longs, or single-precision floating-point values, +%% depending on `Type' . These values are grouped into sets of one, two, three, or four +%% values, depending on `Format' , to form elements. Each data byte is treated as eight +%% 1-bit elements, with bit ordering determined by `?GL_UNPACK_LSB_FIRST' (see {@link gl:pixelStoref/2} +%% ). +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% The first element corresponds to the lower left corner of the texture image. Subsequent +%% elements progress left-to-right through the remaining texels in the lowest row of the +%% texture image, and then in successively higher rows of the texture image. The final element +%% corresponds to the upper right corner of the texture image. +%% +%% `Format' determines the composition of each element in `Data' . It can assume +%% one of these symbolic values: +%% +%% `?GL_RED': Each element is a single red component. The GL converts it to floating +%% point and assembles it into an RGBA element by attaching 0 for green and blue, and 1 for +%% alpha. Each component is then multiplied by the signed scale factor `?GL_c_SCALE', +%% added to the signed bias `?GL_c_BIAS', and clamped to the range [0,1]. +%% +%% `?GL_RG': Each element is a red and green pair. The GL converts each to floating +%% point and assembles it into an RGBA element by attaching 0 for blue, and 1 for alpha. +%% Each component is then multiplied by the signed scale factor `?GL_c_SCALE', added +%% to the signed bias `?GL_c_BIAS', and clamped to the range [0,1]. +%% +%% `?GL_RGB' +%% +%% `?GL_BGR': Each element is an RGB triple. The GL converts it to floating point and +%% assembles it into an RGBA element by attaching 1 for alpha. Each component is then multiplied +%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS', +%% and clamped to the range [0,1]. +%% +%% `?GL_RGBA' +%% +%% `?GL_BGRA': Each element contains all four components. Each component is multiplied +%% by the signed scale factor `?GL_c_SCALE', added to the signed bias `?GL_c_BIAS', +%% and clamped to the range [0,1]. +%% +%% If an application wants to store the texture at a certain resolution or in a certain +%% format, it can request the resolution and format with `InternalFormat' . The GL will +%% choose an internal representation that closely approximates that requested by `InternalFormat' +%% , but it may not match exactly. (The representations specified by `?GL_RED', `?GL_RG' +%% , `?GL_RGB', and `?GL_RGBA' must match exactly.) +%% +%% `InternalFormat' may be one of the base internal formats shown in Table 1, below +%% +%% `InternalFormat' may also be one of the sized internal formats shown in Table 2, +%% below +%% +%% Finally, `InternalFormat' may also be one of the generic or compressed compressed +%% texture formats shown in Table 3 below +%% +%% If the `InternalFormat' parameter is one of the generic compressed formats, `?GL_COMPRESSED_RED' +%% , `?GL_COMPRESSED_RG', `?GL_COMPRESSED_RGB', or `?GL_COMPRESSED_RGBA', +%% the GL will replace the internal format with the symbolic constant for a specific internal +%% format and compress the texture before storage. If no corresponding internal format is +%% available, or the GL can not compress that image for any reason, the internal format is +%% instead replaced with a corresponding base internal format. +%% +%% If the `InternalFormat' parameter is `?GL_SRGB', `?GL_SRGB8', `?GL_SRGB_ALPHA' +%% , or `?GL_SRGB8_ALPHA8', the texture is treated as if the red, green, blue, or +%% luminance components are encoded in the sRGB color space. Any alpha component is left +%% unchanged. The conversion from the sRGB encoded component c s to a linear component +%% c l is: +%% +%% c l={ c s/12.92if c s&le; 0.04045( c s+0.055/1.055) 2.4if c s> 0.04045 +%% +%% Assume c s is the sRGB component in the range [0,1]. +%% +%% Use the `?GL_PROXY_TEXTURE_3D' target to try out a resolution and format. The implementation +%% will update and recompute its best match for the requested storage resolution and format. +%% To then query this state, call {@link gl:getTexLevelParameterfv/3} . If the texture cannot +%% be accommodated, texture state is set to 0. +%% +%% A one-component texture image uses only the red component of the RGBA color extracted +%% from `Data' . A two-component image uses the R and A values. A three-component image +%% uses the R, G, and B values. A four-component image uses all of the RGBA components. +%% +%% See external documentation. +-spec texImage3D(Target, Level, InternalFormat, Width, Height, Depth, Border, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Border :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem(). +texImage3D(Target,Level,InternalFormat,Width,Height,Depth,Border,Format,Type,Pixels) when is_integer(Pixels) -> + cast(5319, <>); +texImage3D(Target,Level,InternalFormat,Width,Height,Depth,Border,Format,Type,Pixels) -> send_bin(Pixels), - cast(5320, <>). + cast(5320, <>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Zoffset::integer(),Width::integer(),Height::integer(),Depth::integer(),Format::enum(),Type::enum(),Pixels::offset()|mem()) -> ok -%% @doc See external documentation. --spec texSubImage3D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok. +%% @doc glTexSubImage +%% +%% See external documentation. +-spec texSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, Width, Height, Depth, Format, Type, Pixels) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Pixels :: offset()|mem(). texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Type,Pixels) when is_integer(Pixels) -> cast(5321, <>); texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Type,Pixels) -> send_bin(Pixels), cast(5322, <>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Zoffset::integer(),X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok -%% @doc See external documentation. --spec copyTexSubImage3D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc Copy a three-dimensional texture subimage +%% +%% ``gl:copyTexSubImage3D'' replaces a rectangular portion of a three-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} ). +%% +%% The screen-aligned pixel rectangle with lower left corner at ( `X' , `Y' ) and +%% with width `Width' and height `Height' replaces the portion of the texture array +%% with x indices `Xoffset' through xoffset+width-1, inclusive, and y indices `Yoffset' +%% through yoffset+height-1, inclusive, at z index `Zoffset' and at the mipmap level +%% specified by `Level' . +%% +%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been +%% called, but the process stops just before final conversion. At this point, all pixel component +%% values are clamped to the range [0 1] and then converted to the texture's internal format +%% for storage in the texel array. +%% +%% The destination rectangle in the texture array may not include any texels outside the +%% texture array as it was originally specified. It is not an error to specify a subtexture +%% with zero width or height, but such a specification has no effect. +%% +%% If any of the pixels within the specified rectangle of the current `?GL_READ_BUFFER' +%% are outside the read window associated with the current rendering context, then the values +%% obtained for those pixels are undefined. +%% +%% No change is made to the `internalformat', `width', `height', `depth', +%% or `border' parameters of the specified texture array or to texel values outside +%% the specified subregion. +%% +%% See external documentation. +-spec copyTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, X, Y, Width, Height) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(). copyTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,X,Y,Width,Height) -> cast(5323, <>). -%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Format::enum(),Type::enum(),Table::offset()|mem()) -> ok -%% @doc See external documentation. --spec colorTable(enum(),enum(),integer(),enum(),enum(),offset()|mem()) -> ok. +%% @doc Define a color lookup table +%% +%% ``gl:colorTable'' may be used in two ways: to test the actual size and color resolution +%% of a lookup table given a particular set of parameters, or to load the contents of a color +%% lookup table. Use the targets `?GL_PROXY_*' for the first case and the other targets +%% for the second case. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a color table is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% If `Target' is `?GL_COLOR_TABLE', `?GL_POST_CONVOLUTION_COLOR_TABLE', or `?GL_POST_COLOR_MATRIX_COLOR_TABLE' +%% , ``gl:colorTable'' builds a color lookup table from an array of pixels. The pixel array +%% specified by `Width' , `Format' , `Type' , and `Data' is extracted from +%% memory and processed just as if {@link gl:drawPixels/5} were called, but processing stops +%% after the final expansion to RGBA is completed. +%% +%% The four scale parameters and the four bias parameters that are defined for the table +%% are then used to scale and bias the R, G, B, and A components of each pixel. (Use ``gl:colorTableParameter'' +%% to set these scale and bias parameters.) +%% +%% Next, the R, G, B, and A values are clamped to the range [0 1]. Each pixel is then converted +%% to the internal format specified by `Internalformat' . This conversion simply maps +%% the component values of the pixel (R, G, B, and A) to the values included in the internal +%% format (red, green, blue, alpha, luminance, and intensity). The mapping is as follows: +%% +%% +%% +%% +%% +%% +%%
` Internal Format '` Red '` Green '` Blue '` Alpha '` Luminance '` Intensity ' +%%
`?GL_ALPHA' A
`?GL_LUMINANCE' R
`?GL_LUMINANCE_ALPHA' A R
`?GL_INTENSITY' +%% R
`?GL_RGB' R G B
`?GL_RGBA' R +%% G B A
+%% +%% Finally, the red, green, blue, alpha, luminance, and/or intensity components of the resulting +%% pixels are stored in the color table. They form a one-dimensional table with indices in +%% the range [0 width-1]. +%% +%% If `Target' is `?GL_PROXY_*', ``gl:colorTable'' recomputes and stores the +%% values of the proxy color table's state variables `?GL_COLOR_TABLE_FORMAT', `?GL_COLOR_TABLE_WIDTH' +%% , `?GL_COLOR_TABLE_RED_SIZE', `?GL_COLOR_TABLE_GREEN_SIZE', `?GL_COLOR_TABLE_BLUE_SIZE' +%% , `?GL_COLOR_TABLE_ALPHA_SIZE', `?GL_COLOR_TABLE_LUMINANCE_SIZE', and `?GL_COLOR_TABLE_INTENSITY_SIZE' +%% . There is no effect on the image or state of any actual color table. If the specified +%% color table is too large to be supported, then all the proxy state variables listed above +%% are set to zero. Otherwise, the color table could be supported by ``gl:colorTable'' +%% using the corresponding non-proxy target, and the proxy state variables are set as if +%% that target were being defined. +%% +%% The proxy state variables can be retrieved by calling {@link gl:getColorTableParameterfv/2} +%% with a target of `?GL_PROXY_*'. This allows the application to decide if a particular +%% ``gl:colorTable'' command would succeed, and to determine what the resulting color table +%% attributes would be. +%% +%% If a color table is enabled, and its width is non-zero, then its contents are used to +%% replace a subset of the components of each RGBA pixel group, based on the internal format +%% of the table. +%% +%% Each pixel group has color components (R, G, B, A) that are in the range [0.0 1.0]. The color +%% components are rescaled to the size of the color lookup table to form an index. Then a +%% subset of the components based on the internal format of the table are replaced by the +%% table entry selected by that index. If the color components and contents of the table +%% are represented as follows: +%% +%% +%% +%%
` Representation '` Meaning '
r Table index computed from R
g Table index +%% computed from G
b Table index computed from B
a +%% Table index computed from A
L[i] Luminance value at +%% table index i
I[i] Intensity value at table index i
R[i] Red value at table index i
G[i] Green value +%% at table index i
B[i] Blue value at table index i
+%% A[i] Alpha value at table index i
+%% +%% then the result of color table lookup is as follows: +%% +%% +%% +%%
` Resulting Texture Components '
` Table Internal Format ' +%% ` R '` G '` B '` A '
`?GL_ALPHA'RGBA[a]
+%% `?GL_LUMINANCE'L[r]L[g]L[b]At
`?GL_LUMINANCE_ALPHA' +%% L[r]L[g]L[b]A[a]
`?GL_INTENSITY'I[r]I[g]I[b]I[a]
`?GL_RGB'R[r] +%% G[g]B[b]A
`?GL_RGBA'R[r] +%% G[g]B[b]A[a]
+%% +%% When `?GL_COLOR_TABLE' is enabled, the colors resulting from the pixel map operation +%% (if it is enabled) are mapped by the color lookup table before being passed to the convolution +%% operation. The colors resulting from the convolution operation are modified by the post +%% convolution color lookup table when `?GL_POST_CONVOLUTION_COLOR_TABLE' is enabled. +%% These modified colors are then sent to the color matrix operation. Finally, if `?GL_POST_COLOR_MATRIX_COLOR_TABLE' +%% is enabled, the colors resulting from the color matrix operation are mapped by the post +%% color matrix color lookup table before being used by the histogram operation. +%% +%% +%% +%% See external documentation. +-spec colorTable(Target, Internalformat, Width, Format, Type, Table) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Format :: enum(),Type :: enum(),Table :: offset()|mem(). colorTable(Target,Internalformat,Width,Format,Type,Table) when is_integer(Table) -> cast(5324, <>); colorTable(Target,Internalformat,Width,Format,Type,Table) -> send_bin(Table), cast(5325, <>). -%% @spec (Target::enum(),Pname::enum(),Params::{float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec colorTableParameterfv(enum(),enum(),{float(),float(),float(),float()}) -> ok. +%% @doc Set color lookup table parameters +%% +%% ``gl:colorTableParameter'' is used to specify the scale factors and bias terms applied +%% to color components when they are loaded into a color table. `Target' indicates which +%% color table the scale and bias terms apply to; it must be set to `?GL_COLOR_TABLE', `?GL_POST_CONVOLUTION_COLOR_TABLE' +%% , or `?GL_POST_COLOR_MATRIX_COLOR_TABLE'. +%% +%% `Pname' must be `?GL_COLOR_TABLE_SCALE' to set the scale factors. In this case, +%% `Params' points to an array of four values, which are the scale factors for red, +%% green, blue, and alpha, in that order. +%% +%% `Pname' must be `?GL_COLOR_TABLE_BIAS' to set the bias terms. In this case, `Params' +%% points to an array of four values, which are the bias terms for red, green, blue, and +%% alpha, in that order. +%% +%% The color tables themselves are specified by calling {@link gl:colorTable/6} . +%% +%% See external documentation. +-spec colorTableParameterfv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {float(),float(),float(),float()}. colorTableParameterfv(Target,Pname,{P1,P2,P3,P4}) -> cast(5326, <>). -%% @spec (Target::enum(),Pname::enum(),Params::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec colorTableParameteriv(enum(),enum(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link colorTableParameterfv/3} +-spec colorTableParameteriv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer(),integer(),integer(),integer()}. colorTableParameteriv(Target,Pname,{P1,P2,P3,P4}) -> cast(5327, <>). -%% @spec (Target::enum(),Internalformat::enum(),X::integer(),Y::integer(),Width::integer()) -> ok -%% @doc See external documentation. --spec copyColorTable(enum(),enum(),integer(),integer(),integer()) -> ok. +%% @doc Copy pixels into a color table +%% +%% ``gl:copyColorTable'' loads a color table with pixels from the current `?GL_READ_BUFFER' +%% (rather than from main memory, as is the case for {@link gl:colorTable/6} ). +%% +%% The screen-aligned pixel rectangle with lower-left corner at ( `X' , `Y' ) having +%% width `Width' and height 1 is loaded into the color table. If any pixels within this +%% region are outside the window that is associated with the GL context, the values obtained +%% for those pixels are undefined. +%% +%% The pixels in the rectangle are processed just as if {@link gl:readPixels/7} were called, +%% with `Internalformat' set to RGBA, but processing stops after the final conversion +%% to RGBA. +%% +%% The four scale parameters and the four bias parameters that are defined for the table +%% are then used to scale and bias the R, G, B, and A components of each pixel. The scale +%% and bias parameters are set by calling {@link gl:colorTableParameterfv/3} . +%% +%% Next, the R, G, B, and A values are clamped to the range [0 1]. Each pixel is then converted +%% to the internal format specified by `Internalformat' . This conversion simply maps +%% the component values of the pixel (R, G, B, and A) to the values included in the internal +%% format (red, green, blue, alpha, luminance, and intensity). The mapping is as follows: +%% +%% +%% +%% +%% +%% +%%
` Internal Format '` Red '` Green '` Blue '` Alpha '` Luminance '` Intensity ' +%%
`?GL_ALPHA' A
`?GL_LUMINANCE' R
`?GL_LUMINANCE_ALPHA' A R
`?GL_INTENSITY' +%% R
`?GL_RGB' R G B
`?GL_RGBA' R +%% G B A
+%% +%% Finally, the red, green, blue, alpha, luminance, and/or intensity components of the resulting +%% pixels are stored in the color table. They form a one-dimensional table with indices in +%% the range [0 width-1]. +%% +%% +%% +%% See external documentation. +-spec copyColorTable(Target, Internalformat, X, Y, Width) -> ok when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(). copyColorTable(Target,Internalformat,X,Y,Width) -> cast(5328, <>). -%% @spec (Target::enum(),Format::enum(),Type::enum(),Table::mem()) -> ok -%% @doc See external documentation. --spec getColorTable(enum(),enum(),enum(),mem()) -> ok. +%% @doc Retrieve contents of a color lookup table +%% +%% ``gl:getColorTable'' returns in `Table' the contents of the color table specified +%% by `Target' . No pixel transfer operations are performed, but pixel storage modes +%% that are applicable to {@link gl:readPixels/7} are performed. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a histogram table is requested, `Table' is treated +%% as a byte offset into the buffer object's data store. +%% +%% Color components that are requested in the specified `Format' , but which are not +%% included in the internal format of the color lookup table, are returned as zero. The assignments +%% of internal color components to the components requested by `Format' are +%% +%%
` Internal Component '` Resulting Component '
Red Red
Green Green
+%% Blue Blue
Alpha Alpha
Luminance +%% Red
Intensity Red
+%% +%% +%% +%% See external documentation. +-spec getColorTable(Target, Format, Type, Table) -> ok when Target :: enum(),Format :: enum(),Type :: enum(),Table :: mem(). getColorTable(Target,Format,Type,Table) -> send_bin(Table), call(5329, <>). -%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getColorTableParameterfv(enum(),enum()) -> {float(),float(),float(),float()}. +%% @doc Get color lookup table parameters +%% +%% Returns parameters specific to color table `Target' . +%% +%% When `Pname' is set to `?GL_COLOR_TABLE_SCALE' or `?GL_COLOR_TABLE_BIAS', +%% ``gl:getColorTableParameter'' returns the color table scale or bias parameters for the +%% table specified by `Target' . For these queries, `Target' must be set to `?GL_COLOR_TABLE' +%% , `?GL_POST_CONVOLUTION_COLOR_TABLE', or `?GL_POST_COLOR_MATRIX_COLOR_TABLE' +%% and `Params' points to an array of four elements, which receive the scale or bias +%% factors for red, green, blue, and alpha, in that order. +%% +%% ``gl:getColorTableParameter'' can also be used to retrieve the format and size parameters +%% for a color table. For these queries, set `Target' to either the color table target +%% or the proxy color table target. The format and size parameters are set by {@link gl:colorTable/6} +%% . +%% +%% The following table lists the format and size parameters that may be queried. For each +%% symbolic constant listed below for `Pname' , `Params' must point to an array +%% of the given length and receive the values indicated. +%% +%% +%%
` Parameter '` N '` Meaning '
`?GL_COLOR_TABLE_FORMAT' 1 Internal format +%% (e.g., `?GL_RGBA')
`?GL_COLOR_TABLE_WIDTH' 1 +%% Number of elements in table
`?GL_COLOR_TABLE_RED_SIZE' +%% 1 Size of red component, in bits
`?GL_COLOR_TABLE_GREEN_SIZE' +%% 1 Size of green component
`?GL_COLOR_TABLE_BLUE_SIZE' +%% 1 Size of blue component
`?GL_COLOR_TABLE_ALPHA_SIZE' +%% 1 Size of alpha component
`?GL_COLOR_TABLE_LUMINANCE_SIZE' +%% 1 Size of luminance component
`?GL_COLOR_TABLE_INTENSITY_SIZE' +%% 1 Size of intensity component
+%% +%% +%% +%% See external documentation. +-spec getColorTableParameterfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum(). getColorTableParameterfv(Target,Pname) -> call(5330, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getColorTableParameteriv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. +%% @doc +%% See {@link getColorTableParameterfv/2} +-spec getColorTableParameteriv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum(). getColorTableParameteriv(Target,Pname) -> call(5331, <>). -%% @spec (Target::enum(),Start::integer(),Count::integer(),Format::enum(),Type::enum(),Data::offset()|mem()) -> ok -%% @doc See external documentation. --spec colorSubTable(enum(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok. +%% @doc Respecify a portion of a color table +%% +%% ``gl:colorSubTable'' is used to respecify a contiguous portion of a color table previously +%% defined using {@link gl:colorTable/6} . The pixels referenced by `Data' replace the +%% portion of the existing table from indices `Start' to start+count-1, inclusive. +%% This region may not include any entries outside the range of the color table as it was +%% originally specified. It is not an error to specify a subtexture with width of 0, but +%% such a specification has no effect. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a portion of a color table is respecified, `Data' +%% is treated as a byte offset into the buffer object's data store. +%% +%% See external documentation. +-spec colorSubTable(Target, Start, Count, Format, Type, Data) -> ok when Target :: enum(),Start :: integer(),Count :: integer(),Format :: enum(),Type :: enum(),Data :: offset()|mem(). colorSubTable(Target,Start,Count,Format,Type,Data) when is_integer(Data) -> cast(5332, <>); colorSubTable(Target,Start,Count,Format,Type,Data) -> send_bin(Data), cast(5333, <>). -%% @spec (Target::enum(),Start::integer(),X::integer(),Y::integer(),Width::integer()) -> ok -%% @doc See external documentation. --spec copyColorSubTable(enum(),integer(),integer(),integer(),integer()) -> ok. +%% @doc Respecify a portion of a color table +%% +%% ``gl:copyColorSubTable'' is used to respecify a contiguous portion of a color table +%% previously defined using {@link gl:colorTable/6} . The pixels copied from the framebuffer +%% replace the portion of the existing table from indices `Start' to start+x-1, inclusive. +%% This region may not include any entries outside the range of the color table, as was originally +%% specified. It is not an error to specify a subtexture with width of 0, but such a specification +%% has no effect. +%% +%% See external documentation. +-spec copyColorSubTable(Target, Start, X, Y, Width) -> ok when Target :: enum(),Start :: integer(),X :: integer(),Y :: integer(),Width :: integer(). copyColorSubTable(Target,Start,X,Y,Width) -> cast(5334, <>). -%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Format::enum(),Type::enum(),Image::offset()|mem()) -> ok -%% @doc See external documentation. --spec convolutionFilter1D(enum(),enum(),integer(),enum(),enum(),offset()|mem()) -> ok. +%% @doc Define a one-dimensional convolution filter +%% +%% ``gl:convolutionFilter1D'' builds a one-dimensional convolution filter kernel from an +%% array of pixels. +%% +%% The pixel array specified by `Width' , `Format' , `Type' , and `Data' +%% is extracted from memory and processed just as if {@link gl:drawPixels/5} were called, +%% but processing stops after the final expansion to RGBA is completed. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a convolution filter is specified, `Data' is +%% treated as a byte offset into the buffer object's data store. +%% +%% The R, G, B, and A components of each pixel are next scaled by the four 1D `?GL_CONVOLUTION_FILTER_SCALE' +%% parameters and biased by the four 1D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The +%% scale and bias parameters are set by {@link gl:convolutionParameterf/3} using the `?GL_CONVOLUTION_1D' +%% target and the names `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS' +%% . The parameters themselves are vectors of four values that are applied to red, green, +%% blue, and alpha, in that order.) The R, G, B, and A values are not clamped to [0,1] at +%% any time during this process. +%% +%% Each pixel is then converted to the internal format specified by `Internalformat' . +%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the +%% values included in the internal format (red, green, blue, alpha, luminance, and intensity). +%% The mapping is as follows: +%% +%% +%% +%% +%% +%% +%%
` Internal Format '` Red '` Green '` Blue '` Alpha '` Luminance '` Intensity ' +%%
`?GL_ALPHA' A
`?GL_LUMINANCE' R
`?GL_LUMINANCE_ALPHA' A R
`?GL_INTENSITY' +%% R
`?GL_RGB' R G B
`?GL_RGBA' R +%% G B A
+%% +%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting +%% pixels are stored in floating-point rather than integer format. They form a one-dimensional +%% filter kernel image indexed with coordinate `i' such that `i' starts at 0 and +%% increases from left to right. Kernel location `i' is derived from the `i'th +%% pixel, counting from 0. +%% +%% Note that after a convolution is performed, the resulting color components are also scaled +%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their +%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the +%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are +%% set by {@link gl:pixelTransferf/2} . +%% +%% See external documentation. +-spec convolutionFilter1D(Target, Internalformat, Width, Format, Type, Image) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Format :: enum(),Type :: enum(),Image :: offset()|mem(). convolutionFilter1D(Target,Internalformat,Width,Format,Type,Image) when is_integer(Image) -> cast(5335, <>); convolutionFilter1D(Target,Internalformat,Width,Format,Type,Image) -> send_bin(Image), cast(5336, <>). -%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Image::offset()|mem()) -> ok -%% @doc See external documentation. --spec convolutionFilter2D(enum(),enum(),integer(),integer(),enum(),enum(),offset()|mem()) -> ok. +%% @doc Define a two-dimensional convolution filter +%% +%% ``gl:convolutionFilter2D'' builds a two-dimensional convolution filter kernel from an +%% array of pixels. +%% +%% The pixel array specified by `Width' , `Height' , `Format' , `Type' , +%% and `Data' is extracted from memory and processed just as if {@link gl:drawPixels/5} +%% were called, but processing stops after the final expansion to RGBA is completed. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a convolution filter is specified, `Data' is +%% treated as a byte offset into the buffer object's data store. +%% +%% The R, G, B, and A components of each pixel are next scaled by the four 2D `?GL_CONVOLUTION_FILTER_SCALE' +%% parameters and biased by the four 2D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The +%% scale and bias parameters are set by {@link gl:convolutionParameterf/3} using the `?GL_CONVOLUTION_2D' +%% target and the names `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS' +%% . The parameters themselves are vectors of four values that are applied to red, green, +%% blue, and alpha, in that order.) The R, G, B, and A values are not clamped to [0,1] at +%% any time during this process. +%% +%% Each pixel is then converted to the internal format specified by `Internalformat' . +%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the +%% values included in the internal format (red, green, blue, alpha, luminance, and intensity). +%% The mapping is as follows: +%% +%% +%% +%% +%% +%% +%%
` Internal Format '` Red '` Green '` Blue '` Alpha '` Luminance '` Intensity ' +%%
`?GL_ALPHA' A
`?GL_LUMINANCE' R
`?GL_LUMINANCE_ALPHA' A R
`?GL_INTENSITY' +%% R
`?GL_RGB' R G B
`?GL_RGBA' R +%% G B A
+%% +%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting +%% pixels are stored in floating-point rather than integer format. They form a two-dimensional +%% filter kernel image indexed with coordinates `i' and `j' such that `i' +%% starts at zero and increases from left to right, and `j' starts at zero and increases +%% from bottom to top. Kernel location `i,j' is derived from the `N'th pixel, where +%% `N' is `i'+`j'* `Width' . +%% +%% Note that after a convolution is performed, the resulting color components are also scaled +%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their +%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the +%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are +%% set by {@link gl:pixelTransferf/2} . +%% +%% See external documentation. +-spec convolutionFilter2D(Target, Internalformat, Width, Height, Format, Type, Image) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Image :: offset()|mem(). convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) when is_integer(Image) -> cast(5337, <>); convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) -> send_bin(Image), cast(5338, <>). -%% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec convolutionParameterf(enum(),enum(),{float()}) -> ok. +%% @doc Set convolution parameters +%% +%% ``gl:convolutionParameter'' sets the value of a convolution parameter. +%% +%% `Target' selects the convolution filter to be affected: `?GL_CONVOLUTION_1D', `?GL_CONVOLUTION_2D' +%% , or `?GL_SEPARABLE_2D' for the 1D, 2D, or separable 2D filter, respectively. +%% +%% `Pname' selects the parameter to be changed. `?GL_CONVOLUTION_FILTER_SCALE' +%% and `?GL_CONVOLUTION_FILTER_BIAS' affect the definition of the convolution filter +%% kernel; see {@link gl:convolutionFilter1D/6} , {@link gl:convolutionFilter2D/7} , and {@link gl:separableFilter2D/8} +%% for details. In these cases, `Params' v is an array of four values to be applied +%% to red, green, blue, and alpha values, respectively. The initial value for `?GL_CONVOLUTION_FILTER_SCALE' +%% is (1, 1, 1, 1), and the initial value for `?GL_CONVOLUTION_FILTER_BIAS' is (0, +%% 0, 0, 0). +%% +%% A `Pname' value of `?GL_CONVOLUTION_BORDER_MODE' controls the convolution border +%% mode. The accepted modes are: +%% +%% `?GL_REDUCE': The image resulting from convolution is smaller than the source image. +%% If the filter width is Wf and height is Hf, and the source image width is Ws and +%% height is Hs, then the convolved image width will be Ws-Wf+1 and height will be Hs-Hf +%% +1. (If this reduction would generate an image with zero or negative width and/or height, +%% the output is simply null, with no error generated.) The coordinates of the image resulting +%% from convolution are zero through Ws-Wf in width and zero through Hs-Hf in height. +%% +%% `?GL_CONSTANT_BORDER': The image resulting from convolution is the same size as +%% the source image, and processed as if the source image were surrounded by pixels with +%% their color specified by the `?GL_CONVOLUTION_BORDER_COLOR'. +%% +%% `?GL_REPLICATE_BORDER': The image resulting from convolution is the same size as +%% the source image, and processed as if the outermost pixel on the border of the source +%% image were replicated. +%% +%% See external documentation. +-spec convolutionParameterf(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {float()}. convolutionParameterf(Target,Pname,Params) -> cast(5339, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (Target,Pname,{Params}) -> ok %% @equiv convolutionParameterf(Target,Pname,Params) --spec convolutionParameterfv(enum(),enum(),{{float()}}) -> ok. +-spec convolutionParameterfv(Target :: enum(),Pname :: enum(),Params) -> ok when Params :: {Params :: {float()}}. convolutionParameterfv(Target,Pname,{Params}) -> convolutionParameterf(Target,Pname,Params). -%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec convolutionParameteri(enum(),enum(),{integer()}) -> ok. +%% @doc +%% See {@link convolutionParameterf/3} +-spec convolutionParameteri(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}. convolutionParameteri(Target,Pname,Params) -> cast(5340, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (Target,Pname,{Params}) -> ok %% @equiv convolutionParameteri(Target,Pname,Params) --spec convolutionParameteriv(enum(),enum(),{{integer()}}) -> ok. +-spec convolutionParameteriv(Target :: enum(),Pname :: enum(),Params) -> ok when Params :: {Params :: {integer()}}. convolutionParameteriv(Target,Pname,{Params}) -> convolutionParameteri(Target,Pname,Params). -%% @spec (Target::enum(),Internalformat::enum(),X::integer(),Y::integer(),Width::integer()) -> ok -%% @doc See external documentation. --spec copyConvolutionFilter1D(enum(),enum(),integer(),integer(),integer()) -> ok. +%% @doc Copy pixels into a one-dimensional convolution filter +%% +%% ``gl:copyConvolutionFilter1D'' defines a one-dimensional convolution filter kernel with +%% pixels from the current `?GL_READ_BUFFER' (rather than from main memory, as is the +%% case for {@link gl:convolutionFilter1D/6} ). +%% +%% The screen-aligned pixel rectangle with lower-left corner at ( `X' , `Y' ), width +%% `Width' and height 1 is used to define the convolution filter. If any pixels within +%% this region are outside the window that is associated with the GL context, the values +%% obtained for those pixels are undefined. +%% +%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been +%% called with `format' set to RGBA, but the process stops just before final conversion. +%% The R, G, B, and A components of each pixel are next scaled by the four 1D `?GL_CONVOLUTION_FILTER_SCALE' +%% parameters and biased by the four 1D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The +%% scale and bias parameters are set by {@link gl:convolutionParameterf/3} using the `?GL_CONVOLUTION_1D' +%% target and the names `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS' +%% . The parameters themselves are vectors of four values that are applied to red, green, +%% blue, and alpha, in that order.) The R, G, B, and A values are not clamped to [0,1] at +%% any time during this process. +%% +%% Each pixel is then converted to the internal format specified by `Internalformat' . +%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the +%% values included in the internal format (red, green, blue, alpha, luminance, and intensity). +%% The mapping is as follows: +%% +%% +%% +%% +%% +%% +%%
` Internal Format '` Red '` Green '` Blue '` Alpha '` Luminance '` Intensity ' +%%
`?GL_ALPHA' A
`?GL_LUMINANCE' R
`?GL_LUMINANCE_ALPHA' A R
`?GL_INTENSITY' +%% R
`?GL_RGB' R G B
`?GL_RGBA' R +%% G B A
+%% +%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting +%% pixels are stored in floating-point rather than integer format. +%% +%% Pixel ordering is such that lower x screen coordinates correspond to lower `i' filter +%% image coordinates. +%% +%% Note that after a convolution is performed, the resulting color components are also scaled +%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their +%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the +%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are +%% set by {@link gl:pixelTransferf/2} . +%% +%% See external documentation. +-spec copyConvolutionFilter1D(Target, Internalformat, X, Y, Width) -> ok when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(). copyConvolutionFilter1D(Target,Internalformat,X,Y,Width) -> cast(5341, <>). -%% @spec (Target::enum(),Internalformat::enum(),X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok -%% @doc See external documentation. --spec copyConvolutionFilter2D(enum(),enum(),integer(),integer(),integer(),integer()) -> ok. +%% @doc Copy pixels into a two-dimensional convolution filter +%% +%% ``gl:copyConvolutionFilter2D'' defines a two-dimensional convolution filter kernel with +%% pixels from the current `?GL_READ_BUFFER' (rather than from main memory, as is the +%% case for {@link gl:convolutionFilter2D/7} ). +%% +%% The screen-aligned pixel rectangle with lower-left corner at ( `X' , `Y' ), width +%% `Width' and height `Height' is used to define the convolution filter. If any +%% pixels within this region are outside the window that is associated with the GL context, +%% the values obtained for those pixels are undefined. +%% +%% The pixels in the rectangle are processed exactly as if {@link gl:readPixels/7} had been +%% called with `format' set to RGBA, but the process stops just before final conversion. +%% The R, G, B, and A components of each pixel are next scaled by the four 2D `?GL_CONVOLUTION_FILTER_SCALE' +%% parameters and biased by the four 2D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The +%% scale and bias parameters are set by {@link gl:convolutionParameterf/3} using the `?GL_CONVOLUTION_2D' +%% target and the names `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS' +%% . The parameters themselves are vectors of four values that are applied to red, green, +%% blue, and alpha, in that order.) The R, G, B, and A values are not clamped to [0,1] at +%% any time during this process. +%% +%% Each pixel is then converted to the internal format specified by `Internalformat' . +%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the +%% values included in the internal format (red, green, blue, alpha, luminance, and intensity). +%% The mapping is as follows: +%% +%% +%% +%% +%% +%% +%%
` Internal Format '` Red '` Green '` Blue '` Alpha '` Luminance '` Intensity ' +%%
`?GL_ALPHA' A
`?GL_LUMINANCE' R
`?GL_LUMINANCE_ALPHA' A R
`?GL_INTENSITY' +%% R
`?GL_RGB' R G B
`?GL_RGBA' R +%% G B A
+%% +%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting +%% pixels are stored in floating-point rather than integer format. +%% +%% Pixel ordering is such that lower x screen coordinates correspond to lower `i' filter +%% image coordinates, and lower y screen coordinates correspond to lower `j' filter +%% image coordinates. +%% +%% Note that after a convolution is performed, the resulting color components are also scaled +%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their +%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the +%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are +%% set by {@link gl:pixelTransferf/2} . +%% +%% See external documentation. +-spec copyConvolutionFilter2D(Target, Internalformat, X, Y, Width, Height) -> ok when Target :: enum(),Internalformat :: enum(),X :: integer(),Y :: integer(),Width :: integer(),Height :: integer(). copyConvolutionFilter2D(Target,Internalformat,X,Y,Width,Height) -> cast(5342, <>). -%% @spec (Target::enum(),Format::enum(),Type::enum(),Image::mem()) -> ok -%% @doc See external documentation. --spec getConvolutionFilter(enum(),enum(),enum(),mem()) -> ok. +%% @doc Get current 1D or 2D convolution filter kernel +%% +%% ``gl:getConvolutionFilter'' returns the current 1D or 2D convolution filter kernel as +%% an image. The one- or two-dimensional image is placed in `Image' according to the +%% specifications in `Format' and `Type' . No pixel transfer operations are performed +%% on this image, but the relevant pixel storage modes are applied. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a convolution filter is requested, `Image' is +%% treated as a byte offset into the buffer object's data store. +%% +%% Color components that are present in `Format' but not included in the internal format +%% of the filter are returned as zero. The assignments of internal color components to the +%% components of `Format' are as follows. +%%
` Internal Component ' +%% ` Resulting Component '
Red Red
Green Green
Blue Blue
+%% Alpha Alpha
Luminance Red
Intensity +%% Red
+%% +%% +%% +%% See external documentation. +-spec getConvolutionFilter(Target, Format, Type, Image) -> ok when Target :: enum(),Format :: enum(),Type :: enum(),Image :: mem(). getConvolutionFilter(Target,Format,Type,Image) -> send_bin(Image), call(5343, <>). -%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getConvolutionParameterfv(enum(),enum()) -> {float(),float(),float(),float()}. +%% @doc Get convolution parameters +%% +%% ``gl:getConvolutionParameter'' retrieves convolution parameters. `Target' determines +%% which convolution filter is queried. `Pname' determines which parameter is returned: +%% +%% +%% `?GL_CONVOLUTION_BORDER_MODE': The convolution border mode. See {@link gl:convolutionParameterf/3} +%% for a list of border modes. +%% +%% `?GL_CONVOLUTION_BORDER_COLOR': The current convolution border color. `Params' +%% must be a pointer to an array of four elements, which will receive the red, green, blue, +%% and alpha border colors. +%% +%% `?GL_CONVOLUTION_FILTER_SCALE': The current filter scale factors. `Params' +%% must be a pointer to an array of four elements, which will receive the red, green, blue, +%% and alpha filter scale factors in that order. +%% +%% `?GL_CONVOLUTION_FILTER_BIAS': The current filter bias factors. `Params' must +%% be a pointer to an array of four elements, which will receive the red, green, blue, and +%% alpha filter bias terms in that order. +%% +%% `?GL_CONVOLUTION_FORMAT': The current internal format. See {@link gl:convolutionFilter1D/6} +%% , {@link gl:convolutionFilter2D/7} , and {@link gl:separableFilter2D/8} for lists of allowable +%% formats. +%% +%% `?GL_CONVOLUTION_WIDTH': The current filter image width. +%% +%% `?GL_CONVOLUTION_HEIGHT': The current filter image height. +%% +%% `?GL_MAX_CONVOLUTION_WIDTH': The maximum acceptable filter image width. +%% +%% `?GL_MAX_CONVOLUTION_HEIGHT': The maximum acceptable filter image height. +%% +%% See external documentation. +-spec getConvolutionParameterfv(Target, Pname) -> {float(),float(),float(),float()} when Target :: enum(),Pname :: enum(). getConvolutionParameterfv(Target,Pname) -> call(5344, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getConvolutionParameteriv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. +%% @doc +%% See {@link getConvolutionParameterfv/2} +-spec getConvolutionParameteriv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum(). getConvolutionParameteriv(Target,Pname) -> call(5345, <>). -%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Row::offset()|mem(),Column::offset()|mem()) -> ok -%% @doc See external documentation. --spec separableFilter2D(enum(),enum(),integer(),integer(),enum(),enum(),offset()|mem(),offset()|mem()) -> ok. +%% @doc Define a separable two-dimensional convolution filter +%% +%% ``gl:separableFilter2D'' builds a two-dimensional separable convolution filter kernel +%% from two arrays of pixels. +%% +%% The pixel arrays specified by ( `Width' , `Format' , `Type' , `Row' ) +%% and ( `Height' , `Format' , `Type' , `Column' ) are processed just as if +%% they had been passed to {@link gl:drawPixels/5} , but processing stops after the final expansion +%% to RGBA is completed. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a convolution filter is specified, `Row' and `Column' +%% are treated as byte offsets into the buffer object's data store. +%% +%% Next, the R, G, B, and A components of all pixels in both arrays are scaled by the four +%% separable 2D `?GL_CONVOLUTION_FILTER_SCALE' parameters and biased by the four separable +%% 2D `?GL_CONVOLUTION_FILTER_BIAS' parameters. (The scale and bias parameters are set +%% by {@link gl:convolutionParameterf/3} using the `?GL_SEPARABLE_2D' target and the names +%% `?GL_CONVOLUTION_FILTER_SCALE' and `?GL_CONVOLUTION_FILTER_BIAS'. The parameters +%% themselves are vectors of four values that are applied to red, green, blue, and alpha, +%% in that order.) The R, G, B, and A values are not clamped to [0,1] at any time during +%% this process. +%% +%% Each pixel is then converted to the internal format specified by `Internalformat' . +%% This conversion simply maps the component values of the pixel (R, G, B, and A) to the +%% values included in the internal format (red, green, blue, alpha, luminance, and intensity). +%% The mapping is as follows: +%% +%% +%%
` Internal Format '` Red ' +%% ` Green '` Blue '` Alpha '` Luminance ' +%% ` Intensity '
`?GL_LUMINANCE' R
`?GL_LUMINANCE_ALPHA' A R
`?GL_INTENSITY' +%% R
`?GL_RGB' R G B
`?GL_RGBA' +%% R G B A
+%% +%% +%% The red, green, blue, alpha, luminance, and/or intensity components of the resulting +%% pixels are stored in floating-point rather than integer format. They form two one-dimensional +%% filter kernel images. The row image is indexed by coordinate `i' starting at zero +%% and increasing from left to right. Each location in the row image is derived from element +%% `i' of `Row' . The column image is indexed by coordinate `j' starting at +%% zero and increasing from bottom to top. Each location in the column image is derived from +%% element `j' of `Column' . +%% +%% Note that after a convolution is performed, the resulting color components are also scaled +%% by their corresponding `?GL_POST_CONVOLUTION_c_SCALE' parameters and biased by their +%% corresponding `?GL_POST_CONVOLUTION_c_BIAS' parameters (where `c' takes on the +%% values `RED', `GREEN', `BLUE', and `ALPHA'). These parameters are +%% set by {@link gl:pixelTransferf/2} . +%% +%% See external documentation. +-spec separableFilter2D(Target, Internalformat, Width, Height, Format, Type, Row, Column) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Row :: offset()|mem(),Column :: offset()|mem(). separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) when is_integer(Row), is_integer(Column) -> cast(5346, <>); separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) -> @@ -2522,3497 +8778,7990 @@ separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) -> send_bin(Column), cast(5347, <>). -%% @spec (Target::enum(),Reset::0|1,Format::enum(),Type::enum(),Values::mem()) -> ok -%% @doc See external documentation. --spec getHistogram(enum(),0|1,enum(),enum(),mem()) -> ok. +%% @doc Get histogram table +%% +%% ``gl:getHistogram'' returns the current histogram table as a one-dimensional image with +%% the same width as the histogram. No pixel transfer operations are performed on this image, +%% but pixel storage modes that are applicable to 1D images are honored. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a histogram table is requested, `Values' is treated +%% as a byte offset into the buffer object's data store. +%% +%% Color components that are requested in the specified `Format' , but which are not +%% included in the internal format of the histogram, are returned as zero. The assignments +%% of internal color components to the components requested by `Format' are: +%% +%%
` Internal Component '` Resulting Component '
Red Red
Green Green
+%% Blue Blue
Alpha Alpha
Luminance +%% Red
+%% +%% +%% +%% See external documentation. +-spec getHistogram(Target, Reset, Format, Type, Values) -> ok when Target :: enum(),Reset :: 0|1,Format :: enum(),Type :: enum(),Values :: mem(). getHistogram(Target,Reset,Format,Type,Values) -> send_bin(Values), call(5348, <>). -%% @spec (Target::enum(),Pname::enum()) -> {float()} -%% @doc See external documentation. --spec getHistogramParameterfv(enum(),enum()) -> {float()}. +%% @doc Get histogram parameters +%% +%% ``gl:getHistogramParameter'' is used to query parameter values for the current histogram +%% or for a proxy. The histogram state information may be queried by calling ``gl:getHistogramParameter'' +%% with a `Target' of `?GL_HISTOGRAM' (to obtain information for the current histogram +%% table) or `?GL_PROXY_HISTOGRAM' (to obtain information from the most recent proxy +%% request) and one of the following values for the `Pname' argument: +%% +%% +%% +%%
` Parameter '` Description '
`?GL_HISTOGRAM_WIDTH' Histogram table width
`?GL_HISTOGRAM_FORMAT' +%% Internal format
`?GL_HISTOGRAM_RED_SIZE' Red +%% component counter size, in bits
`?GL_HISTOGRAM_GREEN_SIZE' +%% Green component counter size, in bits
`?GL_HISTOGRAM_BLUE_SIZE' Blue component counter size, in bits
`?GL_HISTOGRAM_ALPHA_SIZE' +%% Alpha component counter size, in bits
`?GL_HISTOGRAM_LUMINANCE_SIZE' +%% Luminance component counter size, in bits
`?GL_HISTOGRAM_SINK' +%% Value of the `sink' parameter
+%% +%% +%% +%% See external documentation. +-spec getHistogramParameterfv(Target, Pname) -> {float()} when Target :: enum(),Pname :: enum(). getHistogramParameterfv(Target,Pname) -> call(5349, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer()} -%% @doc See external documentation. --spec getHistogramParameteriv(enum(),enum()) -> {integer()}. +%% @doc +%% See {@link getHistogramParameterfv/2} +-spec getHistogramParameteriv(Target, Pname) -> {integer()} when Target :: enum(),Pname :: enum(). getHistogramParameteriv(Target,Pname) -> call(5350, <>). -%% @spec (Target::enum(),Reset::0|1,Format::enum(),Type::enum(),Values::mem()) -> ok -%% @doc See external documentation. --spec getMinmax(enum(),0|1,enum(),enum(),mem()) -> ok. -getMinmax(Target,Reset,Format,Type,Values) -> +%% @doc Get minimum and maximum pixel values +%% +%% ``gl:getMinmax'' returns the accumulated minimum and maximum pixel values (computed +%% on a per-component basis) in a one-dimensional image of width 2. The first set of return +%% values are the minima, and the second set of return values are the maxima. The format +%% of the return values is determined by `Format' , and their type is determined by `Types' +%% . +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while minimum and maximum pixel values are requested, `Values' +%% is treated as a byte offset into the buffer object's data store. +%% +%% No pixel transfer operations are performed on the return values, but pixel storage modes +%% that are applicable to one-dimensional images are performed. Color components that are +%% requested in the specified `Format' , but that are not included in the internal format +%% of the minmax table, are returned as zero. The assignment of internal color components +%% to the components requested by `Format' are as follows: +%% +%% +%% +%%
` Internal Component '` Resulting Component '
Red Red
Green Green
Blue Blue
Alpha Alpha
+%% Luminance Red
+%% +%% If `Reset' is `?GL_TRUE', the minmax table entries corresponding to the return +%% values are reset to their initial values. Minimum and maximum values that are not returned +%% are not modified, even if `Reset' is `?GL_TRUE'. +%% +%% See external documentation. +-spec getMinmax(Target, Reset, Format, Types, Values) -> ok when Target :: enum(),Reset :: 0|1,Format :: enum(),Types :: enum(),Values :: mem(). +getMinmax(Target,Reset,Format,Types,Values) -> send_bin(Values), - call(5351, <>). + call(5351, <>). -%% @spec (Target::enum(),Pname::enum()) -> {float()} -%% @doc See external documentation. --spec getMinmaxParameterfv(enum(),enum()) -> {float()}. +%% @doc Get minmax parameters +%% +%% ``gl:getMinmaxParameter'' retrieves parameters for the current minmax table by setting `Pname' +%% to one of the following values: +%% +%% +%%
` Parameter '` Description '
`?GL_MINMAX_FORMAT' Internal format of minmax table
+%% `?GL_MINMAX_SINK' Value of the `sink' parameter
+%% +%% +%% +%% +%% See external documentation. +-spec getMinmaxParameterfv(Target, Pname) -> {float()} when Target :: enum(),Pname :: enum(). getMinmaxParameterfv(Target,Pname) -> call(5352, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer()} -%% @doc See external documentation. --spec getMinmaxParameteriv(enum(),enum()) -> {integer()}. +%% @doc +%% See {@link getMinmaxParameterfv/2} +-spec getMinmaxParameteriv(Target, Pname) -> {integer()} when Target :: enum(),Pname :: enum(). getMinmaxParameteriv(Target,Pname) -> call(5353, <>). -%% @spec (Target::enum(),Width::integer(),Internalformat::enum(),Sink::0|1) -> ok -%% @doc See external documentation. --spec histogram(enum(),integer(),enum(),0|1) -> ok. +%% @doc Define histogram table +%% +%% When `?GL_HISTOGRAM' is enabled, RGBA color components are converted to histogram +%% table indices by clamping to the range [0,1], multiplying by the width of the histogram +%% table, and rounding to the nearest integer. The table entries selected by the RGBA indices +%% are then incremented. (If the internal format of the histogram table includes luminance, +%% then the index derived from the R color component determines the luminance table entry +%% to be incremented.) If a histogram table entry is incremented beyond its maximum value, +%% then its value becomes undefined. (This is not an error.) +%% +%% Histogramming is performed only for RGBA pixels (though these may be specified originally +%% as color indices and converted to RGBA by index table lookup). Histogramming is enabled +%% with {@link gl:enable/1} and disabled with {@link gl:enable/1} . +%% +%% When `Target' is `?GL_HISTOGRAM', ``gl:histogram'' redefines the current +%% histogram table to have `Width' entries of the format specified by `Internalformat' +%% . The entries are indexed 0 through width-1, and all entries are initialized to zero. +%% The values in the previous histogram table, if any, are lost. If `Sink' is `?GL_TRUE' +%% , then pixels are discarded after histogramming; no further processing of the pixels takes +%% place, and no drawing, texture loading, or pixel readback will result. +%% +%% When `Target' is `?GL_PROXY_HISTOGRAM', ``gl:histogram'' computes all state +%% information as if the histogram table were to be redefined, but does not actually define +%% the new table. If the requested histogram table is too large to be supported, then the +%% state information will be set to zero. This provides a way to determine if a histogram +%% table with the given parameters can be supported. +%% +%% +%% +%% See external documentation. +-spec histogram(Target, Width, Internalformat, Sink) -> ok when Target :: enum(),Width :: integer(),Internalformat :: enum(),Sink :: 0|1. histogram(Target,Width,Internalformat,Sink) -> cast(5354, <>). -%% @spec (Target::enum(),Internalformat::enum(),Sink::0|1) -> ok -%% @doc See external documentation. --spec minmax(enum(),enum(),0|1) -> ok. +%% @doc Define minmax table +%% +%% When `?GL_MINMAX' is enabled, the RGBA components of incoming pixels are compared +%% to the minimum and maximum values for each component, which are stored in the two-element +%% minmax table. (The first element stores the minima, and the second element stores the +%% maxima.) If a pixel component is greater than the corresponding component in the maximum +%% element, then the maximum element is updated with the pixel component value. If a pixel +%% component is less than the corresponding component in the minimum element, then the minimum +%% element is updated with the pixel component value. (In both cases, if the internal format +%% of the minmax table includes luminance, then the R color component of incoming pixels +%% is used for comparison.) The contents of the minmax table may be retrieved at a later +%% time by calling {@link gl:getMinmax/5} . The minmax operation is enabled or disabled by +%% calling {@link gl:enable/1} or {@link gl:enable/1} , respectively, with an argument of `?GL_MINMAX' +%% . +%% +%% ``gl:minmax'' redefines the current minmax table to have entries of the format specified +%% by `Internalformat' . The maximum element is initialized with the smallest possible +%% component values, and the minimum element is initialized with the largest possible component +%% values. The values in the previous minmax table, if any, are lost. If `Sink' is `?GL_TRUE' +%% , then pixels are discarded after minmax; no further processing of the pixels takes place, +%% and no drawing, texture loading, or pixel readback will result. +%% +%% +%% +%% See external documentation. +-spec minmax(Target, Internalformat, Sink) -> ok when Target :: enum(),Internalformat :: enum(),Sink :: 0|1. minmax(Target,Internalformat,Sink) -> cast(5355, <>). -%% @spec (Target::enum()) -> ok -%% @doc See external documentation. --spec resetHistogram(enum()) -> ok. +%% @doc Reset histogram table entries to zero +%% +%% ``gl:resetHistogram'' resets all the elements of the current histogram table to zero. +%% +%% See external documentation. +-spec resetHistogram(Target) -> ok when Target :: enum(). resetHistogram(Target) -> cast(5356, <>). -%% @spec (Target::enum()) -> ok -%% @doc See external documentation. --spec resetMinmax(enum()) -> ok. +%% @doc Reset minmax table entries to initial values +%% +%% ``gl:resetMinmax'' resets the elements of the current minmax table to their initial +%% values: the ``maximum'' element receives the minimum possible component values, and the +%% ``minimum'' element receives the maximum possible component values. +%% +%% See external documentation. +-spec resetMinmax(Target) -> ok when Target :: enum(). resetMinmax(Target) -> cast(5357, <>). -%% @spec (Texture::enum()) -> ok -%% @doc See external documentation. --spec activeTexture(enum()) -> ok. +%% @doc Select active texture unit +%% +%% ``gl:activeTexture'' selects which texture unit subsequent texture state calls will +%% affect. The number of texture units an implementation supports is implementation dependent, +%% but must be at least 80. +%% +%% See external documentation. +-spec activeTexture(Texture) -> ok when Texture :: enum(). activeTexture(Texture) -> cast(5358, <>). -%% @spec (Value::clamp(),Invert::0|1) -> ok -%% @doc See external documentation. --spec sampleCoverage(clamp(),0|1) -> ok. +%% @doc Specify multisample coverage parameters +%% +%% Multisampling samples a pixel multiple times at various implementation-dependent subpixel +%% locations to generate antialiasing effects. Multisampling transparently antialiases points, +%% lines, polygons, and images if it is enabled. +%% +%% `Value' is used in constructing a temporary mask used in determining which samples +%% will be used in resolving the final fragment color. This mask is bitwise-anded with the +%% coverage mask generated from the multisampling computation. If the `Invert' flag +%% is set, the temporary mask is inverted (all bits flipped) and then the bitwise-and is +%% computed. +%% +%% If an implementation does not have any multisample buffers available, or multisampling +%% is disabled, rasterization occurs with only a single sample computing a pixel's final +%% RGB color. +%% +%% Provided an implementation supports multisample buffers, and multisampling is enabled, +%% then a pixel's final color is generated by combining several samples per pixel. Each sample +%% contains color, depth, and stencil information, allowing those operations to be performed +%% on each sample. +%% +%% See external documentation. +-spec sampleCoverage(Value, Invert) -> ok when Value :: clamp(),Invert :: 0|1. sampleCoverage(Value,Invert) -> cast(5359, <>). -%% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Height::integer(),Depth::integer(),Border::integer(),ImageSize::integer(),Data::offset()|mem()) -> ok -%% @doc See external documentation. --spec compressedTexImage3D(enum(),integer(),enum(),integer(),integer(),integer(),integer(),integer(),offset()|mem()) -> ok. +%% @doc Specify a three-dimensional texture image in a compressed format +%% +%% Texturing allows elements of an image array to be read by shaders. +%% +%% ``gl:compressedTexImage3D'' loads a previously defined, and retrieved, compressed three-dimensional +%% texture image if `Target' is `?GL_TEXTURE_3D' (see {@link gl:texImage3D/10} ). +%% +%% If `Target' is `?GL_TEXTURE_2D_ARRAY', `Data' is treated as an array of +%% compressed 2D textures. +%% +%% If `Target' is `?GL_PROXY_TEXTURE_3D' or `?GL_PROXY_TEXTURE_2D_ARRAY', +%% no data is read from `Data' , but all of the texture image state is recalculated, +%% checked for consistency, and checked against the implementation's capabilities. If the +%% implementation cannot handle a texture of the requested texture size, it sets all of the +%% image state to 0, but does not generate an error (see {@link gl:getError/0} ). To query +%% for an entire mipmap array, use an image array level greater than or equal to 1. +%% +%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC') +%% or an extension-specified compressed-texture format. When a texture is loaded with {@link gl:texImage2D/9} +%% using a generic compressed texture format (e.g., `?GL_COMPRESSED_RGB'), the GL selects +%% from one of its extensions supporting compressed textures. In order to load the compressed +%% texture image using ``gl:compressedTexImage3D'', query the compressed texture image's +%% size and format using {@link gl:getTexLevelParameterfv/3} . +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% If the compressed data are arranged into fixed-size blocks of texels, the pixel storage +%% modes can be used to select a sub-rectangle from a larger containing rectangle. These +%% pixel storage modes operate in the same way as they do for {@link gl:texImage1D/8} . In +%% the following description, denote by b s, b w, b h, and b d, the values of pixel storage +%% modes `?GL_UNPACK_COMPRESSED_BLOCK_SIZE', `?GL_UNPACK_COMPRESSED_BLOCK_WIDTH', `?GL_UNPACK_COMPRESSED_BLOCK_HEIGHT' +%% , and `?GL_UNPACK_COMPRESSED_BLOCK_DEPTH', respectively. b s is the compressed block +%% size in bytes; b w, b h, and b d are the compressed block width, height, and depth +%% in pixels. +%% +%% By default the pixel storage modes `?GL_UNPACK_ROW_LENGTH', `?GL_UNPACK_SKIP_ROWS' +%% , `?GL_UNPACK_SKIP_PIXELS', `?GL_UNPACK_IMAGE_HEIGHT' and `?GL_UNPACK_SKIP_IMAGES' +%% are ignored for compressed images. To enable `?GL_UNPACK_SKIP_PIXELS' and `?GL_UNPACK_ROW_LENGTH' +%% , b s and b w must both be non-zero. To also enable `?GL_UNPACK_SKIP_ROWS' and `?GL_UNPACK_IMAGE_HEIGHT' +%% , b h must be non-zero. To also enable `?GL_UNPACK_SKIP_IMAGES', b d must be non-zero. +%% All parameters must be consistent with the compressed format to produce the desired results. +%% +%% +%% When selecting a sub-rectangle from a compressed image: the value of `?GL_UNPACK_SKIP_PIXELS' +%% must be a multiple of b w;the value of `?GL_UNPACK_SKIP_ROWS' must be a multiple +%% of b w;the value of `?GL_UNPACK_SKIP_IMAGES' must be a multiple of b w. +%% +%% `ImageSize' must be equal to: +%% +%% b s*|width b/w|*|height b/h|*|depth b/d| +%% +%% See external documentation. +-spec compressedTexImage3D(Target, Level, Internalformat, Width, Height, Depth, Border, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Depth :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem(). compressedTexImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,ImageSize,Data) when is_integer(Data) -> cast(5360, <>); compressedTexImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,ImageSize,Data) -> send_bin(Data), cast(5361, <>). -%% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Height::integer(),Border::integer(),ImageSize::integer(),Data::offset()|mem()) -> ok -%% @doc See external documentation. --spec compressedTexImage2D(enum(),integer(),enum(),integer(),integer(),integer(),integer(),offset()|mem()) -> ok. +%% @doc Specify a two-dimensional texture image in a compressed format +%% +%% Texturing allows elements of an image array to be read by shaders. +%% +%% ``gl:compressedTexImage2D'' loads a previously defined, and retrieved, compressed two-dimensional +%% texture image if `Target' is `?GL_TEXTURE_2D', or one of the cube map faces +%% such as `?GL_TEXTURE_CUBE_MAP_POSITIVE_X'. (see {@link gl:texImage2D/9} ). +%% +%% If `Target' is `?GL_TEXTURE_1D_ARRAY', `Data' is treated as an array of +%% compressed 1D textures. +%% +%% If `Target' is `?GL_PROXY_TEXTURE_2D', `?GL_PROXY_TEXTURE_1D_ARRAY' or `?GL_PROXY_CUBE_MAP' +%% , no data is read from `Data' , but all of the texture image state is recalculated, +%% checked for consistency, and checked against the implementation's capabilities. If the +%% implementation cannot handle a texture of the requested texture size, it sets all of the +%% image state to 0, but does not generate an error (see {@link gl:getError/0} ). To query +%% for an entire mipmap array, use an image array level greater than or equal to 1. +%% +%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC') +%% or an extension-specified compressed-texture format. When a texture is loaded with {@link gl:texImage2D/9} +%% using a generic compressed texture format (e.g., `?GL_COMPRESSED_RGB'), the GL selects +%% from one of its extensions supporting compressed textures. In order to load the compressed +%% texture image using ``gl:compressedTexImage2D'', query the compressed texture image's +%% size and format using {@link gl:getTexLevelParameterfv/3} . +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% If the compressed data are arranged into fixed-size blocks of texels, the pixel storage +%% modes can be used to select a sub-rectangle from a larger containing rectangle. These +%% pixel storage modes operate in the same way as they do for {@link gl:texImage2D/9} . In +%% the following description, denote by b s, b w, b h, and b d, the values of pixel storage +%% modes `?GL_UNPACK_COMPRESSED_BLOCK_SIZE', `?GL_UNPACK_COMPRESSED_BLOCK_WIDTH', `?GL_UNPACK_COMPRESSED_BLOCK_HEIGHT' +%% , and `?GL_UNPACK_COMPRESSED_BLOCK_DEPTH', respectively. b s is the compressed block +%% size in bytes; b w, b h, and b d are the compressed block width, height, and depth +%% in pixels. +%% +%% By default the pixel storage modes `?GL_UNPACK_ROW_LENGTH', `?GL_UNPACK_SKIP_ROWS' +%% , `?GL_UNPACK_SKIP_PIXELS', `?GL_UNPACK_IMAGE_HEIGHT' and `?GL_UNPACK_SKIP_IMAGES' +%% are ignored for compressed images. To enable `?GL_UNPACK_SKIP_PIXELS' and `?GL_UNPACK_ROW_LENGTH' +%% , b s and b w must both be non-zero. To also enable `?GL_UNPACK_SKIP_ROWS' and `?GL_UNPACK_IMAGE_HEIGHT' +%% , b h must be non-zero. To also enable `?GL_UNPACK_SKIP_IMAGES', b d must be non-zero. +%% All parameters must be consistent with the compressed format to produce the desired results. +%% +%% +%% When selecting a sub-rectangle from a compressed image: the value of `?GL_UNPACK_SKIP_PIXELS' +%% must be a multiple of b w;the value of `?GL_UNPACK_SKIP_ROWS' must be a multiple +%% of b w. +%% +%% `ImageSize' must be equal to: +%% +%% b s*|width b/w|*|height b/h| +%% +%% See external documentation. +-spec compressedTexImage2D(Target, Level, Internalformat, Width, Height, Border, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem(). compressedTexImage2D(Target,Level,Internalformat,Width,Height,Border,ImageSize,Data) when is_integer(Data) -> cast(5362, <>); compressedTexImage2D(Target,Level,Internalformat,Width,Height,Border,ImageSize,Data) -> send_bin(Data), cast(5363, <>). -%% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Border::integer(),ImageSize::integer(),Data::offset()|mem()) -> ok -%% @doc See external documentation. --spec compressedTexImage1D(enum(),integer(),enum(),integer(),integer(),integer(),offset()|mem()) -> ok. +%% @doc Specify a one-dimensional texture image in a compressed format +%% +%% Texturing allows elements of an image array to be read by shaders. +%% +%% ``gl:compressedTexImage1D'' loads a previously defined, and retrieved, compressed one-dimensional +%% texture image if `Target' is `?GL_TEXTURE_1D' (see {@link gl:texImage1D/8} ). +%% +%% If `Target' is `?GL_PROXY_TEXTURE_1D', no data is read from `Data' , but +%% all of the texture image state is recalculated, checked for consistency, and checked against +%% the implementation's capabilities. If the implementation cannot handle a texture of the +%% requested texture size, it sets all of the image state to 0, but does not generate an +%% error (see {@link gl:getError/0} ). To query for an entire mipmap array, use an image array +%% level greater than or equal to 1. +%% +%% `Internalformat' must be an extension-specified compressed-texture format. When a +%% texture is loaded with {@link gl:texImage1D/8} using a generic compressed texture format +%% (e.g., `?GL_COMPRESSED_RGB') the GL selects from one of its extensions supporting +%% compressed textures. In order to load the compressed texture image using ``gl:compressedTexImage1D'' +%% , query the compressed texture image's size and format using {@link gl:getTexLevelParameterfv/3} +%% . +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% If the compressed data are arranged into fixed-size blocks of texels, the pixel storage +%% modes can be used to select a sub-rectangle from a larger containing rectangle. These +%% pixel storage modes operate in the same way as they do for {@link gl:texImage1D/8} . In +%% the following description, denote by b s, b w, b h, and b d, the values of pixel storage +%% modes `?GL_UNPACK_COMPRESSED_BLOCK_SIZE', `?GL_UNPACK_COMPRESSED_BLOCK_WIDTH', `?GL_UNPACK_COMPRESSED_BLOCK_HEIGHT' +%% , and `?GL_UNPACK_COMPRESSED_BLOCK_DEPTH', respectively. b s is the compressed block +%% size in bytes; b w, b h, and b d are the compressed block width, height, and depth +%% in pixels. +%% +%% By default the pixel storage modes `?GL_UNPACK_ROW_LENGTH', `?GL_UNPACK_SKIP_ROWS' +%% , `?GL_UNPACK_SKIP_PIXELS', `?GL_UNPACK_IMAGE_HEIGHT' and `?GL_UNPACK_SKIP_IMAGES' +%% are ignored for compressed images. To enable `?GL_UNPACK_SKIP_PIXELS' and `?GL_UNPACK_ROW_LENGTH' +%% , b s and b w must both be non-zero. To also enable `?GL_UNPACK_SKIP_ROWS' and `?GL_UNPACK_IMAGE_HEIGHT' +%% , b h must be non-zero. To also enable `?GL_UNPACK_SKIP_IMAGES', b d must be non-zero. +%% All parameters must be consistent with the compressed format to produce the desired results. +%% +%% +%% When selecting a sub-rectangle from a compressed image: the value of `?GL_UNPACK_SKIP_PIXELS' +%% must be a multiple of b w; +%% +%% `ImageSize' must be equal to: +%% +%% b s*|width b/w| +%% +%% See external documentation. +-spec compressedTexImage1D(Target, Level, Internalformat, Width, Border, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Internalformat :: enum(),Width :: integer(),Border :: integer(),ImageSize :: integer(),Data :: offset()|mem(). compressedTexImage1D(Target,Level,Internalformat,Width,Border,ImageSize,Data) when is_integer(Data) -> cast(5364, <>); compressedTexImage1D(Target,Level,Internalformat,Width,Border,ImageSize,Data) -> send_bin(Data), cast(5365, <>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Zoffset::integer(),Width::integer(),Height::integer(),Depth::integer(),Format::enum(),ImageSize::integer(),Data::offset()|mem()) -> ok -%% @doc See external documentation. --spec compressedTexSubImage3D(enum(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),enum(),integer(),offset()|mem()) -> ok. +%% @doc Specify a three-dimensional texture subimage in a compressed format +%% +%% Texturing allows elements of an image array to be read by shaders. +%% +%% ``gl:compressedTexSubImage3D'' redefines a contiguous subregion of an existing three-dimensional +%% texture image. The texels referenced by `Data' replace the portion of the existing +%% texture array with x indices `Xoffset' and xoffset+width-1, and the y indices `Yoffset' +%% and yoffset+height-1, and the z indices `Zoffset' and zoffset+depth-1, inclusive. +%% This region may not include any texels outside the range of the texture array as it was +%% originally specified. It is not an error to specify a subtexture with width of 0, but +%% such a specification has no effect. +%% +%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC') +%% or an extension-specified compressed-texture format. The `Format' of the compressed +%% texture image is selected by the GL implementation that compressed it (see {@link gl:texImage3D/10} +%% ) and should be queried at the time the texture was compressed with {@link gl:getTexLevelParameterfv/3} +%% . +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% See external documentation. +-spec compressedTexSubImage3D(Target, Level, Xoffset, Yoffset, Zoffset, Width, Height, Depth, Format, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Zoffset :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem(). compressedTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,ImageSize,Data) when is_integer(Data) -> cast(5366, <>); compressedTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,ImageSize,Data) -> send_bin(Data), cast(5367, <>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Width::integer(),Height::integer(),Format::enum(),ImageSize::integer(),Data::offset()|mem()) -> ok -%% @doc See external documentation. --spec compressedTexSubImage2D(enum(),integer(),integer(),integer(),integer(),integer(),enum(),integer(),offset()|mem()) -> ok. +%% @doc Specify a two-dimensional texture subimage in a compressed format +%% +%% Texturing allows elements of an image array to be read by shaders. +%% +%% ``gl:compressedTexSubImage2D'' redefines a contiguous subregion of an existing two-dimensional +%% texture image. The texels referenced by `Data' replace the portion of the existing +%% texture array with x indices `Xoffset' and xoffset+width-1, and the y indices `Yoffset' +%% and yoffset+height-1, inclusive. This region may not include any texels outside the +%% range of the texture array as it was originally specified. It is not an error to specify +%% a subtexture with width of 0, but such a specification has no effect. +%% +%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC') +%% or an extension-specified compressed-texture format. The `Format' of the compressed +%% texture image is selected by the GL implementation that compressed it (see {@link gl:texImage2D/9} +%% ) and should be queried at the time the texture was compressed with {@link gl:getTexLevelParameterfv/3} +%% . +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% See external documentation. +-spec compressedTexSubImage2D(Target, Level, Xoffset, Yoffset, Width, Height, Format, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Yoffset :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem(). compressedTexSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,ImageSize,Data) when is_integer(Data) -> cast(5368, <>); compressedTexSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,ImageSize,Data) -> send_bin(Data), cast(5369, <>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Width::integer(),Format::enum(),ImageSize::integer(),Data::offset()|mem()) -> ok -%% @doc See external documentation. --spec compressedTexSubImage1D(enum(),integer(),integer(),integer(),enum(),integer(),offset()|mem()) -> ok. +%% @doc Specify a one-dimensional texture subimage in a compressed format +%% +%% Texturing allows elements of an image array to be read by shaders. +%% +%% ``gl:compressedTexSubImage1D'' redefines a contiguous subregion of an existing one-dimensional +%% texture image. The texels referenced by `Data' replace the portion of the existing +%% texture array with x indices `Xoffset' and xoffset+width-1, inclusive. This region +%% may not include any texels outside the range of the texture array as it was originally +%% specified. It is not an error to specify a subtexture with width of 0, but such a specification +%% has no effect. +%% +%% `Internalformat' must be a known compressed image format (such as `?GL_RGTC') +%% or an extension-specified compressed-texture format. The `Format' of the compressed +%% texture image is selected by the GL implementation that compressed it (see {@link gl:texImage1D/8} +%% ), and should be queried at the time the texture was compressed with {@link gl:getTexLevelParameterfv/3} +%% . +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is specified, `Data' is treated +%% as a byte offset into the buffer object's data store. +%% +%% See external documentation. +-spec compressedTexSubImage1D(Target, Level, Xoffset, Width, Format, ImageSize, Data) -> ok when Target :: enum(),Level :: integer(),Xoffset :: integer(),Width :: integer(),Format :: enum(),ImageSize :: integer(),Data :: offset()|mem(). compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) when is_integer(Data) -> cast(5370, <>); compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) -> send_bin(Data), cast(5371, <>). -%% @spec (Target::enum(),Level::integer(),Img::mem()) -> ok -%% @doc See external documentation. --spec getCompressedTexImage(enum(),integer(),mem()) -> ok. -getCompressedTexImage(Target,Level,Img) -> +%% @doc Return a compressed texture image +%% +%% ``gl:getCompressedTexImage'' returns the compressed texture image associated with `Target' +%% and `Lod' into `Img' . `Img' should be an array of `?GL_TEXTURE_COMPRESSED_IMAGE_SIZE' +%% bytes. `Target' specifies whether the desired texture image was one specified by {@link gl:texImage1D/8} +%% (`?GL_TEXTURE_1D'), {@link gl:texImage2D/9} (`?GL_TEXTURE_2D' or any of `?GL_TEXTURE_CUBE_MAP_*' +%% ), or {@link gl:texImage3D/10} (`?GL_TEXTURE_3D'). `Lod' specifies the level-of-detail +%% number of the desired image. +%% +%% If a non-zero named buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target +%% (see {@link gl:bindBuffer/2} ) while a texture image is requested, `Img' is treated +%% as a byte offset into the buffer object's data store. +%% +%% To minimize errors, first verify that the texture is compressed by calling {@link gl:getTexLevelParameterfv/3} +%% with argument `?GL_TEXTURE_COMPRESSED'. If the texture is compressed, then determine +%% the amount of memory required to store the compressed texture by calling {@link gl:getTexLevelParameterfv/3} +%% with argument `?GL_TEXTURE_COMPRESSED_IMAGE_SIZE'. Finally, retrieve the internal +%% format of the texture by calling {@link gl:getTexLevelParameterfv/3} with argument `?GL_TEXTURE_INTERNAL_FORMAT' +%% . To store the texture for later use, associate the internal format and size with the +%% retrieved texture image. These data can be used by the respective texture or subtexture +%% loading routine used for loading `Target' textures. +%% +%% See external documentation. +-spec getCompressedTexImage(Target, Lod, Img) -> ok when Target :: enum(),Lod :: integer(),Img :: mem(). +getCompressedTexImage(Target,Lod,Img) -> send_bin(Img), - call(5372, <>). + call(5372, <>). -%% @spec (Texture::enum()) -> ok -%% @doc See external documentation. --spec clientActiveTexture(enum()) -> ok. +%% @doc Select active texture unit +%% +%% ``gl:clientActiveTexture'' selects the vertex array client state parameters to be modified +%% by {@link gl:texCoordPointer/4} , and enabled or disabled with {@link gl:enableClientState/1} +%% or {@link gl:enableClientState/1} , respectively, when called with a parameter of `?GL_TEXTURE_COORD_ARRAY' +%% . +%% +%% See external documentation. +-spec clientActiveTexture(Texture) -> ok when Texture :: enum(). clientActiveTexture(Texture) -> cast(5373, <>). -%% @spec (Target::enum(),S::float()) -> ok -%% @doc See external documentation. --spec multiTexCoord1d(enum(),float()) -> ok. +%% @doc Set the current texture coordinates +%% +%% ``gl:multiTexCoord'' specifies texture coordinates in one, two, three, or four dimensions. +%% ``gl:multiTexCoord1'' sets the current texture coordinates to (s 0 0 1); a call to ``gl:multiTexCoord2'' +%% sets them to (s t 0 1). Similarly, ``gl:multiTexCoord3'' specifies the texture coordinates as (s +%% t r 1), +%% and ``gl:multiTexCoord4'' defines all four components explicitly as (s t r q). +%% +%% The current texture coordinates are part of the data that is associated with each vertex +%% and with the current raster position. Initially, the values for (s t r q) are (0 0 0 1). +%% +%% +%% +%% See external documentation. +-spec multiTexCoord1d(Target, S) -> ok when Target :: enum(),S :: float(). multiTexCoord1d(Target,S) -> cast(5374, <>). -%% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1d(Target,S) --spec multiTexCoord1dv(enum(),{float()}) -> ok. +-spec multiTexCoord1dv(Target :: enum(),V) -> ok when V :: {S :: float()}. multiTexCoord1dv(Target,{S}) -> multiTexCoord1d(Target,S). -%% @spec (Target::enum(),S::float()) -> ok -%% @doc See external documentation. --spec multiTexCoord1f(enum(),float()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord1f(Target, S) -> ok when Target :: enum(),S :: float(). multiTexCoord1f(Target,S) -> cast(5375, <>). -%% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1f(Target,S) --spec multiTexCoord1fv(enum(),{float()}) -> ok. +-spec multiTexCoord1fv(Target :: enum(),V) -> ok when V :: {S :: float()}. multiTexCoord1fv(Target,{S}) -> multiTexCoord1f(Target,S). -%% @spec (Target::enum(),S::integer()) -> ok -%% @doc See external documentation. --spec multiTexCoord1i(enum(),integer()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord1i(Target, S) -> ok when Target :: enum(),S :: integer(). multiTexCoord1i(Target,S) -> cast(5376, <>). -%% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1i(Target,S) --spec multiTexCoord1iv(enum(),{integer()}) -> ok. +-spec multiTexCoord1iv(Target :: enum(),V) -> ok when V :: {S :: integer()}. multiTexCoord1iv(Target,{S}) -> multiTexCoord1i(Target,S). -%% @spec (Target::enum(),S::integer()) -> ok -%% @doc See external documentation. --spec multiTexCoord1s(enum(),integer()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord1s(Target, S) -> ok when Target :: enum(),S :: integer(). multiTexCoord1s(Target,S) -> cast(5377, <>). -%% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1s(Target,S) --spec multiTexCoord1sv(enum(),{integer()}) -> ok. +-spec multiTexCoord1sv(Target :: enum(),V) -> ok when V :: {S :: integer()}. multiTexCoord1sv(Target,{S}) -> multiTexCoord1s(Target,S). -%% @spec (Target::enum(),S::float(),T::float()) -> ok -%% @doc See external documentation. --spec multiTexCoord2d(enum(),float(),float()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord2d(Target, S, T) -> ok when Target :: enum(),S :: float(),T :: float(). multiTexCoord2d(Target,S,T) -> cast(5378, <>). -%% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2d(Target,S,T) --spec multiTexCoord2dv(enum(),{float(),float()}) -> ok. +-spec multiTexCoord2dv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float()}. multiTexCoord2dv(Target,{S,T}) -> multiTexCoord2d(Target,S,T). -%% @spec (Target::enum(),S::float(),T::float()) -> ok -%% @doc See external documentation. --spec multiTexCoord2f(enum(),float(),float()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord2f(Target, S, T) -> ok when Target :: enum(),S :: float(),T :: float(). multiTexCoord2f(Target,S,T) -> cast(5379, <>). -%% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2f(Target,S,T) --spec multiTexCoord2fv(enum(),{float(),float()}) -> ok. +-spec multiTexCoord2fv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float()}. multiTexCoord2fv(Target,{S,T}) -> multiTexCoord2f(Target,S,T). -%% @spec (Target::enum(),S::integer(),T::integer()) -> ok -%% @doc See external documentation. --spec multiTexCoord2i(enum(),integer(),integer()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord2i(Target, S, T) -> ok when Target :: enum(),S :: integer(),T :: integer(). multiTexCoord2i(Target,S,T) -> cast(5380, <>). -%% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2i(Target,S,T) --spec multiTexCoord2iv(enum(),{integer(),integer()}) -> ok. +-spec multiTexCoord2iv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer()}. multiTexCoord2iv(Target,{S,T}) -> multiTexCoord2i(Target,S,T). -%% @spec (Target::enum(),S::integer(),T::integer()) -> ok -%% @doc See external documentation. --spec multiTexCoord2s(enum(),integer(),integer()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord2s(Target, S, T) -> ok when Target :: enum(),S :: integer(),T :: integer(). multiTexCoord2s(Target,S,T) -> cast(5381, <>). -%% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2s(Target,S,T) --spec multiTexCoord2sv(enum(),{integer(),integer()}) -> ok. +-spec multiTexCoord2sv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer()}. multiTexCoord2sv(Target,{S,T}) -> multiTexCoord2s(Target,S,T). -%% @spec (Target::enum(),S::float(),T::float(),R::float()) -> ok -%% @doc See external documentation. --spec multiTexCoord3d(enum(),float(),float(),float()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord3d(Target, S, T, R) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float(). multiTexCoord3d(Target,S,T,R) -> cast(5382, <>). -%% @spec (Target,{S,T,R}) -> ok %% @equiv multiTexCoord3d(Target,S,T,R) --spec multiTexCoord3dv(enum(),{float(),float(),float()}) -> ok. +-spec multiTexCoord3dv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float()}. multiTexCoord3dv(Target,{S,T,R}) -> multiTexCoord3d(Target,S,T,R). -%% @spec (Target::enum(),S::float(),T::float(),R::float()) -> ok -%% @doc See external documentation. --spec multiTexCoord3f(enum(),float(),float(),float()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord3f(Target, S, T, R) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float(). multiTexCoord3f(Target,S,T,R) -> cast(5383, <>). -%% @spec (Target,{S,T,R}) -> ok %% @equiv multiTexCoord3f(Target,S,T,R) --spec multiTexCoord3fv(enum(),{float(),float(),float()}) -> ok. +-spec multiTexCoord3fv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float()}. multiTexCoord3fv(Target,{S,T,R}) -> multiTexCoord3f(Target,S,T,R). -%% @spec (Target::enum(),S::integer(),T::integer(),R::integer()) -> ok -%% @doc See external documentation. --spec multiTexCoord3i(enum(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord3i(Target, S, T, R) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer(). multiTexCoord3i(Target,S,T,R) -> cast(5384, <>). -%% @spec (Target,{S,T,R}) -> ok %% @equiv multiTexCoord3i(Target,S,T,R) --spec multiTexCoord3iv(enum(),{integer(),integer(),integer()}) -> ok. +-spec multiTexCoord3iv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}. multiTexCoord3iv(Target,{S,T,R}) -> multiTexCoord3i(Target,S,T,R). -%% @spec (Target::enum(),S::integer(),T::integer(),R::integer()) -> ok -%% @doc See external documentation. --spec multiTexCoord3s(enum(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord3s(Target, S, T, R) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer(). multiTexCoord3s(Target,S,T,R) -> cast(5385, <>). -%% @spec (Target,{S,T,R}) -> ok %% @equiv multiTexCoord3s(Target,S,T,R) --spec multiTexCoord3sv(enum(),{integer(),integer(),integer()}) -> ok. +-spec multiTexCoord3sv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer()}. multiTexCoord3sv(Target,{S,T,R}) -> multiTexCoord3s(Target,S,T,R). -%% @spec (Target::enum(),S::float(),T::float(),R::float(),Q::float()) -> ok -%% @doc See external documentation. --spec multiTexCoord4d(enum(),float(),float(),float(),float()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord4d(Target, S, T, R, Q) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float(),Q :: float(). multiTexCoord4d(Target,S,T,R,Q) -> cast(5386, <>). -%% @spec (Target,{S,T,R,Q}) -> ok %% @equiv multiTexCoord4d(Target,S,T,R,Q) --spec multiTexCoord4dv(enum(),{float(),float(),float(),float()}) -> ok. +-spec multiTexCoord4dv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}. multiTexCoord4dv(Target,{S,T,R,Q}) -> multiTexCoord4d(Target,S,T,R,Q). -%% @spec (Target::enum(),S::float(),T::float(),R::float(),Q::float()) -> ok -%% @doc See external documentation. --spec multiTexCoord4f(enum(),float(),float(),float(),float()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord4f(Target, S, T, R, Q) -> ok when Target :: enum(),S :: float(),T :: float(),R :: float(),Q :: float(). multiTexCoord4f(Target,S,T,R,Q) -> cast(5387, <>). -%% @spec (Target,{S,T,R,Q}) -> ok %% @equiv multiTexCoord4f(Target,S,T,R,Q) --spec multiTexCoord4fv(enum(),{float(),float(),float(),float()}) -> ok. +-spec multiTexCoord4fv(Target :: enum(),V) -> ok when V :: {S :: float(),T :: float(),R :: float(),Q :: float()}. multiTexCoord4fv(Target,{S,T,R,Q}) -> multiTexCoord4f(Target,S,T,R,Q). -%% @spec (Target::enum(),S::integer(),T::integer(),R::integer(),Q::integer()) -> ok -%% @doc See external documentation. --spec multiTexCoord4i(enum(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord4i(Target, S, T, R, Q) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer(),Q :: integer(). multiTexCoord4i(Target,S,T,R,Q) -> cast(5388, <>). -%% @spec (Target,{S,T,R,Q}) -> ok %% @equiv multiTexCoord4i(Target,S,T,R,Q) --spec multiTexCoord4iv(enum(),{integer(),integer(),integer(),integer()}) -> ok. +-spec multiTexCoord4iv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}. multiTexCoord4iv(Target,{S,T,R,Q}) -> multiTexCoord4i(Target,S,T,R,Q). -%% @spec (Target::enum(),S::integer(),T::integer(),R::integer(),Q::integer()) -> ok -%% @doc See external documentation. --spec multiTexCoord4s(enum(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link multiTexCoord1d/2} +-spec multiTexCoord4s(Target, S, T, R, Q) -> ok when Target :: enum(),S :: integer(),T :: integer(),R :: integer(),Q :: integer(). multiTexCoord4s(Target,S,T,R,Q) -> cast(5389, <>). -%% @spec (Target,{S,T,R,Q}) -> ok %% @equiv multiTexCoord4s(Target,S,T,R,Q) --spec multiTexCoord4sv(enum(),{integer(),integer(),integer(),integer()}) -> ok. +-spec multiTexCoord4sv(Target :: enum(),V) -> ok when V :: {S :: integer(),T :: integer(),R :: integer(),Q :: integer()}. multiTexCoord4sv(Target,{S,T,R,Q}) -> multiTexCoord4s(Target,S,T,R,Q). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec loadTransposeMatrixf({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. +%% @doc Replace the current matrix with the specified row-major ordered matrix +%% +%% ``gl:loadTransposeMatrix'' 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} ). +%% +%% The current matrix, M, defines a transformation of coordinates. For instance, assume +%% M refers to the modelview matrix. If v=(v[0] v[1] v[2] v[3]) is the set of object coordinates of a vertex, +%% and `M' points to an array of 16 single- or double-precision floating-point values +%% m={m[0] m[1] ... m[15]}, then the modelview transformation M(v) does the following: +%% +%% M(v)=(m[0] m[1] m[2] m[3] m[4] m[5] m[6] m[7] m[8] m[9] m[10] m[11] m[12] m[13] m[14] m[15])*(v[0] v[1] v[2] v[3]) +%% +%% Projection and texture transformations are similarly defined. +%% +%% Calling ``gl:loadTransposeMatrix'' with matrix M is identical in operation to {@link gl:loadMatrixd/1} +%% with M T, where T represents the transpose. +%% +%% See external documentation. +-spec loadTransposeMatrixf(M) -> ok when M :: matrix(). loadTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5390, <>); loadTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5390, <>). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec loadTransposeMatrixd({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. +%% @doc +%% See {@link loadTransposeMatrixf/1} +-spec loadTransposeMatrixd(M) -> ok when M :: matrix(). loadTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5391, <>); loadTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5391, <>). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec multTransposeMatrixf({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. +%% @doc Multiply the current matrix with the specified row-major ordered matrix +%% +%% ``gl:multTransposeMatrix'' multiplies the current matrix with the one specified using `M' +%% , and replaces the current matrix with the product. +%% +%% The current matrix is determined by the current matrix mode (see {@link gl:matrixMode/1} ). +%% It is either the projection matrix, modelview matrix, or the texture matrix. +%% +%% See external documentation. +-spec multTransposeMatrixf(M) -> ok when M :: matrix(). multTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5392, <>); multTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5392, <>). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec multTransposeMatrixd({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. +%% @doc +%% See {@link multTransposeMatrixf/1} +-spec multTransposeMatrixd(M) -> ok when M :: matrix(). multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5393, <>); multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5393, <>). -%% @spec (SfactorRGB::enum(),DfactorRGB::enum(),SfactorAlpha::enum(),DfactorAlpha::enum()) -> ok -%% @doc See external documentation. --spec blendFuncSeparate(enum(),enum(),enum(),enum()) -> ok. +%% @doc Specify pixel arithmetic for RGB and alpha components separately +%% +%% 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. +%% +%% ``gl:blendFuncSeparate'' defines the operation of blending for all draw buffers when +%% it is enabled. ``gl:blendFuncSeparatei'' defines the operation of blending for a single +%% draw buffer specified by `Buf' when enabled for that draw buffer. `SrcRGB' specifies +%% which method is used to scale the source RGB-color components. `DstRGB' specifies +%% which method is used to scale the destination RGB-color components. Likewise, `SrcAlpha' +%% specifies which method is used to scale the source alpha color component, and `DstAlpha' +%% specifies which method is used to scale the destination alpha component. The possible +%% methods are described in the following table. Each method defines four scale factors, +%% one each for red, green, blue, and alpha. +%% +%% In the table and in subsequent equations, first source, second source and destination +%% color components are referred to as (R s0 G s0 B s0 A s0), (R s1 G s1 B s1 A s1), and (R d G d B d A d), respectively. The color specified by {@link gl:blendColor/4} +%% is referred to as (R c G c B c A c). They are understood to have integer values between 0 and (k R k G k B +%% k A), where +%% +%% k c= 2(m c)-1 +%% +%% and (m R m G m B m A) is the number of red, green, blue, and alpha bitplanes. +%% +%% Source and destination scale factors are referred to as (s R s G s B s A) and (d R d G d B d A). All scale factors have +%% range [0 1]. +%% +%% +%% +%% +%% +%%
` Parameter '` RGB Factor '` Alpha Factor ' +%%
`?GL_ZERO'(0 0 0) 0
`?GL_ONE' +%% (1 1 1) 1
`?GL_SRC_COLOR'(R s0 k/R G s0 k/G B s0 +%% k/B) A s0 k/A
`?GL_ONE_MINUS_SRC_COLOR'(1 1 1 1)-(R s0 k/R G s0 k/G B s0 k/B) 1-A s0 k/A
+%% `?GL_DST_COLOR'(R d k/R G d k/G B d k/B) A d k/A
`?GL_ONE_MINUS_DST_COLOR' +%% (1 1 1)-(R d k/R G d k/G B d k/B) 1-A d k/A
`?GL_SRC_ALPHA'(A s0 k/A A s0 +%% k/A A s0 k/A) A +%% s0 k/A
`?GL_ONE_MINUS_SRC_ALPHA'(1 1 1)-(A s0 k/A A s0 k/A A s0 k/A +%% ) 1-A s0 k/A
`?GL_DST_ALPHA'(A d k/A A d k/A A d k/A) A d k/A
`?GL_ONE_MINUS_DST_ALPHA' +%% (1 1 1)-(A d k/A A d k/A A d k/A) 1-A d k/A
`?GL_CONSTANT_COLOR'(R c G c +%% B c) +%% A c
`?GL_ONE_MINUS_CONSTANT_COLOR'(1 1 1)-(R c G c B c) 1-A c
`?GL_CONSTANT_ALPHA'(A c A c A c) A c
`?GL_ONE_MINUS_CONSTANT_ALPHA' +%% (1 1 1)-(A c A c A c) 1-A c
`?GL_SRC_ALPHA_SATURATE'(i i i) +%% 1
`?GL_SRC1_COLOR'(R s1 k/R G s1 k/G B s1 k/B) A s1 k/A
`?GL_ONE_MINUS_SRC_COLOR' +%% (1 1 1 1)-(R s1 k/R G s1 k/G B s1 k/B) 1-A s1 k/A
`?GL_SRC1_ALPHA'(A s1 k/A A +%% s1 k/A A s1 k/A) A +%% s1 k/A
`?GL_ONE_MINUS_SRC_ALPHA'(1 1 1)-(A s1 k/A A s1 k/A A s1 k/A +%% ) 1-A s1 k/A
+%% +%% In the table, +%% +%% i= min(A s 1-(A d)) +%% +%% To determine the blended RGBA values of a pixel, the system uses the following equations: +%% +%% +%% R d= min(k R R s s R+R d d R) G d= min(k G G s s G+G d d G) B d= min(k B B s s B+B d d B) A d= min(k A A s s A+A d d A) +%% +%% Despite the apparent precision of the above equations, blending arithmetic is not exactly +%% specified, because blending operates with imprecise integer color values. However, a blend +%% factor that should be equal to 1 is guaranteed not to modify its multiplicand, and a blend +%% factor equal to 0 reduces its multiplicand to 0. For example, when `SrcRGB' is `?GL_SRC_ALPHA' +%% , `DstRGB' is `?GL_ONE_MINUS_SRC_ALPHA', and A s is equal to k A, the equations +%% reduce to simple replacement: +%% +%% R d= R s G d= G s B d= B s A d= A s +%% +%% +%% +%% See external documentation. +-spec blendFuncSeparate(SfactorRGB, DfactorRGB, SfactorAlpha, DfactorAlpha) -> ok when SfactorRGB :: enum(),DfactorRGB :: enum(),SfactorAlpha :: enum(),DfactorAlpha :: enum(). blendFuncSeparate(SfactorRGB,DfactorRGB,SfactorAlpha,DfactorAlpha) -> cast(5394, <>). -%% @spec (Mode::enum(),First::[integer()],Count::[integer()]) -> ok -%% @doc See external documentation. --spec multiDrawArrays(enum(),[integer()],[integer()]) -> ok. +%% @doc Render multiple sets of primitives from array data +%% +%% ``gl:multiDrawArrays'' specifies multiple sets of 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:multiDrawArrays''. +%% +%% ``gl:multiDrawArrays'' behaves identically to {@link gl:drawArrays/3} except that `Primcount' +%% separate ranges of elements are specified instead. +%% +%% When ``gl:multiDrawArrays'' is called, it uses `Count' sequential elements from +%% each enabled array to construct a sequence of geometric primitives, beginning with element +%% `First' . `Mode' specifies what kind of primitives are constructed, and how the +%% array elements construct those primitives. +%% +%% Vertex attributes that are modified by ``gl:multiDrawArrays'' have an unspecified value +%% after ``gl:multiDrawArrays'' returns. Attributes that aren't modified remain well defined. +%% +%% +%% See external documentation. +-spec multiDrawArrays(Mode, First, Count) -> ok when Mode :: enum(),First :: [integer()],Count :: [integer()]. multiDrawArrays(Mode,First,Count) -> cast(5395, <> || C <- First>>)/binary,0:(((length(First)) rem 2)*32),(length(Count)):?GLuint, (<< <> || C <- Count>>)/binary,0:(((1+length(Count)) rem 2)*32)>>). -%% @spec (Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec pointParameterf(enum(),float()) -> ok. +%% @doc Specify point parameters +%% +%% The following values are accepted for `Pname' : +%% +%% `?GL_POINT_FADE_THRESHOLD_SIZE': `Params' is a single floating-point value that +%% specifies the threshold value to which point sizes are clamped if they exceed the specified +%% value. The default value is 1.0. +%% +%% `?GL_POINT_SPRITE_COORD_ORIGIN': `Params' is a single enum specifying the point +%% sprite texture coordinate origin, either `?GL_LOWER_LEFT' or `?GL_UPPER_LEFT'. +%% The default value is `?GL_UPPER_LEFT'. +%% +%% See external documentation. +-spec pointParameterf(Pname, Param) -> ok when Pname :: enum(),Param :: float(). pointParameterf(Pname,Param) -> cast(5396, <>). -%% @spec (Pname::enum(),Params::{float()}) -> ok -%% @doc See external documentation. --spec pointParameterfv(enum(),{float()}) -> ok. +%% @doc +%% See {@link pointParameterf/2} +-spec pointParameterfv(Pname, Params) -> ok when Pname :: enum(),Params :: {float()}. pointParameterfv(Pname,Params) -> cast(5397, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). -%% @spec (Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec pointParameteri(enum(),integer()) -> ok. +%% @doc +%% See {@link pointParameterf/2} +-spec pointParameteri(Pname, Param) -> ok when Pname :: enum(),Param :: integer(). pointParameteri(Pname,Param) -> cast(5398, <>). -%% @spec (Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec pointParameteriv(enum(),{integer()}) -> ok. +%% @doc +%% See {@link pointParameterf/2} +-spec pointParameteriv(Pname, Params) -> ok when Pname :: enum(),Params :: {integer()}. pointParameteriv(Pname,Params) -> cast(5399, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). -%% @spec (Coord::float()) -> ok -%% @doc See external documentation. --spec fogCoordf(float()) -> ok. +%% @doc Set the current fog coordinates +%% +%% ``gl:fogCoord'' specifies the fog coordinate that is associated with each vertex and +%% the current raster position. The value specified is interpolated and used in computing +%% the fog color (see {@link gl:fogf/2} ). +%% +%% See external documentation. +-spec fogCoordf(Coord) -> ok when Coord :: float(). fogCoordf(Coord) -> cast(5400, <>). -%% @spec ({Coord}) -> ok %% @equiv fogCoordf(Coord) --spec fogCoordfv({float()}) -> ok. +-spec fogCoordfv(Coord) -> ok when Coord :: {Coord :: float()}. fogCoordfv({Coord}) -> fogCoordf(Coord). -%% @spec (Coord::float()) -> ok -%% @doc See external documentation. --spec fogCoordd(float()) -> ok. +%% @doc +%% See {@link fogCoordf/1} +-spec fogCoordd(Coord) -> ok when Coord :: float(). fogCoordd(Coord) -> cast(5401, <>). -%% @spec ({Coord}) -> ok %% @equiv fogCoordd(Coord) --spec fogCoorddv({float()}) -> ok. +-spec fogCoorddv(Coord) -> ok when Coord :: {Coord :: float()}. fogCoorddv({Coord}) -> fogCoordd(Coord). -%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec fogCoordPointer(enum(),integer(),offset()|mem()) -> ok. +%% @doc Define an array of fog coordinates +%% +%% ``gl:fogCoordPointer'' specifies the location and data format of an array of fog coordinates +%% to use when rendering. `Type' specifies the data type of each fog coordinate, and `Stride' +%% specifies the byte stride from one fog coordinate to the next, allowing vertices and +%% attributes to be packed into a single array or stored in separate arrays. +%% +%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2} +%% ) while a fog coordinate array is specified, `Pointer' is treated as a byte offset +%% into the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING' +%% ) is saved as fog coordinate vertex array client-side state (`?GL_FOG_COORD_ARRAY_BUFFER_BINDING' +%% ). +%% +%% When a fog coordinate array is specified, `Type' , `Stride' , and `Pointer' +%% are saved as client-side state, in addition to the current vertex array buffer object +%% binding. +%% +%% To enable and disable the fog coordinate array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1} +%% with the argument `?GL_FOG_COORD_ARRAY'. If enabled, the fog coordinate array is +%% used when {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} , see `glMultiDrawElements' +%% , {@link gl:drawRangeElements/6} , or {@link gl:arrayElement/1} is called. +%% +%% See external documentation. +-spec fogCoordPointer(Type, Stride, Pointer) -> ok when Type :: enum(),Stride :: integer(),Pointer :: offset()|mem(). fogCoordPointer(Type,Stride,Pointer) when is_integer(Pointer) -> cast(5402, <>); fogCoordPointer(Type,Stride,Pointer) -> send_bin(Pointer), cast(5403, <>). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec secondaryColor3b(integer(),integer(),integer()) -> ok. +%% @doc Set the current secondary color +%% +%% The GL stores both a primary four-valued RGBA color and a secondary four-valued RGBA +%% color (where alpha is always set to 0.0) that is associated with every vertex. +%% +%% The secondary color is interpolated and applied to each fragment during rasterization +%% when `?GL_COLOR_SUM' is enabled. When lighting is enabled, and `?GL_SEPARATE_SPECULAR_COLOR' +%% is specified, the value of the secondary color is assigned the value computed from the +%% specular term of the lighting computation. Both the primary and secondary current colors +%% are applied to each fragment, regardless of the state of `?GL_COLOR_SUM', under such +%% conditions. When `?GL_SEPARATE_SPECULAR_COLOR' is specified, the value returned from +%% querying the current secondary color is undefined. +%% +%% ``gl:secondaryColor3b'', ``gl:secondaryColor3s'', and ``gl:secondaryColor3i'' take +%% three signed byte, short, or long integers as arguments. When `v' is appended to +%% the name, the color commands can take a pointer to an array of such values. +%% +%% Color values are stored in floating-point format, with unspecified mantissa and exponent +%% sizes. Unsigned integer color components, when specified, are linearly mapped to floating-point +%% values such that the largest representable value maps to 1.0 (full intensity), and 0 maps +%% to 0.0 (zero intensity). Signed integer color components, when specified, are linearly +%% mapped to floating-point values such that the most positive representable value maps to +%% 1.0, and the most negative representable value maps to -1.0. (Note that this mapping +%% does not convert 0 precisely to 0.0). Floating-point values are mapped directly. +%% +%% Neither floating-point nor signed integer values are clamped to the range [0 1] before the +%% current color is updated. However, color components are clamped to this range before they +%% are interpolated or written into a color buffer. +%% +%% See external documentation. +-spec secondaryColor3b(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). secondaryColor3b(Red,Green,Blue) -> cast(5404, <>). -%% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3b(Red,Green,Blue) --spec secondaryColor3bv({integer(),integer(),integer()}) -> ok. +-spec secondaryColor3bv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}. secondaryColor3bv({Red,Green,Blue}) -> secondaryColor3b(Red,Green,Blue). -%% @spec (Red::float(),Green::float(),Blue::float()) -> ok -%% @doc See external documentation. --spec secondaryColor3d(float(),float(),float()) -> ok. +%% @doc +%% See {@link secondaryColor3b/3} +-spec secondaryColor3d(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float(). secondaryColor3d(Red,Green,Blue) -> cast(5405, <>). -%% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3d(Red,Green,Blue) --spec secondaryColor3dv({float(),float(),float()}) -> ok. +-spec secondaryColor3dv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}. secondaryColor3dv({Red,Green,Blue}) -> secondaryColor3d(Red,Green,Blue). -%% @spec (Red::float(),Green::float(),Blue::float()) -> ok -%% @doc See external documentation. --spec secondaryColor3f(float(),float(),float()) -> ok. +%% @doc +%% See {@link secondaryColor3b/3} +-spec secondaryColor3f(Red, Green, Blue) -> ok when Red :: float(),Green :: float(),Blue :: float(). secondaryColor3f(Red,Green,Blue) -> cast(5406, <>). -%% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3f(Red,Green,Blue) --spec secondaryColor3fv({float(),float(),float()}) -> ok. +-spec secondaryColor3fv(V) -> ok when V :: {Red :: float(),Green :: float(),Blue :: float()}. secondaryColor3fv({Red,Green,Blue}) -> secondaryColor3f(Red,Green,Blue). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec secondaryColor3i(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link secondaryColor3b/3} +-spec secondaryColor3i(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). secondaryColor3i(Red,Green,Blue) -> cast(5407, <>). -%% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3i(Red,Green,Blue) --spec secondaryColor3iv({integer(),integer(),integer()}) -> ok. +-spec secondaryColor3iv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}. secondaryColor3iv({Red,Green,Blue}) -> secondaryColor3i(Red,Green,Blue). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec secondaryColor3s(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link secondaryColor3b/3} +-spec secondaryColor3s(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). secondaryColor3s(Red,Green,Blue) -> cast(5408, <>). -%% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3s(Red,Green,Blue) --spec secondaryColor3sv({integer(),integer(),integer()}) -> ok. +-spec secondaryColor3sv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}. secondaryColor3sv({Red,Green,Blue}) -> secondaryColor3s(Red,Green,Blue). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec secondaryColor3ub(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link secondaryColor3b/3} +-spec secondaryColor3ub(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). secondaryColor3ub(Red,Green,Blue) -> cast(5409, <>). -%% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3ub(Red,Green,Blue) --spec secondaryColor3ubv({integer(),integer(),integer()}) -> ok. +-spec secondaryColor3ubv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}. secondaryColor3ubv({Red,Green,Blue}) -> secondaryColor3ub(Red,Green,Blue). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec secondaryColor3ui(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link secondaryColor3b/3} +-spec secondaryColor3ui(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). secondaryColor3ui(Red,Green,Blue) -> cast(5410, <>). -%% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3ui(Red,Green,Blue) --spec secondaryColor3uiv({integer(),integer(),integer()}) -> ok. +-spec secondaryColor3uiv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}. secondaryColor3uiv({Red,Green,Blue}) -> secondaryColor3ui(Red,Green,Blue). -%% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok -%% @doc See external documentation. --spec secondaryColor3us(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link secondaryColor3b/3} +-spec secondaryColor3us(Red, Green, Blue) -> ok when Red :: integer(),Green :: integer(),Blue :: integer(). secondaryColor3us(Red,Green,Blue) -> cast(5411, <>). -%% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3us(Red,Green,Blue) --spec secondaryColor3usv({integer(),integer(),integer()}) -> ok. +-spec secondaryColor3usv(V) -> ok when V :: {Red :: integer(),Green :: integer(),Blue :: integer()}. secondaryColor3usv({Red,Green,Blue}) -> secondaryColor3us(Red,Green,Blue). -%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec secondaryColorPointer(integer(),enum(),integer(),offset()|mem()) -> ok. +%% @doc Define an array of secondary colors +%% +%% ``gl:secondaryColorPointer'' 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. `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. +%% +%% If a non-zero named buffer object is bound to the `?GL_ARRAY_BUFFER' target (see {@link gl:bindBuffer/2} +%% ) while a secondary color array is specified, `Pointer' is treated as a byte offset +%% into the buffer object's data store. Also, the buffer object binding (`?GL_ARRAY_BUFFER_BINDING' +%% ) is saved as secondary color vertex array client-side state (`?GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING' +%% ). +%% +%% When a secondary color array is specified, `Size' , `Type' , `Stride' , and `Pointer' +%% are saved as client-side state, in addition to the current vertex array buffer object +%% binding. +%% +%% To enable and disable the secondary color array, call {@link gl:enableClientState/1} and {@link gl:enableClientState/1} +%% with the argument `?GL_SECONDARY_COLOR_ARRAY'. If enabled, the secondary color array +%% is used when {@link gl:arrayElement/1} , {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , +%% {@link gl:drawElements/4} , see `glMultiDrawElements', or {@link gl:drawRangeElements/6} +%% is called. +%% +%% See external documentation. +-spec secondaryColorPointer(Size, Type, Stride, Pointer) -> ok when Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem(). secondaryColorPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) -> cast(5412, <>); secondaryColorPointer(Size,Type,Stride,Pointer) -> send_bin(Pointer), cast(5413, <>). -%% @spec (X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec windowPos2d(float(),float()) -> ok. +%% @doc Specify the raster position in window coordinates 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} +%% . +%% +%% ``gl:windowPos2'' specifies the x and y coordinates, while z is implicitly set +%% to 0. ``gl:windowPos3'' specifies all three coordinates. The w coordinate of the current +%% raster position is always set to 1.0. +%% +%% ``gl:windowPos'' directly updates the x and y coordinates of the current raster +%% position with the values specified. That is, the values are neither transformed by the +%% current modelview and projection matrices, nor by the viewport-to-window transform. The +%% z coordinate of the current raster position is updated in the following manner: +%% +%% z={n f(n+z*(f-n)) if z<= 0 if z>= 1(otherwise)) +%% +%% where n is `?GL_DEPTH_RANGE''s near value, and f is `?GL_DEPTH_RANGE''s +%% far value. See {@link gl:depthRange/2} . +%% +%% The specified coordinates are not clip-tested, causing the raster position to always +%% be valid. +%% +%% The current raster position also includes some associated color data and texture coordinates. +%% If lighting is enabled, then `?GL_CURRENT_RASTER_COLOR' (in RGBA mode) or `?GL_CURRENT_RASTER_INDEX' +%% (in color index mode) is set to the color produced by the lighting calculation (see {@link gl:lightf/3} +%% , {@link gl:lightModelf/2} , and {@link gl:shadeModel/1} ). If lighting is disabled, current +%% color (in RGBA mode, state variable `?GL_CURRENT_COLOR') or color index (in color +%% index mode, state variable `?GL_CURRENT_INDEX') is used to update the current raster +%% color. `?GL_CURRENT_RASTER_SECONDARY_COLOR' (in RGBA mode) is likewise updated. +%% +%% Likewise, `?GL_CURRENT_RASTER_TEXTURE_COORDS' is updated as a function of `?GL_CURRENT_TEXTURE_COORDS' +%% , based on the texture matrix and the texture generation functions (see {@link gl:texGend/3} ). +%% The `?GL_CURRENT_RASTER_DISTANCE' is set to the `?GL_CURRENT_FOG_COORD'. +%% +%% +%% +%% See external documentation. +-spec windowPos2d(X, Y) -> ok when X :: float(),Y :: float(). windowPos2d(X,Y) -> cast(5414, <>). -%% @spec ({X,Y}) -> ok %% @equiv windowPos2d(X,Y) --spec windowPos2dv({float(),float()}) -> ok. +-spec windowPos2dv(V) -> ok when V :: {X :: float(),Y :: float()}. windowPos2dv({X,Y}) -> windowPos2d(X,Y). -%% @spec (X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec windowPos2f(float(),float()) -> ok. +%% @doc +%% See {@link windowPos2d/2} +-spec windowPos2f(X, Y) -> ok when X :: float(),Y :: float(). windowPos2f(X,Y) -> cast(5415, <>). -%% @spec ({X,Y}) -> ok %% @equiv windowPos2f(X,Y) --spec windowPos2fv({float(),float()}) -> ok. +-spec windowPos2fv(V) -> ok when V :: {X :: float(),Y :: float()}. windowPos2fv({X,Y}) -> windowPos2f(X,Y). -%% @spec (X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec windowPos2i(integer(),integer()) -> ok. +%% @doc +%% See {@link windowPos2d/2} +-spec windowPos2i(X, Y) -> ok when X :: integer(),Y :: integer(). windowPos2i(X,Y) -> cast(5416, <>). -%% @spec ({X,Y}) -> ok %% @equiv windowPos2i(X,Y) --spec windowPos2iv({integer(),integer()}) -> ok. +-spec windowPos2iv(V) -> ok when V :: {X :: integer(),Y :: integer()}. windowPos2iv({X,Y}) -> windowPos2i(X,Y). -%% @spec (X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec windowPos2s(integer(),integer()) -> ok. +%% @doc +%% See {@link windowPos2d/2} +-spec windowPos2s(X, Y) -> ok when X :: integer(),Y :: integer(). windowPos2s(X,Y) -> cast(5417, <>). -%% @spec ({X,Y}) -> ok %% @equiv windowPos2s(X,Y) --spec windowPos2sv({integer(),integer()}) -> ok. +-spec windowPos2sv(V) -> ok when V :: {X :: integer(),Y :: integer()}. windowPos2sv({X,Y}) -> windowPos2s(X,Y). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec windowPos3d(float(),float(),float()) -> ok. +%% @doc +%% See {@link windowPos2d/2} +-spec windowPos3d(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float(). windowPos3d(X,Y,Z) -> cast(5418, <>). -%% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3d(X,Y,Z) --spec windowPos3dv({float(),float(),float()}) -> ok. +-spec windowPos3dv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}. windowPos3dv({X,Y,Z}) -> windowPos3d(X,Y,Z). -%% @spec (X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec windowPos3f(float(),float(),float()) -> ok. +%% @doc +%% See {@link windowPos2d/2} +-spec windowPos3f(X, Y, Z) -> ok when X :: float(),Y :: float(),Z :: float(). windowPos3f(X,Y,Z) -> cast(5419, <>). -%% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3f(X,Y,Z) --spec windowPos3fv({float(),float(),float()}) -> ok. +-spec windowPos3fv(V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}. windowPos3fv({X,Y,Z}) -> windowPos3f(X,Y,Z). -%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec windowPos3i(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link windowPos2d/2} +-spec windowPos3i(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer(). windowPos3i(X,Y,Z) -> cast(5420, <>). -%% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3i(X,Y,Z) --spec windowPos3iv({integer(),integer(),integer()}) -> ok. +-spec windowPos3iv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}. windowPos3iv({X,Y,Z}) -> windowPos3i(X,Y,Z). -%% @spec (X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec windowPos3s(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link windowPos2d/2} +-spec windowPos3s(X, Y, Z) -> ok when X :: integer(),Y :: integer(),Z :: integer(). windowPos3s(X,Y,Z) -> cast(5421, <>). -%% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3s(X,Y,Z) --spec windowPos3sv({integer(),integer(),integer()}) -> ok. +-spec windowPos3sv(V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}. windowPos3sv({X,Y,Z}) -> windowPos3s(X,Y,Z). -%% @spec (N::integer()) -> [integer()] -%% @doc See external documentation. --spec genQueries(integer()) -> [integer()]. +%% @doc Generate query object names +%% +%% ``gl:genQueries'' returns `N' query object names in `Ids' . 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:genQueries''. +%% +%% Query object names returned by a call to ``gl:genQueries'' are not returned by subsequent +%% calls, unless they are first deleted with {@link gl:deleteQueries/1} . +%% +%% No query objects are associated with the returned query object names until they are first +%% used by calling {@link gl:beginQuery/2} . +%% +%% See external documentation. +-spec genQueries(N) -> [integer()] when N :: integer(). genQueries(N) -> call(5422, <>). -%% @spec (Ids::[integer()]) -> ok -%% @doc See external documentation. --spec deleteQueries([integer()]) -> ok. +%% @doc Delete named query objects +%% +%% ``gl:deleteQueries'' deletes `N' query objects named by the elements of the array `Ids' +%% . After a query object is deleted, it has no contents, and its name is free for reuse +%% (for example by {@link gl:genQueries/1} ). +%% +%% ``gl:deleteQueries'' silently ignores 0's and names that do not correspond to existing +%% query objects. +%% +%% See external documentation. +-spec deleteQueries(Ids) -> ok when Ids :: [integer()]. deleteQueries(Ids) -> cast(5423, <<(length(Ids)):?GLuint, (<< <> || C <- Ids>>)/binary,0:(((1+length(Ids)) rem 2)*32)>>). -%% @spec (Id::integer()) -> 0|1 -%% @doc See external documentation. --spec isQuery(integer()) -> 0|1. +%% @doc Determine if a name corresponds to a query object +%% +%% ``gl:isQuery'' returns `?GL_TRUE' if `Id' is currently the name of a query +%% object. If `Id' is zero, or is a non-zero value that is not currently the name of +%% a query object, or if an error occurs, ``gl:isQuery'' returns `?GL_FALSE'. +%% +%% A name returned by {@link gl:genQueries/1} , but not yet associated with a query object +%% by calling {@link gl:beginQuery/2} , is not the name of a query object. +%% +%% See external documentation. +-spec isQuery(Id) -> 0|1 when Id :: integer(). isQuery(Id) -> call(5424, <>). -%% @spec (Target::enum(),Id::integer()) -> ok -%% @doc See external documentation. --spec beginQuery(enum(),integer()) -> ok. +%% @doc Delimit the boundaries of a query object +%% +%% ``gl:beginQuery'' and {@link gl:beginQuery/2} delimit the boundaries of a query object. `Query' +%% must be a name previously returned from a call to {@link gl:genQueries/1} . If a query +%% object with name `Id' does not yet exist it is created with the type determined by `Target' +%% . `Target' must be one of `?GL_SAMPLES_PASSED', `?GL_ANY_SAMPLES_PASSED', `?GL_PRIMITIVES_GENERATED' +%% , `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN', or `?GL_TIME_ELAPSED'. The behavior +%% of the query object depends on its type and is as follows. +%% +%% If `Target' is `?GL_SAMPLES_PASSED', `Id' must be an unused name, or the +%% name of an existing occlusion query object. When ``gl:beginQuery'' is executed, the +%% query object's samples-passed counter is reset to 0. Subsequent rendering will increment +%% the counter for every sample that passes the depth test. If the value of `?GL_SAMPLE_BUFFERS' +%% is 0, then the samples-passed count is incremented by 1 for each fragment. If the value +%% of `?GL_SAMPLE_BUFFERS' is 1, then the samples-passed count is incremented by the +%% number of samples whose coverage bit is set. However, implementations, at their discression +%% may instead increase the samples-passed count by the value of `?GL_SAMPLES' if any +%% sample in the fragment is covered. When ``gl:endQuery'' is executed, the samples-passed +%% counter is assigned to the query object's result value. This value can be queried by calling +%% {@link gl:getQueryObjectiv/2} with `Pname' `?GL_QUERY_RESULT'. +%% +%% If `Target' is `?GL_ANY_SAMPLES_PASSED', `Id' must be an unused name, +%% or the name of an existing boolean occlusion query object. When ``gl:beginQuery'' is +%% executed, the query object's samples-passed flag is reset to `?GL_FALSE'. Subsequent +%% rendering causes the flag to be set to `?GL_TRUE' if any sample passes the depth +%% test. When ``gl:endQuery'' is executed, the samples-passed flag is assigned to the query +%% object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2} +%% with `Pname' `?GL_QUERY_RESULT'. +%% +%% If `Target' is `?GL_PRIMITIVES_GENERATED', `Id' must be an unused name, +%% or the name of an existing primitive query object previously bound to the `?GL_PRIMITIVES_GENERATED' +%% query binding. When ``gl:beginQuery'' is executed, the query object's primitives-generated +%% counter is reset to 0. Subsequent rendering will increment the counter once for every +%% vertex that is emitted from the geometry shader, or from the vertex shader if no geometry +%% shader is present. When ``gl:endQuery'' is executed, the primitives-generated counter +%% is assigned to the query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2} +%% with `Pname' `?GL_QUERY_RESULT'. +%% +%% If `Target' is `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN', `Id' must +%% be an unused name, or the name of an existing primitive query object previously bound +%% to the `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN' query binding. When ``gl:beginQuery'' +%% is executed, the query object's primitives-written counter is reset to 0. Subsequent +%% rendering will increment the counter once for every vertex that is written into the bound +%% transform feedback buffer(s). If transform feedback mode is not activated between the +%% call to ``gl:beginQuery'' and ``gl:endQuery'', the counter will not be incremented. +%% When ``gl:endQuery'' is executed, the primitives-written counter is assigned to the +%% query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2} +%% with `Pname' `?GL_QUERY_RESULT'. +%% +%% If `Target' is `?GL_TIME_ELAPSED', `Id' must be an unused name, or the +%% name of an existing timer query object previously bound to the `?GL_TIME_ELAPSED' +%% query binding. When ``gl:beginQuery'' is executed, the query object's time counter is +%% reset to 0. When ``gl:endQuery'' is executed, the elapsed server time that has passed +%% since the call to ``gl:beginQuery'' is written into the query object's time counter. +%% This value can be queried by calling {@link gl:getQueryObjectiv/2} with `Pname' `?GL_QUERY_RESULT' +%% . +%% +%% Querying the `?GL_QUERY_RESULT' implicitly flushes the GL pipeline until the rendering +%% delimited by the query object has completed and the result is available. `?GL_QUERY_RESULT_AVAILABLE' +%% can be queried to determine if the result is immediately available or if the rendering +%% is not yet complete. +%% +%% See external documentation. +-spec beginQuery(Target, Id) -> ok when Target :: enum(),Id :: integer(). beginQuery(Target,Id) -> cast(5425, <>). -%% @spec (Target::enum()) -> ok -%% @doc See external documentation. --spec endQuery(enum()) -> ok. +%% @doc +%% See {@link beginQuery/2} +-spec endQuery(Target) -> ok when Target :: enum(). endQuery(Target) -> cast(5426, <>). -%% @spec (Target::enum(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getQueryiv(enum(),enum()) -> integer(). +%% @doc glGetQuery +%% +%% See external documentation. +-spec getQueryiv(Target, Pname) -> integer() when Target :: enum(),Pname :: enum(). getQueryiv(Target,Pname) -> call(5427, <>). -%% @spec (Id::integer(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getQueryObjectiv(integer(),enum()) -> integer(). +%% @doc Return parameters of a query object +%% +%% ``gl:getQueryObject'' returns in `Params' a selected parameter of the query object +%% specified by `Id' . +%% +%% `Pname' names a specific query object parameter. `Pname' can be as follows: +%% +%% `?GL_QUERY_RESULT': `Params' returns the value of the query object's passed +%% samples counter. The initial value is 0. +%% +%% `?GL_QUERY_RESULT_AVAILABLE': `Params' returns whether the passed samples counter +%% is immediately available. If a delay would occur waiting for the query result, `?GL_FALSE' +%% is returned. Otherwise, `?GL_TRUE' is returned, which also indicates that the results +%% of all previous queries are available as well. +%% +%% See external documentation. +-spec getQueryObjectiv(Id, Pname) -> integer() when Id :: integer(),Pname :: enum(). getQueryObjectiv(Id,Pname) -> call(5428, <>). -%% @spec (Id::integer(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getQueryObjectuiv(integer(),enum()) -> integer(). +%% @doc +%% See {@link getQueryObjectiv/2} +-spec getQueryObjectuiv(Id, Pname) -> integer() when Id :: integer(),Pname :: enum(). getQueryObjectuiv(Id,Pname) -> call(5429, <>). -%% @spec (Target::enum(),Buffer::integer()) -> ok -%% @doc See external documentation. --spec bindBuffer(enum(),integer()) -> ok. +%% @doc Bind a named buffer object +%% +%% ``gl:bindBuffer'' binds a buffer object to the specified buffer binding point. Calling ``gl:bindBuffer'' +%% with `Target' set to one of the accepted symbolic constants and `Buffer' set +%% to the name of a buffer object binds that buffer object name to the target. If no buffer +%% object with name `Buffer' exists, one is created with that name. When a buffer object +%% is bound to a target, the previous binding for that target is automatically broken. +%% +%% Buffer object names are unsigned integers. The value zero is reserved, but there is no +%% default buffer object for each buffer object target. Instead, `Buffer' set to zero +%% effectively unbinds any buffer object previously bound, and restores client memory usage +%% for that buffer object target (if supported for that target). Buffer object names and +%% the corresponding buffer object contents are local to the shared object space of the current +%% GL rendering context; two rendering contexts share buffer object names only if they explicitly +%% enable sharing between contexts through the appropriate GL windows interfaces functions. +%% +%% {@link gl:genBuffers/1} must be used to generate a set of unused buffer object names. +%% +%% The state of a buffer object immediately after it is first bound is an unmapped zero-sized +%% memory buffer with `?GL_READ_WRITE' access and `?GL_STATIC_DRAW' usage. +%% +%% While a non-zero buffer object name is bound, GL operations on the target to which it +%% is bound affect the bound buffer object, and queries of the target to which it is bound +%% return state from the bound buffer object. While buffer object name zero is bound, as +%% in the initial state, attempts to modify or query state on the target to which it is bound +%% generates an `?GL_INVALID_OPERATION' error. +%% +%% When a non-zero buffer object is bound to the `?GL_ARRAY_BUFFER' target, the vertex +%% array pointer parameter is interpreted as an offset within the buffer object measured +%% in basic machine units. +%% +%% When a non-zero buffer object is bound to the `?GL_DRAW_INDIRECT_BUFFER' target, +%% parameters for draws issued through {@link gl:drawArraysIndirect/2} and {@link gl:drawElementsIndirect/3} +%% are sourced from that buffer object. +%% +%% While a non-zero buffer object is bound to the `?GL_ELEMENT_ARRAY_BUFFER' target, +%% the indices parameter of {@link gl:drawElements/4} , {@link gl:drawElementsInstanced/5} , {@link gl:drawElementsBaseVertex/5} +%% , {@link gl:drawRangeElements/6} , {@link gl:drawRangeElementsBaseVertex/7} , see `glMultiDrawElements' +%% , or see `glMultiDrawElementsBaseVertex' is interpreted as an offset within the +%% buffer object measured in basic machine units. +%% +%% While a non-zero buffer object is bound to the `?GL_PIXEL_PACK_BUFFER' target, +%% the following commands are affected: {@link gl:getCompressedTexImage/3} , {@link gl:getTexImage/5} +%% , and {@link gl:readPixels/7} . The pointer parameter is interpreted as an offset within +%% the buffer object measured in basic machine units. +%% +%% While a non-zero buffer object is bound to the `?GL_PIXEL_UNPACK_BUFFER' target, +%% the following commands are affected: {@link gl:compressedTexImage1D/7} , {@link gl:compressedTexImage2D/8} +%% , {@link gl:compressedTexImage3D/9} , {@link gl:compressedTexSubImage1D/7} , {@link gl:compressedTexSubImage2D/9} +%% , {@link gl:compressedTexSubImage3D/11} , {@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} . +%% The pointer parameter is interpreted as an offset within the buffer object measured in +%% basic machine units. +%% +%% The buffer targets `?GL_COPY_READ_BUFFER' and `?GL_COPY_WRITE_BUFFER' are provided +%% to allow {@link gl:copyBufferSubData/5} to be used without disturbing the state of other +%% bindings. However, {@link gl:copyBufferSubData/5} may be used with any pair of buffer binding +%% points. +%% +%% The `?GL_TRANSFORM_FEEDBACK_BUFFER' buffer binding point may be passed to ``gl:bindBuffer'' +%% , but will not directly affect transform feedback state. Instead, the indexed `?GL_TRANSFORM_FEEDBACK_BUFFER' +%% bindings must be used through a call to {@link gl:bindBufferBase/3} or {@link gl:bindBufferRange/5} +%% . This will affect the generic `?GL_TRANSFORM_FEEDABCK_BUFFER' binding. +%% +%% Likewise, the `?GL_UNIFORM_BUFFER' and `?GL_ATOMIC_COUNTER_BUFFER' buffer binding +%% points may be used, but do not directly affect uniform buffer or atomic counter buffer +%% state, respectively. {@link gl:bindBufferBase/3} or {@link gl:bindBufferRange/5} must be +%% used to bind a buffer to an indexed uniform buffer or atomic counter buffer binding point. +%% +%% +%% A buffer object binding created with ``gl:bindBuffer'' remains active until a different +%% buffer object name is bound to the same target, or until the bound buffer object is deleted +%% with {@link gl:deleteBuffers/1} . +%% +%% Once created, a named buffer object may be re-bound to any target as often as needed. +%% However, the GL implementation may make choices about how to optimize the storage of a +%% buffer object based on its initial binding target. +%% +%% See external documentation. +-spec bindBuffer(Target, Buffer) -> ok when Target :: enum(),Buffer :: integer(). bindBuffer(Target,Buffer) -> cast(5430, <>). -%% @spec (Buffers::[integer()]) -> ok -%% @doc See external documentation. --spec deleteBuffers([integer()]) -> ok. +%% @doc Delete named buffer objects +%% +%% ``gl:deleteBuffers'' deletes `N' buffer objects named by the elements of the array +%% `Buffers' . After a buffer object is deleted, it has no contents, and its name is +%% free for reuse (for example by {@link gl:genBuffers/1} ). If a buffer object that is currently +%% bound is deleted, the binding reverts to 0 (the absence of any buffer object). +%% +%% ``gl:deleteBuffers'' silently ignores 0's and names that do not correspond to existing +%% buffer objects. +%% +%% See external documentation. +-spec deleteBuffers(Buffers) -> ok when Buffers :: [integer()]. deleteBuffers(Buffers) -> cast(5431, <<(length(Buffers)):?GLuint, (<< <> || C <- Buffers>>)/binary,0:(((1+length(Buffers)) rem 2)*32)>>). -%% @spec (N::integer()) -> [integer()] -%% @doc See external documentation. --spec genBuffers(integer()) -> [integer()]. +%% @doc Generate buffer object names +%% +%% ``gl:genBuffers'' returns `N' buffer object names in `Buffers' . 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:genBuffers'' +%% . +%% +%% Buffer object names returned by a call to ``gl:genBuffers'' are not returned by subsequent +%% calls, unless they are first deleted with {@link gl:deleteBuffers/1} . +%% +%% No buffer objects are associated with the returned buffer object names until they are +%% first bound by calling {@link gl:bindBuffer/2} . +%% +%% See external documentation. +-spec genBuffers(N) -> [integer()] when N :: integer(). genBuffers(N) -> call(5432, <>). -%% @spec (Buffer::integer()) -> 0|1 -%% @doc See external documentation. --spec isBuffer(integer()) -> 0|1. +%% @doc Determine if a name corresponds to a buffer object +%% +%% ``gl:isBuffer'' returns `?GL_TRUE' if `Buffer' is currently the name of a +%% buffer object. If `Buffer' is zero, or is a non-zero value that is not currently +%% the name of a buffer object, or if an error occurs, ``gl:isBuffer'' returns `?GL_FALSE' +%% . +%% +%% A name returned by {@link gl:genBuffers/1} , but not yet associated with a buffer object +%% by calling {@link gl:bindBuffer/2} , is not the name of a buffer object. +%% +%% See external documentation. +-spec isBuffer(Buffer) -> 0|1 when Buffer :: integer(). isBuffer(Buffer) -> call(5433, <>). -%% @spec (Target::enum(),Size::integer(),Data::offset()|mem(),Usage::enum()) -> ok -%% @doc See external documentation. --spec bufferData(enum(),integer(),offset()|mem(),enum()) -> ok. +%% @doc Creates and initializes a buffer object's data store +%% +%% ``gl:bufferData'' creates a new data store for the buffer object currently bound to `Target' +%% . Any pre-existing data store is deleted. The new data store is created with the specified +%% `Size' in bytes and `Usage' . If `Data' is not `?NULL', the data store +%% is initialized with data from this pointer. In its initial state, the new data store +%% is not mapped, it has a `?NULL' mapped pointer, and its mapped access is `?GL_READ_WRITE' +%% . +%% +%% `Usage' is a hint to the GL implementation as to how a buffer object's data store +%% will be accessed. This enables the GL implementation to make more intelligent decisions +%% that may significantly impact buffer object performance. It does not, however, constrain +%% the actual usage of the data store. `Usage' can be broken down into two parts: first, +%% the frequency of access (modification and usage), and second, the nature of that access. +%% The frequency of access may be one of these: +%% +%% STREAM: The data store contents will be modified once and used at most a few times. +%% +%% STATIC: The data store contents will be modified once and used many times. +%% +%% DYNAMIC: The data store contents will be modified repeatedly and used many times. +%% +%% The nature of access may be one of these: +%% +%% DRAW: The data store contents are modified by the application, and used as the source +%% for GL drawing and image specification commands. +%% +%% READ: The data store contents are modified by reading data from the GL, and used to return +%% that data when queried by the application. +%% +%% COPY: The data store contents are modified by reading data from the GL, and used as the +%% source for GL drawing and image specification commands. +%% +%% See external documentation. +-spec bufferData(Target, Size, Data, Usage) -> ok when Target :: enum(),Size :: integer(),Data :: offset()|mem(),Usage :: enum(). bufferData(Target,Size,Data,Usage) when is_integer(Data) -> cast(5434, <>); bufferData(Target,Size,Data,Usage) -> send_bin(Data), cast(5435, <>). -%% @spec (Target::enum(),Offset::integer(),Size::integer(),Data::offset()|mem()) -> ok -%% @doc See external documentation. --spec bufferSubData(enum(),integer(),integer(),offset()|mem()) -> ok. +%% @doc Updates a subset of a buffer object's data store +%% +%% ``gl:bufferSubData'' redefines some or all of the data store for the buffer object currently +%% bound to `Target' . Data starting at byte offset `Offset' and extending for `Size' +%% bytes is copied to the data store from the memory pointed to by `Data' . An error +%% is thrown if `Offset' and `Size' together define a range beyond the bounds of +%% the buffer object's data store. +%% +%% See external documentation. +-spec bufferSubData(Target, Offset, Size, Data) -> ok when Target :: enum(),Offset :: integer(),Size :: integer(),Data :: offset()|mem(). bufferSubData(Target,Offset,Size,Data) when is_integer(Data) -> cast(5436, <>); bufferSubData(Target,Offset,Size,Data) -> send_bin(Data), cast(5437, <>). -%% @spec (Target::enum(),Offset::integer(),Size::integer(),Data::mem()) -> ok -%% @doc See external documentation. --spec getBufferSubData(enum(),integer(),integer(),mem()) -> ok. +%% @doc Returns a subset of a buffer object's data store +%% +%% ``gl:getBufferSubData'' returns some or all of the data from the buffer object currently +%% bound to `Target' . Data starting at byte offset `Offset' and extending for `Size' +%% bytes is copied from the data store to the memory pointed to by `Data' . An error +%% is thrown if the buffer object is currently mapped, or if `Offset' and `Size' +%% together define a range beyond the bounds of the buffer object's data store. +%% +%% See external documentation. +-spec getBufferSubData(Target, Offset, Size, Data) -> ok when Target :: enum(),Offset :: integer(),Size :: integer(),Data :: mem(). getBufferSubData(Target,Offset,Size,Data) -> send_bin(Data), call(5438, <>). -%% @spec (Target::enum(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getBufferParameteriv(enum(),enum()) -> integer(). +%% @doc Return parameters of a buffer object +%% +%% ``gl:getBufferParameteriv'' returns in `Data' a selected parameter of the buffer +%% object specified by `Target' . +%% +%% `Value' names a specific buffer object parameter, as follows: +%% +%% `?GL_BUFFER_ACCESS': `Params' returns the access policy set while mapping the +%% buffer object. The initial value is `?GL_READ_WRITE'. +%% +%% `?GL_BUFFER_MAPPED': `Params' returns a flag indicating whether the buffer object +%% is currently mapped. The initial value is `?GL_FALSE'. +%% +%% `?GL_BUFFER_SIZE': `Params' returns the size of the buffer object, measured +%% in bytes. The initial value is 0. +%% +%% `?GL_BUFFER_USAGE': `Params' returns the buffer object's usage pattern. The +%% initial value is `?GL_STATIC_DRAW'. +%% +%% See external documentation. +-spec getBufferParameteriv(Target, Pname) -> integer() when Target :: enum(),Pname :: enum(). getBufferParameteriv(Target,Pname) -> call(5439, <>). -%% @spec (ModeRGB::enum(),ModeAlpha::enum()) -> ok -%% @doc See external documentation. --spec blendEquationSeparate(enum(),enum()) -> ok. +%% @doc Set the RGB blend equation and the alpha blend equation separately +%% +%% The blend equations determines how a new pixel (the ''source'' color) is combined with +%% a pixel already in the framebuffer (the ''destination'' color). These functions specifie +%% one blend equation for the RGB-color components and one blend equation for the alpha +%% component. ``gl:blendEquationSeparatei'' specifies the blend equations for a single +%% draw buffer whereas ``gl:blendEquationSeparate'' sets the blend equations for all draw +%% buffers. +%% +%% The blend equations use the source and destination blend factors specified by either {@link gl:blendFunc/2} +%% or {@link gl:blendFuncSeparate/4} . See {@link gl:blendFunc/2} or {@link gl:blendFuncSeparate/4} +%% for a description of the various blend factors. +%% +%% In the equations that follow, source and destination color components are referred to +%% as (R s G s B s A s) and (R d G d B d A d), respectively. The result color is referred to as (R r G r B r A r). The source and destination +%% blend factors are denoted (s R s G s B s A) and (d R d G d B d A), respectively. For these equations all color components +%% are understood to have values in the range [0 1]. +%%
` Mode ' +%% ` RGB Components '` Alpha Component '
`?GL_FUNC_ADD' +%% Rr= R s s R+R d d R Gr= G s s G+G d d G Br= B s s B+B d d B Ar= +%% A s s A+A d d A
`?GL_FUNC_SUBTRACT' Rr= R s s R-R d d +%% R Gr= G s s G-G d d G Br= B s s B-B d d B Ar= A s s A-A d d A
`?GL_FUNC_REVERSE_SUBTRACT' Rr= R d d R-R s s R Gr= G d d G-G s s G +%% Br= B d d B-B s s B Ar= A d d A-A s s A
`?GL_MIN' +%% Rr= min(R s R d) Gr= min(G s G d) Br= min(B s B d) Ar= min(A s A d)
`?GL_MAX' Rr= +%% max(R s R d) Gr= max(G s G d) Br= max(B s B d) Ar= max(A s A d)
+%% +%% The results of these equations are clamped to the range [0 1]. +%% +%% The `?GL_MIN' and `?GL_MAX' equations are useful for applications that analyze +%% image data (image thresholding against a constant color, for example). The `?GL_FUNC_ADD' +%% equation is useful for antialiasing and transparency, among other things. +%% +%% Initially, both the RGB blend equation and the alpha blend equation are set to `?GL_FUNC_ADD' +%% . +%% +%% +%% +%% See external documentation. +-spec blendEquationSeparate(ModeRGB, ModeAlpha) -> ok when ModeRGB :: enum(),ModeAlpha :: enum(). blendEquationSeparate(ModeRGB,ModeAlpha) -> cast(5440, <>). -%% @spec (Bufs::[enum()]) -> ok -%% @doc See external documentation. --spec drawBuffers([enum()]) -> ok. +%% @doc Specifies a list of color buffers to be drawn into +%% +%% ``gl:drawBuffers'' defines an array of buffers into which outputs from the fragment +%% shader data will be written. If a fragment shader writes a value to one or more user defined +%% output variables, then the value of each variable will be written into the buffer specified +%% at a location within `Bufs' corresponding to the location assigned to that user defined +%% output. The draw buffer used for user defined outputs assigned to locations greater than +%% or equal to `N' is implicitly set to `?GL_NONE' and any data written to such +%% an output is discarded. +%% +%% The symbolic constants contained in `Bufs' may be any of the following: +%% +%% `?GL_NONE': The fragment shader output value is not written into any color buffer. +%% +%% `?GL_FRONT_LEFT': The fragment shader output value is written into the front left +%% color buffer. +%% +%% `?GL_FRONT_RIGHT': The fragment shader output value is written into the front right +%% color buffer. +%% +%% `?GL_BACK_LEFT': The fragment shader output value is written into the back left color +%% buffer. +%% +%% `?GL_BACK_RIGHT': The fragment shader output value is written into the back right +%% color buffer. +%% +%% `?GL_COLOR_ATTACHMENT'`n': The fragment shader output value is written into +%% the `n'th color attachment of the current framebuffer. `n' may range from 0 +%% to the value of `?GL_MAX_COLOR_ATTACHMENTS'. +%% +%% Except for `?GL_NONE', the preceding symbolic constants may not appear more than +%% once in `Bufs' . The maximum number of draw buffers supported is implementation dependent +%% and can be queried by calling {@link gl:getBooleanv/1} with the argument `?GL_MAX_DRAW_BUFFERS' +%% . +%% +%% See external documentation. +-spec drawBuffers(Bufs) -> ok when Bufs :: [enum()]. drawBuffers(Bufs) -> cast(5441, <<(length(Bufs)):?GLuint, (<< <> || C <- Bufs>>)/binary,0:(((1+length(Bufs)) rem 2)*32)>>). -%% @spec (Face::enum(),Sfail::enum(),Dpfail::enum(),Dppass::enum()) -> ok -%% @doc See external documentation. --spec stencilOpSeparate(enum(),enum(),enum(),enum()) -> ok. +%% @doc Set front and/or 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. +%% +%% The stencil test conditionally eliminates a pixel based on the outcome of a comparison +%% between the value in the stencil buffer and a reference value. To enable and disable the +%% test, call {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_STENCIL_TEST' +%% ; to control it, call {@link gl:stencilFunc/3} or {@link gl:stencilFuncSeparate/4} . +%% +%% There can be two separate sets of `Sfail' , `Dpfail' , and `Dppass' parameters; +%% one affects back-facing polygons, and the other affects front-facing polygons as well +%% as other non-polygon primitives. {@link gl:stencilOp/3} sets both front and back stencil +%% state to the same values, as if {@link gl:stencilOpSeparate/4} were called with `Face' +%% set to `?GL_FRONT_AND_BACK'. +%% +%% ``gl:stencilOpSeparate'' takes three arguments that indicate what happens to the stored +%% stencil value while stenciling is enabled. If the stencil test fails, no change is made +%% to the pixel's color or depth buffers, and `Sfail' specifies what happens to the +%% stencil buffer contents. The following eight actions are possible. +%% +%% `?GL_KEEP': Keeps the current value. +%% +%% `?GL_ZERO': Sets the stencil buffer value to 0. +%% +%% `?GL_REPLACE': Sets the stencil buffer value to `ref', as specified by {@link gl:stencilFunc/3} +%% . +%% +%% `?GL_INCR': Increments the current stencil buffer value. Clamps to the maximum representable +%% unsigned value. +%% +%% `?GL_INCR_WRAP': Increments the current stencil buffer value. Wraps stencil buffer +%% value to zero when incrementing the maximum representable unsigned value. +%% +%% `?GL_DECR': Decrements the current stencil buffer value. Clamps to 0. +%% +%% `?GL_DECR_WRAP': Decrements the current stencil buffer value. Wraps stencil buffer +%% value to the maximum representable unsigned value when decrementing a stencil buffer value +%% of zero. +%% +%% `?GL_INVERT': Bitwise inverts the current stencil buffer value. +%% +%% Stencil buffer values are treated as unsigned integers. When incremented and decremented, +%% values are clamped to 0 and 2 n-1, where n is the value returned by querying `?GL_STENCIL_BITS' +%% . +%% +%% The other two arguments to ``gl:stencilOpSeparate'' specify stencil buffer actions +%% that depend on whether subsequent depth buffer tests succeed ( `Dppass' ) or fail ( `Dpfail' +%% ) (see {@link gl:depthFunc/1} ). The actions are specified using the same eight symbolic +%% constants as `Sfail' . Note that `Dpfail' is ignored when there is no depth buffer, +%% or when the depth buffer is not enabled. In these cases, `Sfail' and `Dppass' +%% specify stencil action when the stencil test fails and passes, respectively. +%% +%% See external documentation. +-spec stencilOpSeparate(Face, Sfail, Dpfail, Dppass) -> ok when Face :: enum(),Sfail :: enum(),Dpfail :: enum(),Dppass :: enum(). stencilOpSeparate(Face,Sfail,Dpfail,Dppass) -> cast(5442, <>). -%% @spec (Face::enum(),Func::enum(),Ref::integer(),Mask::integer()) -> ok -%% @doc See external documentation. --spec stencilFuncSeparate(enum(),enum(),integer(),integer()) -> ok. +%% @doc Set front and/or back function and reference value for stencil testing +%% +%% 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. +%% +%% The stencil test conditionally eliminates a pixel based on the outcome of a comparison +%% between the reference value and the value in the stencil buffer. To enable and disable +%% the test, call {@link gl:enable/1} and {@link gl:enable/1} with argument `?GL_STENCIL_TEST' +%% . To specify actions based on the outcome of the stencil test, call {@link gl:stencilOp/3} +%% or {@link gl:stencilOpSeparate/4} . +%% +%% There can be two separate sets of `Func' , `Ref' , and `Mask' parameters; +%% one affects back-facing polygons, and the other affects front-facing polygons as well +%% as other non-polygon primitives. {@link gl:stencilFunc/3} sets both front and back stencil +%% state to the same values, as if {@link gl:stencilFuncSeparate/4} were called with `Face' +%% set to `?GL_FRONT_AND_BACK'. +%% +%% `Func' is a symbolic constant that determines the stencil comparison function. It +%% accepts one of eight values, shown in the following list. `Ref' is an integer reference +%% value that is used in the stencil comparison. It is clamped to the range [0 2 n-1], where n +%% is the number of bitplanes in the stencil buffer. `Mask' is bitwise ANDed with both +%% the reference value and the stored stencil value, with the ANDed values participating +%% in the comparison. +%% +%% If `stencil' represents the value stored in the corresponding stencil buffer location, +%% the following list shows the effect of each comparison function that can be specified by `Func' +%% . Only if the comparison succeeds is the pixel passed through to the next stage in the +%% rasterization process (see {@link gl:stencilOp/3} ). All tests treat `stencil' values +%% as unsigned integers in the range [0 2 n-1], where n is the number of bitplanes in the stencil +%% buffer. +%% +%% The following values are accepted by `Func' : +%% +%% `?GL_NEVER': Always fails. +%% +%% `?GL_LESS': Passes if ( `Ref' & `Mask' ) < ( `stencil' & `Mask' +%% ). +%% +%% `?GL_LEQUAL': Passes if ( `Ref' & `Mask' ) <= ( `stencil' +%% & `Mask' ). +%% +%% `?GL_GREATER': Passes if ( `Ref' & `Mask' ) > ( `stencil' +%% & `Mask' ). +%% +%% `?GL_GEQUAL': Passes if ( `Ref' & `Mask' ) >= ( `stencil' +%% & `Mask' ). +%% +%% `?GL_EQUAL': Passes if ( `Ref' & `Mask' ) = ( `stencil' & `Mask' +%% ). +%% +%% `?GL_NOTEQUAL': Passes if ( `Ref' & `Mask' ) != ( `stencil' & +%% `Mask' ). +%% +%% `?GL_ALWAYS': Always passes. +%% +%% See external documentation. +-spec stencilFuncSeparate(Face, Func, Ref, Mask) -> ok when Face :: enum(),Func :: enum(),Ref :: integer(),Mask :: integer(). stencilFuncSeparate(Face,Func,Ref,Mask) -> cast(5443, <>). -%% @spec (Face::enum(),Mask::integer()) -> ok -%% @doc See external documentation. --spec stencilMaskSeparate(enum(),integer()) -> ok. +%% @doc Control the front and/or back writing of individual bits in the stencil planes +%% +%% ``gl:stencilMaskSeparate'' 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. +%% +%% There can be two separate `Mask' writemasks; one affects back-facing polygons, and +%% the other affects front-facing polygons as well as other non-polygon primitives. {@link gl:stencilMask/1} +%% sets both front and back stencil writemasks to the same values, as if {@link gl:stencilMaskSeparate/2} +%% were called with `Face' set to `?GL_FRONT_AND_BACK'. +%% +%% See external documentation. +-spec stencilMaskSeparate(Face, Mask) -> ok when Face :: enum(),Mask :: integer(). stencilMaskSeparate(Face,Mask) -> cast(5444, <>). -%% @spec (Program::integer(),Shader::integer()) -> ok -%% @doc See external documentation. --spec attachShader(integer(),integer()) -> ok. +%% @doc Attaches a shader object to a program object +%% +%% In order to create a complete shader program, there must be a way to specify the list +%% of things that will be linked together. Program objects provide this mechanism. Shaders +%% that are to be linked together in a program object must first be attached to that program +%% object. ``gl:attachShader'' attaches the shader object specified by `Shader' to +%% the program object specified by `Program' . This indicates that `Shader' will +%% be included in link operations that will be performed on `Program' . +%% +%% All operations that can be performed on a shader object are valid whether or not the +%% shader object is attached to a program object. It is permissible to attach a shader object +%% to a program object before source code has been loaded into the shader object or before +%% the shader object has been compiled. It is permissible to attach multiple shader objects +%% of the same type because each may contain a portion of the complete shader. It is also +%% permissible to attach a shader object to more than one program object. If a shader object +%% is deleted while it is attached to a program object, it will be flagged for deletion, +%% and deletion will not occur until {@link gl:detachShader/2} is called to detach it from +%% all program objects to which it is attached. +%% +%% See external documentation. +-spec attachShader(Program, Shader) -> ok when Program :: integer(),Shader :: integer(). attachShader(Program,Shader) -> cast(5445, <>). -%% @spec (Program::integer(),Index::integer(),Name::string()) -> ok -%% @doc See external documentation. --spec bindAttribLocation(integer(),integer(),string()) -> ok. +%% @doc Associates a generic vertex attribute index with a named attribute variable +%% +%% ``gl:bindAttribLocation'' is used to associate a user-defined attribute variable in +%% the program object specified by `Program' with a generic vertex attribute index. +%% The name of the user-defined attribute variable is passed as a null terminated string in `Name' +%% . The generic vertex attribute index to be bound to this variable is specified by `Index' +%% . When `Program' is made part of current state, values provided via the generic vertex +%% attribute `Index' will modify the value of the user-defined attribute variable specified +%% by `Name' . +%% +%% If `Name' refers to a matrix attribute variable, `Index' refers to the first +%% column of the matrix. Other matrix columns are then automatically bound to locations `Index+1' +%% for a matrix of type `mat2'; `Index+1' and `Index+2' for a matrix of type +%% `mat3'; and `Index+1' , `Index+2' , and `Index+3' for a matrix of type `mat4' +%% . +%% +%% This command makes it possible for vertex shaders to use descriptive names for attribute +%% variables rather than generic variables that are numbered from 0 to `?GL_MAX_VERTEX_ATTRIBS' +%% -1. The values sent to each generic attribute index are part of current state. If a different +%% program object is made current by calling {@link gl:useProgram/1} , the generic vertex attributes +%% are tracked in such a way that the same values will be observed by attributes in the new +%% program object that are also bound to `Index' . +%% +%% Attribute variable name-to-generic attribute index bindings for a program object can be +%% explicitly assigned at any time by calling ``gl:bindAttribLocation''. Attribute bindings +%% do not go into effect until {@link gl:linkProgram/1} is called. After a program object +%% has been linked successfully, the index values for generic attributes remain fixed (and +%% their values can be queried) until the next link command occurs. +%% +%% Any attribute binding that occurs after the program object has been linked will not take +%% effect until the next time the program object is linked. +%% +%% See external documentation. +-spec bindAttribLocation(Program, Index, Name) -> ok when Program :: integer(),Index :: integer(),Name :: string(). bindAttribLocation(Program,Index,Name) -> cast(5446, <>). -%% @spec (Shader::integer()) -> ok -%% @doc See external documentation. --spec compileShader(integer()) -> ok. +%% @doc Compiles a shader object +%% +%% ``gl:compileShader'' compiles the source code strings that have been stored in the shader +%% object specified by `Shader' . +%% +%% The compilation status will be stored as part of the shader object's state. This value +%% will be set to `?GL_TRUE' if the shader was compiled without errors and is ready +%% for use, and `?GL_FALSE' otherwise. It can be queried by calling {@link gl:getShaderiv/2} +%% with arguments `Shader' and `?GL_COMPILE_STATUS'. +%% +%% Compilation of a shader can fail for a number of reasons as specified by the OpenGL Shading +%% Language Specification. Whether or not the compilation was successful, information about +%% the compilation can be obtained from the shader object's information log by calling {@link gl:getShaderInfoLog/2} +%% . +%% +%% See external documentation. +-spec compileShader(Shader) -> ok when Shader :: integer(). compileShader(Shader) -> cast(5447, <>). -%% @spec () -> integer() -%% @doc See external documentation. +%% @doc Creates a program object +%% +%% ``gl:createProgram'' creates an empty program object and returns a non-zero value by +%% which it can be referenced. A program object is an object to which shader objects can +%% be attached. This provides a mechanism to specify the shader objects that will be linked +%% to create a program. It also provides a means for checking the compatibility of the +%% shaders that will be used to create a program (for instance, checking the compatibility +%% between a vertex shader and a fragment shader). When no longer needed as part of a program +%% object, shader objects can be detached. +%% +%% One or more executables are created in a program object by successfully attaching shader +%% objects to it with {@link gl:attachShader/2} , successfully compiling the shader objects +%% with {@link gl:compileShader/1} , and successfully linking the program object with {@link gl:linkProgram/1} +%% . These executables are made part of current state when {@link gl:useProgram/1} is called. +%% Program objects can be deleted by calling {@link gl:deleteProgram/1} . The memory associated +%% with the program object will be deleted when it is no longer part of current rendering +%% state for any context. +%% +%% See external documentation. -spec createProgram() -> integer(). createProgram() -> call(5448, <<>>). -%% @spec (Type::enum()) -> integer() -%% @doc See external documentation. --spec createShader(enum()) -> integer(). +%% @doc Creates a shader object +%% +%% ``gl:createShader'' creates an empty shader object and returns a non-zero value by +%% which it can be referenced. A shader object is used to maintain the source code strings +%% that define a shader. `ShaderType' indicates the type of shader to be created. Five +%% types of shader are supported. A shader of type `?GL_VERTEX_SHADER' is a shader +%% that is intended to run on the programmable vertex processor. A shader of type `?GL_TESS_CONTROL_SHADER' +%% is a shader that is intended to run on the programmable tessellation processor in the +%% control stage. A shader of type `?GL_TESS_EVALUATION_SHADER' is a shader that is +%% intended to run on the programmable tessellation processor in the evaluation stage. A +%% shader of type `?GL_GEOMETRY_SHADER' is a shader that is intended to run on the +%% programmable geometry processor. A shader of type `?GL_FRAGMENT_SHADER' is a shader +%% that is intended to run on the programmable fragment processor. +%% +%% When created, a shader object's `?GL_SHADER_TYPE' parameter is set to either `?GL_VERTEX_SHADER' +%% , `?GL_TESS_CONTROL_SHADER', `?GL_TESS_EVALUATION_SHADER', `?GL_GEOMETRY_SHADER' +%% or `?GL_FRAGMENT_SHADER', depending on the value of `ShaderType' . +%% +%% See external documentation. +-spec createShader(Type) -> integer() when Type :: enum(). createShader(Type) -> call(5449, <>). -%% @spec (Program::integer()) -> ok -%% @doc See external documentation. --spec deleteProgram(integer()) -> ok. +%% @doc Deletes a program object +%% +%% ``gl:deleteProgram'' frees the memory and invalidates the name associated with the program +%% object specified by `Program.' This command effectively undoes the effects of a call +%% to {@link gl:createProgram/0} . +%% +%% If a program object is in use as part of current rendering state, it will be flagged for +%% deletion, but it will not be deleted until it is no longer part of current state for any +%% rendering context. If a program object to be deleted has shader objects attached to it, +%% those shader objects will be automatically detached but not deleted unless they have already +%% been flagged for deletion by a previous call to {@link gl:deleteShader/1} . A value of 0 +%% for `Program' will be silently ignored. +%% +%% To determine whether a program object has been flagged for deletion, call {@link gl:getProgramiv/2} +%% with arguments `Program' and `?GL_DELETE_STATUS'. +%% +%% See external documentation. +-spec deleteProgram(Program) -> ok when Program :: integer(). deleteProgram(Program) -> cast(5450, <>). -%% @spec (Shader::integer()) -> ok -%% @doc See external documentation. --spec deleteShader(integer()) -> ok. +%% @doc Deletes a shader object +%% +%% ``gl:deleteShader'' frees the memory and invalidates the name associated with the shader +%% object specified by `Shader' . This command effectively undoes the effects of a call +%% to {@link gl:createShader/1} . +%% +%% If a shader object to be deleted is attached to a program object, it will be flagged for +%% deletion, but it will not be deleted until it is no longer attached to any program object, +%% for any rendering context (i.e., it must be detached from wherever it was attached before +%% it will be deleted). A value of 0 for `Shader' will be silently ignored. +%% +%% To determine whether an object has been flagged for deletion, call {@link gl:getShaderiv/2} +%% with arguments `Shader' and `?GL_DELETE_STATUS'. +%% +%% See external documentation. +-spec deleteShader(Shader) -> ok when Shader :: integer(). deleteShader(Shader) -> cast(5451, <>). -%% @spec (Program::integer(),Shader::integer()) -> ok -%% @doc See external documentation. --spec detachShader(integer(),integer()) -> ok. +%% @doc Detaches a shader object from a program object to which it is attached +%% +%% ``gl:detachShader'' detaches the shader object specified by `Shader' from the program +%% object specified by `Program' . This command can be used to undo the effect of the +%% command {@link gl:attachShader/2} . +%% +%% If `Shader' has already been flagged for deletion by a call to {@link gl:deleteShader/1} +%% and it is not attached to any other program object, it will be deleted after it has been +%% detached. +%% +%% See external documentation. +-spec detachShader(Program, Shader) -> ok when Program :: integer(),Shader :: integer(). detachShader(Program,Shader) -> cast(5452, <>). -%% @spec (Index::integer()) -> ok -%% @doc See external documentation. --spec disableVertexAttribArray(integer()) -> ok. +%% @doc Enable or disable a generic vertex attribute array +%% +%% ``gl:enableVertexAttribArray'' enables the generic vertex attribute array specified by `Index' +%% . ``gl:disableVertexAttribArray'' disables the generic vertex attribute array specified +%% by `Index' . By default, all client-side capabilities are disabled, including all +%% generic vertex attribute arrays. If enabled, the values in the generic vertex attribute +%% array will be accessed and used for rendering when calls are made to vertex array commands +%% such as {@link gl:drawArrays/3} , {@link gl:drawElements/4} , {@link gl:drawRangeElements/6} , see `glMultiDrawElements' +%% , or {@link gl:multiDrawArrays/3} . +%% +%% See external documentation. +-spec disableVertexAttribArray(Index) -> ok when Index :: integer(). disableVertexAttribArray(Index) -> cast(5453, <>). -%% @spec (Index::integer()) -> ok -%% @doc See external documentation. --spec enableVertexAttribArray(integer()) -> ok. +%% @doc +%% See {@link disableVertexAttribArray/1} +-spec enableVertexAttribArray(Index) -> ok when Index :: integer(). enableVertexAttribArray(Index) -> cast(5454, <>). -%% @spec (Program::integer(),Index::integer(),BufSize::integer()) -> {Size::integer(),Type::enum(),Name::string()} -%% @doc See external documentation. --spec getActiveAttrib(integer(),integer(),integer()) -> {integer(),enum(),string()}. +%% @doc Returns information about an active attribute variable for the specified program object +%% +%% ``gl:getActiveAttrib'' returns information about an active attribute variable in the +%% program object specified by `Program' . The number of active attributes can be obtained +%% by calling {@link gl:getProgramiv/2} with the value `?GL_ACTIVE_ATTRIBUTES'. A value +%% of 0 for `Index' selects the first active attribute variable. Permissible values +%% for `Index' range from 0 to the number of active attribute variables minus 1. +%% +%% A vertex shader may use either built-in attribute variables, user-defined attribute variables, +%% or both. Built-in attribute variables have a prefix of "gl_" and reference conventional +%% OpenGL vertex attribtes (e.g., `Gl_Vertex' , `Gl_Normal' , etc., see the OpenGL +%% Shading Language specification for a complete list.) User-defined attribute variables +%% have arbitrary names and obtain their values through numbered generic vertex attributes. +%% An attribute variable (either built-in or user-defined) is considered active if it is +%% determined during the link operation that it may be accessed during program execution. +%% Therefore, `Program' should have previously been the target of a call to {@link gl:linkProgram/1} +%% , but it is not necessary for it to have been linked successfully. +%% +%% The size of the character buffer required to store the longest attribute variable name +%% in `Program' can be obtained by calling {@link gl:getProgramiv/2} with the value `?GL_ACTIVE_ATTRIBUTE_MAX_LENGTH' +%% . This value should be used to allocate a buffer of sufficient size to store the returned +%% attribute name. The size of this character buffer is passed in `BufSize' , and a pointer +%% to this character buffer is passed in `Name' . +%% +%% ``gl:getActiveAttrib'' returns the name of the attribute variable indicated by `Index' +%% , storing it in the character buffer specified by `Name' . The string returned will +%% be null terminated. The actual number of characters written into this buffer is returned +%% in `Length' , and this count does not include the null termination character. If the +%% length of the returned string is not required, a value of `?NULL' can be passed in +%% the `Length' argument. +%% +%% The `Type' argument specifies a pointer to a variable into which the attribute variable's +%% data type will be written. The symbolic constants `?GL_FLOAT', `?GL_FLOAT_VEC2', +%% `?GL_FLOAT_VEC3', `?GL_FLOAT_VEC4', `?GL_FLOAT_MAT2', `?GL_FLOAT_MAT3', +%% `?GL_FLOAT_MAT4', `?GL_FLOAT_MAT2x3', `?GL_FLOAT_MAT2x4', `?GL_FLOAT_MAT3x2' +%% , `?GL_FLOAT_MAT3x4', `?GL_FLOAT_MAT4x2', `?GL_FLOAT_MAT4x3', `?GL_INT' +%% , `?GL_INT_VEC2', `?GL_INT_VEC3', `?GL_INT_VEC4', `?GL_UNSIGNED_INT_VEC' +%% , `?GL_UNSIGNED_INT_VEC2', `?GL_UNSIGNED_INT_VEC3', `?GL_UNSIGNED_INT_VEC4', +%% `?DOUBLE', `?DOUBLE_VEC2', `?DOUBLE_VEC3', `?DOUBLE_VEC4', `?DOUBLE_MAT2' +%% , `?DOUBLE_MAT3', `?DOUBLE_MAT4', `?DOUBLE_MAT2x3', `?DOUBLE_MAT2x4', +%% `?DOUBLE_MAT3x2', `?DOUBLE_MAT3x4', `?DOUBLE_MAT4x2', or `?DOUBLE_MAT4x3' +%% may be returned. The `Size' argument will return the size of the attribute, in units +%% of the type returned in `Type' . +%% +%% The list of active attribute variables may include both built-in attribute variables (which +%% begin with the prefix "gl_") as well as user-defined attribute variable names. +%% +%% This function will return as much information as it can about the specified active attribute +%% variable. If no information is available, `Length' will be 0, and `Name' will +%% be an empty string. This situation could occur if this function is called after a link +%% operation that failed. If an error occurs, the return values `Length' , `Size' , `Type' +%% , and `Name' will be unmodified. +%% +%% See external documentation. +-spec getActiveAttrib(Program, Index, BufSize) -> {Size :: integer(),Type :: enum(),Name :: string()} when Program :: integer(),Index :: integer(),BufSize :: integer(). getActiveAttrib(Program,Index,BufSize) -> call(5455, <>). -%% @spec (Program::integer(),Index::integer(),BufSize::integer()) -> {Size::integer(),Type::enum(),Name::string()} -%% @doc See external documentation. --spec getActiveUniform(integer(),integer(),integer()) -> {integer(),enum(),string()}. +%% @doc Returns information about an active uniform variable for the specified program object +%% +%% ``gl:getActiveUniform'' returns information about an active uniform variable in the +%% program object specified by `Program' . The number of active uniform variables can +%% be obtained by calling {@link gl:getProgramiv/2} with the value `?GL_ACTIVE_UNIFORMS'. +%% A value of 0 for `Index' selects the first active uniform variable. Permissible values +%% for `Index' range from 0 to the number of active uniform variables minus 1. +%% +%% Shaders may use either built-in uniform variables, user-defined uniform variables, or +%% both. Built-in uniform variables have a prefix of "gl_" and reference existing OpenGL +%% state or values derived from such state (e.g., `Gl_DepthRangeParameters' , see the +%% OpenGL Shading Language specification for a complete list.) User-defined uniform variables +%% have arbitrary names and obtain their values from the application through calls to {@link gl:uniform1f/2} +%% . A uniform variable (either built-in or user-defined) is considered active if it is determined +%% during the link operation that it may be accessed during program execution. Therefore, `Program' +%% should have previously been the target of a call to {@link gl:linkProgram/1} , but it is +%% not necessary for it to have been linked successfully. +%% +%% The size of the character buffer required to store the longest uniform variable name in `Program' +%% can be obtained by calling {@link gl:getProgramiv/2} with the value `?GL_ACTIVE_UNIFORM_MAX_LENGTH' +%% . This value should be used to allocate a buffer of sufficient size to store the returned +%% uniform variable name. The size of this character buffer is passed in `BufSize' , +%% and a pointer to this character buffer is passed in `Name.' +%% +%% ``gl:getActiveUniform'' returns the name of the uniform variable indicated by `Index' +%% , storing it in the character buffer specified by `Name' . The string returned will +%% be null terminated. The actual number of characters written into this buffer is returned +%% in `Length' , and this count does not include the null termination character. If the +%% length of the returned string is not required, a value of `?NULL' can be passed in +%% the `Length' argument. +%% +%% The `Type' argument will return a pointer to the uniform variable's data type. The +%% symbolic constants returned for uniform types are shown in the table below. +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%%
` Returned Symbolic Contant '` Shader Uniform Type '
`?GL_FLOAT'`?float'
`?GL_FLOAT_VEC2' +%% `?vec2'
`?GL_FLOAT_VEC3'`?vec3'
`?GL_FLOAT_VEC4'`?vec4'
`?GL_DOUBLE'`?double'
`?GL_DOUBLE_VEC2'`?dvec2'
`?GL_DOUBLE_VEC3'`?dvec3'
`?GL_DOUBLE_VEC4' +%% `?dvec4'
`?GL_INT'`?int'
+%% `?GL_INT_VEC2'`?ivec2'
`?GL_INT_VEC3'`?ivec3' +%%
`?GL_INT_VEC4'`?ivec4'
`?GL_UNSIGNED_INT' +%% `?unsigned int'
`?GL_UNSIGNED_INT_VEC2'`?uvec2' +%%
`?GL_UNSIGNED_INT_VEC3'`?uvec3'
`?GL_UNSIGNED_INT_VEC4' +%% `?uvec4'
`?GL_BOOL'`?bool'
`?GL_BOOL_VEC2'`?bvec2'
`?GL_BOOL_VEC3' +%% `?bvec3'
`?GL_BOOL_VEC4'`?bvec4'
+%% `?GL_FLOAT_MAT2'`?mat2'
`?GL_FLOAT_MAT3' +%% `?mat3'
`?GL_FLOAT_MAT4'`?mat4'
+%% `?GL_FLOAT_MAT2x3'`?mat2x3'
`?GL_FLOAT_MAT2x4'`?mat2x4'
`?GL_FLOAT_MAT3x2'`?mat3x2'
`?GL_FLOAT_MAT3x4'`?mat3x4'
`?GL_FLOAT_MAT4x2' +%% `?mat4x2'
`?GL_FLOAT_MAT4x3'`?mat4x3'
`?GL_DOUBLE_MAT2'`?dmat2'
`?GL_DOUBLE_MAT3' +%% `?dmat3'
`?GL_DOUBLE_MAT4'`?dmat4'
`?GL_DOUBLE_MAT2x3'`?dmat2x3'
`?GL_DOUBLE_MAT2x4' +%% `?dmat2x4'
`?GL_DOUBLE_MAT3x2'`?dmat3x2'
`?GL_DOUBLE_MAT3x4'`?dmat3x4'
`?GL_DOUBLE_MAT4x2' +%% `?dmat4x2'
`?GL_DOUBLE_MAT4x3'`?dmat4x3'
`?GL_SAMPLER_1D'`?sampler1D'
`?GL_SAMPLER_2D' +%% `?sampler2D'
`?GL_SAMPLER_3D'`?sampler3D' +%%
`?GL_SAMPLER_CUBE'`?samplerCube'
`?GL_SAMPLER_1D_SHADOW' +%% `?sampler1DShadow'
`?GL_SAMPLER_2D_SHADOW'`?sampler2DShadow' +%%
`?GL_SAMPLER_1D_ARRAY'`?sampler1DArray'
`?GL_SAMPLER_2D_ARRAY'`?sampler2DArray'
`?GL_SAMPLER_1D_ARRAY_SHADOW' +%% `?sampler1DArrayShadow'
`?GL_SAMPLER_2D_ARRAY_SHADOW'`?sampler2DArrayShadow'
`?GL_SAMPLER_2D_MULTISAMPLE' +%% `?sampler2DMS'
`?GL_SAMPLER_2D_MULTISAMPLE_ARRAY'`?sampler2DMSArray' +%%
`?GL_SAMPLER_CUBE_SHADOW'`?samplerCubeShadow'
`?GL_SAMPLER_BUFFER'`?samplerBuffer'
`?GL_SAMPLER_2D_RECT' +%% `?sampler2DRect'
`?GL_SAMPLER_2D_RECT_SHADOW' +%% `?sampler2DRectShadow'
`?GL_INT_SAMPLER_1D'`?isampler1D' +%%
`?GL_INT_SAMPLER_2D'`?isampler2D'
`?GL_INT_SAMPLER_3D' +%% `?isampler3D'
`?GL_INT_SAMPLER_CUBE'`?isamplerCube' +%%
`?GL_INT_SAMPLER_1D_ARRAY'`?isampler1DArray'
`?GL_INT_SAMPLER_2D_ARRAY'`?isampler2DArray'
`?GL_INT_SAMPLER_2D_MULTISAMPLE' +%% `?isampler2DMS'
`?GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY'`?isampler2DMSArray'
`?GL_INT_SAMPLER_BUFFER'`?isamplerBuffer' +%%
`?GL_INT_SAMPLER_2D_RECT'`?isampler2DRect'
`?GL_UNSIGNED_INT_SAMPLER_1D'`?usampler1D'
`?GL_UNSIGNED_INT_SAMPLER_2D' +%% `?usampler2D'
`?GL_UNSIGNED_INT_SAMPLER_3D'`?usampler3D' +%%
`?GL_UNSIGNED_INT_SAMPLER_CUBE'`?usamplerCube'
`?GL_UNSIGNED_INT_SAMPLER_1D_ARRAY'`?usampler2DArray'
`?GL_UNSIGNED_INT_SAMPLER_2D_ARRAY'`?usampler2DArray'
`?GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE'`?usampler2DMS'
`?GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY'`?usampler2DMSArray' +%%
`?GL_UNSIGNED_INT_SAMPLER_BUFFER'`?usamplerBuffer'
`?GL_UNSIGNED_INT_SAMPLER_2D_RECT'`?usampler2DRect'
`?GL_IMAGE_1D'`?image1D'
`?GL_IMAGE_2D'`?image2D'
`?GL_IMAGE_3D'`?image3D'
`?GL_IMAGE_2D_RECT'`?image2DRect'
`?GL_IMAGE_CUBE' +%% `?imageCube'
`?GL_IMAGE_BUFFER'`?imageBuffer' +%%
`?GL_IMAGE_1D_ARRAY'`?image1DArray'
+%% `?GL_IMAGE_2D_ARRAY'`?image2DArray'
`?GL_IMAGE_2D_MULTISAMPLE' +%% `?image2DMS'
`?GL_IMAGE_2D_MULTISAMPLE_ARRAY' +%% `?image2DMSArray'
`?GL_INT_IMAGE_1D'`?iimage1D'
`?GL_INT_IMAGE_2D'`?iimage2D'
`?GL_INT_IMAGE_3D' +%% `?iimage3D'
`?GL_INT_IMAGE_2D_RECT'`?iimage2DRect' +%%
`?GL_INT_IMAGE_CUBE'`?iimageCube'
`?GL_INT_IMAGE_BUFFER' +%% `?iimageBuffer'
`?GL_INT_IMAGE_1D_ARRAY'`?iimage1DArray' +%%
`?GL_INT_IMAGE_2D_ARRAY'`?iimage2DArray'
`?GL_INT_IMAGE_2D_MULTISAMPLE'`?iimage2DMS'
`?GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY' +%% `?iimage2DMSArray'
`?GL_UNSIGNED_INT_IMAGE_1D' +%% `?uimage1D'
`?GL_UNSIGNED_INT_IMAGE_2D'`?uimage2D' +%%
`?GL_UNSIGNED_INT_IMAGE_3D'`?uimage3D'
+%% `?GL_UNSIGNED_INT_IMAGE_2D_RECT'`?uimage2DRect'
`?GL_UNSIGNED_INT_IMAGE_CUBE' +%% `?uimageCube'
`?GL_UNSIGNED_INT_IMAGE_BUFFER' +%% `?uimageBuffer'
`?GL_UNSIGNED_INT_IMAGE_1D_ARRAY'`?uimage1DArray' +%%
`?GL_UNSIGNED_INT_IMAGE_2D_ARRAY'`?uimage2DArray'
`?GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE'`?uimage2DMS'
`?GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY'`?uimage2DMSArray'
`?GL_UNSIGNED_INT_ATOMIC_COUNTER'`?atomic_uint'
+%% +%% If one or more elements of an array are active, the name of the array is returned in `Name' +%% , the type is returned in `Type' , and the `Size' parameter returns the highest +%% array element index used, plus one, as determined by the compiler and/or linker. Only +%% one active uniform variable will be reported for a uniform array. +%% +%% Uniform variables that are declared as structures or arrays of structures will not be +%% returned directly by this function. Instead, each of these uniform variables will be reduced +%% to its fundamental components containing the "." and "[]" operators such that each of +%% the names is valid as an argument to {@link gl:getUniformLocation/2} . Each of these reduced +%% uniform variables is counted as one active uniform variable and is assigned an index. +%% A valid name cannot be a structure, an array of structures, or a subcomponent of a vector +%% or matrix. +%% +%% The size of the uniform variable will be returned in `Size' . Uniform variables other +%% than arrays will have a size of 1. Structures and arrays of structures will be reduced +%% as described earlier, such that each of the names returned will be a data type in the +%% earlier list. If this reduction results in an array, the size returned will be as described +%% for uniform arrays; otherwise, the size returned will be 1. +%% +%% The list of active uniform variables may include both built-in uniform variables (which +%% begin with the prefix "gl_") as well as user-defined uniform variable names. +%% +%% This function will return as much information as it can about the specified active uniform +%% variable. If no information is available, `Length' will be 0, and `Name' will +%% be an empty string. This situation could occur if this function is called after a link +%% operation that failed. If an error occurs, the return values `Length' , `Size' , `Type' +%% , and `Name' will be unmodified. +%% +%% See external documentation. +-spec getActiveUniform(Program, Index, BufSize) -> {Size :: integer(),Type :: enum(),Name :: string()} when Program :: integer(),Index :: integer(),BufSize :: integer(). getActiveUniform(Program,Index,BufSize) -> call(5456, <>). -%% @spec (Program::integer(),MaxCount::integer()) -> [integer()] -%% @doc See external documentation. --spec getAttachedShaders(integer(),integer()) -> [integer()]. +%% @doc Returns the handles of the shader objects attached to a program object +%% +%% ``gl:getAttachedShaders'' returns the names of the shader objects attached to `Program' +%% . The names of shader objects that are attached to `Program' will be returned in `Shaders.' +%% The actual number of shader names written into `Shaders' is returned in `Count.' +%% If no shader objects are attached to `Program' , `Count' is set to 0. The maximum +%% number of shader names that may be returned in `Shaders' is specified by `MaxCount' +%% . +%% +%% If the number of names actually returned is not required (for instance, if it has just +%% been obtained by calling {@link gl:getProgramiv/2} ), a value of `?NULL' may be passed +%% for count. If no shader objects are attached to `Program' , a value of 0 will be returned +%% in `Count' . The actual number of attached shaders can be obtained by calling {@link gl:getProgramiv/2} +%% with the value `?GL_ATTACHED_SHADERS'. +%% +%% See external documentation. +-spec getAttachedShaders(Program, MaxCount) -> [integer()] when Program :: integer(),MaxCount :: integer(). getAttachedShaders(Program,MaxCount) -> call(5457, <>). -%% @spec (Program::integer(),Name::string()) -> integer() -%% @doc See external documentation. --spec getAttribLocation(integer(),string()) -> integer(). +%% @doc Returns the location of an attribute variable +%% +%% ``gl:getAttribLocation'' queries the previously linked program object specified by `Program' +%% for the attribute variable specified by `Name' and returns the index of the generic +%% vertex attribute that is bound to that attribute variable. If `Name' is a matrix +%% attribute variable, the index of the first column of the matrix is returned. If the named +%% attribute variable is not an active attribute in the specified program object or if `Name' +%% starts with the reserved prefix "gl_", a value of -1 is returned. +%% +%% The association between an attribute variable name and a generic attribute index can be +%% specified at any time by calling {@link gl:bindAttribLocation/3} . Attribute bindings do +%% not go into effect until {@link gl:linkProgram/1} is called. After a program object has +%% been linked successfully, the index values for attribute variables remain fixed until +%% the next link command occurs. The attribute values can only be queried after a link if +%% the link was successful. ``gl:getAttribLocation'' returns the binding that actually +%% went into effect the last time {@link gl:linkProgram/1} was called for the specified program +%% object. Attribute bindings that have been specified since the last link operation are +%% not returned by ``gl:getAttribLocation''. +%% +%% See external documentation. +-spec getAttribLocation(Program, Name) -> integer() when Program :: integer(),Name :: string(). getAttribLocation(Program,Name) -> call(5458, <>). -%% @spec (Program::integer(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getProgramiv(integer(),enum()) -> integer(). +%% @doc Returns a parameter from a program object +%% +%% ``gl:getProgram'' returns in `Params' the value of a parameter for a specific program +%% object. The following parameters are defined: +%% +%% `?GL_DELETE_STATUS': `Params' returns `?GL_TRUE' if `Program' is currently +%% flagged for deletion, and `?GL_FALSE' otherwise. +%% +%% `?GL_LINK_STATUS': `Params' returns `?GL_TRUE' if the last link operation +%% on `Program' was successful, and `?GL_FALSE' otherwise. +%% +%% `?GL_VALIDATE_STATUS': `Params' returns `?GL_TRUE' or if the last validation +%% operation on `Program' was successful, and `?GL_FALSE' otherwise. +%% +%% `?GL_INFO_LOG_LENGTH': `Params' returns the number of characters in the information +%% log for `Program' including the null termination character (i.e., the size of the +%% character buffer required to store the information log). If `Program' has no information +%% log, a value of 0 is returned. +%% +%% `?GL_ATTACHED_SHADERS': `Params' returns the number of shader objects attached +%% to `Program' . +%% +%% `?GL_ACTIVE_ATOMIC_COUNTER_BUFFERS': `Params' returns the number of active attribute +%% atomic counter buffers used by `Program' . +%% +%% `?GL_ACTIVE_ATTRIBUTES': `Params' returns the number of active attribute variables +%% for `Program' . +%% +%% `?GL_ACTIVE_ATTRIBUTE_MAX_LENGTH': `Params' returns the length of the longest +%% active attribute name for `Program' , including the null termination character (i.e., +%% the size of the character buffer required to store the longest attribute name). If no +%% active attributes exist, 0 is returned. +%% +%% `?GL_ACTIVE_UNIFORMS': `Params' returns the number of active uniform variables +%% for `Program' . +%% +%% `?GL_ACTIVE_UNIFORM_MAX_LENGTH': `Params' returns the length of the longest +%% active uniform variable name for `Program' , including the null termination character +%% (i.e., the size of the character buffer required to store the longest uniform variable +%% name). If no active uniform variables exist, 0 is returned. +%% +%% `?GL_PROGRAM_BINARY_LENGTH': `Params' returns the length of the program binary, +%% in bytes that will be returned by a call to {@link gl:getProgramBinary/2} . When a progam's +%% `?GL_LINK_STATUS' is `?GL_FALSE', its program binary length is zero. +%% +%% `?GL_TRANSFORM_FEEDBACK_BUFFER_MODE': `Params' returns a symbolic constant indicating +%% the buffer mode used when transform feedback is active. This may be `?GL_SEPARATE_ATTRIBS' +%% or `?GL_INTERLEAVED_ATTRIBS'. +%% +%% `?GL_TRANSFORM_FEEDBACK_VARYINGS': `Params' returns the number of varying variables +%% to capture in transform feedback mode for the program. +%% +%% `?GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH': `Params' returns the length of +%% the longest variable name to be used for transform feedback, including the null-terminator. +%% +%% +%% `?GL_GEOMETRY_VERTICES_OUT': `Params' returns the maximum number of vertices +%% that the geometry shader in `Program' will output. +%% +%% `?GL_GEOMETRY_INPUT_TYPE': `Params' returns a symbolic constant indicating the +%% primitive type accepted as input to the geometry shader contained in `Program' . +%% +%% `?GL_GEOMETRY_OUTPUT_TYPE': `Params' returns a symbolic constant indicating +%% the primitive type that will be output by the geometry shader contained in `Program' . +%% +%% +%% See external documentation. +-spec getProgramiv(Program, Pname) -> integer() when Program :: integer(),Pname :: enum(). getProgramiv(Program,Pname) -> call(5459, <>). -%% @spec (Program::integer(),BufSize::integer()) -> string() -%% @doc See external documentation. --spec getProgramInfoLog(integer(),integer()) -> string(). +%% @doc Returns the information log for a program object +%% +%% ``gl:getProgramInfoLog'' returns the information log for the specified program object. +%% The information log for a program object is modified when the program object is linked +%% or validated. The string that is returned will be null terminated. +%% +%% ``gl:getProgramInfoLog'' returns in `InfoLog' as much of the information log as +%% it can, up to a maximum of `MaxLength' characters. The number of characters actually +%% returned, excluding the null termination character, is specified by `Length' . If +%% the length of the returned string is not required, a value of `?NULL' can be passed +%% in the `Length' argument. The size of the buffer required to store the returned +%% information log can be obtained by calling {@link gl:getProgramiv/2} with the value `?GL_INFO_LOG_LENGTH' +%% . +%% +%% The information log for a program object is either an empty string, or a string containing +%% information about the last link operation, or a string containing information about the +%% last validation operation. It may contain diagnostic messages, warning messages, and +%% other information. When a program object is created, its information log will be a string +%% of length 0. +%% +%% See external documentation. +-spec getProgramInfoLog(Program, BufSize) -> string() when Program :: integer(),BufSize :: integer(). getProgramInfoLog(Program,BufSize) -> call(5460, <>). -%% @spec (Shader::integer(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getShaderiv(integer(),enum()) -> integer(). +%% @doc Returns a parameter from a shader object +%% +%% ``gl:getShader'' returns in `Params' the value of a parameter for a specific +%% shader object. The following parameters are defined: +%% +%% `?GL_SHADER_TYPE': `Params' returns `?GL_VERTEX_SHADER' if `Shader' +%% is a vertex shader object, `?GL_GEOMETRY_SHADER' if `Shader' is a geometry +%% shader object, and `?GL_FRAGMENT_SHADER' if `Shader' is a fragment shader +%% object. +%% +%% `?GL_DELETE_STATUS': `Params' returns `?GL_TRUE' if `Shader' is +%% currently flagged for deletion, and `?GL_FALSE' otherwise. +%% +%% `?GL_COMPILE_STATUS': `Params' returns `?GL_TRUE' if the last compile +%% operation on `Shader' was successful, and `?GL_FALSE' otherwise. +%% +%% `?GL_INFO_LOG_LENGTH': `Params' returns the number of characters in the information +%% log for `Shader' including the null termination character (i.e., the size of +%% the character buffer required to store the information log). If `Shader' has +%% no information log, a value of 0 is returned. +%% +%% `?GL_SHADER_SOURCE_LENGTH': `Params' returns the length of the concatenation +%% of the source strings that make up the shader source for the `Shader' , including +%% the null termination character. (i.e., the size of the character buffer required to +%% store the shader source). If no source code exists, 0 is returned. +%% +%% See external documentation. +-spec getShaderiv(Shader, Pname) -> integer() when Shader :: integer(),Pname :: enum(). getShaderiv(Shader,Pname) -> call(5461, <>). -%% @spec (Shader::integer(),BufSize::integer()) -> string() -%% @doc See external documentation. --spec getShaderInfoLog(integer(),integer()) -> string(). +%% @doc Returns the information log for a shader object +%% +%% ``gl:getShaderInfoLog'' returns the information log for the specified shader object. +%% The information log for a shader object is modified when the shader is compiled. The +%% string that is returned will be null terminated. +%% +%% ``gl:getShaderInfoLog'' returns in `InfoLog' as much of the information log as +%% it can, up to a maximum of `MaxLength' characters. The number of characters actually +%% returned, excluding the null termination character, is specified by `Length' . If +%% the length of the returned string is not required, a value of `?NULL' can be passed +%% in the `Length' argument. The size of the buffer required to store the returned +%% information log can be obtained by calling {@link gl:getShaderiv/2} with the value `?GL_INFO_LOG_LENGTH' +%% . +%% +%% The information log for a shader object is a string that may contain diagnostic messages, +%% warning messages, and other information about the last compile operation. When a shader +%% object is created, its information log will be a string of length 0. +%% +%% See external documentation. +-spec getShaderInfoLog(Shader, BufSize) -> string() when Shader :: integer(),BufSize :: integer(). getShaderInfoLog(Shader,BufSize) -> call(5462, <>). -%% @spec (Shader::integer(),BufSize::integer()) -> string() -%% @doc See external documentation. --spec getShaderSource(integer(),integer()) -> string(). +%% @doc Returns the source code string from a shader object +%% +%% ``gl:getShaderSource'' returns the concatenation of the source code strings from the +%% shader object specified by `Shader' . The source code strings for a shader object +%% are the result of a previous call to {@link gl:shaderSource/2} . The string returned by +%% the function will be null terminated. +%% +%% ``gl:getShaderSource'' returns in `Source' as much of the source code string as +%% it can, up to a maximum of `BufSize' characters. The number of characters actually +%% returned, excluding the null termination character, is specified by `Length' . If +%% the length of the returned string is not required, a value of `?NULL' can be passed +%% in the `Length' argument. The size of the buffer required to store the returned source +%% code string can be obtained by calling {@link gl:getShaderiv/2} with the value `?GL_SHADER_SOURCE_LENGTH' +%% . +%% +%% See external documentation. +-spec getShaderSource(Shader, BufSize) -> string() when Shader :: integer(),BufSize :: integer(). getShaderSource(Shader,BufSize) -> call(5463, <>). -%% @spec (Program::integer(),Name::string()) -> integer() -%% @doc See external documentation. --spec getUniformLocation(integer(),string()) -> integer(). +%% @doc Returns the location of a uniform variable +%% +%% ``gl:getUniformLocation '' returns an integer that represents the location of a specific +%% uniform variable within a program object. `Name' must be a null terminated string +%% that contains no white space. `Name' must be an active uniform variable name in `Program' +%% that is not a structure, an array of structures, or a subcomponent of a vector or a matrix. +%% This function returns -1 if `Name' does not correspond to an active uniform variable +%% in `Program' , if `Name' starts with the reserved prefix "gl_", or if `Name' +%% is associated with an atomic counter or a named uniform block. +%% +%% Uniform variables that are structures or arrays of structures may be queried by calling ``gl:getUniformLocation'' +%% for each field within the structure. The array element operator "[]" and the structure +%% field operator "." may be used in `Name' in order to select elements within an array +%% or fields within a structure. The result of using these operators is not allowed to be +%% another structure, an array of structures, or a subcomponent of a vector or a matrix. +%% Except if the last part of `Name' indicates a uniform variable array, the location +%% of the first element of an array can be retrieved by using the name of the array, or by +%% using the name appended by "[0]". +%% +%% The actual locations assigned to uniform variables are not known until the program object +%% is linked successfully. After linking has occurred, the command ``gl:getUniformLocation'' +%% can be used to obtain the location of a uniform variable. This location value can then +%% be passed to {@link gl:uniform1f/2} to set the value of the uniform variable or to {@link gl:getUniformfv/2} +%% in order to query the current value of the uniform variable. After a program object has +%% been linked successfully, the index values for uniform variables remain fixed until the +%% next link command occurs. Uniform variable locations and values can only be queried after +%% a link if the link was successful. +%% +%% See external documentation. +-spec getUniformLocation(Program, Name) -> integer() when Program :: integer(),Name :: string(). getUniformLocation(Program,Name) -> call(5464, <>). -%% @spec (Program::integer(),Location::integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()} -%% @doc See external documentation. --spec getUniformfv(integer(),integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}. +%% @doc Returns the value of a uniform variable +%% +%% ``gl:getUniform'' returns in `Params' the value(s) of the specified uniform variable. +%% The type of the uniform variable specified by `Location' determines the number of +%% values returned. If the uniform variable is defined in the shader as a boolean, int, or +%% float, a single value will be returned. If it is defined as a vec2, ivec2, or bvec2, two +%% values will be returned. If it is defined as a vec3, ivec3, or bvec3, three values will +%% be returned, and so on. To query values stored in uniform variables declared as arrays, +%% call ``gl:getUniform'' for each element of the array. To query values stored in uniform +%% variables declared as structures, call ``gl:getUniform'' for each field in the structure. +%% The values for uniform variables declared as a matrix will be returned in column major +%% order. +%% +%% The locations assigned to uniform variables are not known until the program object is +%% linked. After linking has occurred, the command {@link gl:getUniformLocation/2} can be +%% used to obtain the location of a uniform variable. This location value can then be passed +%% to ``gl:getUniform'' in order to query the current value of the uniform variable. After +%% a program object has been linked successfully, the index values for uniform variables +%% remain fixed until the next link command occurs. The uniform variable values can only +%% be queried after a link if the link was successful. +%% +%% See external documentation. +-spec getUniformfv(Program, Location) -> matrix() when Program :: integer(),Location :: integer(). getUniformfv(Program,Location) -> call(5465, <>). -%% @spec (Program::integer(),Location::integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getUniformiv(integer(),integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}. +%% @doc +%% See {@link getUniformfv/2} +-spec getUniformiv(Program, Location) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} when Program :: integer(),Location :: integer(). getUniformiv(Program,Location) -> call(5466, <>). -%% @spec (Index::integer(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getVertexAttribdv(integer(),enum()) -> {float(),float(),float(),float()}. +%% @doc Return a generic vertex attribute parameter +%% +%% ``gl:getVertexAttrib'' returns in `Params' the value of a generic vertex attribute +%% parameter. The generic vertex attribute to be queried is specified by `Index' , and +%% the parameter to be queried is specified by `Pname' . +%% +%% The accepted parameter names are as follows: +%% +%% `?GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING': `Params' returns a single value, the +%% name of the buffer object currently bound to the binding point corresponding to generic +%% vertex attribute array `Index' . If no buffer object is bound, 0 is returned. The +%% initial value is 0. +%% +%% `?GL_VERTEX_ATTRIB_ARRAY_ENABLED': `Params' returns a single value that is non-zero +%% (true) if the vertex attribute array for `Index' is enabled and 0 (false) if it is +%% disabled. The initial value is `?GL_FALSE'. +%% +%% `?GL_VERTEX_ATTRIB_ARRAY_SIZE': `Params' returns a single value, the size of +%% the vertex attribute array for `Index' . The size is the number of values for each +%% element of the vertex attribute array, and it will be 1, 2, 3, or 4. The initial value +%% is 4. +%% +%% `?GL_VERTEX_ATTRIB_ARRAY_STRIDE': `Params' returns a single value, the array +%% stride for (number of bytes between successive elements in) the vertex attribute array +%% for `Index' . A value of 0 indicates that the array elements are stored sequentially +%% in memory. The initial value is 0. +%% +%% `?GL_VERTEX_ATTRIB_ARRAY_TYPE': `Params' returns a single value, a symbolic +%% constant indicating the array type for the vertex attribute array for `Index' . Possible +%% values are `?GL_BYTE', `?GL_UNSIGNED_BYTE', `?GL_SHORT', `?GL_UNSIGNED_SHORT' +%% , `?GL_INT', `?GL_UNSIGNED_INT', `?GL_FLOAT', and `?GL_DOUBLE'. The +%% initial value is `?GL_FLOAT'. +%% +%% `?GL_VERTEX_ATTRIB_ARRAY_NORMALIZED': `Params' returns a single value that is +%% non-zero (true) if fixed-point data types for the vertex attribute array indicated by `Index' +%% are normalized when they are converted to floating point, and 0 (false) otherwise. The +%% initial value is `?GL_FALSE'. +%% +%% `?GL_VERTEX_ATTRIB_ARRAY_INTEGER': `Params' returns a single value that is non-zero +%% (true) if fixed-point data types for the vertex attribute array indicated by `Index' +%% have integer data types, and 0 (false) otherwise. The initial value is 0 (`?GL_FALSE'). +%% +%% +%% `?GL_VERTEX_ATTRIB_ARRAY_DIVISOR': `Params' returns a single value that is the +%% frequency divisor used for instanced rendering. See {@link gl:vertexAttribDivisor/2} . The +%% initial value is 0. +%% +%% `?GL_CURRENT_VERTEX_ATTRIB': `Params' returns four values that represent the +%% current value for the generic vertex attribute specified by index. Generic vertex attribute +%% 0 is unique in that it has no current state, so an error will be generated if `Index' +%% is 0. The initial value for all other generic vertex attributes is (0,0,0,1). +%% +%% ``gl:getVertexAttribdv'' and ``gl:getVertexAttribfv'' return the current attribute +%% values as four single-precision floating-point values; ``gl:getVertexAttribiv'' reads +%% them as floating-point values and converts them to four integer values; ``gl:getVertexAttribIiv'' +%% and ``gl:getVertexAttribIuiv'' read and return them as signed or unsigned integer values, +%% respectively; ``gl:getVertexAttribLdv'' reads and returns them as four double-precision +%% floating-point values. +%% +%% All of the parameters except `?GL_CURRENT_VERTEX_ATTRIB' represent state stored in +%% the currently bound vertex array object. +%% +%% See external documentation. +-spec getVertexAttribdv(Index, Pname) -> {float(),float(),float(),float()} when Index :: integer(),Pname :: enum(). getVertexAttribdv(Index,Pname) -> call(5467, <>). -%% @spec (Index::integer(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getVertexAttribfv(integer(),enum()) -> {float(),float(),float(),float()}. +%% @doc +%% See {@link getVertexAttribdv/2} +-spec getVertexAttribfv(Index, Pname) -> {float(),float(),float(),float()} when Index :: integer(),Pname :: enum(). getVertexAttribfv(Index,Pname) -> call(5468, <>). -%% @spec (Index::integer(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getVertexAttribiv(integer(),enum()) -> {integer(),integer(),integer(),integer()}. +%% @doc +%% See {@link getVertexAttribdv/2} +-spec getVertexAttribiv(Index, Pname) -> {integer(),integer(),integer(),integer()} when Index :: integer(),Pname :: enum(). getVertexAttribiv(Index,Pname) -> call(5469, <>). -%% @spec (Program::integer()) -> 0|1 -%% @doc See external documentation. --spec isProgram(integer()) -> 0|1. +%% @doc Determines if a name corresponds to a program object +%% +%% ``gl:isProgram'' returns `?GL_TRUE' if `Program' is the name of a program +%% object previously created with {@link gl:createProgram/0} and not yet deleted with {@link gl:deleteProgram/1} +%% . If `Program' is zero or a non-zero value that is not the name of a program object, +%% or if an error occurs, ``gl:isProgram'' returns `?GL_FALSE'. +%% +%% See external documentation. +-spec isProgram(Program) -> 0|1 when Program :: integer(). isProgram(Program) -> call(5470, <>). -%% @spec (Shader::integer()) -> 0|1 -%% @doc See external documentation. --spec isShader(integer()) -> 0|1. +%% @doc Determines if a name corresponds to a shader object +%% +%% ``gl:isShader'' returns `?GL_TRUE' if `Shader' is the name of a shader object +%% previously created with {@link gl:createShader/1} and not yet deleted with {@link gl:deleteShader/1} +%% . If `Shader' is zero or a non-zero value that is not the name of a shader object, +%% or if an error occurs, ``gl:isShader '' returns `?GL_FALSE'. +%% +%% See external documentation. +-spec isShader(Shader) -> 0|1 when Shader :: integer(). isShader(Shader) -> call(5471, <>). -%% @spec (Program::integer()) -> ok -%% @doc See external documentation. --spec linkProgram(integer()) -> ok. +%% @doc Links a program object +%% +%% ``gl:linkProgram'' links the program object specified by `Program' . If any shader +%% objects of type `?GL_VERTEX_SHADER' are attached to `Program' , they will be +%% used to create an executable that will run on the programmable vertex processor. If any +%% shader objects of type `?GL_GEOMETRY_SHADER' are attached to `Program' , they +%% will be used to create an executable that will run on the programmable geometry processor. +%% If any shader objects of type `?GL_FRAGMENT_SHADER' are attached to `Program' , +%% they will be used to create an executable that will run on the programmable fragment processor. +%% +%% +%% The status of the link operation will be stored as part of the program object's state. +%% This value will be set to `?GL_TRUE' if the program object was linked without errors +%% and is ready for use, and `?GL_FALSE' otherwise. It can be queried by calling {@link gl:getProgramiv/2} +%% with arguments `Program' and `?GL_LINK_STATUS'. +%% +%% As a result of a successful link operation, all active user-defined uniform variables +%% belonging to `Program' will be initialized to 0, and each of the program object's +%% active uniform variables will be assigned a location that can be queried by calling {@link gl:getUniformLocation/2} +%% . Also, any active user-defined attribute variables that have not been bound to a generic +%% vertex attribute index will be bound to one at this time. +%% +%% Linking of a program object can fail for a number of reasons as specified in the `OpenGL Shading Language Specification' +%% . The following lists some of the conditions that will cause a link error. +%% +%% The number of active attribute variables supported by the implementation has been exceeded. +%% +%% +%% The storage limit for uniform variables has been exceeded. +%% +%% The number of active uniform variables supported by the implementation has been exceeded. +%% +%% The `main' function is missing for the vertex, geometry or fragment shader. +%% +%% A varying variable actually used in the fragment shader is not declared in the same way +%% (or is not declared at all) in the vertex shader, or geometry shader shader if present. +%% +%% A reference to a function or variable name is unresolved. +%% +%% A shared global is declared with two different types or two different initial values. +%% +%% One or more of the attached shader objects has not been successfully compiled. +%% +%% Binding a generic attribute matrix caused some rows of the matrix to fall outside the +%% allowed maximum of `?GL_MAX_VERTEX_ATTRIBS'. +%% +%% Not enough contiguous vertex attribute slots could be found to bind attribute matrices. +%% +%% The program object contains objects to form a fragment shader but does not contain objects +%% to form a vertex shader. +%% +%% The program object contains objects to form a geometry shader but does not contain objects +%% to form a vertex shader. +%% +%% The program object contains objects to form a geometry shader and the input primitive +%% type, output primitive type, or maximum output vertex count is not specified in any compiled +%% geometry shader object. +%% +%% The program object contains objects to form a geometry shader and the input primitive +%% type, output primitive type, or maximum output vertex count is specified differently in +%% multiple geometry shader objects. +%% +%% The number of active outputs in the fragment shader is greater than the value of `?GL_MAX_DRAW_BUFFERS' +%% . +%% +%% The program has an active output assigned to a location greater than or equal to the value +%% of `?GL_MAX_DUAL_SOURCE_DRAW_BUFFERS' and has an active output assigned an index +%% greater than or equal to one. +%% +%% More than one varying out variable is bound to the same number and index. +%% +%% The explicit binding assigments do not leave enough space for the linker to automatically +%% assign a location for a varying out array, which requires multiple contiguous locations. +%% +%% The `Count' specified by {@link gl:transformFeedbackVaryings/3} is non-zero, but the +%% program object has no vertex or geometry shader. +%% +%% Any variable name specified to {@link gl:transformFeedbackVaryings/3} in the `Varyings' +%% array is not declared as an output in the vertex shader (or the geometry shader, if active). +%% +%% +%% Any two entries in the `Varyings' array given {@link gl:transformFeedbackVaryings/3} +%% specify the same varying variable. +%% +%% The total number of components to capture in any transform feedback varying variable is +%% greater than the constant `?GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS' and the +%% buffer mode is `?SEPARATE_ATTRIBS'. +%% +%% When a program object has been successfully linked, the program object can be made part +%% of current state by calling {@link gl:useProgram/1} . Whether or not the link operation +%% was successful, the program object's information log will be overwritten. The information +%% log can be retrieved by calling {@link gl:getProgramInfoLog/2} . +%% +%% ``gl:linkProgram'' will also install the generated executables as part of the current +%% rendering state if the link operation was successful and the specified program object +%% is already currently in use as a result of a previous call to {@link gl:useProgram/1} . +%% If the program object currently in use is relinked unsuccessfully, its link status will +%% be set to `?GL_FALSE' , but the executables and associated state will remain part +%% of the current state until a subsequent call to ``gl:useProgram'' removes it from use. +%% After it is removed from use, it cannot be made part of current state until it has been +%% successfully relinked. +%% +%% If `Program' contains shader objects of type `?GL_VERTEX_SHADER', and optionally +%% of type `?GL_GEOMETRY_SHADER', but does not contain shader objects of type `?GL_FRAGMENT_SHADER' +%% , the vertex shader executable will be installed on the programmable vertex processor, +%% the geometry shader executable, if present, will be installed on the programmable geometry +%% processor, but no executable will be installed on the fragment processor. The results +%% of rasterizing primitives with such a program will be undefined. +%% +%% The program object's information log is updated and the program is generated at the time +%% of the link operation. After the link operation, applications are free to modify attached +%% shader objects, compile attached shader objects, detach shader objects, delete shader +%% objects, and attach additional shader objects. None of these operations affects the information +%% log or the program that is part of the program object. +%% +%% See external documentation. +-spec linkProgram(Program) -> ok when Program :: integer(). linkProgram(Program) -> cast(5472, <>). -%% @spec (Shader::integer(),String::[string()]) -> ok -%% @doc See external documentation. --spec shaderSource(integer(),[string()]) -> ok. +%% @doc Replaces the source code in a shader object +%% +%% ``gl:shaderSource'' sets the source code in `Shader' to the source code in the +%% array of strings specified by `String' . Any source code previously stored in the +%% shader object is completely replaced. The number of strings in the array is specified +%% by `Count' . If `Length' is `?NULL', each string is assumed to be null +%% terminated. If `Length' is a value other than `?NULL', it points to an array +%% containing a string length for each of the corresponding elements of `String' . +%% Each element in the `Length' array may contain the length of the corresponding +%% string (the null character is not counted as part of the string length) or a value less +%% than 0 to indicate that the string is null terminated. The source code strings are not +%% scanned or parsed at this time; they are simply copied into the specified shader object. +%% +%% See external documentation. +-spec shaderSource(Shader, String) -> ok when Shader :: integer(),String :: [string()]. shaderSource(Shader,String) -> StringTemp = list_to_binary([[Str|[0]] || Str <- String ]), cast(5473, <>). -%% @spec (Program::integer()) -> ok -%% @doc See external documentation. --spec useProgram(integer()) -> ok. +%% @doc Installs a program object as part of current rendering state +%% +%% ``gl:useProgram'' installs the program object specified by `Program' as part of +%% current rendering state. One or more executables are created in a program object by +%% successfully attaching shader objects to it with {@link gl:attachShader/2} , successfully +%% compiling the shader objects with {@link gl:compileShader/1} , and successfully linking +%% the program object with {@link gl:linkProgram/1} . +%% +%% A program object will contain an executable that will run on the vertex processor if +%% it contains one or more shader objects of type `?GL_VERTEX_SHADER' that have been +%% successfully compiled and linked. A program object will contain an executable that will +%% run on the geometry processor if it contains one or more shader objects of type `?GL_GEOMETRY_SHADER' +%% that have been successfully compiled and linked. Similarly, a program object will contain +%% an executable that will run on the fragment processor if it contains one or more shader +%% objects of type `?GL_FRAGMENT_SHADER' that have been successfully compiled and +%% linked. +%% +%% While a program object is in use, applications are free to modify attached shader objects, +%% compile attached shader objects, attach additional shader objects, and detach or delete +%% shader objects. None of these operations will affect the executables that are part of +%% the current state. However, relinking the program object that is currently in use will +%% install the program object as part of the current rendering state if the link operation +%% was successful (see {@link gl:linkProgram/1} ). If the program object currently in use +%% is relinked unsuccessfully, its link status will be set to `?GL_FALSE', but the +%% executables and associated state will remain part of the current state until a subsequent +%% call to ``gl:useProgram'' removes it from use. After it is removed from use, it cannot +%% be made part of current state until it has been successfully relinked. +%% +%% If `Program' is zero, then the current rendering state refers to an `invalid' +%% program object and the results of shader execution are undefined. However, this is not +%% an error. +%% +%% If `Program' does not contain shader objects of type `?GL_FRAGMENT_SHADER', +%% an executable will be installed on the vertex, and possibly geometry processors, but +%% the results of fragment shader execution will be undefined. +%% +%% See external documentation. +-spec useProgram(Program) -> ok when Program :: integer(). useProgram(Program) -> cast(5474, <>). -%% @spec (Location::integer(),V0::float()) -> ok -%% @doc See external documentation. --spec uniform1f(integer(),float()) -> ok. +%% @doc Specify the value of a uniform variable for the current program object +%% +%% ``gl:uniform'' modifies the value of a uniform variable or a uniform variable array. +%% The location of the uniform variable to be modified is specified by `Location' , which +%% should be a value returned by {@link gl:getUniformLocation/2} . ``gl:uniform'' operates +%% on the program object that was made part of current state by calling {@link gl:useProgram/1} +%% . +%% +%% The commands ``gl:uniform{1|2|3|4}{f|i|ui}'' are used to change the value of the uniform +%% variable specified by `Location' using the values passed as arguments. The number +%% specified in the command should match the number of components in the data type of the +%% specified uniform variable (e.g., `1' for float, int, unsigned int, bool; `2' +%% for vec2, ivec2, uvec2, bvec2, etc.). The suffix `f' indicates that floating-point +%% values are being passed; the suffix `i' indicates that integer values are being passed; +%% the suffix `ui' indicates that unsigned integer values are being passed, and this +%% type should also match the data type of the specified uniform variable. The `i' variants +%% of this function should be used to provide values for uniform variables defined as int, ivec2 +%% , ivec3, ivec4, or arrays of these. The `ui' variants of this function should be +%% used to provide values for uniform variables defined as unsigned int, uvec2, uvec3, uvec4, +%% or arrays of these. The `f' variants should be used to provide values for uniform +%% variables of type float, vec2, vec3, vec4, or arrays of these. Either the `i', `ui' +%% or `f' variants may be used to provide values for uniform variables of type bool, bvec2 +%% , bvec3, bvec4, or arrays of these. The uniform variable will be set to false if the input +%% value is 0 or 0.0f, and it will be set to true otherwise. +%% +%% All active uniform variables defined in a program object are initialized to 0 when the +%% program object is linked successfully. They retain the values assigned to them by a call +%% to ``gl:uniform '' until the next successful link operation occurs on the program object, +%% when they are once again initialized to 0. +%% +%% The commands ``gl:uniform{1|2|3|4}{f|i|ui}v'' can be used to modify a single uniform +%% variable or a uniform variable array. These commands pass a count and a pointer to the +%% values to be loaded into a uniform variable or a uniform variable array. A count of 1 +%% should be used if modifying the value of a single uniform variable, and a count of 1 or +%% greater can be used to modify an entire array or part of an array. When loading `n' +%% elements starting at an arbitrary position `m' in a uniform variable array, elements +%% `m' + `n' - 1 in the array will be replaced with the new values. If `M' + `N' +%% - 1 is larger than the size of the uniform variable array, values for all array elements +%% beyond the end of the array will be ignored. The number specified in the name of the command +%% indicates the number of components for each element in `Value' , and it should match +%% the number of components in the data type of the specified uniform variable (e.g., `1' +%% for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The data type specified +%% in the name of the command must match the data type for the specified uniform variable +%% as described previously for ``gl:uniform{1|2|3|4}{f|i|ui}''. +%% +%% For uniform variable arrays, each element of the array is considered to be of the type +%% indicated in the name of the command (e.g., ``gl:uniform3f'' or ``gl:uniform3fv'' +%% can be used to load a uniform variable array of type vec3). The number of elements of +%% the uniform variable array to be modified is specified by `Count' +%% +%% The commands ``gl:uniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv'' are used to modify +%% a matrix or an array of matrices. The numbers in the command name are interpreted as the +%% dimensionality of the matrix. The number `2' indicates a 2 × 2 matrix (i.e., 4 values), +%% the number `3' indicates a 3 × 3 matrix (i.e., 9 values), and the number `4' +%% indicates a 4 × 4 matrix (i.e., 16 values). Non-square matrix dimensionality is explicit, +%% with the first number representing the number of columns and the second number representing +%% the number of rows. For example, `2x4' indicates a 2 × 4 matrix with 2 columns and +%% 4 rows (i.e., 8 values). If `Transpose' is `?GL_FALSE', each matrix is assumed +%% to be supplied in column major order. If `Transpose' is `?GL_TRUE', each matrix +%% is assumed to be supplied in row major order. The `Count' argument indicates the +%% number of matrices to be passed. A count of 1 should be used if modifying the value of +%% a single matrix, and a count greater than 1 can be used to modify an array of matrices. +%% +%% See external documentation. +-spec uniform1f(Location, V0) -> ok when Location :: integer(),V0 :: float(). uniform1f(Location,V0) -> cast(5475, <>). -%% @spec (Location::integer(),V0::float(),V1::float()) -> ok -%% @doc See external documentation. --spec uniform2f(integer(),float(),float()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform2f(Location, V0, V1) -> ok when Location :: integer(),V0 :: float(),V1 :: float(). uniform2f(Location,V0,V1) -> cast(5476, <>). -%% @spec (Location::integer(),V0::float(),V1::float(),V2::float()) -> ok -%% @doc See external documentation. --spec uniform3f(integer(),float(),float(),float()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform3f(Location, V0, V1, V2) -> ok when Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(). uniform3f(Location,V0,V1,V2) -> cast(5477, <>). -%% @spec (Location::integer(),V0::float(),V1::float(),V2::float(),V3::float()) -> ok -%% @doc See external documentation. --spec uniform4f(integer(),float(),float(),float(),float()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform4f(Location, V0, V1, V2, V3) -> ok when Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float(). uniform4f(Location,V0,V1,V2,V3) -> cast(5478, <>). -%% @spec (Location::integer(),V0::integer()) -> ok -%% @doc See external documentation. --spec uniform1i(integer(),integer()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform1i(Location, V0) -> ok when Location :: integer(),V0 :: integer(). uniform1i(Location,V0) -> cast(5479, <>). -%% @spec (Location::integer(),V0::integer(),V1::integer()) -> ok -%% @doc See external documentation. --spec uniform2i(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform2i(Location, V0, V1) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(). uniform2i(Location,V0,V1) -> cast(5480, <>). -%% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok -%% @doc See external documentation. --spec uniform3i(integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform3i(Location, V0, V1, V2) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(). uniform3i(Location,V0,V1,V2) -> cast(5481, <>). -%% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok -%% @doc See external documentation. --spec uniform4i(integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform4i(Location, V0, V1, V2, V3) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer(). uniform4i(Location,V0,V1,V2,V3) -> cast(5482, <>). -%% @spec (Location::integer(),Value::[float()]) -> ok -%% @doc See external documentation. --spec uniform1fv(integer(),[float()]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform1fv(Location, Value) -> ok when Location :: integer(),Value :: [float()]. uniform1fv(Location,Value) -> cast(5483, <> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>). -%% @spec (Location::integer(),Value::[{float(),float()}]) -> ok -%% @doc See external documentation. --spec uniform2fv(integer(),[{float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform2fv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float()}]. uniform2fv(Location,Value) -> cast(5484, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniform3fv(integer(),[{float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform3fv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float()}]. uniform3fv(Location,Value) -> cast(5485, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniform4fv(integer(),[{float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform4fv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float(),float()}]. uniform4fv(Location,Value) -> cast(5486, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[integer()]) -> ok -%% @doc See external documentation. --spec uniform1iv(integer(),[integer()]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform1iv(Location, Value) -> ok when Location :: integer(),Value :: [integer()]. uniform1iv(Location,Value) -> cast(5487, <> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>). -%% @spec (Location::integer(),Value::[{integer(),integer()}]) -> ok -%% @doc See external documentation. --spec uniform2iv(integer(),[{integer(),integer()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform2iv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer()}]. uniform2iv(Location,Value) -> cast(5488, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok -%% @doc See external documentation. --spec uniform3iv(integer(),[{integer(),integer(),integer()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform3iv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer()}]. uniform3iv(Location,Value) -> cast(5489, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok -%% @doc See external documentation. --spec uniform4iv(integer(),[{integer(),integer(),integer(),integer()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform4iv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}]. uniform4iv(Location,Value) -> cast(5490, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix2fv(integer(),0|1,[{float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix2fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}]. uniformMatrix2fv(Location,Transpose,Value) -> cast(5491, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix3fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix3fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix3fv(Location,Transpose,Value) -> cast(5492, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix4fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix4fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix4fv(Location,Transpose,Value) -> cast(5493, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>). -%% @spec (Program::integer()) -> ok -%% @doc See external documentation. --spec validateProgram(integer()) -> ok. +%% @doc Validates a program object +%% +%% ``gl:validateProgram'' checks to see whether the executables contained in `Program' +%% can execute given the current OpenGL state. The information generated by the validation +%% process will be stored in `Program' 's information log. The validation information +%% may consist of an empty string, or it may be a string containing information about how +%% the current program object interacts with the rest of current OpenGL state. This provides +%% a way for OpenGL implementers to convey more information about why the current program +%% is inefficient, suboptimal, failing to execute, and so on. +%% +%% The status of the validation operation will be stored as part of the program object's +%% state. This value will be set to `?GL_TRUE' if the validation succeeded, and `?GL_FALSE' +%% otherwise. It can be queried by calling {@link gl:getProgramiv/2} with arguments `Program' +%% and `?GL_VALIDATE_STATUS'. If validation is successful, `Program' is guaranteed +%% to execute given the current state. Otherwise, `Program' is guaranteed to not execute. +%% +%% +%% This function is typically useful only during application development. The informational +%% string stored in the information log is completely implementation dependent; therefore, +%% an application should not expect different OpenGL implementations to produce identical +%% information strings. +%% +%% See external documentation. +-spec validateProgram(Program) -> ok when Program :: integer(). validateProgram(Program) -> cast(5494, <>). -%% @spec (Index::integer(),X::float()) -> ok -%% @doc See external documentation. --spec vertexAttrib1d(integer(),float()) -> ok. +%% @doc Specifies the value of a generic vertex attribute +%% +%% The ``gl:vertexAttrib'' family of entry points allows an application to pass generic +%% vertex attributes in numbered locations. +%% +%% Generic attributes are defined as four-component values that are organized into an array. +%% The first entry of this array is numbered 0, and the size of the array is specified by +%% the implementation-dependent constant `?GL_MAX_VERTEX_ATTRIBS'. Individual elements +%% of this array can be modified with a ``gl:vertexAttrib'' call that specifies the index +%% of the element to be modified and a value for that element. +%% +%% These commands can be used to specify one, two, three, or all four components of the generic +%% vertex attribute specified by `Index' . A `1' in the name of the command indicates +%% that only one value is passed, and it will be used to modify the first component of the +%% generic vertex attribute. The second and third components will be set to 0, and the fourth +%% component will be set to 1. Similarly, a `2' in the name of the command indicates +%% that values are provided for the first two components, the third component will be set +%% to 0, and the fourth component will be set to 1. A `3' in the name of the command +%% indicates that values are provided for the first three components and the fourth component +%% will be set to 1, whereas a `4' in the name indicates that values are provided for +%% all four components. +%% +%% The letters `s', `f', `i', `d', `ub', `us', and `ui' +%% indicate whether the arguments are of type short, float, int, double, unsigned byte, unsigned +%% short, or unsigned int. When `v' is appended to the name, the commands can take a +%% pointer to an array of such values. +%% +%% Additional capitalized letters can indicate further alterations to the default behavior +%% of the glVertexAttrib function: +%% +%% The commands containing `N' indicate that the arguments will be passed as fixed-point +%% values that are scaled to a normalized range according to the component conversion rules +%% defined by the OpenGL specification. Signed values are understood to represent fixed-point +%% values in the range [-1,1], and unsigned values are understood to represent fixed-point +%% values in the range [0,1]. +%% +%% The commands containing `I' indicate that the arguments are extended to full signed +%% or unsigned integers. +%% +%% The commands containing `P' indicate that the arguments are stored as packed components +%% within a larger natural type. +%% +%% The commands containing `L' indicate that the arguments are full 64-bit quantities +%% and should be passed directly to shader inputs declared as 64-bit double precision types. +%% +%% +%% OpenGL Shading Language attribute variables are allowed to be of type mat2, mat3, or mat4. +%% Attributes of these types may be loaded using the ``gl:vertexAttrib'' entry points. +%% Matrices must be loaded into successive generic attribute slots in column major order, +%% with one column of the matrix in each generic attribute slot. +%% +%% A user-defined attribute variable declared in a vertex shader can be bound to a generic +%% attribute index by calling {@link gl:bindAttribLocation/3} . This allows an application +%% to use more descriptive variable names in a vertex shader. A subsequent change to the +%% specified generic vertex attribute will be immediately reflected as a change to the corresponding +%% attribute variable in the vertex shader. +%% +%% The binding between a generic vertex attribute index and a user-defined attribute variable +%% in a vertex shader is part of the state of a program object, but the current value of +%% the generic vertex attribute is not. The value of each generic vertex attribute is part +%% of current state, just like standard vertex attributes, and it is maintained even if a +%% different program object is used. +%% +%% An application may freely modify generic vertex attributes that are not bound to a named +%% vertex shader attribute variable. These values are simply maintained as part of current +%% state and will not be accessed by the vertex shader. If a generic vertex attribute bound +%% to an attribute variable in a vertex shader is not updated while the vertex shader is +%% executing, the vertex shader will repeatedly use the current value for the generic vertex +%% attribute. +%% +%% See external documentation. +-spec vertexAttrib1d(Index, X) -> ok when Index :: integer(),X :: float(). vertexAttrib1d(Index,X) -> cast(5495, <>). -%% @spec (Index,{X}) -> ok %% @equiv vertexAttrib1d(Index,X) --spec vertexAttrib1dv(integer(),{float()}) -> ok. +-spec vertexAttrib1dv(Index :: integer(),V) -> ok when V :: {X :: float()}. vertexAttrib1dv(Index,{X}) -> vertexAttrib1d(Index,X). -%% @spec (Index::integer(),X::float()) -> ok -%% @doc See external documentation. --spec vertexAttrib1f(integer(),float()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib1f(Index, X) -> ok when Index :: integer(),X :: float(). vertexAttrib1f(Index,X) -> cast(5496, <>). -%% @spec (Index,{X}) -> ok %% @equiv vertexAttrib1f(Index,X) --spec vertexAttrib1fv(integer(),{float()}) -> ok. +-spec vertexAttrib1fv(Index :: integer(),V) -> ok when V :: {X :: float()}. vertexAttrib1fv(Index,{X}) -> vertexAttrib1f(Index,X). -%% @spec (Index::integer(),X::integer()) -> ok -%% @doc See external documentation. --spec vertexAttrib1s(integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib1s(Index, X) -> ok when Index :: integer(),X :: integer(). vertexAttrib1s(Index,X) -> cast(5497, <>). -%% @spec (Index,{X}) -> ok %% @equiv vertexAttrib1s(Index,X) --spec vertexAttrib1sv(integer(),{integer()}) -> ok. +-spec vertexAttrib1sv(Index :: integer(),V) -> ok when V :: {X :: integer()}. vertexAttrib1sv(Index,{X}) -> vertexAttrib1s(Index,X). -%% @spec (Index::integer(),X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec vertexAttrib2d(integer(),float(),float()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib2d(Index, X, Y) -> ok when Index :: integer(),X :: float(),Y :: float(). vertexAttrib2d(Index,X,Y) -> cast(5498, <>). -%% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttrib2d(Index,X,Y) --spec vertexAttrib2dv(integer(),{float(),float()}) -> ok. +-spec vertexAttrib2dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float()}. vertexAttrib2dv(Index,{X,Y}) -> vertexAttrib2d(Index,X,Y). -%% @spec (Index::integer(),X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec vertexAttrib2f(integer(),float(),float()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib2f(Index, X, Y) -> ok when Index :: integer(),X :: float(),Y :: float(). vertexAttrib2f(Index,X,Y) -> cast(5499, <>). -%% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttrib2f(Index,X,Y) --spec vertexAttrib2fv(integer(),{float(),float()}) -> ok. +-spec vertexAttrib2fv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float()}. vertexAttrib2fv(Index,{X,Y}) -> vertexAttrib2f(Index,X,Y). -%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec vertexAttrib2s(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib2s(Index, X, Y) -> ok when Index :: integer(),X :: integer(),Y :: integer(). vertexAttrib2s(Index,X,Y) -> cast(5500, <>). -%% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttrib2s(Index,X,Y) --spec vertexAttrib2sv(integer(),{integer(),integer()}) -> ok. +-spec vertexAttrib2sv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer()}. vertexAttrib2sv(Index,{X,Y}) -> vertexAttrib2s(Index,X,Y). -%% @spec (Index::integer(),X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec vertexAttrib3d(integer(),float(),float(),float()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib3d(Index, X, Y, Z) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(). vertexAttrib3d(Index,X,Y,Z) -> cast(5501, <>). -%% @spec (Index,{X,Y,Z}) -> ok %% @equiv vertexAttrib3d(Index,X,Y,Z) --spec vertexAttrib3dv(integer(),{float(),float(),float()}) -> ok. +-spec vertexAttrib3dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}. vertexAttrib3dv(Index,{X,Y,Z}) -> vertexAttrib3d(Index,X,Y,Z). -%% @spec (Index::integer(),X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec vertexAttrib3f(integer(),float(),float(),float()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib3f(Index, X, Y, Z) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(). vertexAttrib3f(Index,X,Y,Z) -> cast(5502, <>). -%% @spec (Index,{X,Y,Z}) -> ok %% @equiv vertexAttrib3f(Index,X,Y,Z) --spec vertexAttrib3fv(integer(),{float(),float(),float()}) -> ok. +-spec vertexAttrib3fv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}. vertexAttrib3fv(Index,{X,Y,Z}) -> vertexAttrib3f(Index,X,Y,Z). -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec vertexAttrib3s(integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib3s(Index, X, Y, Z) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(). vertexAttrib3s(Index,X,Y,Z) -> cast(5503, <>). -%% @spec (Index,{X,Y,Z}) -> ok %% @equiv vertexAttrib3s(Index,X,Y,Z) --spec vertexAttrib3sv(integer(),{integer(),integer(),integer()}) -> ok. +-spec vertexAttrib3sv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}. vertexAttrib3sv(Index,{X,Y,Z}) -> vertexAttrib3s(Index,X,Y,Z). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4Nbv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4Nbv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4Nbv(Index,{V1,V2,V3,V4}) -> cast(5504, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4Niv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4Niv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4Niv(Index,{V1,V2,V3,V4}) -> cast(5505, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4Nsv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4Nsv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4Nsv(Index,{V1,V2,V3,V4}) -> cast(5506, <>). -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec vertexAttrib4Nub(integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4Nub(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer(). vertexAttrib4Nub(Index,X,Y,Z,W) -> cast(5507, <>). -%% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttrib4Nub(Index,X,Y,Z,W) --spec vertexAttrib4Nubv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +-spec vertexAttrib4Nubv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}. vertexAttrib4Nubv(Index,{X,Y,Z,W}) -> vertexAttrib4Nub(Index,X,Y,Z,W). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4Nuiv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4Nuiv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4Nuiv(Index,{V1,V2,V3,V4}) -> cast(5508, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4Nusv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4Nusv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4Nusv(Index,{V1,V2,V3,V4}) -> cast(5509, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4bv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4bv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4bv(Index,{V1,V2,V3,V4}) -> cast(5510, <>). -%% @spec (Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec vertexAttrib4d(integer(),float(),float(),float(),float()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4d(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float(). vertexAttrib4d(Index,X,Y,Z,W) -> cast(5511, <>). -%% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttrib4d(Index,X,Y,Z,W) --spec vertexAttrib4dv(integer(),{float(),float(),float(),float()}) -> ok. +-spec vertexAttrib4dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}. vertexAttrib4dv(Index,{X,Y,Z,W}) -> vertexAttrib4d(Index,X,Y,Z,W). -%% @spec (Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec vertexAttrib4f(integer(),float(),float(),float(),float()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4f(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float(). vertexAttrib4f(Index,X,Y,Z,W) -> cast(5512, <>). -%% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttrib4f(Index,X,Y,Z,W) --spec vertexAttrib4fv(integer(),{float(),float(),float(),float()}) -> ok. +-spec vertexAttrib4fv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}. vertexAttrib4fv(Index,{X,Y,Z,W}) -> vertexAttrib4f(Index,X,Y,Z,W). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4iv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4iv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4iv(Index,{V1,V2,V3,V4}) -> cast(5513, <>). -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec vertexAttrib4s(integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4s(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer(). vertexAttrib4s(Index,X,Y,Z,W) -> cast(5514, <>). -%% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttrib4s(Index,X,Y,Z,W) --spec vertexAttrib4sv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +-spec vertexAttrib4sv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}. vertexAttrib4sv(Index,{X,Y,Z,W}) -> vertexAttrib4s(Index,X,Y,Z,W). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4ubv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4ubv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4ubv(Index,{V1,V2,V3,V4}) -> cast(5515, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4uiv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4uiv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4uiv(Index,{V1,V2,V3,V4}) -> cast(5516, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttrib4usv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttrib4usv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttrib4usv(Index,{V1,V2,V3,V4}) -> cast(5517, <>). -%% @spec (Index::integer(),Size::integer(),Type::enum(),Normalized::0|1,Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec vertexAttribPointer(integer(),integer(),enum(),0|1,integer(),offset()|mem()) -> ok. +%% @doc Define an array of generic vertex attribute data +%% +%% ``gl:vertexAttribPointer'', ``gl:vertexAttribIPointer'' and ``gl:vertexAttribLPointer'' +%% specify the location and data format of the array of generic vertex attributes at index `Index' +%% to use when rendering. `Size' specifies the number of components per attribute and +%% must be 1, 2, 3, 4, or `?GL_BGRA'. `Type' specifies the data type of each component, +%% and `Stride' specifies the byte stride from one attribute to the next, allowing vertices +%% and attributes to be packed into a single array or stored in separate arrays. +%% +%% For ``gl:vertexAttribPointer'', if `Normalized' is set to `?GL_TRUE', it +%% indicates that values stored in an integer format are to be mapped to the range [-1,1] +%% (for signed values) or [0,1] (for unsigned values) when they are accessed and converted +%% to floating point. Otherwise, values will be converted to floats directly without normalization. +%% +%% +%% For ``gl:vertexAttribIPointer'', only the integer types `?GL_BYTE', `?GL_UNSIGNED_BYTE' +%% , `?GL_SHORT', `?GL_UNSIGNED_SHORT', `?GL_INT', `?GL_UNSIGNED_INT' +%% are accepted. Values are always left as integer values. +%% +%% ``gl:vertexAttribLPointer'' specifies state for a generic vertex attribute array associated +%% with a shader attribute variable declared with 64-bit double precision components. `Type' +%% must be `?GL_DOUBLE'. `Index' , `Size' , and `Stride' behave as described +%% for ``gl:vertexAttribPointer'' and ``gl:vertexAttribIPointer''. +%% +%% If `Pointer' is not NULL, a non-zero named buffer object must be bound to the `?GL_ARRAY_BUFFER' +%% target (see {@link gl:bindBuffer/2} ), otherwise an error is generated. `Pointer' +%% is treated as a byte offset into the buffer object's data store. The buffer object binding +%% (`?GL_ARRAY_BUFFER_BINDING') is saved as generic vertex attribute array state (`?GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING' +%% ) for index `Index' . +%% +%% When a generic vertex attribute array is specified, `Size' , `Type' , `Normalized' +%% , `Stride' , and `Pointer' are saved as vertex array state, in addition to the +%% current vertex array buffer object binding. +%% +%% To enable and disable a generic vertex attribute array, call {@link gl:disableVertexAttribArray/1} +%% and {@link gl:disableVertexAttribArray/1} with `Index' . If enabled, the generic vertex +%% attribute array is used when {@link gl:drawArrays/3} , {@link gl:multiDrawArrays/3} , {@link gl:drawElements/4} +%% , see `glMultiDrawElements', or {@link gl:drawRangeElements/6} is called. +%% +%% See external documentation. +-spec vertexAttribPointer(Index, Size, Type, Normalized, Stride, Pointer) -> ok when Index :: integer(),Size :: integer(),Type :: enum(),Normalized :: 0|1,Stride :: integer(),Pointer :: offset()|mem(). vertexAttribPointer(Index,Size,Type,Normalized,Stride,Pointer) when is_integer(Pointer) -> cast(5518, <>); vertexAttribPointer(Index,Size,Type,Normalized,Stride,Pointer) -> send_bin(Pointer), cast(5519, <>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix2x3fv(integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix2x3fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}]. uniformMatrix2x3fv(Location,Transpose,Value) -> cast(5520, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix3x2fv(integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix3x2fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}]. uniformMatrix3x2fv(Location,Transpose,Value) -> cast(5521, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix2x4fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix2x4fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix2x4fv(Location,Transpose,Value) -> cast(5522, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix4x2fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix4x2fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix4x2fv(Location,Transpose,Value) -> cast(5523, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix3x4fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix3x4fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix3x4fv(Location,Transpose,Value) -> cast(5524, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix4x3fv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix4x3fv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix4x3fv(Location,Transpose,Value) -> cast(5525, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>). -%% @spec (Index::integer(),R::0|1,G::0|1,B::0|1,A::0|1) -> ok -%% @doc See external documentation. --spec colorMaski(integer(),0|1,0|1,0|1,0|1) -> ok. +%% @doc glColorMaski +%% +%% See external documentation. +-spec colorMaski(Index, R, G, B, A) -> ok when Index :: integer(),R :: 0|1,G :: 0|1,B :: 0|1,A :: 0|1. colorMaski(Index,R,G,B,A) -> cast(5526, <>). -%% @spec (Target::enum(),Index::integer()) -> [0|1] -%% @doc See external documentation. --spec getBooleani_v(enum(),integer()) -> [0|1]. +%% @doc +%% See {@link getBooleanv/1} +-spec getBooleani_v(Target, Index) -> [0|1] when Target :: enum(),Index :: integer(). getBooleani_v(Target,Index) -> call(5527, <>). -%% @spec (Target::enum(),Index::integer()) -> [integer()] -%% @doc See external documentation. --spec getIntegeri_v(enum(),integer()) -> [integer()]. +%% @doc +%% See {@link getBooleanv/1} +-spec getIntegeri_v(Target, Index) -> [integer()] when Target :: enum(),Index :: integer(). getIntegeri_v(Target,Index) -> call(5528, <>). -%% @spec (Target::enum(),Index::integer()) -> ok -%% @doc See external documentation. --spec enablei(enum(),integer()) -> ok. +%% @doc +%% See {@link enable/1} +-spec enablei(Target, Index) -> ok when Target :: enum(),Index :: integer(). enablei(Target,Index) -> cast(5529, <>). -%% @spec (Target::enum(),Index::integer()) -> ok -%% @doc See external documentation. --spec disablei(enum(),integer()) -> ok. +%% @doc glEnablei +%% +%% See external documentation. +-spec disablei(Target, Index) -> ok when Target :: enum(),Index :: integer(). disablei(Target,Index) -> cast(5530, <>). -%% @spec (Target::enum(),Index::integer()) -> 0|1 -%% @doc See external documentation. --spec isEnabledi(enum(),integer()) -> 0|1. +%% @doc glIsEnabledi +%% +%% See external documentation. +-spec isEnabledi(Target, Index) -> 0|1 when Target :: enum(),Index :: integer(). isEnabledi(Target,Index) -> call(5531, <>). -%% @spec (PrimitiveMode::enum()) -> ok -%% @doc See external documentation. --spec beginTransformFeedback(enum()) -> ok. +%% @doc Start transform feedback operation +%% +%% Transform feedback mode captures the values of varying variables written by the vertex +%% shader (or, if active, the geometry shader). Transform feedback is said to be active after +%% a call to ``gl:beginTransformFeedback'' until a subsequent call to {@link gl:beginTransformFeedback/1} +%% . Transform feedback commands must be paired. +%% +%% If no geometry shader is present, while transform feedback is active the `Mode' +%% parameter to {@link gl:drawArrays/3} must match those specified in the following table: +%% +%%
` Transform Feedback ' `PrimitiveMode' ` Allowed Render Primitive ' +%% `Modes'
`?GL_POINTS'`?GL_POINTS'
`?GL_LINES'`?GL_LINES', `?GL_LINE_LOOP', `?GL_LINE_STRIP' +%% , `?GL_LINES_ADJACENCY', `?GL_LINE_STRIP_ADJACENCY'
`?GL_TRIANGLES' +%% `?GL_TRIANGLES', `?GL_TRIANGLE_STRIP', `?GL_TRIANGLE_FAN', `?GL_TRIANGLES_ADJACENCY' +%% , `?GL_TRIANGLE_STRIP_ADJACENCY'
+%% +%% If a geometry shader is present, the output primitive type from the geometry shader must +%% match those provided in the following table: +%%
` Transform Feedback ' +%% `PrimitiveMode' ` Allowed Geometry Shader Output Primitive Type '
`?GL_POINTS'`?points'
`?GL_LINES' +%% `?line_strip'
`?GL_TRIANGLES'`?triangle_strip' +%%
+%% +%% See external documentation. +-spec beginTransformFeedback(PrimitiveMode) -> ok when PrimitiveMode :: enum(). beginTransformFeedback(PrimitiveMode) -> cast(5532, <>). -%% @spec () -> ok -%% @doc See external documentation. +%% @doc +%% See {@link beginTransformFeedback/1} -spec endTransformFeedback() -> ok. endTransformFeedback() -> cast(5533, <<>>). -%% @spec (Target::enum(),Index::integer(),Buffer::integer(),Offset::integer(),Size::integer()) -> ok -%% @doc See external documentation. --spec bindBufferRange(enum(),integer(),integer(),integer(),integer()) -> ok. +%% @doc Bind a range within a buffer object to an indexed buffer target +%% +%% ``gl:bindBufferRange'' binds a range the buffer object `Buffer' represented by `Offset' +%% and `Size' to the binding point at index `Index' of the array of targets specified +%% by `Target' . Each `Target' represents an indexed array of buffer binding points, +%% as well as a single general binding point that can be used by other buffer manipulation +%% functions such as {@link gl:bindBuffer/2} or see `glMapBuffer'. In addition to binding +%% a range of `Buffer' to the indexed buffer binding target, ``gl:bindBufferBase'' +%% also binds the range to the generic buffer binding point specified by `Target' . +%% +%% `Offset' specifies the offset in basic machine units into the buffer object `Buffer' +%% and `Size' specifies the amount of data that can be read from the buffer object +%% while used as an indexed target. +%% +%% See external documentation. +-spec bindBufferRange(Target, Index, Buffer, Offset, Size) -> ok when Target :: enum(),Index :: integer(),Buffer :: integer(),Offset :: integer(),Size :: integer(). bindBufferRange(Target,Index,Buffer,Offset,Size) -> cast(5534, <>). -%% @spec (Target::enum(),Index::integer(),Buffer::integer()) -> ok -%% @doc See external documentation. --spec bindBufferBase(enum(),integer(),integer()) -> ok. +%% @doc Bind a buffer object to an indexed buffer target +%% +%% ``gl:bindBufferBase'' binds the buffer object `Buffer' to the binding point at +%% index `Index' of the array of targets specified by `Target' . Each `Target' +%% represents an indexed array of buffer binding points, as well as a single general binding +%% point that can be used by other buffer manipulation functions such as {@link gl:bindBuffer/2} +%% or see `glMapBuffer'. In addition to binding `Buffer' to the indexed buffer +%% binding target, ``gl:bindBufferBase'' also binds `Buffer' to the generic buffer +%% binding point specified by `Target' . +%% +%% See external documentation. +-spec bindBufferBase(Target, Index, Buffer) -> ok when Target :: enum(),Index :: integer(),Buffer :: integer(). bindBufferBase(Target,Index,Buffer) -> cast(5535, <>). -%% @spec (Program::integer(),Varyings::[string()],BufferMode::enum()) -> ok -%% @doc See external documentation. --spec transformFeedbackVaryings(integer(),[string()],enum()) -> ok. +%% @doc Specify values to record in transform feedback buffers +%% +%% The names of the vertex or geometry shader outputs to be recorded in transform feedback +%% mode are specified using ``gl:transformFeedbackVaryings''. When a geometry shader is +%% active, transform feedback records the values of selected geometry shader output variables +%% from the emitted vertices. Otherwise, the values of the selected vertex shader outputs +%% are recorded. +%% +%% The state set by ``gl:tranformFeedbackVaryings'' is stored and takes effect next time {@link gl:linkProgram/1} +%% is called on `Program' . When {@link gl:linkProgram/1} is called, `Program' is +%% linked so that the values of the specified varying variables for the vertices of each +%% primitive generated by the GL are written to a single buffer object if `BufferMode' +%% is `?GL_INTERLEAVED_ATTRIBS' or multiple buffer objects if `BufferMode' is `?GL_SEPARATE_ATTRIBS' +%% . +%% +%% In addition to the errors generated by ``gl:transformFeedbackVaryings'', the program `Program' +%% will fail to link if: +%% +%% The count specified by ``gl:transformFeedbackVaryings'' is non-zero, but the program +%% object has no vertex or geometry shader. +%% +%% Any variable name specified in the `Varyings' array is not declared as an output +%% in the vertex shader (or the geometry shader, if active). +%% +%% Any two entries in the `Varyings' array specify the same varying variable. +%% +%% The total number of components to capture in any varying variable in `Varyings' +%% is greater than the constant `?GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS' and +%% the buffer mode is `?GL_SEPARATE_ATTRIBS'. +%% +%% The total number of components to capture is greater than the constant `?GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS' +%% and the buffer mode is `?GL_INTERLEAVED_ATTRIBS'. +%% +%% See external documentation. +-spec transformFeedbackVaryings(Program, Varyings, BufferMode) -> ok when Program :: integer(),Varyings :: [string()],BufferMode :: enum(). transformFeedbackVaryings(Program,Varyings,BufferMode) -> VaryingsTemp = list_to_binary([[Str|[0]] || Str <- Varyings ]), cast(5536, <>). -%% @spec (Program::integer(),Index::integer(),BufSize::integer()) -> {Size::integer(),Type::enum(),Name::string()} -%% @doc See external documentation. --spec getTransformFeedbackVarying(integer(),integer(),integer()) -> {integer(),enum(),string()}. +%% @doc Retrieve information about varying variables selected for transform feedback +%% +%% Information about the set of varying variables in a linked program that will be captured +%% during transform feedback may be retrieved by calling ``gl:getTransformFeedbackVarying''. +%% ``gl:getTransformFeedbackVarying'' provides information about the varying variable selected +%% by `Index' . An `Index' of 0 selects the first varying variable specified in +%% the `Varyings' array passed to {@link gl:transformFeedbackVaryings/3} , and an `Index' +%% of `?GL_TRANSFORM_FEEDBACK_VARYINGS-1' selects the last such variable. +%% +%% The name of the selected varying is returned as a null-terminated string in `Name' . +%% The actual number of characters written into `Name' , excluding the null terminator, +%% is returned in `Length' . If `Length' is NULL, no length is returned. The maximum +%% number of characters that may be written into `Name' , including the null terminator, +%% is specified by `BufSize' . +%% +%% The length of the longest varying name in program is given by `?GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH' +%% , which can be queried with {@link gl:getProgramiv/2} . +%% +%% For the selected varying variable, its type is returned into `Type' . The size of +%% the varying is returned into `Size' . The value in `Size' is in units of the +%% type returned in `Type' . The type returned can be any of the scalar, vector, or matrix +%% attribute types returned by {@link gl:getActiveAttrib/3} . If an error occurred, the return +%% parameters `Length' , `Size' , `Type' and `Name' will be unmodified. +%% This command will return as much information about the varying variables as possible. +%% If no information is available, `Length' will be set to zero and `Name' will +%% be an empty string. This situation could arise if ``gl:getTransformFeedbackVarying'' +%% is called after a failed link. +%% +%% See external documentation. +-spec getTransformFeedbackVarying(Program, Index, BufSize) -> {Size :: integer(),Type :: enum(),Name :: string()} when Program :: integer(),Index :: integer(),BufSize :: integer(). getTransformFeedbackVarying(Program,Index,BufSize) -> call(5537, <>). -%% @spec (Target::enum(),Clamp::enum()) -> ok -%% @doc See external documentation. --spec clampColor(enum(),enum()) -> ok. +%% @doc specify whether data read via +%% +%% {@link gl:readPixels/7} should be clamped +%% +%% ``gl:clampColor'' controls color clamping that is performed during {@link gl:readPixels/7} +%% . `Target' must be `?GL_CLAMP_READ_COLOR'. If `Clamp' is `?GL_TRUE', +%% read color clamping is enabled; if `Clamp' is `?GL_FALSE', read color clamping +%% is disabled. If `Clamp' is `?GL_FIXED_ONLY', read color clamping is enabled +%% only if the selected read buffer has fixed point components and disabled otherwise. +%% +%% See external documentation. +-spec clampColor(Target, Clamp) -> ok when Target :: enum(),Clamp :: enum(). clampColor(Target,Clamp) -> cast(5538, <>). -%% @spec (Id::integer(),Mode::enum()) -> ok -%% @doc See external documentation. --spec beginConditionalRender(integer(),enum()) -> ok. +%% @doc Start conditional rendering +%% +%% Conditional rendering is started using ``gl:beginConditionalRender'' and ended using ``gl:endConditionalRender'' +%% . During conditional rendering, all vertex array commands, as well as {@link gl:clear/1} +%% and {@link gl:clearBufferiv/3} have no effect if the (`?GL_SAMPLES_PASSED') result of +%% the query object `Id' is zero, or if the (`?GL_ANY_SAMPLES_PASSED') result is `?GL_FALSE' +%% . The results of commands setting the current vertex state, such as {@link gl:vertexAttrib1d/2} +%% are undefined. If the (`?GL_SAMPLES_PASSED') result is non-zero or if the (`?GL_ANY_SAMPLES_PASSED' +%% ) result is `?GL_TRUE', such commands are not discarded. The `Id' parameter to ``gl:beginConditionalRender'' +%% must be the name of a query object previously returned from a call to {@link gl:genQueries/1} +%% . `Mode' specifies how the results of the query object are to be interpreted. If `Mode' +%% is `?GL_QUERY_WAIT', the GL waits for the results of the query to be available and +%% then uses the results to determine if subsequent rendering commands are discarded. If `Mode' +%% is `?GL_QUERY_NO_WAIT', the GL may choose to unconditionally execute the subsequent +%% rendering commands without waiting for the query to complete. +%% +%% If `Mode' is `?GL_QUERY_BY_REGION_WAIT', the GL will also wait for occlusion +%% query results and discard rendering commands if the result of the occlusion query is zero. +%% If the query result is non-zero, subsequent rendering commands are executed, but the GL +%% may discard the results of the commands for any region of the framebuffer that did not +%% contribute to the sample count in the specified occlusion query. Any such discarding is +%% done in an implementation-dependent manner, but the rendering command results may not +%% be discarded for any samples that contributed to the occlusion query sample count. If `Mode' +%% is `?GL_QUERY_BY_REGION_NO_WAIT', the GL operates as in `?GL_QUERY_BY_REGION_WAIT' +%% , but may choose to unconditionally execute the subsequent rendering commands without +%% waiting for the query to complete. +%% +%% See external documentation. +-spec beginConditionalRender(Id, Mode) -> ok when Id :: integer(),Mode :: enum(). beginConditionalRender(Id,Mode) -> cast(5539, <>). -%% @spec () -> ok -%% @doc See external documentation. +%% @doc +%% See {@link beginConditionalRender/2} -spec endConditionalRender() -> ok. endConditionalRender() -> cast(5540, <<>>). -%% @spec (Index::integer(),Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec vertexAttribIPointer(integer(),integer(),enum(),integer(),offset()|mem()) -> ok. +%% @doc glVertexAttribIPointer +%% +%% See external documentation. +-spec vertexAttribIPointer(Index, Size, Type, Stride, Pointer) -> ok when Index :: integer(),Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem(). vertexAttribIPointer(Index,Size,Type,Stride,Pointer) when is_integer(Pointer) -> cast(5541, <>); vertexAttribIPointer(Index,Size,Type,Stride,Pointer) -> send_bin(Pointer), cast(5542, <>). -%% @spec (Index::integer(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getVertexAttribIiv(integer(),enum()) -> {integer(),integer(),integer(),integer()}. +%% @doc +%% See {@link getVertexAttribdv/2} +-spec getVertexAttribIiv(Index, Pname) -> {integer(),integer(),integer(),integer()} when Index :: integer(),Pname :: enum(). getVertexAttribIiv(Index,Pname) -> call(5543, <>). -%% @spec (Index::integer(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getVertexAttribIuiv(integer(),enum()) -> {integer(),integer(),integer(),integer()}. +%% @doc glGetVertexAttribI +%% +%% See external documentation. +-spec getVertexAttribIuiv(Index, Pname) -> {integer(),integer(),integer(),integer()} when Index :: integer(),Pname :: enum(). getVertexAttribIuiv(Index,Pname) -> call(5544, <>). -%% @spec (Index::integer(),X::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI1i(integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI1i(Index, X) -> ok when Index :: integer(),X :: integer(). vertexAttribI1i(Index,X) -> cast(5545, <>). -%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI2i(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI2i(Index, X, Y) -> ok when Index :: integer(),X :: integer(),Y :: integer(). vertexAttribI2i(Index,X,Y) -> cast(5546, <>). -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI3i(integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI3i(Index, X, Y, Z) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(). vertexAttribI3i(Index,X,Y,Z) -> cast(5547, <>). -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI4i(integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI4i(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer(). vertexAttribI4i(Index,X,Y,Z,W) -> cast(5548, <>). -%% @spec (Index::integer(),X::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI1ui(integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI1ui(Index, X) -> ok when Index :: integer(),X :: integer(). vertexAttribI1ui(Index,X) -> cast(5549, <>). -%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI2ui(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI2ui(Index, X, Y) -> ok when Index :: integer(),X :: integer(),Y :: integer(). vertexAttribI2ui(Index,X,Y) -> cast(5550, <>). -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI3ui(integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI3ui(Index, X, Y, Z) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(). vertexAttribI3ui(Index,X,Y,Z) -> cast(5551, <>). -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI4ui(integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI4ui(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: integer(),Y :: integer(),Z :: integer(),W :: integer(). vertexAttribI4ui(Index,X,Y,Z,W) -> cast(5552, <>). -%% @spec (Index,{X}) -> ok %% @equiv vertexAttribI1i(Index,X) --spec vertexAttribI1iv(integer(),{integer()}) -> ok. +-spec vertexAttribI1iv(Index :: integer(),V) -> ok when V :: {X :: integer()}. vertexAttribI1iv(Index,{X}) -> vertexAttribI1i(Index,X). -%% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttribI2i(Index,X,Y) --spec vertexAttribI2iv(integer(),{integer(),integer()}) -> ok. +-spec vertexAttribI2iv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer()}. vertexAttribI2iv(Index,{X,Y}) -> vertexAttribI2i(Index,X,Y). -%% @spec (Index,{X,Y,Z}) -> ok %% @equiv vertexAttribI3i(Index,X,Y,Z) --spec vertexAttribI3iv(integer(),{integer(),integer(),integer()}) -> ok. +-spec vertexAttribI3iv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}. vertexAttribI3iv(Index,{X,Y,Z}) -> vertexAttribI3i(Index,X,Y,Z). -%% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttribI4i(Index,X,Y,Z,W) --spec vertexAttribI4iv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +-spec vertexAttribI4iv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}. vertexAttribI4iv(Index,{X,Y,Z,W}) -> vertexAttribI4i(Index,X,Y,Z,W). -%% @spec (Index,{X}) -> ok %% @equiv vertexAttribI1ui(Index,X) --spec vertexAttribI1uiv(integer(),{integer()}) -> ok. +-spec vertexAttribI1uiv(Index :: integer(),V) -> ok when V :: {X :: integer()}. vertexAttribI1uiv(Index,{X}) -> vertexAttribI1ui(Index,X). -%% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttribI2ui(Index,X,Y) --spec vertexAttribI2uiv(integer(),{integer(),integer()}) -> ok. +-spec vertexAttribI2uiv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer()}. vertexAttribI2uiv(Index,{X,Y}) -> vertexAttribI2ui(Index,X,Y). -%% @spec (Index,{X,Y,Z}) -> ok %% @equiv vertexAttribI3ui(Index,X,Y,Z) --spec vertexAttribI3uiv(integer(),{integer(),integer(),integer()}) -> ok. +-spec vertexAttribI3uiv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer()}. vertexAttribI3uiv(Index,{X,Y,Z}) -> vertexAttribI3ui(Index,X,Y,Z). -%% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttribI4ui(Index,X,Y,Z,W) --spec vertexAttribI4uiv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +-spec vertexAttribI4uiv(Index :: integer(),V) -> ok when V :: {X :: integer(),Y :: integer(),Z :: integer(),W :: integer()}. vertexAttribI4uiv(Index,{X,Y,Z,W}) -> vertexAttribI4ui(Index,X,Y,Z,W). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttribI4bv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI4bv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttribI4bv(Index,{V1,V2,V3,V4}) -> cast(5553, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttribI4sv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI4sv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttribI4sv(Index,{V1,V2,V3,V4}) -> cast(5554, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttribI4ubv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI4ubv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttribI4ubv(Index,{V1,V2,V3,V4}) -> cast(5555, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttribI4usv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc +%% See {@link vertexAttrib1d/2} +-spec vertexAttribI4usv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. vertexAttribI4usv(Index,{V1,V2,V3,V4}) -> cast(5556, <>). -%% @spec (Program::integer(),Location::integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getUniformuiv(integer(),integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}. +%% @doc +%% See {@link getUniformfv/2} +-spec getUniformuiv(Program, Location) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} when Program :: integer(),Location :: integer(). getUniformuiv(Program,Location) -> call(5557, <>). -%% @spec (Program::integer(),Color::integer(),Name::string()) -> ok -%% @doc See external documentation. --spec bindFragDataLocation(integer(),integer(),string()) -> ok. +%% @doc Bind a user-defined varying out variable to a fragment shader color number +%% +%% ``gl:bindFragDataLocation'' explicitly specifies the binding of the user-defined varying +%% out variable `Name' to fragment shader color number `ColorNumber' for program `Program' +%% . If `Name' was bound previously, its assigned binding is replaced with `ColorNumber' +%% . `Name' must be a null-terminated string. `ColorNumber' must be less than `?GL_MAX_DRAW_BUFFERS' +%% . +%% +%% The bindings specified by ``gl:bindFragDataLocation'' have no effect until `Program' +%% is next linked. Bindings may be specified at any time after `Program' has been created. +%% Specifically, they may be specified before shader objects are attached to the program. +%% Therefore, any name may be specified in `Name' , including a name that is never used +%% as a varying out variable in any fragment shader object. Names beginning with `?gl_' +%% are reserved by the GL. +%% +%% In addition to the errors generated by ``gl:bindFragDataLocation'', the program `Program' +%% will fail to link if: +%% +%% The number of active outputs is greater than the value `?GL_MAX_DRAW_BUFFERS'. +%% +%% More than one varying out variable is bound to the same color number. +%% +%% See external documentation. +-spec bindFragDataLocation(Program, Color, Name) -> ok when Program :: integer(),Color :: integer(),Name :: string(). bindFragDataLocation(Program,Color,Name) -> cast(5558, <>). -%% @spec (Program::integer(),Name::string()) -> integer() -%% @doc See external documentation. --spec getFragDataLocation(integer(),string()) -> integer(). +%% @doc Query the bindings of color numbers to user-defined varying out variables +%% +%% ``gl:getFragDataLocation'' retrieves the assigned color number binding for the user-defined +%% varying out variable `Name' for program `Program' . `Program' must have +%% previously been linked. `Name' must be a null-terminated string. If `Name' is +%% not the name of an active user-defined varying out fragment shader variable within `Program' +%% , -1 will be returned. +%% +%% See external documentation. +-spec getFragDataLocation(Program, Name) -> integer() when Program :: integer(),Name :: string(). getFragDataLocation(Program,Name) -> call(5559, <>). -%% @spec (Location::integer(),V0::integer()) -> ok -%% @doc See external documentation. --spec uniform1ui(integer(),integer()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform1ui(Location, V0) -> ok when Location :: integer(),V0 :: integer(). uniform1ui(Location,V0) -> cast(5560, <>). -%% @spec (Location::integer(),V0::integer(),V1::integer()) -> ok -%% @doc See external documentation. --spec uniform2ui(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform2ui(Location, V0, V1) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(). uniform2ui(Location,V0,V1) -> cast(5561, <>). -%% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok -%% @doc See external documentation. --spec uniform3ui(integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform3ui(Location, V0, V1, V2) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(). uniform3ui(Location,V0,V1,V2) -> cast(5562, <>). -%% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok -%% @doc See external documentation. --spec uniform4ui(integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform4ui(Location, V0, V1, V2, V3) -> ok when Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer(). uniform4ui(Location,V0,V1,V2,V3) -> cast(5563, <>). -%% @spec (Location::integer(),Value::[integer()]) -> ok -%% @doc See external documentation. --spec uniform1uiv(integer(),[integer()]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform1uiv(Location, Value) -> ok when Location :: integer(),Value :: [integer()]. uniform1uiv(Location,Value) -> cast(5564, <> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>). -%% @spec (Location::integer(),Value::[{integer(),integer()}]) -> ok -%% @doc See external documentation. --spec uniform2uiv(integer(),[{integer(),integer()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform2uiv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer()}]. uniform2uiv(Location,Value) -> cast(5565, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok -%% @doc See external documentation. --spec uniform3uiv(integer(),[{integer(),integer(),integer()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform3uiv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer()}]. uniform3uiv(Location,Value) -> cast(5566, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok -%% @doc See external documentation. --spec uniform4uiv(integer(),[{integer(),integer(),integer(),integer()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform4uiv(Location, Value) -> ok when Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}]. uniform4uiv(Location,Value) -> cast(5567, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec texParameterIiv(enum(),enum(),{integer()}) -> ok. +%% @doc +%% See {@link texParameterf/3} +-spec texParameterIiv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}. texParameterIiv(Target,Pname,Params) -> cast(5568, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok -%% @doc See external documentation. --spec texParameterIuiv(enum(),enum(),{integer()}) -> ok. +%% @doc glTexParameterI +%% +%% See external documentation. +-spec texParameterIuiv(Target, Pname, Params) -> ok when Target :: enum(),Pname :: enum(),Params :: {integer()}. texParameterIuiv(Target,Pname,Params) -> cast(5569, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getTexParameterIiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. +%% @doc +%% See {@link getTexParameterfv/2} +-spec getTexParameterIiv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum(). getTexParameterIiv(Target,Pname) -> call(5570, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getTexParameterIuiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. +%% @doc glGetTexParameterI +%% +%% See external documentation. +-spec getTexParameterIuiv(Target, Pname) -> {integer(),integer(),integer(),integer()} when Target :: enum(),Pname :: enum(). getTexParameterIuiv(Target,Pname) -> call(5571, <>). -%% @spec (Buffer::enum(),Drawbuffer::integer(),Value::{integer()}) -> ok -%% @doc See external documentation. --spec clearBufferiv(enum(),integer(),{integer()}) -> ok. +%% @doc Clear individual buffers of the currently bound draw framebuffer +%% +%% ``gl:clearBuffer*'' clears the specified buffer to the specified value(s). If `Buffer' +%% is `?GL_COLOR', a particular draw buffer `?GL_DRAWBUFFER' `I' is specified +%% by passing `I' as `DrawBuffer' . In this case, `Value' points to a four-element +%% vector specifying the R, G, B and A color to clear that draw buffer to. If `Buffer' +%% is one of `?GL_FRONT', `?GL_BACK', `?GL_LEFT', `?GL_RIGHT', or `?GL_FRONT_AND_BACK' +%% , identifying multiple buffers, each selected buffer is cleared to the same value. Clamping +%% and conversion for fixed-point color buffers are performed in the same fashion as {@link gl:clearColor/4} +%% . +%% +%% If `Buffer' is `?GL_DEPTH', `DrawBuffer' must be zero, and `Value' +%% points to a single value to clear the depth buffer to. Only ``gl:clearBufferfv'' should +%% be used to clear depth buffers. Clamping and conversion for fixed-point depth buffers +%% are performed in the same fashion as {@link gl:clearDepth/1} . +%% +%% If `Buffer' is `?GL_STENCIL', `DrawBuffer' must be zero, and `Value' +%% points to a single value to clear the stencil buffer to. Only ``gl:clearBufferiv'' should +%% be used to clear stencil buffers. Masing and type conversion are performed in the same +%% fashion as {@link gl:clearStencil/1} . +%% +%% ``gl:clearBufferfi'' may be used to clear the depth and stencil buffers. `Buffer' +%% must be `?GL_DEPTH_STENCIL' and `DrawBuffer' must be zero. `Depth' and `Stencil' +%% are the depth and stencil values, respectively. +%% +%% The result of ``gl:clearBuffer'' is undefined if no conversion between the type of `Value' +%% and the buffer being cleared is defined. However, this is not an error. +%% +%% See external documentation. +-spec clearBufferiv(Buffer, Drawbuffer, Value) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Value :: {integer()}. clearBufferiv(Buffer,Drawbuffer,Value) -> cast(5572, <> ||C <- tuple_to_list(Value)>>)/binary,0:(((1+size(Value)) rem 2)*32)>>). -%% @spec (Buffer::enum(),Drawbuffer::integer(),Value::{integer()}) -> ok -%% @doc See external documentation. --spec clearBufferuiv(enum(),integer(),{integer()}) -> ok. +%% @doc +%% See {@link clearBufferiv/3} +-spec clearBufferuiv(Buffer, Drawbuffer, Value) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Value :: {integer()}. clearBufferuiv(Buffer,Drawbuffer,Value) -> cast(5573, <> ||C <- tuple_to_list(Value)>>)/binary,0:(((1+size(Value)) rem 2)*32)>>). -%% @spec (Buffer::enum(),Drawbuffer::integer(),Value::{float()}) -> ok -%% @doc See external documentation. --spec clearBufferfv(enum(),integer(),{float()}) -> ok. +%% @doc +%% See {@link clearBufferiv/3} +-spec clearBufferfv(Buffer, Drawbuffer, Value) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Value :: {float()}. clearBufferfv(Buffer,Drawbuffer,Value) -> cast(5574, <> ||C <- tuple_to_list(Value)>>)/binary,0:(((1+size(Value)) rem 2)*32)>>). -%% @spec (Buffer::enum(),Drawbuffer::integer(),Depth::float(),Stencil::integer()) -> ok -%% @doc See external documentation. --spec clearBufferfi(enum(),integer(),float(),integer()) -> ok. +%% @doc glClearBufferfi +%% +%% See external documentation. +-spec clearBufferfi(Buffer, Drawbuffer, Depth, Stencil) -> ok when Buffer :: enum(),Drawbuffer :: integer(),Depth :: float(),Stencil :: integer(). clearBufferfi(Buffer,Drawbuffer,Depth,Stencil) -> cast(5575, <>). -%% @spec (Name::enum(),Index::integer()) -> string() -%% @doc See external documentation. --spec getStringi(enum(),integer()) -> string(). +%% @doc +%% See {@link getString/1} +-spec getStringi(Name, Index) -> string() when Name :: enum(),Index :: integer(). getStringi(Name,Index) -> call(5576, <>). -%% @spec (Mode::enum(),First::integer(),Count::integer(),Primcount::integer()) -> ok -%% @doc See external documentation. --spec drawArraysInstanced(enum(),integer(),integer(),integer()) -> ok. +%% @doc glDrawArraysInstance +%% +%% See external documentation. +-spec drawArraysInstanced(Mode, First, Count, Primcount) -> ok when Mode :: enum(),First :: integer(),Count :: integer(),Primcount :: integer(). drawArraysInstanced(Mode,First,Count,Primcount) -> cast(5577, <>). -%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|mem(),Primcount::integer()) -> ok -%% @doc See external documentation. --spec drawElementsInstanced(enum(),integer(),enum(),offset()|mem(),integer()) -> ok. +%% @doc glDrawElementsInstance +%% +%% See external documentation. +-spec drawElementsInstanced(Mode, Count, Type, Indices, Primcount) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(). drawElementsInstanced(Mode,Count,Type,Indices,Primcount) when is_integer(Indices) -> cast(5578, <>); drawElementsInstanced(Mode,Count,Type,Indices,Primcount) -> send_bin(Indices), cast(5579, <>). -%% @spec (Target::enum(),Internalformat::enum(),Buffer::integer()) -> ok -%% @doc See external documentation. --spec texBuffer(enum(),enum(),integer()) -> ok. +%% @doc Attach the storage for a buffer object to the active buffer texture +%% +%% ``gl:texBuffer'' attaches the storage for the buffer object named `Buffer' to the +%% active buffer texture, and specifies the internal format for the texel array found in +%% the attached buffer object. If `Buffer' is zero, any buffer object attached to the +%% buffer texture is detached and no new buffer object is attached. If `Buffer' is non-zero, +%% it must be the name of an existing buffer object. `Target' must be `?GL_TEXTURE_BUFFER' +%% . `Internalformat' specifies the storage format, and must be one of the following +%% sized internal formats: +%% +%% +%% +%% +%% +%% +%% +%% +%% +%% +%%
` Component ' +%%
`Sized Internal Format'`Base Type'`Components'`Norm'0123
`?GL_R8'ubyte1YESR001
`?GL_R16'ushort1YESR +%% 001
`?GL_R16F'half1NOR001
`?GL_R32F'float +%% 1NOR001
`?GL_R8I' +%% byte1NOR001
`?GL_R16I' +%% short1NOR001
+%% `?GL_R32I'int1NOR001
`?GL_R8UI'ubyte1NOR0 +%% 01
`?GL_R16UI'ushort1NO +%% R001
`?GL_R32UI'uint1NOR001
`?GL_RG8'ubyte +%% 2YESRG01
`?GL_RG16' +%% ushort2YESRG01
`?GL_RG16F'half2NORG0 +%% 1
`?GL_RG32F'float2NORG +%% 01
`?GL_RG8I'byte2NORG01
`?GL_RG16I'short +%% 2NORG01
`?GL_RG32I'int2NORG01
`?GL_RG8UI' +%% ubyte2NORG01
+%% `?GL_RG16UI'ushort2NORG0 +%% 1
`?GL_RG32UI'uint2NORG +%% 01
`?GL_RGB32F'float3NO +%% RGB1
`?GL_RGB32I'int3NORGB1
`?GL_RGB32UI' +%% uint3NORGB1
+%% `?GL_RGBA8'uint4YESRGB +%% A
`?GL_RGBA16'short4YESR +%% GBA
`?GL_RGBA16F'half4NO +%% RGBA
`?GL_RGBA32F'float +%% 4NORGBA
`?GL_RGBA8I' +%% byte4NORGBA
+%% `?GL_RGBA16I'short4NORGB +%% A
`?GL_RGBA32I'int4NORG +%% BA
`?GL_RGBA8UI'ubyte4NO +%% RGBA
`?GL_RGBA16UI'ushort +%% 4NORGBA
`?GL_RGBA32UI' +%% uint4NORGBA
+%% +%% When a buffer object is attached to a buffer texture, the buffer object's data store +%% is taken as the texture's texel array. The number of texels in the buffer texture's texel +%% array is given by buffer_size components× sizeof( base_type/) +%% +%% where `buffer_size' is the size of the buffer object, in basic machine units and +%% components and base type are the element count and base data type for elements, as specified +%% in the table above. The number of texels in the texel array is then clamped to the implementation-dependent +%% limit `?GL_MAX_TEXTURE_BUFFER_SIZE'. When a buffer texture is accessed in a shader, +%% the results of a texel fetch are undefined if the specified texel coordinate is negative, +%% or greater than or equal to the clamped number of texels in the texel array. +%% +%% See external documentation. +-spec texBuffer(Target, Internalformat, Buffer) -> ok when Target :: enum(),Internalformat :: enum(),Buffer :: integer(). texBuffer(Target,Internalformat,Buffer) -> cast(5580, <>). -%% @spec (Index::integer()) -> ok -%% @doc See external documentation. --spec primitiveRestartIndex(integer()) -> ok. +%% @doc Specify the primitive restart index +%% +%% ``gl:primitiveRestartIndex'' specifies a vertex array element that is treated specially +%% when primitive restarting is enabled. This is known as the primitive restart index. +%% +%% When one of the `Draw*' commands transfers a set of generic attribute array elements +%% to the GL, if the index within the vertex arrays corresponding to that set is equal to +%% the primitive restart index, then the GL does not process those elements as a vertex. +%% Instead, it is as if the drawing command ended with the immediately preceding transfer, +%% and another drawing command is immediately started with the same parameters, but only +%% transferring the immediately following element through the end of the originally specified +%% elements. +%% +%% When either {@link gl:drawElementsBaseVertex/5} , {@link gl:drawElementsInstancedBaseVertex/6} +%% or see `glMultiDrawElementsBaseVertex' is used, the primitive restart comparison +%% occurs before the basevertex offset is added to the array index. +%% +%% See external documentation. +-spec primitiveRestartIndex(Index) -> ok when Index :: integer(). primitiveRestartIndex(Index) -> cast(5581, <>). -%% @spec (Target::enum(),Index::integer()) -> [integer()] -%% @doc See external documentation. --spec getInteger64i_v(enum(),integer()) -> [integer()]. +%% @doc +%% See {@link getBooleanv/1} +-spec getInteger64i_v(Target, Index) -> [integer()] when Target :: enum(),Index :: integer(). getInteger64i_v(Target,Index) -> call(5582, <>). -%% @spec (Target::enum(),Pname::enum()) -> [integer()] -%% @doc See external documentation. --spec getBufferParameteri64v(enum(),enum()) -> [integer()]. +%% @doc glGetBufferParameteri64v +%% +%% See external documentation. +-spec getBufferParameteri64v(Target, Pname) -> [integer()] when Target :: enum(),Pname :: enum(). getBufferParameteri64v(Target,Pname) -> call(5583, <>). -%% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer()) -> ok -%% @doc See external documentation. --spec framebufferTexture(enum(),enum(),integer(),integer()) -> ok. +%% @doc Attach a level of a texture object as a logical buffer to the currently bound framebuffer object +%% +%% ``gl:framebufferTexture'', ``gl:framebufferTexture1D'', ``gl:framebufferTexture2D'', +%% and ``gl:framebufferTexture'' attach a selected mipmap level or image of a texture object +%% as one of the logical buffers of the framebuffer object currently bound to `Target' . +%% `Target' must be `?GL_DRAW_FRAMEBUFFER', `?GL_READ_FRAMEBUFFER', or `?GL_FRAMEBUFFER' +%% . `?GL_FRAMEBUFFER' is equivalent to `?GL_DRAW_FRAMEBUFFER'. +%% +%% `Attachment' specifies the logical attachment of the framebuffer and must be `?GL_COLOR_ATTACHMENT' +%% `i', `?GL_DEPTH_ATTACHMENT', `?GL_STENCIL_ATTACHMENT' or `?GL_DEPTH_STENCIL_ATTACHMMENT' +%% . `i' in `?GL_COLOR_ATTACHMENT'`i' may range from zero to the value of `?GL_MAX_COLOR_ATTACHMENTS' +%% - 1. Attaching a level of a texture to `?GL_DEPTH_STENCIL_ATTACHMENT' is equivalent +%% to attaching that level to both the `?GL_DEPTH_ATTACHMENT'`and' the `?GL_STENCIL_ATTACHMENT' +%% attachment points simultaneously. +%% +%% `Textarget' specifies what type of texture is named by `Texture' , and for cube +%% map textures, specifies the face that is to be attached. If `Texture' is not zero, +%% it must be the name of an existing texture with type `Textarget' , unless it is a +%% cube map texture, in which case `Textarget' must be `?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', or `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'. +%% +%% If `Texture' is non-zero, the specified `Level' of the texture object named `Texture' +%% is attached to the framebfufer attachment point named by `Attachment' . For ``gl:framebufferTexture1D'' +%% , ``gl:framebufferTexture2D'', and ``gl:framebufferTexture3D'', `Texture' must +%% be zero or the name of an existing texture with a target of `Textarget' , or `Texture' +%% must be the name of an existing cube-map texture and `Textarget' must be one of `?GL_TEXTURE_CUBE_MAP_POSITIVE_X' +%% , `?GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Z', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_X' +%% , `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', or `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z'. +%% +%% If `Textarget' is `?GL_TEXTURE_RECTANGLE', `?GL_TEXTURE_2D_MULTISAMPLE', +%% or `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY', then `Level' must be zero. If `Textarget' +%% is `?GL_TEXTURE_3D', then level must be greater than or equal to zero and less than +%% or equal to log2 of the value of `?GL_MAX_3D_TEXTURE_SIZE'. If `Textarget' is +%% one of `?GL_TEXTURE_CUBE_MAP_POSITIVE_X', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Z' +%% , `?GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', or `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' +%% , then `Level' must be greater than or equal to zero and less than or equal to log2 +%% of the value of `?GL_MAX_CUBE_MAP_TEXTURE_SIZE'. For all other values of `Textarget' +%% , `Level' must be greater than or equal to zero and no larger than log2 of the value +%% of `?GL_MAX_TEXTURE_SIZE'. +%% +%% `Layer' specifies the layer of a 2-dimensional image within a 3-dimensional texture. +%% +%% +%% For ``gl:framebufferTexture1D'', if `Texture' is not zero, then `Textarget' +%% must be `?GL_TEXTURE_1D'. For ``gl:framebufferTexture2D'', if `Texture' is +%% not zero, `Textarget' must be one of `?GL_TEXTURE_2D', `?GL_TEXTURE_RECTANGLE' +%% , `?GL_TEXTURE_CUBE_MAP_POSITIVE_X', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Y', `?GL_TEXTURE_CUBE_MAP_POSITIVE_Z' +%% , `?GL_TEXTURE_CUBE_MAP_NEGATIVE_X', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Y', `?GL_TEXTURE_CUBE_MAP_NEGATIVE_Z' +%% , or `?GL_TEXTURE_2D_MULTISAMPLE'. For ``gl:framebufferTexture3D'', if `Texture' +%% is not zero, then `Textarget' must be `?GL_TEXTURE_3D'. +%% +%% See external documentation. +-spec framebufferTexture(Target, Attachment, Texture, Level) -> ok when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer(). framebufferTexture(Target,Attachment,Texture,Level) -> cast(5584, <>). -%% @spec (Index::integer(),Divisor::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribDivisor(integer(),integer()) -> ok. +%% @doc Modify the rate at which generic vertex attributes advance during instanced rendering +%% +%% ``gl:vertexAttribDivisor'' modifies the rate at which generic vertex attributes advance +%% when rendering multiple instances of primitives in a single draw call. If `Divisor' +%% is zero, the attribute at slot `Index' advances once per vertex. If `Divisor' +%% is non-zero, the attribute advances once per `Divisor' instances of the set(s) of +%% vertices being rendered. An attribute is referred to as instanced if its `?GL_VERTEX_ATTRIB_ARRAY_DIVISOR' +%% value is non-zero. +%% +%% `Index' must be less than the value of `?GL_MAX_VERTEX_ATTRIBUTES'. +%% +%% See external documentation. +-spec vertexAttribDivisor(Index, Divisor) -> ok when Index :: integer(),Divisor :: integer(). vertexAttribDivisor(Index,Divisor) -> cast(5585, <>). -%% @spec (Value::clamp()) -> ok -%% @doc See external documentation. --spec minSampleShading(clamp()) -> ok. +%% @doc Specifies minimum rate at which sample shaing takes place +%% +%% ``gl:minSampleShading'' specifies the rate at which samples are shaded within a covered +%% pixel. Sample-rate shading is enabled by calling {@link gl:enable/1} with the parameter `?GL_SAMPLE_SHADING' +%% . If `?GL_MULTISAMPLE' or `?GL_SAMPLE_SHADING' is disabled, sample shading has +%% no effect. Otherwise, an implementation must provide at least as many unique color values +%% for each covered fragment as specified by `Value' times `Samples' where `Samples' +%% is the value of `?GL_SAMPLES' for the current framebuffer. At least 1 sample for +%% each covered fragment is generated. +%% +%% A `Value' of 1.0 indicates that each sample in the framebuffer should be indpendently +%% shaded. A `Value' of 0.0 effectively allows the GL to ignore sample rate shading. +%% Any value between 0.0 and 1.0 allows the GL to shade only a subset of the total samples +%% within each covered fragment. Which samples are shaded and the algorithm used to select +%% that subset of the fragment's samples is implementation dependent. +%% +%% See external documentation. +-spec minSampleShading(Value) -> ok when Value :: clamp(). minSampleShading(Value) -> cast(5586, <>). -%% @spec (Buf::integer(),Mode::enum()) -> ok -%% @doc See external documentation. --spec blendEquationi(integer(),enum()) -> ok. +%% @doc +%% See {@link blendEquation/1} +-spec blendEquationi(Buf, Mode) -> ok when Buf :: integer(),Mode :: enum(). blendEquationi(Buf,Mode) -> cast(5587, <>). -%% @spec (Buf::integer(),ModeRGB::enum(),ModeAlpha::enum()) -> ok -%% @doc See external documentation. --spec blendEquationSeparatei(integer(),enum(),enum()) -> ok. +%% @doc +%% See {@link blendEquationSeparate/2} +-spec blendEquationSeparatei(Buf, ModeRGB, ModeAlpha) -> ok when Buf :: integer(),ModeRGB :: enum(),ModeAlpha :: enum(). blendEquationSeparatei(Buf,ModeRGB,ModeAlpha) -> cast(5588, <>). -%% @spec (Buf::integer(),Src::enum(),Dst::enum()) -> ok -%% @doc See external documentation. --spec blendFunci(integer(),enum(),enum()) -> ok. +%% @doc glBlendFunci +%% +%% See external documentation. +-spec blendFunci(Buf, Src, Dst) -> ok when Buf :: integer(),Src :: enum(),Dst :: enum(). blendFunci(Buf,Src,Dst) -> cast(5589, <>). -%% @spec (Buf::integer(),SrcRGB::enum(),DstRGB::enum(),SrcAlpha::enum(),DstAlpha::enum()) -> ok -%% @doc See external documentation. --spec blendFuncSeparatei(integer(),enum(),enum(),enum(),enum()) -> ok. +%% @doc +%% See {@link blendFuncSeparate/4} +-spec blendFuncSeparatei(Buf, SrcRGB, DstRGB, SrcAlpha, DstAlpha) -> ok when Buf :: integer(),SrcRGB :: enum(),DstRGB :: enum(),SrcAlpha :: enum(),DstAlpha :: enum(). blendFuncSeparatei(Buf,SrcRGB,DstRGB,SrcAlpha,DstAlpha) -> cast(5590, <>). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec loadTransposeMatrixfARB({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. +%% @doc glLoadTransposeMatrixARB +%% +%% See external documentation. +-spec loadTransposeMatrixfARB(M) -> ok when M :: matrix(). loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5591, <>); loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5591, <>). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec loadTransposeMatrixdARB({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. +%% @doc glLoadTransposeMatrixARB +%% +%% See external documentation. +-spec loadTransposeMatrixdARB(M) -> ok when M :: matrix(). loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5592, <>); loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5592, <>). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec multTransposeMatrixfARB({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. +%% @doc glMultTransposeMatrixARB +%% +%% See external documentation. +-spec multTransposeMatrixfARB(M) -> ok when M :: matrix(). multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5593, <>); multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5593, <>). -%% @spec (M::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec multTransposeMatrixdARB({float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}) -> ok. +%% @doc glMultTransposeMatrixARB +%% +%% See external documentation. +-spec multTransposeMatrixdARB(M) -> ok when M :: matrix(). multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5594, <>); multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5594, <>). -%% @spec (Weights::[integer()]) -> ok -%% @doc See external documentation. --spec weightbvARB([integer()]) -> ok. +%% @doc glWeightARB +%% +%% See external documentation. +-spec weightbvARB(Weights) -> ok when Weights :: [integer()]. weightbvARB(Weights) -> cast(5595, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:((8-((length(Weights)+ 4) rem 8)) rem 8)>>). -%% @spec (Weights::[integer()]) -> ok -%% @doc See external documentation. --spec weightsvARB([integer()]) -> ok. +%% @doc glWeightARB +%% +%% See external documentation. +-spec weightsvARB(Weights) -> ok when Weights :: [integer()]. weightsvARB(Weights) -> cast(5596, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:((8-((length(Weights)*2+ 4) rem 8)) rem 8)>>). -%% @spec (Weights::[integer()]) -> ok -%% @doc See external documentation. --spec weightivARB([integer()]) -> ok. +%% @doc glWeightARB +%% +%% See external documentation. +-spec weightivARB(Weights) -> ok when Weights :: [integer()]. weightivARB(Weights) -> cast(5597, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>). -%% @spec (Weights::[float()]) -> ok -%% @doc See external documentation. --spec weightfvARB([float()]) -> ok. +%% @doc glWeightARB +%% +%% See external documentation. +-spec weightfvARB(Weights) -> ok when Weights :: [float()]. weightfvARB(Weights) -> cast(5598, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>). -%% @spec (Weights::[float()]) -> ok -%% @doc See external documentation. --spec weightdvARB([float()]) -> ok. +%% @doc glWeightARB +%% +%% See external documentation. +-spec weightdvARB(Weights) -> ok when Weights :: [float()]. weightdvARB(Weights) -> cast(5599, <<(length(Weights)):?GLuint,0:32, (<< <> || C <- Weights>>)/binary>>). -%% @spec (Weights::[integer()]) -> ok -%% @doc See external documentation. --spec weightubvARB([integer()]) -> ok. +%% @doc glWeightARB +%% +%% See external documentation. +-spec weightubvARB(Weights) -> ok when Weights :: [integer()]. weightubvARB(Weights) -> cast(5600, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:((8-((length(Weights)+ 4) rem 8)) rem 8)>>). -%% @spec (Weights::[integer()]) -> ok -%% @doc See external documentation. --spec weightusvARB([integer()]) -> ok. +%% @doc glWeightARB +%% +%% See external documentation. +-spec weightusvARB(Weights) -> ok when Weights :: [integer()]. weightusvARB(Weights) -> cast(5601, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:((8-((length(Weights)*2+ 4) rem 8)) rem 8)>>). -%% @spec (Weights::[integer()]) -> ok -%% @doc See external documentation. --spec weightuivARB([integer()]) -> ok. +%% @doc glWeightARB +%% +%% See external documentation. +-spec weightuivARB(Weights) -> ok when Weights :: [integer()]. weightuivARB(Weights) -> cast(5602, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>). -%% @spec (Count::integer()) -> ok -%% @doc See external documentation. --spec vertexBlendARB(integer()) -> ok. +%% @doc glVertexBlenARB +%% +%% See external documentation. +-spec vertexBlendARB(Count) -> ok when Count :: integer(). vertexBlendARB(Count) -> cast(5603, <>). -%% @spec (Index::integer()) -> ok -%% @doc See external documentation. --spec currentPaletteMatrixARB(integer()) -> ok. +%% @doc glCurrentPaletteMatrixARB +%% +%% See external documentation. +-spec currentPaletteMatrixARB(Index) -> ok when Index :: integer(). currentPaletteMatrixARB(Index) -> cast(5604, <>). -%% @spec (Indices::[integer()]) -> ok -%% @doc See external documentation. --spec matrixIndexubvARB([integer()]) -> ok. +%% @doc glMatrixIndexARB +%% +%% See external documentation. +-spec matrixIndexubvARB(Indices) -> ok when Indices :: [integer()]. matrixIndexubvARB(Indices) -> cast(5605, <<(length(Indices)):?GLuint, (<< <> || C <- Indices>>)/binary,0:((8-((length(Indices)+ 4) rem 8)) rem 8)>>). -%% @spec (Indices::[integer()]) -> ok -%% @doc See external documentation. --spec matrixIndexusvARB([integer()]) -> ok. +%% @doc glMatrixIndexARB +%% +%% See external documentation. +-spec matrixIndexusvARB(Indices) -> ok when Indices :: [integer()]. matrixIndexusvARB(Indices) -> cast(5606, <<(length(Indices)):?GLuint, (<< <> || C <- Indices>>)/binary,0:((8-((length(Indices)*2+ 4) rem 8)) rem 8)>>). -%% @spec (Indices::[integer()]) -> ok -%% @doc See external documentation. --spec matrixIndexuivARB([integer()]) -> ok. +%% @doc glMatrixIndexARB +%% +%% See external documentation. +-spec matrixIndexuivARB(Indices) -> ok when Indices :: [integer()]. matrixIndexuivARB(Indices) -> cast(5607, <<(length(Indices)):?GLuint, (<< <> || C <- Indices>>)/binary,0:(((1+length(Indices)) rem 2)*32)>>). -%% @spec (Target::enum(),Format::enum(),String::string()) -> ok -%% @doc See external documentation. --spec programStringARB(enum(),enum(),string()) -> ok. +%% @doc glProgramStringARB +%% +%% See external documentation. +-spec programStringARB(Target, Format, String) -> ok when Target :: enum(),Format :: enum(),String :: string(). programStringARB(Target,Format,String) -> cast(5608, <>). -%% @spec (Target::enum(),Program::integer()) -> ok -%% @doc See external documentation. --spec bindProgramARB(enum(),integer()) -> ok. +%% @doc glBindProgramARB +%% +%% See external documentation. +-spec bindProgramARB(Target, Program) -> ok when Target :: enum(),Program :: integer(). bindProgramARB(Target,Program) -> cast(5609, <>). -%% @spec (Programs::[integer()]) -> ok -%% @doc See external documentation. --spec deleteProgramsARB([integer()]) -> ok. +%% @doc glDeleteProgramsARB +%% +%% See external documentation. +-spec deleteProgramsARB(Programs) -> ok when Programs :: [integer()]. deleteProgramsARB(Programs) -> cast(5610, <<(length(Programs)):?GLuint, (<< <> || C <- Programs>>)/binary,0:(((1+length(Programs)) rem 2)*32)>>). -%% @spec (N::integer()) -> [integer()] -%% @doc See external documentation. --spec genProgramsARB(integer()) -> [integer()]. +%% @doc glGenProgramsARB +%% +%% See external documentation. +-spec genProgramsARB(N) -> [integer()] when N :: integer(). genProgramsARB(N) -> call(5611, <>). -%% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec programEnvParameter4dARB(enum(),integer(),float(),float(),float(),float()) -> ok. +%% @doc glProgramEnvParameterARB +%% +%% See external documentation. +-spec programEnvParameter4dARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float(). programEnvParameter4dARB(Target,Index,X,Y,Z,W) -> cast(5612, <>). -%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec programEnvParameter4dvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok. +%% @doc glProgramEnvParameterARB +%% +%% See external documentation. +-spec programEnvParameter4dvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}. programEnvParameter4dvARB(Target,Index,{P1,P2,P3,P4}) -> cast(5613, <>). -%% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec programEnvParameter4fARB(enum(),integer(),float(),float(),float(),float()) -> ok. +%% @doc glProgramEnvParameterARB +%% +%% See external documentation. +-spec programEnvParameter4fARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float(). programEnvParameter4fARB(Target,Index,X,Y,Z,W) -> cast(5614, <>). -%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec programEnvParameter4fvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok. +%% @doc glProgramEnvParameterARB +%% +%% See external documentation. +-spec programEnvParameter4fvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}. programEnvParameter4fvARB(Target,Index,{P1,P2,P3,P4}) -> cast(5615, <>). -%% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec programLocalParameter4dARB(enum(),integer(),float(),float(),float(),float()) -> ok. +%% @doc glProgramLocalParameterARB +%% +%% See external documentation. +-spec programLocalParameter4dARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float(). programLocalParameter4dARB(Target,Index,X,Y,Z,W) -> cast(5616, <>). -%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec programLocalParameter4dvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok. +%% @doc glProgramLocalParameterARB +%% +%% See external documentation. +-spec programLocalParameter4dvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}. programLocalParameter4dvARB(Target,Index,{P1,P2,P3,P4}) -> cast(5617, <>). -%% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec programLocalParameter4fARB(enum(),integer(),float(),float(),float(),float()) -> ok. +%% @doc glProgramLocalParameterARB +%% +%% See external documentation. +-spec programLocalParameter4fARB(Target, Index, X, Y, Z, W) -> ok when Target :: enum(),Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float(). programLocalParameter4fARB(Target,Index,X,Y,Z,W) -> cast(5618, <>). -%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec programLocalParameter4fvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok. +%% @doc glProgramLocalParameterARB +%% +%% See external documentation. +-spec programLocalParameter4fvARB(Target, Index, Params) -> ok when Target :: enum(),Index :: integer(),Params :: {float(),float(),float(),float()}. programLocalParameter4fvARB(Target,Index,{P1,P2,P3,P4}) -> cast(5619, <>). -%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getProgramEnvParameterdvARB(enum(),integer()) -> {float(),float(),float(),float()}. +%% @doc glGetProgramEnvParameterARB +%% +%% See external documentation. +-spec getProgramEnvParameterdvARB(Target, Index) -> {float(),float(),float(),float()} when Target :: enum(),Index :: integer(). getProgramEnvParameterdvARB(Target,Index) -> call(5620, <>). -%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getProgramEnvParameterfvARB(enum(),integer()) -> {float(),float(),float(),float()}. +%% @doc glGetProgramEnvParameterARB +%% +%% See external documentation. +-spec getProgramEnvParameterfvARB(Target, Index) -> {float(),float(),float(),float()} when Target :: enum(),Index :: integer(). getProgramEnvParameterfvARB(Target,Index) -> call(5621, <>). -%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getProgramLocalParameterdvARB(enum(),integer()) -> {float(),float(),float(),float()}. +%% @doc glGetProgramLocalParameterARB +%% +%% See external documentation. +-spec getProgramLocalParameterdvARB(Target, Index) -> {float(),float(),float(),float()} when Target :: enum(),Index :: integer(). getProgramLocalParameterdvARB(Target,Index) -> call(5622, <>). -%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getProgramLocalParameterfvARB(enum(),integer()) -> {float(),float(),float(),float()}. +%% @doc glGetProgramLocalParameterARB +%% +%% See external documentation. +-spec getProgramLocalParameterfvARB(Target, Index) -> {float(),float(),float(),float()} when Target :: enum(),Index :: integer(). getProgramLocalParameterfvARB(Target,Index) -> call(5623, <>). -%% @spec (Target::enum(),Pname::enum(),String::mem()) -> ok -%% @doc See external documentation. --spec getProgramStringARB(enum(),enum(),mem()) -> ok. +%% @doc glGetProgramStringARB +%% +%% See external documentation. +-spec getProgramStringARB(Target, Pname, String) -> ok when Target :: enum(),Pname :: enum(),String :: mem(). getProgramStringARB(Target,Pname,String) -> send_bin(String), call(5624, <>). -%% @spec (Target::enum(),Pname::enum()) -> [integer()] -%% @doc See external documentation. --spec getBufferParameterivARB(enum(),enum()) -> [integer()]. +%% @doc glGetBufferParameterARB +%% +%% See external documentation. +-spec getBufferParameterivARB(Target, Pname) -> [integer()] when Target :: enum(),Pname :: enum(). getBufferParameterivARB(Target,Pname) -> call(5625, <>). -%% @spec (Obj::integer()) -> ok -%% @doc See external documentation. --spec deleteObjectARB(integer()) -> ok. +%% @doc glDeleteObjectARB +%% +%% See external documentation. +-spec deleteObjectARB(Obj) -> ok when Obj :: integer(). deleteObjectARB(Obj) -> cast(5626, <>). -%% @spec (Pname::enum()) -> integer() -%% @doc See external documentation. --spec getHandleARB(enum()) -> integer(). +%% @doc glGetHandleARB +%% +%% See external documentation. +-spec getHandleARB(Pname) -> integer() when Pname :: enum(). getHandleARB(Pname) -> call(5627, <>). -%% @spec (ContainerObj::integer(),AttachedObj::integer()) -> ok -%% @doc See external documentation. --spec detachObjectARB(integer(),integer()) -> ok. +%% @doc glDetachObjectARB +%% +%% See external documentation. +-spec detachObjectARB(ContainerObj, AttachedObj) -> ok when ContainerObj :: integer(),AttachedObj :: integer(). detachObjectARB(ContainerObj,AttachedObj) -> cast(5628, <>). -%% @spec (ShaderType::enum()) -> integer() -%% @doc See external documentation. --spec createShaderObjectARB(enum()) -> integer(). +%% @doc glCreateShaderObjectARB +%% +%% See external documentation. +-spec createShaderObjectARB(ShaderType) -> integer() when ShaderType :: enum(). createShaderObjectARB(ShaderType) -> call(5629, <>). -%% @spec (ShaderObj::integer(),String::[string()]) -> ok -%% @doc See external documentation. --spec shaderSourceARB(integer(),[string()]) -> ok. +%% @doc glShaderSourceARB +%% +%% See external documentation. +-spec shaderSourceARB(ShaderObj, String) -> ok when ShaderObj :: integer(),String :: [string()]. shaderSourceARB(ShaderObj,String) -> StringTemp = list_to_binary([[Str|[0]] || Str <- String ]), cast(5630, <>). -%% @spec (ShaderObj::integer()) -> ok -%% @doc See external documentation. --spec compileShaderARB(integer()) -> ok. +%% @doc glCompileShaderARB +%% +%% See external documentation. +-spec compileShaderARB(ShaderObj) -> ok when ShaderObj :: integer(). compileShaderARB(ShaderObj) -> cast(5631, <>). -%% @spec () -> integer() -%% @doc See external documentation. +%% @doc glCreateProgramObjectARB +%% +%% See external documentation. -spec createProgramObjectARB() -> integer(). createProgramObjectARB() -> call(5632, <<>>). -%% @spec (ContainerObj::integer(),Obj::integer()) -> ok -%% @doc See external documentation. --spec attachObjectARB(integer(),integer()) -> ok. +%% @doc glAttachObjectARB +%% +%% See external documentation. +-spec attachObjectARB(ContainerObj, Obj) -> ok when ContainerObj :: integer(),Obj :: integer(). attachObjectARB(ContainerObj,Obj) -> cast(5633, <>). -%% @spec (ProgramObj::integer()) -> ok -%% @doc See external documentation. --spec linkProgramARB(integer()) -> ok. +%% @doc glLinkProgramARB +%% +%% See external documentation. +-spec linkProgramARB(ProgramObj) -> ok when ProgramObj :: integer(). linkProgramARB(ProgramObj) -> cast(5634, <>). -%% @spec (ProgramObj::integer()) -> ok -%% @doc See external documentation. --spec useProgramObjectARB(integer()) -> ok. +%% @doc glUseProgramObjectARB +%% +%% See external documentation. +-spec useProgramObjectARB(ProgramObj) -> ok when ProgramObj :: integer(). useProgramObjectARB(ProgramObj) -> cast(5635, <>). -%% @spec (ProgramObj::integer()) -> ok -%% @doc See external documentation. --spec validateProgramARB(integer()) -> ok. +%% @doc glValidateProgramARB +%% +%% See external documentation. +-spec validateProgramARB(ProgramObj) -> ok when ProgramObj :: integer(). validateProgramARB(ProgramObj) -> cast(5636, <>). -%% @spec (Obj::integer(),Pname::enum()) -> float() -%% @doc See external documentation. --spec getObjectParameterfvARB(integer(),enum()) -> float(). +%% @doc glGetObjectParameterARB +%% +%% See external documentation. +-spec getObjectParameterfvARB(Obj, Pname) -> float() when Obj :: integer(),Pname :: enum(). getObjectParameterfvARB(Obj,Pname) -> call(5637, <>). -%% @spec (Obj::integer(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getObjectParameterivARB(integer(),enum()) -> integer(). +%% @doc glGetObjectParameterARB +%% +%% See external documentation. +-spec getObjectParameterivARB(Obj, Pname) -> integer() when Obj :: integer(),Pname :: enum(). getObjectParameterivARB(Obj,Pname) -> call(5638, <>). -%% @spec (Obj::integer(),MaxLength::integer()) -> string() -%% @doc See external documentation. --spec getInfoLogARB(integer(),integer()) -> string(). +%% @doc glGetInfoLogARB +%% +%% See external documentation. +-spec getInfoLogARB(Obj, MaxLength) -> string() when Obj :: integer(),MaxLength :: integer(). getInfoLogARB(Obj,MaxLength) -> call(5639, <>). -%% @spec (ContainerObj::integer(),MaxCount::integer()) -> [integer()] -%% @doc See external documentation. --spec getAttachedObjectsARB(integer(),integer()) -> [integer()]. +%% @doc glGetAttachedObjectsARB +%% +%% See external documentation. +-spec getAttachedObjectsARB(ContainerObj, MaxCount) -> [integer()] when ContainerObj :: integer(),MaxCount :: integer(). getAttachedObjectsARB(ContainerObj,MaxCount) -> call(5640, <>). -%% @spec (ProgramObj::integer(),Name::string()) -> integer() -%% @doc See external documentation. --spec getUniformLocationARB(integer(),string()) -> integer(). +%% @doc glGetUniformLocationARB +%% +%% See external documentation. +-spec getUniformLocationARB(ProgramObj, Name) -> integer() when ProgramObj :: integer(),Name :: string(). getUniformLocationARB(ProgramObj,Name) -> call(5641, <>). -%% @spec (ProgramObj::integer(),Index::integer(),MaxLength::integer()) -> {Size::integer(),Type::enum(),Name::string()} -%% @doc See external documentation. --spec getActiveUniformARB(integer(),integer(),integer()) -> {integer(),enum(),string()}. +%% @doc glGetActiveUniformARB +%% +%% See external documentation. +-spec getActiveUniformARB(ProgramObj, Index, MaxLength) -> {Size :: integer(),Type :: enum(),Name :: string()} when ProgramObj :: integer(),Index :: integer(),MaxLength :: integer(). getActiveUniformARB(ProgramObj,Index,MaxLength) -> call(5642, <>). -%% @spec (ProgramObj::integer(),Location::integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()} -%% @doc See external documentation. --spec getUniformfvARB(integer(),integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}. +%% @doc glGetUniformARB +%% +%% See external documentation. +-spec getUniformfvARB(ProgramObj, Location) -> matrix() when ProgramObj :: integer(),Location :: integer(). getUniformfvARB(ProgramObj,Location) -> call(5643, <>). -%% @spec (ProgramObj::integer(),Location::integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getUniformivARB(integer(),integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}. +%% @doc glGetUniformARB +%% +%% See external documentation. +-spec getUniformivARB(ProgramObj, Location) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} when ProgramObj :: integer(),Location :: integer(). getUniformivARB(ProgramObj,Location) -> call(5644, <>). -%% @spec (Obj::integer(),MaxLength::integer()) -> string() -%% @doc See external documentation. --spec getShaderSourceARB(integer(),integer()) -> string(). +%% @doc glGetShaderSourceARB +%% +%% See external documentation. +-spec getShaderSourceARB(Obj, MaxLength) -> string() when Obj :: integer(),MaxLength :: integer(). getShaderSourceARB(Obj,MaxLength) -> call(5645, <>). -%% @spec (ProgramObj::integer(),Index::integer(),Name::string()) -> ok -%% @doc See external documentation. --spec bindAttribLocationARB(integer(),integer(),string()) -> ok. +%% @doc glBindAttribLocationARB +%% +%% See external documentation. +-spec bindAttribLocationARB(ProgramObj, Index, Name) -> ok when ProgramObj :: integer(),Index :: integer(),Name :: string(). bindAttribLocationARB(ProgramObj,Index,Name) -> cast(5646, <>). -%% @spec (ProgramObj::integer(),Index::integer(),MaxLength::integer()) -> {Size::integer(),Type::enum(),Name::string()} -%% @doc See external documentation. --spec getActiveAttribARB(integer(),integer(),integer()) -> {integer(),enum(),string()}. +%% @doc glGetActiveAttribARB +%% +%% See external documentation. +-spec getActiveAttribARB(ProgramObj, Index, MaxLength) -> {Size :: integer(),Type :: enum(),Name :: string()} when ProgramObj :: integer(),Index :: integer(),MaxLength :: integer(). getActiveAttribARB(ProgramObj,Index,MaxLength) -> call(5647, <>). -%% @spec (ProgramObj::integer(),Name::string()) -> integer() -%% @doc See external documentation. --spec getAttribLocationARB(integer(),string()) -> integer(). +%% @doc glGetAttribLocationARB +%% +%% See external documentation. +-spec getAttribLocationARB(ProgramObj, Name) -> integer() when ProgramObj :: integer(),Name :: string(). getAttribLocationARB(ProgramObj,Name) -> call(5648, <>). -%% @spec (Renderbuffer::integer()) -> 0|1 -%% @doc See external documentation. --spec isRenderbuffer(integer()) -> 0|1. +%% @doc Determine if a name corresponds to a renderbuffer object +%% +%% ``gl:isRenderbuffer'' returns `?GL_TRUE' if `Renderbuffer' is currently the +%% name of a renderbuffer object. If `Renderbuffer' is zero, or if `Renderbuffer' +%% is not the name of a renderbuffer object, or if an error occurs, ``gl:isRenderbuffer'' +%% returns `?GL_FALSE'. If `Renderbuffer' is a name returned by {@link gl:genRenderbuffers/1} +%% , by that has not yet been bound through a call to {@link gl:bindRenderbuffer/2} or {@link gl:framebufferRenderbuffer/4} +%% , then the name is not a renderbuffer object and ``gl:isRenderbuffer'' returns `?GL_FALSE' +%% . +%% +%% See external documentation. +-spec isRenderbuffer(Renderbuffer) -> 0|1 when Renderbuffer :: integer(). isRenderbuffer(Renderbuffer) -> call(5649, <>). -%% @spec (Target::enum(),Renderbuffer::integer()) -> ok -%% @doc See external documentation. --spec bindRenderbuffer(enum(),integer()) -> ok. +%% @doc Bind a renderbuffer to a renderbuffer target +%% +%% ``gl:bindRenderbuffer'' binds the renderbuffer object with name `Renderbuffer' +%% to the renderbuffer target specified by `Target' . `Target' must be `?GL_RENDERBUFFER' +%% . `Renderbuffer' is the name of a renderbuffer object previously returned from a +%% call to {@link gl:genRenderbuffers/1} , or zero to break the existing binding of a renderbuffer +%% object to `Target' . +%% +%% See external documentation. +-spec bindRenderbuffer(Target, Renderbuffer) -> ok when Target :: enum(),Renderbuffer :: integer(). bindRenderbuffer(Target,Renderbuffer) -> cast(5650, <>). -%% @spec (Renderbuffers::[integer()]) -> ok -%% @doc See external documentation. --spec deleteRenderbuffers([integer()]) -> ok. +%% @doc Delete renderbuffer objects +%% +%% ``gl:deleteRenderbuffers'' deletes the `N' renderbuffer objects whose names are +%% stored in the array addressed by `Renderbuffers' . The name zero is reserved by the +%% GL and is silently ignored, should it occur in `Renderbuffers' , as are other unused +%% names. Once a renderbuffer object is deleted, its name is again unused and it has no contents. +%% If a renderbuffer that is currently bound to the target `?GL_RENDERBUFFER' is deleted, +%% it is as though {@link gl:bindRenderbuffer/2} had been executed with a `Target' of `?GL_RENDERBUFFER' +%% and a `Name' of zero. +%% +%% If a renderbuffer object is attached to one or more attachment points in the currently +%% bound framebuffer, then it as if {@link gl:framebufferRenderbuffer/4} had been called, +%% with a `Renderbuffer' of zero for each attachment point to which this image was attached +%% in the currently bound framebuffer. In other words, this renderbuffer object is first +%% detached from all attachment ponits in the currently bound framebuffer. Note that the +%% renderbuffer image is specifically `not' detached from any non-bound framebuffers. +%% +%% See external documentation. +-spec deleteRenderbuffers(Renderbuffers) -> ok when Renderbuffers :: [integer()]. deleteRenderbuffers(Renderbuffers) -> cast(5651, <<(length(Renderbuffers)):?GLuint, (<< <> || C <- Renderbuffers>>)/binary,0:(((1+length(Renderbuffers)) rem 2)*32)>>). -%% @spec (N::integer()) -> [integer()] -%% @doc See external documentation. --spec genRenderbuffers(integer()) -> [integer()]. +%% @doc Generate renderbuffer object names +%% +%% ``gl:genRenderbuffers'' returns `N' renderbuffer object names in `Renderbuffers' +%% . 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:genRenderbuffers'' +%% . +%% +%% Renderbuffer object names returned by a call to ``gl:genRenderbuffers'' are not returned +%% by subsequent calls, unless they are first deleted with {@link gl:deleteRenderbuffers/1} . +%% +%% The names returned in `Renderbuffers' are marked as used, for the purposes of ``gl:genRenderbuffers'' +%% only, but they acquire state and type only when they are first bound. +%% +%% See external documentation. +-spec genRenderbuffers(N) -> [integer()] when N :: integer(). genRenderbuffers(N) -> call(5652, <>). -%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer()) -> ok -%% @doc See external documentation. --spec renderbufferStorage(enum(),enum(),integer(),integer()) -> ok. +%% @doc Establish data storage, format and dimensions of a renderbuffer object's image +%% +%% ``gl:renderbufferStorage'' is equivalent to calling {@link gl:renderbufferStorageMultisample/5} +%% with the `Samples' set to zero. +%% +%% The target of the operation, specified by `Target' must be `?GL_RENDERBUFFER'. +%% `Internalformat' specifies the internal format to be used for the renderbuffer object's +%% storage and must be a color-renderable, depth-renderable, or stencil-renderable format. `Width' +%% and `Height' are the dimensions, in pixels, of the renderbuffer. Both `Width' +%% and `Height' must be less than or equal to the value of `?GL_MAX_RENDERBUFFER_SIZE' +%% . +%% +%% Upon success, ``gl:renderbufferStorage'' deletes any existing data store for the renderbuffer +%% image and the contents of the data store after calling ``gl:renderbufferStorage'' are +%% undefined. +%% +%% See external documentation. +-spec renderbufferStorage(Target, Internalformat, Width, Height) -> ok when Target :: enum(),Internalformat :: enum(),Width :: integer(),Height :: integer(). renderbufferStorage(Target,Internalformat,Width,Height) -> cast(5653, <>). -%% @spec (Target::enum(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getRenderbufferParameteriv(enum(),enum()) -> integer(). +%% @doc Retrieve information about a bound renderbuffer object +%% +%% ``gl:getRenderbufferParameteriv'' retrieves information about a bound renderbuffer object. +%% `Target' specifies the target of the query operation and must be `?GL_RENDERBUFFER' +%% . `Pname' specifies the parameter whose value to query and must be one of `?GL_RENDERBUFFER_WIDTH' +%% , `?GL_RENDERBUFFER_HEIGHT', `?GL_RENDERBUFFER_INTERNAL_FORMAT', `?GL_RENDERBUFFER_RED_SIZE' +%% , `?GL_RENDERBUFFER_GREEN_SIZE', `?GL_RENDERBUFFER_BLUE_SIZE', `?GL_RENDERBUFFER_ALPHA_SIZE' +%% , `?GL_RENDERBUFFER_DEPTH_SIZE', `?GL_RENDERBUFFER_DEPTH_SIZE', `?GL_RENDERBUFFER_STENCIL_SIZE' +%% , or `?GL_RENDERBUFFER_SAMPLES'. +%% +%% Upon a successful return from ``gl:getRenderbufferParameteriv'', if `Pname' is `?GL_RENDERBUFFER_WIDTH' +%% , `?GL_RENDERBUFFER_HEIGHT', `?GL_RENDERBUFFER_INTERNAL_FORMAT', or `?GL_RENDERBUFFER_SAMPLES' +%% , then `Params' will contain the width in pixels, the height in pixels, the internal +%% format, or the number of samples, respectively, of the image of the renderbuffer currently +%% bound to `Target' . +%% +%% If `Pname' is `?GL_RENDERBUFFER_RED_SIZE', `?GL_RENDERBUFFER_GREEN_SIZE', +%% `?GL_RENDERBUFFER_BLUE_SIZE', `?GL_RENDERBUFFER_ALPHA_SIZE', `?GL_RENDERBUFFER_DEPTH_SIZE' +%% , or `?GL_RENDERBUFFER_STENCIL_SIZE', then `Params' will contain the actual +%% resolutions (not the resolutions specified when the image array was defined) for the red, +%% green, blue, alpha depth, or stencil components, respectively, of the image of the renderbuffer +%% currently bound to `Target' . +%% +%% See external documentation. +-spec getRenderbufferParameteriv(Target, Pname) -> integer() when Target :: enum(),Pname :: enum(). getRenderbufferParameteriv(Target,Pname) -> call(5654, <>). -%% @spec (Framebuffer::integer()) -> 0|1 -%% @doc See external documentation. --spec isFramebuffer(integer()) -> 0|1. +%% @doc Determine if a name corresponds to a framebuffer object +%% +%% ``gl:isFramebuffer'' returns `?GL_TRUE' if `Framebuffer' is currently the +%% name of a framebuffer object. If `Framebuffer' is zero, or if `?framebuffer' +%% is not the name of a framebuffer object, or if an error occurs, ``gl:isFramebuffer'' +%% returns `?GL_FALSE'. If `Framebuffer' is a name returned by {@link gl:genFramebuffers/1} +%% , by that has not yet been bound through a call to {@link gl:bindFramebuffer/2} , then the +%% name is not a framebuffer object and ``gl:isFramebuffer'' returns `?GL_FALSE'. +%% +%% See external documentation. +-spec isFramebuffer(Framebuffer) -> 0|1 when Framebuffer :: integer(). isFramebuffer(Framebuffer) -> call(5655, <>). -%% @spec (Target::enum(),Framebuffer::integer()) -> ok -%% @doc See external documentation. --spec bindFramebuffer(enum(),integer()) -> ok. +%% @doc Bind a framebuffer to a framebuffer target +%% +%% ``gl:bindFramebuffer'' binds the framebuffer object with name `Framebuffer' to +%% the framebuffer target specified by `Target' . `Target' must be either `?GL_DRAW_FRAMEBUFFER' +%% , `?GL_READ_FRAMEBUFFER' or `?GL_FRAMEBUFFER'. If a framebuffer object is bound +%% to `?GL_DRAW_FRAMEBUFFER' or `?GL_READ_FRAMEBUFFER', it becomes the target for +%% rendering or readback operations, respectively, until it is deleted or another framebuffer +%% is bound to the corresponding bind point. Calling ``gl:bindFramebuffer'' with `Target' +%% set to `?GL_FRAMEBUFFER' binds `Framebuffer' to both the read and draw framebuffer +%% targets. `Framebuffer' is the name of a framebuffer object previously returned from +%% a call to {@link gl:genFramebuffers/1} , or zero to break the existing binding of a framebuffer +%% object to `Target' . +%% +%% See external documentation. +-spec bindFramebuffer(Target, Framebuffer) -> ok when Target :: enum(),Framebuffer :: integer(). bindFramebuffer(Target,Framebuffer) -> cast(5656, <>). -%% @spec (Framebuffers::[integer()]) -> ok -%% @doc See external documentation. --spec deleteFramebuffers([integer()]) -> ok. +%% @doc Delete framebuffer objects +%% +%% ``gl:deleteFramebuffers'' deletes the `N' framebuffer objects whose names are stored +%% in the array addressed by `Framebuffers' . The name zero is reserved by the GL and +%% is silently ignored, should it occur in `Framebuffers' , as are other unused names. +%% Once a framebuffer object is deleted, its name is again unused and it has no attachments. +%% If a framebuffer that is currently bound to one or more of the targets `?GL_DRAW_FRAMEBUFFER' +%% or `?GL_READ_FRAMEBUFFER' is deleted, it is as though {@link gl:bindFramebuffer/2} +%% had been executed with the corresponding `Target' and `Framebuffer' zero. +%% +%% See external documentation. +-spec deleteFramebuffers(Framebuffers) -> ok when Framebuffers :: [integer()]. deleteFramebuffers(Framebuffers) -> cast(5657, <<(length(Framebuffers)):?GLuint, (<< <> || C <- Framebuffers>>)/binary,0:(((1+length(Framebuffers)) rem 2)*32)>>). -%% @spec (N::integer()) -> [integer()] -%% @doc See external documentation. --spec genFramebuffers(integer()) -> [integer()]. +%% @doc Generate framebuffer object names +%% +%% ``gl:genFramebuffers'' returns `N' framebuffer object names in `Ids' . 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:genFramebuffers'' +%% . +%% +%% Framebuffer object names returned by a call to ``gl:genFramebuffers'' are not returned +%% by subsequent calls, unless they are first deleted with {@link gl:deleteFramebuffers/1} . +%% +%% The names returned in `Ids' are marked as used, for the purposes of ``gl:genFramebuffers'' +%% only, but they acquire state and type only when they are first bound. +%% +%% See external documentation. +-spec genFramebuffers(N) -> [integer()] when N :: integer(). genFramebuffers(N) -> call(5658, <>). -%% @spec (Target::enum()) -> enum() -%% @doc See external documentation. --spec checkFramebufferStatus(enum()) -> enum(). +%% @doc Check the completeness status of a framebuffer +%% +%% ``gl:checkFramebufferStatus'' queries the completeness status of the framebuffer object +%% currently bound to `Target' . `Target' must be `?GL_DRAW_FRAMEBUFFER', `?GL_READ_FRAMEBUFFER' +%% or `?GL_FRAMEBUFFER'. `?GL_FRAMEBUFFER' is equivalent to `?GL_DRAW_FRAMEBUFFER' +%% . +%% +%% The return value is `?GL_FRAMEBUFFER_COMPLETE' if the framebuffer bound to `Target' +%% is complete. Otherwise, the return value is determined as follows: +%% +%% `?GL_FRAMEBUFFER_UNDEFINED' is returned if `Target' is the default framebuffer, +%% but the default framebuffer does not exist. +%% +%% `?GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT' is returned if any of the framebuffer attachment +%% points are framebuffer incomplete. +%% +%% `?GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT' is returned if the framebuffer does +%% not have at least one image attached to it. +%% +%% `?GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER' is returned if the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' +%% is `?GL_NONE' for any color attachment point(s) named by `?GL_DRAWBUFFERi'. +%% +%% `?GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER' is returned if `?GL_READ_BUFFER' is +%% not `?GL_NONE' and the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is `?GL_NONE' +%% for the color attachment point named by `?GL_READ_BUFFER'. +%% +%% `?GL_FRAMEBUFFER_UNSUPPORTED' is returned if the combination of internal formats +%% of the attached images violates an implementation-dependent set of restrictions. +%% +%% `?GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE' is returned if the value of `?GL_RENDERBUFFER_SAMPLES' +%% is not the same for all attached renderbuffers; if the value of `?GL_TEXTURE_SAMPLES' +%% is the not same for all attached textures; or, if the attached images are a mix of renderbuffers +%% and textures, the value of `?GL_RENDERBUFFER_SAMPLES' does not match the value of `?GL_TEXTURE_SAMPLES' +%% . +%% +%% `?GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE' is also returned if the value of `?GL_TEXTURE_FIXED_SAMPLE_LOCATIONS' +%% is not the same for all attached textures; or, if the attached images are a mix of renderbuffers +%% and textures, the value of `?GL_TEXTURE_FIXED_SAMPLE_LOCATIONS' is not `?GL_TRUE' +%% for all attached textures. +%% +%% `?GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS' is returned if any framebuffer attachment +%% is layered, and any populated attachment is not layered, or if all populated color attachments +%% are not from textures of the same target. +%% +%% Additionally, if an error occurs, zero is returned. +%% +%% See external documentation. +-spec checkFramebufferStatus(Target) -> enum() when Target :: enum(). checkFramebufferStatus(Target) -> call(5659, <>). -%% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer()) -> ok -%% @doc See external documentation. --spec framebufferTexture1D(enum(),enum(),enum(),integer(),integer()) -> ok. +%% @doc +%% See {@link framebufferTexture/4} +-spec framebufferTexture1D(Target, Attachment, Textarget, Texture, Level) -> ok when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer(). framebufferTexture1D(Target,Attachment,Textarget,Texture,Level) -> cast(5660, <>). -%% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer()) -> ok -%% @doc See external documentation. --spec framebufferTexture2D(enum(),enum(),enum(),integer(),integer()) -> ok. +%% @doc +%% See {@link framebufferTexture/4} +-spec framebufferTexture2D(Target, Attachment, Textarget, Texture, Level) -> ok when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer(). framebufferTexture2D(Target,Attachment,Textarget,Texture,Level) -> cast(5661, <>). -%% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer(),Zoffset::integer()) -> ok -%% @doc See external documentation. --spec framebufferTexture3D(enum(),enum(),enum(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link framebufferTexture/4} +-spec framebufferTexture3D(Target, Attachment, Textarget, Texture, Level, Zoffset) -> ok when Target :: enum(),Attachment :: enum(),Textarget :: enum(),Texture :: integer(),Level :: integer(),Zoffset :: integer(). framebufferTexture3D(Target,Attachment,Textarget,Texture,Level,Zoffset) -> cast(5662, <>). -%% @spec (Target::enum(),Attachment::enum(),Renderbuffertarget::enum(),Renderbuffer::integer()) -> ok -%% @doc See external documentation. --spec framebufferRenderbuffer(enum(),enum(),enum(),integer()) -> ok. +%% @doc Attach a renderbuffer as a logical buffer to the currently bound framebuffer object +%% +%% ``gl:framebufferRenderbuffer'' attaches a renderbuffer as one of the logical buffers +%% of the currently bound framebuffer object. `Renderbuffer' is the name of the renderbuffer +%% object to attach and must be either zero, or the name of an existing renderbuffer object +%% of type `Renderbuffertarget' . If `Renderbuffer' is not zero and if ``gl:framebufferRenderbuffer'' +%% is successful, then the renderbuffer name `Renderbuffer' will be used as the logical +%% buffer identified by `Attachment' of the framebuffer currently bound to `Target' . +%% +%% +%% The value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' for the specified attachment +%% point is set to `?GL_RENDERBUFFER' and the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME' +%% is set to `Renderbuffer' . All other state values of the attachment point specified +%% by `Attachment' are set to their default values. No change is made to the state of +%% the renderbuuffer object and any previous attachment to the `Attachment' logical +%% buffer of the framebuffer `Target' is broken. +%% +%% Calling ``gl:framebufferRenderbuffer'' with the renderbuffer name zero will detach +%% the image, if any, identified by `Attachment' , in the framebuffer currently bound +%% to `Target' . All state values of the attachment point specified by attachment in +%% the object bound to target are set to their default values. +%% +%% Setting `Attachment' to the value `?GL_DEPTH_STENCIL_ATTACHMENT' is a special +%% case causing both the depth and stencil attachments of the framebuffer object to be set +%% to `Renderbuffer' , which should have the base internal format `?GL_DEPTH_STENCIL' +%% . +%% +%% See external documentation. +-spec framebufferRenderbuffer(Target, Attachment, Renderbuffertarget, Renderbuffer) -> ok when Target :: enum(),Attachment :: enum(),Renderbuffertarget :: enum(),Renderbuffer :: integer(). framebufferRenderbuffer(Target,Attachment,Renderbuffertarget,Renderbuffer) -> cast(5663, <>). -%% @spec (Target::enum(),Attachment::enum(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getFramebufferAttachmentParameteriv(enum(),enum(),enum()) -> integer(). +%% @doc Retrieve information about attachments of a bound framebuffer object +%% +%% ``gl:getFramebufferAttachmentParameter'' returns information about attachments of a +%% bound framebuffer object. `Target' specifies the framebuffer binding point and must +%% be `?GL_DRAW_FRAMEBUFFER', `?GL_READ_FRAMEBUFFER' or `?GL_FRAMEBUFFER'. `?GL_FRAMEBUFFER' +%% is equivalent to `?GL_DRAW_FRAMEBUFFER'. +%% +%% If the default framebuffer is bound to `Target' then `Attachment' must be one +%% of `?GL_FRONT_LEFT', `?GL_FRONT_RIGHT', `?GL_BACK_LEFT', or `?GL_BACK_RIGHT' +%% , identifying a color buffer, `?GL_DEPTH', identifying the depth buffer, or `?GL_STENCIL' +%% , identifying the stencil buffer. +%% +%% If a framebuffer object is bound, then `Attachment' must be one of `?GL_COLOR_ATTACHMENT' +%% `i', `?GL_DEPTH_ATTACHMENT', `?GL_STENCIL_ATTACHMENT', or `?GL_DEPTH_STENCIL_ATTACHMENT' +%% . `i' in `?GL_COLOR_ATTACHMENT'`i' must be in the range zero to the value +%% of `?GL_MAX_COLOR_ATTACHMENTS' - 1. +%% +%% If `Attachment' is `?GL_DEPTH_STENCIL_ATTACHMENT' and different objects are +%% bound to the depth and stencil attachment points of `Target' the query will fail. +%% If the same object is bound to both attachment points, information about that object will +%% be returned. +%% +%% Upon successful return from ``gl:getFramebufferAttachmentParameteriv'', if `Pname' +%% is `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE', then `Params' will contain one of `?GL_NONE' +%% , `?GL_FRAMEBUFFER_DEFAULT', `?GL_TEXTURE', or `?GL_RENDERBUFFER', identifying +%% the type of object which contains the attached image. Other values accepted for `Pname' +%% depend on the type of object, as described below. +%% +%% If the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is `?GL_NONE', no +%% framebuffer is bound to `Target' . In this case querying `Pname' `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME' +%% will return zero, and all other queries will generate an error. +%% +%% If the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is not `?GL_NONE', +%% these queries apply to all other framebuffer types: +%% +%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE', `?GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE' +%% , `?GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE', `?GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE' +%% , `?GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE', or `?GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE' +%% , then `Params' will contain the number of bits in the corresponding red, green, +%% blue, alpha, depth, or stencil component of the specified attachment. Zero is returned +%% if the requested component is not present in `Attachment' . +%% +%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE', `Params' will +%% contain the format of components of the specified attachment, one of `?GL_FLOAT', `GL_INT' +%% , `GL_UNSIGNED_INT' , `GL_SIGNED_NORMALIZED' , or `GL_UNSIGNED_NORMALIZED' +%% for floating-point, signed integer, unsigned integer, signed normalized fixed-point, or +%% unsigned normalized fixed-point components respectively. Only color buffers may have integer +%% components. +%% +%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING', `Param' will +%% contain the encoding of components of the specified attachment, one of `?GL_LINEAR' +%% or `?GL_SRGB' for linear or sRGB-encoded components, respectively. Only color buffer +%% components may be sRGB-encoded; such components are treated as described in sections 4.1.7 +%% and 4.1.8. For the default framebuffer, color encoding is determined by the implementation. +%% For framebuffer objects, components are sRGB-encoded if the internal format of a color +%% attachment is one of the color-renderable SRGB formats. +%% +%% If the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is `?GL_RENDERBUFFER', +%% then: +%% +%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME', `Params' will +%% contain the name of the renderbuffer object which contains the attached image. +%% +%% If the value of `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE' is `?GL_TEXTURE', +%% then: +%% +%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME', then `Params' +%% will contain the name of the texture object which contains the attached image. +%% +%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL', then `Params' +%% will contain the mipmap level of the texture object which contains the attached image. +%% +%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE' and the texture +%% object named `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME' is a cube map texture, then `Params' +%% will contain the cube map face of the cubemap texture object which contains the attached +%% image. Otherwise `Params' will contain the value zero. +%% +%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER' and the texture object +%% named `?GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME' is a layer of a three-dimensional +%% texture or a one-or two-dimensional array texture, then `Params' will contain the +%% number of the texture layer which contains the attached image. Otherwise `Params' +%% will contain the value zero. +%% +%% If `Pname' is `?GL_FRAMEBUFFER_ATTACHMENT_LAYERED', then `Params' will +%% contain `?GL_TRUE' if an entire level of a three-dimesional texture, cube map texture, +%% or one-or two-dimensional array texture is attached. Otherwise, `Params' will contain +%% `?GL_FALSE'. +%% +%% Any combinations of framebuffer type and `Pname' not described above will generate +%% an error. +%% +%% See external documentation. +-spec getFramebufferAttachmentParameteriv(Target, Attachment, Pname) -> integer() when Target :: enum(),Attachment :: enum(),Pname :: enum(). getFramebufferAttachmentParameteriv(Target,Attachment,Pname) -> call(5664, <>). -%% @spec (Target::enum()) -> ok -%% @doc See external documentation. --spec generateMipmap(enum()) -> ok. +%% @doc Generate mipmaps for a specified texture target +%% +%% ``gl:generateMipmap'' generates mipmaps for the texture attached to `Target' of +%% the active texture unit. For cube map textures, a `?GL_INVALID_OPERATION' error is +%% generated if the texture attached to `Target' is not cube complete. +%% +%% Mipmap generation replaces texel array levels level base+1 through q with arrays derived +%% from the level base array, regardless of their previous contents. All other mimap arrays, +%% including the level base array, are left unchanged by this computation. +%% +%% The internal formats of the derived mipmap arrays all match those of the level base +%% array. The contents of the derived arrays are computed by repeated, filtered reduction +%% of the level base array. For one- and two-dimensional texture arrays, each layer is filtered +%% independently. +%% +%% See external documentation. +-spec generateMipmap(Target) -> ok when Target :: enum(). generateMipmap(Target) -> cast(5665, <>). -%% @spec (SrcX0::integer(),SrcY0::integer(),SrcX1::integer(),SrcY1::integer(),DstX0::integer(),DstY0::integer(),DstX1::integer(),DstY1::integer(),Mask::integer(),Filter::enum()) -> ok -%% @doc See external documentation. --spec blitFramebuffer(integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),enum()) -> ok. +%% @doc Copy a block of pixels from the read framebuffer to the draw framebuffer +%% +%% ``gl:blitFramebuffer'' transfers a rectangle of pixel values from one region of the +%% read framebuffer to another region in the draw framebuffer. `Mask' is the bitwise +%% OR of a number of values indicating which buffers are to be copied. The values are `?GL_COLOR_BUFFER_BIT' +%% , `?GL_DEPTH_BUFFER_BIT', and `?GL_STENCIL_BUFFER_BIT'. The pixels corresponding +%% to these buffers are copied from the source rectangle bounded by the locations ( `SrcX0' +%% ; `SrcY0' ) and ( `SrcX1' ; `SrcY1' ) to the destination rectangle bounded +%% by the locations ( `DstX0' ; `DstY0' ) and ( `DstX1' ; `DstY1' ). The lower +%% bounds of the rectangle are inclusive, while the upper bounds are exclusive. +%% +%% The actual region taken from the read framebuffer is limited to the intersection of the +%% source buffers being transferred, which may include the color buffer selected by the read +%% buffer, the depth buffer, and/or the stencil buffer depending on mask. The actual region +%% written to the draw framebuffer is limited to the intersection of the destination buffers +%% being written, which may include multiple draw buffers, the depth buffer, and/or the stencil +%% buffer depending on mask. Whether or not the source or destination regions are altered +%% due to these limits, the scaling and offset applied to pixels being transferred is performed +%% as though no such limits were present. +%% +%% If the sizes of the source and destination rectangles are not equal, `Filter' specifies +%% the interpolation method that will be applied to resize the source image , and must be `?GL_NEAREST' +%% or `?GL_LINEAR'. `?GL_LINEAR' is only a valid interpolation method for the +%% color buffer. If `Filter' is not `?GL_NEAREST' and `Mask' includes `?GL_DEPTH_BUFFER_BIT' +%% or `?GL_STENCIL_BUFFER_BIT', no data is transferred and a `?GL_INVALID_OPERATION' +%% error is generated. +%% +%% If `Filter' is `?GL_LINEAR' and the source rectangle would require sampling +%% outside the bounds of the source framebuffer, values are read as if the `?GL_CLAMP_TO_EDGE' +%% texture wrapping mode were applied. +%% +%% When the color buffer is transferred, values are taken from the read buffer of the read +%% framebuffer and written to each of the draw buffers of the draw framebuffer. +%% +%% If the source and destination rectangles overlap or are the same, and the read and draw +%% buffers are the same, the result of the operation is undefined. +%% +%% See external documentation. +-spec blitFramebuffer(SrcX0, SrcY0, SrcX1, SrcY1, DstX0, DstY0, DstX1, DstY1, Mask, Filter) -> ok when SrcX0 :: integer(),SrcY0 :: integer(),SrcX1 :: integer(),SrcY1 :: integer(),DstX0 :: integer(),DstY0 :: integer(),DstX1 :: integer(),DstY1 :: integer(),Mask :: integer(),Filter :: enum(). blitFramebuffer(SrcX0,SrcY0,SrcX1,SrcY1,DstX0,DstY0,DstX1,DstY1,Mask,Filter) -> cast(5666, <>). -%% @spec (Target::enum(),Samples::integer(),Internalformat::enum(),Width::integer(),Height::integer()) -> ok -%% @doc See external documentation. --spec renderbufferStorageMultisample(enum(),integer(),enum(),integer(),integer()) -> ok. +%% @doc Establish data storage, format, dimensions and sample count of a renderbuffer object's image +%% +%% ``gl:renderbufferStorageMultisample'' establishes the data storage, format, dimensions +%% and number of samples of a renderbuffer object's image. +%% +%% The target of the operation, specified by `Target' must be `?GL_RENDERBUFFER'. +%% `Internalformat' specifies the internal format to be used for the renderbuffer object's +%% storage and must be a color-renderable, depth-renderable, or stencil-renderable format. `Width' +%% and `Height' are the dimensions, in pixels, of the renderbuffer. Both `Width' +%% and `Height' must be less than or equal to the value of `?GL_MAX_RENDERBUFFER_SIZE' +%% . `Samples' specifies the number of samples to be used for the renderbuffer object's +%% image, and must be less than or equal to the value of `?GL_MAX_SAMPLES'. If `Internalformat' +%% is a signed or unsigned integer format then `Samples' must be less than or equal +%% to the value of `?GL_MAX_INTEGER_SAMPLES'. +%% +%% Upon success, ``gl:renderbufferStorageMultisample'' deletes any existing data store +%% for the renderbuffer image and the contents of the data store after calling ``gl:renderbufferStorageMultisample'' +%% are undefined. +%% +%% See external documentation. +-spec renderbufferStorageMultisample(Target, Samples, Internalformat, Width, Height) -> ok when Target :: enum(),Samples :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(). renderbufferStorageMultisample(Target,Samples,Internalformat,Width,Height) -> cast(5667, <>). -%% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer(),Layer::integer()) -> ok -%% @doc See external documentation. --spec framebufferTextureLayer(enum(),enum(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link framebufferTexture/4} +-spec framebufferTextureLayer(Target, Attachment, Texture, Level, Layer) -> ok when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer(),Layer :: integer(). framebufferTextureLayer(Target,Attachment,Texture,Level,Layer) -> cast(5668, <>). -%% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer(),Face::enum()) -> ok -%% @doc See external documentation. --spec framebufferTextureFaceARB(enum(),enum(),integer(),integer(),enum()) -> ok. +%% @doc +%% See {@link framebufferTexture/4} +-spec framebufferTextureFaceARB(Target, Attachment, Texture, Level, Face) -> ok when Target :: enum(),Attachment :: enum(),Texture :: integer(),Level :: integer(),Face :: enum(). framebufferTextureFaceARB(Target,Attachment,Texture,Level,Face) -> cast(5669, <>). -%% @spec (Target::enum(),Offset::integer(),Length::integer()) -> ok -%% @doc See external documentation. --spec flushMappedBufferRange(enum(),integer(),integer()) -> ok. +%% @doc Indicate modifications to a range of a mapped buffer +%% +%% ``gl:flushMappedBufferRange'' indicates that modifications have been made to a range +%% of a mapped buffer. The buffer must previously have been mapped with the `?GL_MAP_FLUSH_EXPLICIT' +%% flag. `Offset' and `Length' indicate the modified subrange of the mapping, +%% in basic units. The specified subrange to flush is relative to the start of the currently +%% mapped range of the buffer. ``gl:flushMappedBufferRange'' may be called multiple times +%% to indicate distinct subranges of the mapping which require flushing. +%% +%% See external documentation. +-spec flushMappedBufferRange(Target, Offset, Length) -> ok when Target :: enum(),Offset :: integer(),Length :: integer(). flushMappedBufferRange(Target,Offset,Length) -> cast(5670, <>). -%% @spec (Array::integer()) -> ok -%% @doc See external documentation. --spec bindVertexArray(integer()) -> ok. +%% @doc Bind a vertex array object +%% +%% ``gl:bindVertexArray'' binds the vertex array object with name `Array' . `Array' +%% is the name of a vertex array object previously returned from a call to {@link gl:genVertexArrays/1} +%% , or zero to break the existing vertex array object binding. +%% +%% If no vertex array object with name `Array' exists, one is created when `Array' +%% is first bound. If the bind is successful no change is made to the state of the vertex +%% array object, and any previous vertex array object binding is broken. +%% +%% See external documentation. +-spec bindVertexArray(Array) -> ok when Array :: integer(). bindVertexArray(Array) -> cast(5671, <>). -%% @spec (Arrays::[integer()]) -> ok -%% @doc See external documentation. --spec deleteVertexArrays([integer()]) -> ok. +%% @doc Delete vertex array objects +%% +%% ``gl:deleteVertexArrays'' deletes `N' vertex array objects whose names are stored +%% in the array addressed by `Arrays' . Once a vertex array object is deleted it has +%% no contents and its name is again unused. If a vertex array object that is currently bound +%% is deleted, the binding for that object reverts to zero and the default vertex array becomes +%% current. Unused names in `Arrays' are silently ignored, as is the value zero. +%% +%% See external documentation. +-spec deleteVertexArrays(Arrays) -> ok when Arrays :: [integer()]. deleteVertexArrays(Arrays) -> cast(5672, <<(length(Arrays)):?GLuint, (<< <> || C <- Arrays>>)/binary,0:(((1+length(Arrays)) rem 2)*32)>>). -%% @spec (N::integer()) -> [integer()] -%% @doc See external documentation. --spec genVertexArrays(integer()) -> [integer()]. +%% @doc Generate vertex array object names +%% +%% ``gl:genVertexArrays'' returns `N' vertex array object names in `Arrays' . +%% 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:genVertexArrays'' +%% . +%% +%% Vertex array object names returned by a call to ``gl:genVertexArrays'' are not returned +%% by subsequent calls, unless they are first deleted with {@link gl:deleteVertexArrays/1} . +%% +%% The names returned in `Arrays' are marked as used, for the purposes of ``gl:genVertexArrays'' +%% only, but they acquire state and type only when they are first bound. +%% +%% See external documentation. +-spec genVertexArrays(N) -> [integer()] when N :: integer(). genVertexArrays(N) -> call(5673, <>). -%% @spec (Array::integer()) -> 0|1 -%% @doc See external documentation. --spec isVertexArray(integer()) -> 0|1. +%% @doc Determine if a name corresponds to a vertex array object +%% +%% ``gl:isVertexArray'' returns `?GL_TRUE' if `Array' is currently the name of +%% a renderbuffer object. If `Renderbuffer' is zero, or if `Array' is not the name +%% of a renderbuffer object, or if an error occurs, ``gl:isVertexArray'' returns `?GL_FALSE' +%% . If `Array' is a name returned by {@link gl:genVertexArrays/1} , by that has not yet +%% been bound through a call to {@link gl:bindVertexArray/1} , then the name is not a vertex +%% array object and ``gl:isVertexArray'' returns `?GL_FALSE'. +%% +%% See external documentation. +-spec isVertexArray(Array) -> 0|1 when Array :: integer(). isVertexArray(Array) -> call(5674, <>). -%% @spec (Program::integer(),UniformNames::[string()]) -> [integer()] -%% @doc See external documentation. --spec getUniformIndices(integer(),[string()]) -> [integer()]. +%% @doc Retrieve the index of a named uniform block +%% +%% ``gl:getUniformIndices'' retrieves the indices of a number of uniforms within `Program' +%% . +%% +%% `Program' must be the name of a program object for which the command {@link gl:linkProgram/1} +%% must have been called in the past, although it is not required that {@link gl:linkProgram/1} +%% must have succeeded. The link could have failed because the number of active uniforms +%% exceeded the limit. +%% +%% `UniformCount' indicates both the number of elements in the array of names `UniformNames' +%% and the number of indices that may be written to `UniformIndices' . +%% +%% `UniformNames' contains a list of `UniformCount' name strings identifying the +%% uniform names to be queried for indices. For each name string in `UniformNames' , +%% the index assigned to the active uniform of that name will be written to the corresponding +%% element of `UniformIndices' . If a string in `UniformNames' is not the name of +%% an active uniform, the special value `?GL_INVALID_INDEX' will be written to the corresponding +%% element of `UniformIndices' . +%% +%% If an error occurs, nothing is written to `UniformIndices' . +%% +%% See external documentation. +-spec getUniformIndices(Program, UniformNames) -> [integer()] when Program :: integer(),UniformNames :: [string()]. getUniformIndices(Program,UniformNames) -> UniformNamesTemp = list_to_binary([[Str|[0]] || Str <- UniformNames ]), call(5675, <>). -%% @spec (Program::integer(),UniformIndices::[integer()],Pname::enum()) -> [integer()] -%% @doc See external documentation. --spec getActiveUniformsiv(integer(),[integer()],enum()) -> [integer()]. +%% @doc glGetActiveUniforms +%% +%% See external documentation. +-spec getActiveUniformsiv(Program, UniformIndices, Pname) -> [integer()] when Program :: integer(),UniformIndices :: [integer()],Pname :: enum(). getActiveUniformsiv(Program,UniformIndices,Pname) -> call(5676, <> || C <- UniformIndices>>)/binary,0:(((length(UniformIndices)) rem 2)*32),Pname:?GLenum>>). -%% @spec (Program::integer(),UniformIndex::integer(),BufSize::integer()) -> string() -%% @doc See external documentation. --spec getActiveUniformName(integer(),integer(),integer()) -> string(). +%% @doc Query the name of an active uniform +%% +%% ``gl:getActiveUniformName'' returns the name of the active uniform at `UniformIndex' +%% within `Program' . If `UniformName' is not NULL, up to `BufSize' characters +%% (including a nul-terminator) will be written into the array whose address is specified +%% by `UniformName' . If `Length' is not NULL, the number of characters that were +%% (or would have been) written into `UniformName' (not including the nul-terminator) +%% will be placed in the variable whose address is specified in `Length' . If `Length' +%% is NULL, no length is returned. The length of the longest uniform name in `Program' +%% is given by the value of `?GL_ACTIVE_UNIFORM_MAX_LENGTH', which can be queried with {@link gl:getProgramiv/2} +%% . +%% +%% If ``gl:getActiveUniformName'' is not successful, nothing is written to `Length' +%% or `UniformName' . +%% +%% `Program' must be the name of a program for which the command {@link gl:linkProgram/1} +%% has been issued in the past. It is not necessary for `Program' to have been linked +%% successfully. The link could have failed because the number of active uniforms exceeded +%% the limit. +%% +%% `UniformIndex' must be an active uniform index of the program `Program' , in +%% the range zero to `?GL_ACTIVE_UNIFORMS' - 1. The value of `?GL_ACTIVE_UNIFORMS' +%% can be queried with {@link gl:getProgramiv/2} . +%% +%% See external documentation. +-spec getActiveUniformName(Program, UniformIndex, BufSize) -> string() when Program :: integer(),UniformIndex :: integer(),BufSize :: integer(). getActiveUniformName(Program,UniformIndex,BufSize) -> call(5677, <>). -%% @spec (Program::integer(),UniformBlockName::string()) -> integer() -%% @doc See external documentation. --spec getUniformBlockIndex(integer(),string()) -> integer(). +%% @doc Retrieve the index of a named uniform block +%% +%% ``gl:getUniformBlockIndex'' retrieves the index of a uniform block within `Program' . +%% +%% +%% `Program' must be the name of a program object for which the command {@link gl:linkProgram/1} +%% must have been called in the past, although it is not required that {@link gl:linkProgram/1} +%% must have succeeded. The link could have failed because the number of active uniforms +%% exceeded the limit. +%% +%% `UniformBlockName' must contain a nul-terminated string specifying the name of the +%% uniform block. +%% +%% ``gl:getUniformBlockIndex'' returns the uniform block index for the uniform block named +%% `UniformBlockName' of `Program' . If `UniformBlockName' does not identify +%% an active uniform block of `Program' , ``gl:getUniformBlockIndex'' returns the special +%% identifier, `?GL_INVALID_INDEX'. Indices of the active uniform blocks of a program +%% are assigned in consecutive order, beginning with zero. +%% +%% See external documentation. +-spec getUniformBlockIndex(Program, UniformBlockName) -> integer() when Program :: integer(),UniformBlockName :: string(). getUniformBlockIndex(Program,UniformBlockName) -> call(5678, <>). -%% @spec (Program::integer(),UniformBlockIndex::integer(),Pname::enum(),Params::mem()) -> ok -%% @doc See external documentation. --spec getActiveUniformBlockiv(integer(),integer(),enum(),mem()) -> ok. +%% @doc Query information about an active uniform block +%% +%% ``gl:getActiveUniformBlockiv'' retrieves information about an active uniform block within +%% `Program' . +%% +%% `Program' must be the name of a program object for which the command {@link gl:linkProgram/1} +%% must have been called in the past, although it is not required that {@link gl:linkProgram/1} +%% must have succeeded. The link could have failed because the number of active uniforms +%% exceeded the limit. +%% +%% `UniformBlockIndex' is an active uniform block index of `Program' , and must +%% be less than the value of `?GL_ACTIVE_UNIFORM_BLOCKS'. +%% +%% Upon success, the uniform block parameter(s) specified by `Pname' are returned in `Params' +%% . If an error occurs, nothing will be written to `Params' . +%% +%% If `Pname' is `?GL_UNIFORM_BLOCK_BINDING', then the index of the uniform buffer +%% binding point last selected by the uniform block specified by `UniformBlockIndex' +%% for `Program' is returned. If no uniform block has been previously specified, zero +%% is returned. +%% +%% If `Pname' is `?GL_UNIFORM_BLOCK_DATA_SIZE', then the implementation-dependent +%% minimum total buffer object size, in basic machine units, required to hold all active +%% uniforms in the uniform block identified by `UniformBlockIndex' is returned. It is +%% neither guaranteed nor expected that a given implementation will arrange uniform values +%% as tightly packed in a buffer object. The exception to this is the `std140 uniform block layout' +%% , which guarantees specific packing behavior and does not require the application to query +%% for offsets and strides. In this case the minimum size may still be queried, even though +%% it is determined in advance based only on the uniform block declaration. +%% +%% If `Pname' is `?GL_UNIFORM_BLOCK_NAME_LENGTH', then the total length (including +%% the nul terminator) of the name of the uniform block identified by `UniformBlockIndex' +%% is returned. +%% +%% If `Pname' is `?GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS', then the number of active +%% uniforms in the uniform block identified by `UniformBlockIndex' is returned. +%% +%% If `Pname' is `?GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES', then a list of the +%% active uniform indices for the uniform block identified by `UniformBlockIndex' is +%% returned. The number of elements that will be written to `Params' is the value of `?GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS' +%% for `UniformBlockIndex' . +%% +%% If `Pname' is `?GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER', `?GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER' +%% , or `?GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER', then a boolean value indicating +%% whether the uniform block identified by `UniformBlockIndex' is referenced by the +%% vertex, geometry, or fragment programming stages of program, respectively, is returned. +%% +%% See external documentation. +-spec getActiveUniformBlockiv(Program, UniformBlockIndex, Pname, Params) -> ok when Program :: integer(),UniformBlockIndex :: integer(),Pname :: enum(),Params :: mem(). getActiveUniformBlockiv(Program,UniformBlockIndex,Pname,Params) -> send_bin(Params), call(5679, <>). -%% @spec (Program::integer(),UniformBlockIndex::integer(),BufSize::integer()) -> string() -%% @doc See external documentation. --spec getActiveUniformBlockName(integer(),integer(),integer()) -> string(). +%% @doc Retrieve the name of an active uniform block +%% +%% ``gl:getActiveUniformBlockName'' retrieves the name of the active uniform block at `UniformBlockIndex' +%% within `Program' . +%% +%% `Program' must be the name of a program object for which the command {@link gl:linkProgram/1} +%% must have been called in the past, although it is not required that {@link gl:linkProgram/1} +%% must have succeeded. The link could have failed because the number of active uniforms +%% exceeded the limit. +%% +%% `UniformBlockIndex' is an active uniform block index of `Program' , and must +%% be less than the value of `?GL_ACTIVE_UNIFORM_BLOCKS'. +%% +%% Upon success, the name of the uniform block identified by `UnifomBlockIndex' is +%% returned into `UniformBlockName' . The name is nul-terminated. The actual number of +%% characters written into `UniformBlockName' , excluding the nul terminator, is returned +%% in `Length' . If `Length' is NULL, no length is returned. +%% +%% `BufSize' contains the maximum number of characters (including the nul terminator) +%% that will be written into `UniformBlockName' . +%% +%% If an error occurs, nothing will be written to `UniformBlockName' or `Length' . +%% +%% +%% See external documentation. +-spec getActiveUniformBlockName(Program, UniformBlockIndex, BufSize) -> string() when Program :: integer(),UniformBlockIndex :: integer(),BufSize :: integer(). getActiveUniformBlockName(Program,UniformBlockIndex,BufSize) -> call(5680, <>). -%% @spec (Program::integer(),UniformBlockIndex::integer(),UniformBlockBinding::integer()) -> ok -%% @doc See external documentation. --spec uniformBlockBinding(integer(),integer(),integer()) -> ok. +%% @doc Assign a binding point to an active uniform block +%% +%% Binding points for active uniform blocks are assigned using ``gl:uniformBlockBinding''. +%% Each of a program's active uniform blocks has a corresponding uniform buffer binding point. +%% `Program' is the name of a program object for which the command {@link gl:linkProgram/1} +%% has been issued in the past. +%% +%% If successful, ``gl:uniformBlockBinding'' specifies that `Program' will use the +%% data store of the buffer object bound to the binding point `UniformBlockBinding' +%% to extract the values of the uniforms in the uniform block identified by `UniformBlockIndex' +%% . +%% +%% When a program object is linked or re-linked, the uniform buffer object binding point +%% assigned to each of its active uniform blocks is reset to zero. +%% +%% See external documentation. +-spec uniformBlockBinding(Program, UniformBlockIndex, UniformBlockBinding) -> ok when Program :: integer(),UniformBlockIndex :: integer(),UniformBlockBinding :: integer(). uniformBlockBinding(Program,UniformBlockIndex,UniformBlockBinding) -> cast(5681, <>). -%% @spec (ReadTarget::enum(),WriteTarget::enum(),ReadOffset::integer(),WriteOffset::integer(),Size::integer()) -> ok -%% @doc See external documentation. --spec copyBufferSubData(enum(),enum(),integer(),integer(),integer()) -> ok. +%% @doc Copy part of the data store of a buffer object to the data store of another buffer object +%% +%% ``gl:copyBufferSubData'' copies part of the data store attached to `Readtarget' +%% to the data store attached to `Writetarget' . The number of basic machine units indicated +%% by `Size' is copied from the source, at offset `Readoffset' to the destination +%% at `Writeoffset' , also in basic machine units. +%% +%% `Readtarget' and `Writetarget' must be `?GL_ARRAY_BUFFER', `?GL_COPY_READ_BUFFER' +%% , `?GL_COPY_WRITE_BUFFER', `?GL_ELEMENT_ARRAY_BUFFER', `?GL_PIXEL_PACK_BUFFER' +%% , `?GL_PIXEL_UNPACK_BUFFER', `?GL_TEXTURE_BUFFER', `?GL_TRANSFORM_FEEDBACK_BUFFER' +%% or `?GL_UNIFORM_BUFFER'. Any of these targets may be used, although the targets `?GL_COPY_READ_BUFFER' +%% and `?GL_COPY_WRITE_BUFFER' are provided specifically to allow copies between buffers +%% without disturbing other GL state. +%% +%% `Readoffset' , `Writeoffset' and `Size' must all be greater than or equal +%% to zero. Furthermore, `Readoffset' + `Size' must not exceeed the size of the +%% buffer object bound to `Readtarget' , and `Readoffset' + `Size' must not +%% exceeed the size of the buffer bound to `Writetarget' . If the same buffer object +%% is bound to both `Readtarget' and `Writetarget' , then the ranges specified by `Readoffset' +%% , `Writeoffset' and `Size' must not overlap. +%% +%% See external documentation. +-spec copyBufferSubData(ReadTarget, WriteTarget, ReadOffset, WriteOffset, Size) -> ok when ReadTarget :: enum(),WriteTarget :: enum(),ReadOffset :: integer(),WriteOffset :: integer(),Size :: integer(). copyBufferSubData(ReadTarget,WriteTarget,ReadOffset,WriteOffset,Size) -> cast(5682, <>). -%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|mem(),Basevertex::integer()) -> ok -%% @doc See external documentation. --spec drawElementsBaseVertex(enum(),integer(),enum(),offset()|mem(),integer()) -> ok. +%% @doc Render primitives from array data with a per-element offset +%% +%% ``gl:drawElementsBaseVertex'' behaves identically to {@link gl:drawElements/4} except +%% that the `i'th element transferred by the corresponding draw call will be taken from +%% element `Indices' [i] + `Basevertex' of each enabled array. If the resulting +%% value is larger than the maximum value representable by `Type' , it is as if the calculation +%% were upconverted to 32-bit unsigned integers (with wrapping on overflow conditions). The +%% operation is undefined if the sum would be negative. +%% +%% See external documentation. +-spec drawElementsBaseVertex(Mode, Count, Type, Indices, Basevertex) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Basevertex :: integer(). drawElementsBaseVertex(Mode,Count,Type,Indices,Basevertex) when is_integer(Indices) -> cast(5683, <>); drawElementsBaseVertex(Mode,Count,Type,Indices,Basevertex) -> send_bin(Indices), cast(5684, <>). -%% @spec (Mode::enum(),Start::integer(),End::integer(),Count::integer(),Type::enum(),Indices::offset()|mem(),Basevertex::integer()) -> ok -%% @doc See external documentation. --spec drawRangeElementsBaseVertex(enum(),integer(),integer(),integer(),enum(),offset()|mem(),integer()) -> ok. +%% @doc Render primitives from array data with a per-element offset +%% +%% ``gl:drawRangeElementsBaseVertex'' is a restricted form of {@link gl:drawElementsBaseVertex/5} +%% . `Mode' , `Start' , `End' , `Count' and `Basevertex' match the +%% corresponding arguments to {@link gl:drawElementsBaseVertex/5} , with the additional constraint +%% that all values in the array `Indices' must lie between `Start' and `End' , +%% inclusive, prior to adding `Basevertex' . Index values lying outside the range [ `Start' +%% , `End' ] are treated in the same way as {@link gl:drawElementsBaseVertex/5} . The `i' +%% th element transferred by the corresponding draw call will be taken from element `Indices' +%% [i] + `Basevertex' of each enabled array. If the resulting value is larger than the +%% maximum value representable by `Type' , it is as if the calculation were upconverted +%% to 32-bit unsigned integers (with wrapping on overflow conditions). The operation is undefined +%% if the sum would be negative. +%% +%% See external documentation. +-spec drawRangeElementsBaseVertex(Mode, Start, End, Count, Type, Indices, Basevertex) -> ok when Mode :: enum(),Start :: integer(),End :: integer(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Basevertex :: integer(). drawRangeElementsBaseVertex(Mode,Start,End,Count,Type,Indices,Basevertex) when is_integer(Indices) -> cast(5685, <>); drawRangeElementsBaseVertex(Mode,Start,End,Count,Type,Indices,Basevertex) -> send_bin(Indices), cast(5686, <>). -%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|mem(),Primcount::integer(),Basevertex::integer()) -> ok -%% @doc See external documentation. --spec drawElementsInstancedBaseVertex(enum(),integer(),enum(),offset()|mem(),integer(),integer()) -> ok. +%% @doc Render multiple instances of a set of primitives from array data with a per-element offset +%% +%% ``gl:drawElementsInstancedBaseVertex'' behaves identically to {@link gl:drawElementsInstanced/5} +%% except that the `i'th element transferred by the corresponding draw call will be +%% taken from element `Indices' [i] + `Basevertex' of each enabled array. If the +%% resulting value is larger than the maximum value representable by `Type' , it is as +%% if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow +%% conditions). The operation is undefined if the sum would be negative. +%% +%% See external documentation. +-spec drawElementsInstancedBaseVertex(Mode, Count, Type, Indices, Primcount, Basevertex) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Basevertex :: integer(). drawElementsInstancedBaseVertex(Mode,Count,Type,Indices,Primcount,Basevertex) when is_integer(Indices) -> cast(5687, <>); drawElementsInstancedBaseVertex(Mode,Count,Type,Indices,Primcount,Basevertex) -> send_bin(Indices), cast(5688, <>). -%% @spec (Mode::enum()) -> ok -%% @doc See external documentation. --spec provokingVertex(enum()) -> ok. +%% @doc Specifiy the vertex to be used as the source of data for flat shaded varyings +%% +%% `Flatshading' a vertex shader varying output means to assign all vetices of the primitive +%% the same value for that output. The vertex from which these values is derived is known +%% as the `provoking vertex' and ``gl:provokingVertex'' specifies which vertex is +%% to be used as the source of data for flat shaded varyings. +%% +%% `ProvokeMode' must be either `?GL_FIRST_VERTEX_CONVENTION' or `?GL_LAST_VERTEX_CONVENTION' +%% , and controls the selection of the vertex whose values are assigned to flatshaded varying +%% outputs. The interpretation of these values for the supported primitive types is: +%% +%% +%% +%%
` Primitive Type of Polygon '`i'` First Vertex Convention ' +%% ` Last Vertex Convention '
point `i' +%% `i'
independent line 2`i' - 1 2`i'
line loop `i' +%% +%% `i' + 1, if `i' < `n' +%% +%% 1, if `i' = `n'
line strip `i'`i' +%% + 1
independent triangle 3`i' - 2 3`i'
triangle strip `i'`i' + 2
+%% triangle fan `i' + 1 `i' + 2
line adjacency +%% 4`i' - 2 4`i' - 1
line strip adjacency `i' + 1 `i' + 2
triangle adjacency 6`i' +%% - 5 6`i' - 1
triangle strip adjacency 2`i' +%% - 1 2`i' + 3
+%% +%% If a vertex or geometry shader is active, user-defined varying outputs may be flatshaded +%% by using the flat qualifier when declaring the output. +%% +%% See external documentation. +-spec provokingVertex(Mode) -> ok when Mode :: enum(). provokingVertex(Mode) -> cast(5689, <>). -%% @spec (Condition::enum(),Flags::integer()) -> integer() -%% @doc See external documentation. --spec fenceSync(enum(),integer()) -> integer(). +%% @doc Create a new sync object and insert it into the GL command stream +%% +%% ``gl:fenceSync'' creates a new fence sync object, inserts a fence command into the GL +%% command stream and associates it with that sync object, and returns a non-zero name corresponding +%% to the sync object. +%% +%% When the specified `Condition' of the sync object is satisfied by the fence command, +%% the sync object is signaled by the GL, causing any {@link gl:waitSync/3} , {@link gl:clientWaitSync/3} +%% commands blocking in `Sync' to `unblock'. No other state is affected by ``gl:fenceSync'' +%% or by the execution of the associated fence command. +%% +%% `Condition' must be `?GL_SYNC_GPU_COMMANDS_COMPLETE'. This condition is satisfied +%% by completion of the fence command corresponding to the sync object and all preceding +%% commands in the same command stream. The sync object will not be signaled until all effects +%% from these commands on GL client and server state and the framebuffer are fully realized. +%% Note that completion of the fence command occurs once the state of the corresponding sync +%% object has been changed, but commands waiting on that sync object may not be unblocked +%% until after the fence command completes. +%% +%% See external documentation. +-spec fenceSync(Condition, Flags) -> integer() when Condition :: enum(),Flags :: integer(). fenceSync(Condition,Flags) -> call(5690, <>). -%% @spec (Sync::integer()) -> 0|1 -%% @doc See external documentation. --spec isSync(integer()) -> 0|1. +%% @doc Determine if a name corresponds to a sync object +%% +%% ``gl:isSync'' returns `?GL_TRUE' if `Sync' is currently the name of a sync +%% object. If `Sync' is not the name of a sync object, or if an error occurs, ``gl:isSync'' +%% returns `?GL_FALSE'. Note that zero is not the name of a sync object. +%% +%% See external documentation. +-spec isSync(Sync) -> 0|1 when Sync :: integer(). isSync(Sync) -> call(5691, <>). -%% @spec (Sync::integer()) -> ok -%% @doc See external documentation. --spec deleteSync(integer()) -> ok. +%% @doc Delete a sync object +%% +%% ``gl:deleteSync'' deletes the sync object specified by `Sync' . If the fence command +%% corresponding to the specified sync object has completed, or if no {@link gl:waitSync/3} +%% or {@link gl:clientWaitSync/3} commands are blocking on `Sync' , the object is deleted +%% immediately. Otherwise, `Sync' is flagged for deletion and will be deleted when it +%% is no longer associated with any fence command and is no longer blocking any {@link gl:waitSync/3} +%% or {@link gl:clientWaitSync/3} command. In either case, after ``gl:deleteSync'' returns, +%% the name `Sync' is invalid and can no longer be used to refer to the sync object. +%% +%% ``gl:deleteSync'' will silently ignore a `Sync' value of zero. +%% +%% See external documentation. +-spec deleteSync(Sync) -> ok when Sync :: integer(). deleteSync(Sync) -> cast(5692, <>). -%% @spec (Sync::integer(),Flags::integer(),Timeout::integer()) -> enum() -%% @doc See external documentation. --spec clientWaitSync(integer(),integer(),integer()) -> enum(). +%% @doc Block and wait for a sync object to become signaled +%% +%% ``gl:clientWaitSync'' causes the client to block and wait for the sync object specified +%% by `Sync' to become signaled. If `Sync' is signaled when ``gl:clientWaitSync'' +%% is called, ``gl:clientWaitSync'' returns immediately, otherwise it will block and wait +%% for up to `Timeout' nanoseconds for `Sync' to become signaled. +%% +%% The return value is one of four status values: +%% +%% `?GL_ALREADY_SIGNALED' indicates that `Sync' was signaled at the time that ``gl:clientWaitSync'' +%% was called. +%% +%% `?GL_TIMEOUT_EXPIRED' indicates that at least `Timeout' nanoseconds passed and `Sync' +%% did not become signaled. +%% +%% `?GL_CONDITION_SATISFIED' indicates that `Sync' was signaled before the timeout +%% expired. +%% +%% `?GL_WAIT_FAILED' indicates that an error occurred. Additionally, an OpenGL error +%% will be generated. +%% +%% See external documentation. +-spec clientWaitSync(Sync, Flags, Timeout) -> enum() when Sync :: integer(),Flags :: integer(),Timeout :: integer(). clientWaitSync(Sync,Flags,Timeout) -> call(5693, <>). -%% @spec (Sync::integer(),Flags::integer(),Timeout::integer()) -> ok -%% @doc See external documentation. --spec waitSync(integer(),integer(),integer()) -> ok. +%% @doc Instruct the GL server to block until the specified sync object becomes signaled +%% +%% ``gl:waitSync'' causes the GL server to block and wait until `Sync' becomes signaled. +%% `Sync' is the name of an existing sync object upon which to wait. `Flags' and `Timeout' +%% are currently not used and must be set to zero and the special value `?GL_TIMEOUT_IGNORED' +%% , respectively +%% +%% `Flags' and `Timeout' are placeholders for anticipated future extensions of +%% sync object capabilities. They must have these reserved values in order that existing +%% code calling ``gl:waitSync'' operate properly in the presence of such extensions.. ``gl:waitSync'' +%% will always wait no longer than an implementation-dependent timeout. The duration of +%% this timeout in nanoseconds may be queried by calling {@link gl:getBooleanv/1} with the parameter `?GL_MAX_SERVER_WAIT_TIMEOUT' +%% . There is currently no way to determine whether ``gl:waitSync'' unblocked because the +%% timeout expired or because the sync object being waited on was signaled. +%% +%% If an error occurs, ``gl:waitSync'' does not cause the GL server to block. +%% +%% See external documentation. +-spec waitSync(Sync, Flags, Timeout) -> ok when Sync :: integer(),Flags :: integer(),Timeout :: integer(). waitSync(Sync,Flags,Timeout) -> cast(5694, <>). -%% @spec (Pname::enum()) -> [integer()] -%% @doc See external documentation. --spec getInteger64v(enum()) -> [integer()]. +%% @doc +%% See {@link getBooleanv/1} +-spec getInteger64v(Pname) -> [integer()] when Pname :: enum(). getInteger64v(Pname) -> call(5695, <>). -%% @spec (Sync::integer(),Pname::enum(),BufSize::integer()) -> [integer()] -%% @doc See external documentation. --spec getSynciv(integer(),enum(),integer()) -> [integer()]. +%% @doc Query the properties of a sync object +%% +%% ``gl:getSynciv'' retrieves properties of a sync object. `Sync' specifies the name +%% of the sync object whose properties to retrieve. +%% +%% On success, ``gl:getSynciv'' replaces up to `BufSize' integers in `Values' +%% with the corresponding property values of the object being queried. The actual number +%% of integers replaced is returned in the variable whose address is specified in `Length' +%% . If `Length' is NULL, no length is returned. +%% +%% If `Pname' is `?GL_OBJECT_TYPE', a single value representing the specific type +%% of the sync object is placed in `Values' . The only type supported is `?GL_SYNC_FENCE' +%% . +%% +%% If `Pname' is `?GL_SYNC_STATUS', a single value representing the status of +%% the sync object (`?GL_SIGNALED' or `?GL_UNSIGNALED') is placed in `Values' . +%% +%% +%% If `Pname' is `?GL_SYNC_CONDITION', a single value representing the condition +%% of the sync object is placed in `Values' . The only condition supported is `?GL_SYNC_GPU_COMMANDS_COMPLETE' +%% . +%% +%% If `Pname' is `?GL_SYNC_FLAGS', a single value representing the flags with +%% which the sync object was created is placed in `Values' . No flags are currently supported +%% +%% +%% `Flags' is expected to be used in future extensions to the sync objects.. +%% +%% If an error occurs, nothing will be written to `Values' or `Length' . +%% +%% See external documentation. +-spec getSynciv(Sync, Pname, BufSize) -> [integer()] when Sync :: integer(),Pname :: enum(),BufSize :: integer(). getSynciv(Sync,Pname,BufSize) -> call(5696, <>). -%% @spec (Target::enum(),Samples::integer(),Internalformat::integer(),Width::integer(),Height::integer(),Fixedsamplelocations::0|1) -> ok -%% @doc See external documentation. --spec texImage2DMultisample(enum(),integer(),integer(),integer(),integer(),0|1) -> ok. +%% @doc Establish the data storage, format, dimensions, and number of samples of a multisample texture's image +%% +%% ``gl:texImage2DMultisample'' establishes the data storage, format, dimensions and number +%% of samples of a multisample texture's image. +%% +%% `Target' must be `?GL_TEXTURE_2D_MULTISAMPLE' or `?GL_PROXY_TEXTURE_2D_MULTISAMPLE' +%% . `Width' and `Height' are the dimensions in texels of the texture, and must +%% be in the range zero to `?GL_MAX_TEXTURE_SIZE' - 1. `Samples' specifies the +%% number of samples in the image and must be in the range zero to `?GL_MAX_SAMPLES' +%% - 1. +%% +%% `Internalformat' must be a color-renderable, depth-renderable, or stencil-renderable +%% format. +%% +%% If `Fixedsamplelocations' is `?GL_TRUE', the image will use identical sample +%% locations and the same number of samples for all texels in the image, and the sample locations +%% will not depend on the internal format or size of the image. +%% +%% When a multisample texture is accessed in a shader, the access takes one vector of integers +%% describing which texel to fetch and an integer corresponding to the sample numbers describing +%% which sample within the texel to fetch. No standard sampling instructions are allowed +%% on the multisample texture targets. +%% +%% See external documentation. +-spec texImage2DMultisample(Target, Samples, Internalformat, Width, Height, Fixedsamplelocations) -> ok when Target :: enum(),Samples :: integer(),Internalformat :: integer(),Width :: integer(),Height :: integer(),Fixedsamplelocations :: 0|1. texImage2DMultisample(Target,Samples,Internalformat,Width,Height,Fixedsamplelocations) -> cast(5697, <>). -%% @spec (Target::enum(),Samples::integer(),Internalformat::integer(),Width::integer(),Height::integer(),Depth::integer(),Fixedsamplelocations::0|1) -> ok -%% @doc See external documentation. --spec texImage3DMultisample(enum(),integer(),integer(),integer(),integer(),integer(),0|1) -> ok. +%% @doc Establish the data storage, format, dimensions, and number of samples of a multisample texture's image +%% +%% ``gl:texImage3DMultisample'' establishes the data storage, format, dimensions and number +%% of samples of a multisample texture's image. +%% +%% `Target' must be `?GL_TEXTURE_2D_MULTISAMPLE_ARRAY' or `?GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY' +%% . `Width' and `Height' are the dimensions in texels of the texture, and must +%% be in the range zero to `?GL_MAX_TEXTURE_SIZE' - 1. `Depth' is the number of +%% array slices in the array texture's image. `Samples' specifies the number of samples +%% in the image and must be in the range zero to `?GL_MAX_SAMPLES' - 1. +%% +%% `Internalformat' must be a color-renderable, depth-renderable, or stencil-renderable +%% format. +%% +%% If `Fixedsamplelocations' is `?GL_TRUE', the image will use identical sample +%% locations and the same number of samples for all texels in the image, and the sample locations +%% will not depend on the internal format or size of the image. +%% +%% When a multisample texture is accessed in a shader, the access takes one vector of integers +%% describing which texel to fetch and an integer corresponding to the sample numbers describing +%% which sample within the texel to fetch. No standard sampling instructions are allowed +%% on the multisample texture targets. +%% +%% See external documentation. +-spec texImage3DMultisample(Target, Samples, Internalformat, Width, Height, Depth, Fixedsamplelocations) -> ok when Target :: enum(),Samples :: integer(),Internalformat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Fixedsamplelocations :: 0|1. texImage3DMultisample(Target,Samples,Internalformat,Width,Height,Depth,Fixedsamplelocations) -> cast(5698, <>). -%% @spec (Pname::enum(),Index::integer()) -> {float(),float()} -%% @doc See external documentation. --spec getMultisamplefv(enum(),integer()) -> {float(),float()}. +%% @doc Retrieve the location of a sample +%% +%% ``gl:getMultisamplefv'' queries the location of a given sample. `Pname' specifies +%% the sample parameter to retrieve and must be `?GL_SAMPLE_POSITION'. `Index' +%% corresponds to the sample for which the location should be returned. The sample location +%% is returned as two floating-point values in `Val[0]' and `Val[1]' , each between +%% 0 and 1, corresponding to the `X' and `Y' locations respectively in the GL pixel +%% space of that sample. (0.5, 0.5) this corresponds to the pixel center. `Index' must +%% be between zero and the value of `?GL_SAMPLES' - 1. +%% +%% If the multisample mode does not have fixed sample locations, the returned values may +%% only reflect the locations of samples within some pixels. +%% +%% See external documentation. +-spec getMultisamplefv(Pname, Index) -> {float(),float()} when Pname :: enum(),Index :: integer(). getMultisamplefv(Pname,Index) -> call(5699, <>). -%% @spec (Index::integer(),Mask::integer()) -> ok -%% @doc See external documentation. --spec sampleMaski(integer(),integer()) -> ok. +%% @doc Set the value of a sub-word of the sample mask +%% +%% ``gl:sampleMaski'' sets one 32-bit sub-word of the multi-word sample mask, `?GL_SAMPLE_MASK_VALUE' +%% . +%% +%% `MaskIndex' specifies which 32-bit sub-word of the sample mask to update, and `Mask' +%% specifies the new value to use for that sub-word. `MaskIndex' must be less than +%% the value of `?GL_MAX_SAMPLE_MASK_WORDS'. Bit `B' of mask word `M' corresponds +%% to sample 32 x `M' + `B'. +%% +%% See external documentation. +-spec sampleMaski(Index, Mask) -> ok when Index :: integer(),Mask :: integer(). sampleMaski(Index,Mask) -> cast(5700, <>). -%% @spec (Type::enum(),Name::string(),String::string()) -> ok -%% @doc See external documentation. --spec namedStringARB(enum(),string(),string()) -> ok. +%% @doc glNamedStringARB +%% +%% See external documentation. +-spec namedStringARB(Type, Name, String) -> ok when Type :: enum(),Name :: string(),String :: string(). namedStringARB(Type,Name,String) -> cast(5701, <>). -%% @spec (Name::string()) -> ok -%% @doc See external documentation. --spec deleteNamedStringARB(string()) -> ok. +%% @doc glDeleteNamedStringARB +%% +%% See external documentation. +-spec deleteNamedStringARB(Name) -> ok when Name :: string(). deleteNamedStringARB(Name) -> cast(5702, <<(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>). -%% @spec (Shader::integer(),Path::[string()]) -> ok -%% @doc See external documentation. --spec compileShaderIncludeARB(integer(),[string()]) -> ok. +%% @doc glCompileShaderIncludeARB +%% +%% See external documentation. +-spec compileShaderIncludeARB(Shader, Path) -> ok when Shader :: integer(),Path :: [string()]. compileShaderIncludeARB(Shader,Path) -> PathTemp = list_to_binary([[Str|[0]] || Str <- Path ]), cast(5703, <>). -%% @spec (Name::string()) -> 0|1 -%% @doc See external documentation. --spec isNamedStringARB(string()) -> 0|1. +%% @doc glIsNamedStringARB +%% +%% See external documentation. +-spec isNamedStringARB(Name) -> 0|1 when Name :: string(). isNamedStringARB(Name) -> call(5704, <<(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8)>>). -%% @spec (Name::string(),BufSize::integer()) -> string() -%% @doc See external documentation. --spec getNamedStringARB(string(),integer()) -> string(). +%% @doc glGetNamedStringARB +%% +%% See external documentation. +-spec getNamedStringARB(Name, BufSize) -> string() when Name :: string(),BufSize :: integer(). getNamedStringARB(Name,BufSize) -> call(5705, <<(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8),BufSize:?GLsizei>>). -%% @spec (Name::string(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getNamedStringivARB(string(),enum()) -> integer(). +%% @doc glGetNamedStringARB +%% +%% See external documentation. +-spec getNamedStringivARB(Name, Pname) -> integer() when Name :: string(),Pname :: enum(). getNamedStringivARB(Name,Pname) -> call(5706, <<(list_to_binary([Name|[0]]))/binary,0:((8-((length(Name)+ 1) rem 8)) rem 8),Pname:?GLenum>>). -%% @spec (Program::integer(),ColorNumber::integer(),Index::integer(),Name::string()) -> ok -%% @doc See external documentation. --spec bindFragDataLocationIndexed(integer(),integer(),integer(),string()) -> ok. +%% @doc glBindFragDataLocationIndexe +%% +%% See external documentation. +-spec bindFragDataLocationIndexed(Program, ColorNumber, Index, Name) -> ok when Program :: integer(),ColorNumber :: integer(),Index :: integer(),Name :: string(). bindFragDataLocationIndexed(Program,ColorNumber,Index,Name) -> cast(5707, <>). -%% @spec (Program::integer(),Name::string()) -> integer() -%% @doc See external documentation. --spec getFragDataIndex(integer(),string()) -> integer(). +%% @doc Query the bindings of color indices to user-defined varying out variables +%% +%% ``gl:getFragDataIndex'' returns the index of the fragment color to which the variable `Name' +%% was bound when the program object `Program' was last linked. If `Name' is not +%% a varying out variable of `Program' , or if an error occurs, -1 will be returned. +%% +%% See external documentation. +-spec getFragDataIndex(Program, Name) -> integer() when Program :: integer(),Name :: string(). getFragDataIndex(Program,Name) -> call(5708, <>). -%% @spec (Count::integer()) -> [integer()] -%% @doc See external documentation. --spec genSamplers(integer()) -> [integer()]. +%% @doc Generate sampler object names +%% +%% ``gl:genSamplers'' returns `N' sampler object names in `Samplers' . 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:genSamplers'' +%% . +%% +%% Sampler object names returned by a call to ``gl:genSamplers'' are not returned by subsequent +%% calls, unless they are first deleted with {@link gl:deleteSamplers/1} . +%% +%% The names returned in `Samplers' are marked as used, for the purposes of ``gl:genSamplers'' +%% only, but they acquire state and type only when they are first bound. +%% +%% See external documentation. +-spec genSamplers(Count) -> [integer()] when Count :: integer(). genSamplers(Count) -> call(5709, <>). -%% @spec (Samplers::[integer()]) -> ok -%% @doc See external documentation. --spec deleteSamplers([integer()]) -> ok. +%% @doc Delete named sampler objects +%% +%% ``gl:deleteSamplers'' deletes `N' sampler objects named by the elements of the +%% array `Ids' . After a sampler object is deleted, its name is again unused. If a sampler +%% object that is currently bound to a sampler unit is deleted, it is as though {@link gl:bindSampler/2} +%% is called with unit set to the unit the sampler is bound to and sampler zero. Unused +%% names in samplers are silently ignored, as is the reserved name zero. +%% +%% See external documentation. +-spec deleteSamplers(Samplers) -> ok when Samplers :: [integer()]. deleteSamplers(Samplers) -> cast(5710, <<(length(Samplers)):?GLuint, (<< <> || C <- Samplers>>)/binary,0:(((1+length(Samplers)) rem 2)*32)>>). -%% @spec (Sampler::integer()) -> 0|1 -%% @doc See external documentation. --spec isSampler(integer()) -> 0|1. +%% @doc Determine if a name corresponds to a sampler object +%% +%% ``gl:isSampler'' returns `?GL_TRUE' if `Id' is currently the name of a sampler +%% object. If `Id' is zero, or is a non-zero value that is not currently the name of +%% a sampler object, or if an error occurs, ``gl:isSampler'' returns `?GL_FALSE'. +%% +%% A name returned by {@link gl:genSamplers/1} , is the name of a sampler object. +%% +%% See external documentation. +-spec isSampler(Sampler) -> 0|1 when Sampler :: integer(). isSampler(Sampler) -> call(5711, <>). -%% @spec (Unit::integer(),Sampler::integer()) -> ok -%% @doc See external documentation. --spec bindSampler(integer(),integer()) -> ok. +%% @doc Bind a named sampler to a texturing target +%% +%% ``gl:bindSampler'' binds `Sampler' to the texture unit at index `Unit' . `Sampler' +%% must be zero or the name of a sampler object previously returned from a call to {@link gl:genSamplers/1} +%% . `Unit' must be less than the value of `?GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS'. +%% +%% +%% When a sampler object is bound to a texture unit, its state supersedes that of the texture +%% object bound to that texture unit. If the sampler name zero is bound to a texture unit, +%% the currently bound texture's sampler state becomes active. A single sampler object may +%% be bound to multiple texture units simultaneously. +%% +%% See external documentation. +-spec bindSampler(Unit, Sampler) -> ok when Unit :: integer(),Sampler :: integer(). bindSampler(Unit,Sampler) -> cast(5712, <>). -%% @spec (Sampler::integer(),Pname::enum(),Param::integer()) -> ok -%% @doc See external documentation. --spec samplerParameteri(integer(),enum(),integer()) -> ok. +%% @doc Set sampler parameters +%% +%% ``gl:samplerParameter'' assigns the value or values in `Params' to the sampler +%% parameter specified as `Pname' . `Sampler' specifies the sampler object to be +%% modified, and must be the name of a sampler object previously returned from a call to {@link gl:genSamplers/1} +%% . The following symbols are accepted in `Pname' : +%% +%% `?GL_TEXTURE_MIN_FILTER': The texture minifying function is used whenever the pixel +%% being textured maps to an area greater than one texture element. There are six defined +%% minifying functions. Two of them use the nearest one or nearest four texture elements +%% to compute the texture value. The other four use mipmaps. +%% +%% A mipmap is an ordered set of arrays representing the same image at progressively lower +%% resolutions. If the texture has dimensions 2 n*2 m, there are max(n m)+1 mipmaps. The first +%% mipmap is the original texture, with dimensions 2 n*2 m. Each subsequent mipmap has +%% dimensions 2(k-1)*2(l-1), where 2 k*2 l are the dimensions of the previous mipmap, until either +%% k= 0 or l= 0. At that point, subsequent mipmaps have dimension 1*2(l-1) or 2(k-1)*1 until +%% the final mipmap, which has dimension 1*1. To define the mipmaps, call {@link gl:texImage1D/8} +%% , {@link gl:texImage2D/9} , {@link gl:texImage3D/10} , {@link gl:copyTexImage1D/7} , or {@link gl:copyTexImage2D/8} +%% with the `level' argument indicating the order of the mipmaps. Level 0 is the original +%% texture; level max(n m) is the final 1*1 mipmap. +%% +%% `Params' supplies a function for minifying the texture as one of the following: +%% +%% `?GL_NEAREST': Returns the value of the texture element that is nearest (in Manhattan +%% distance) to the center of the pixel being textured. +%% +%% `?GL_LINEAR': Returns the weighted average of the four texture elements that are +%% closest to the center of the pixel being textured. These can include border texture elements, +%% depending on the values of `?GL_TEXTURE_WRAP_S' and `?GL_TEXTURE_WRAP_T', and +%% on the exact mapping. +%% +%% `?GL_NEAREST_MIPMAP_NEAREST': Chooses the mipmap that most closely matches the size +%% of the pixel being textured and uses the `?GL_NEAREST' criterion (the texture element +%% nearest to the center of the pixel) to produce a texture value. +%% +%% `?GL_LINEAR_MIPMAP_NEAREST': Chooses the mipmap that most closely matches the size +%% of the pixel being textured and uses the `?GL_LINEAR' criterion (a weighted average +%% of the four texture elements that are closest to the center of the pixel) to produce a +%% texture value. +%% +%% `?GL_NEAREST_MIPMAP_LINEAR': Chooses the two mipmaps that most closely match the +%% size of the pixel being textured and uses the `?GL_NEAREST' criterion (the texture +%% element nearest to the center of the pixel) to produce a texture value from each mipmap. +%% The final texture value is a weighted average of those two values. +%% +%% `?GL_LINEAR_MIPMAP_LINEAR': Chooses the two mipmaps that most closely match the +%% size of the pixel being textured and uses the `?GL_LINEAR' criterion (a weighted +%% average of the four texture elements that are closest to the center of the pixel) to produce +%% a texture value from each mipmap. The final texture value is a weighted average of those +%% two values. +%% +%% As more texture elements are sampled in the minification process, fewer aliasing artifacts +%% will be apparent. While the `?GL_NEAREST' and `?GL_LINEAR' minification functions +%% can be faster than the other four, they sample only one or four texture elements to determine +%% the texture value of the pixel being rendered and can produce moire patterns or ragged +%% transitions. The initial value of `?GL_TEXTURE_MIN_FILTER' is `?GL_NEAREST_MIPMAP_LINEAR' +%% . +%% +%% `?GL_TEXTURE_MAG_FILTER': The texture magnification function is used when the pixel +%% being textured maps to an area less than or equal to one texture element. It sets the +%% texture magnification function to either `?GL_NEAREST' or `?GL_LINEAR' (see +%% below). `?GL_NEAREST' is generally faster than `?GL_LINEAR', but it can produce +%% textured images with sharper edges because the transition between texture elements is +%% not as smooth. The initial value of `?GL_TEXTURE_MAG_FILTER' is `?GL_LINEAR'. +%% +%% `?GL_NEAREST': Returns the value of the texture element that is nearest (in Manhattan +%% distance) to the center of the pixel being textured. +%% +%% `?GL_LINEAR': Returns the weighted average of the four texture elements that are +%% closest to the center of the pixel being textured. These can include border texture elements, +%% depending on the values of `?GL_TEXTURE_WRAP_S' and `?GL_TEXTURE_WRAP_T', and +%% on the exact mapping. +%% +%% +%% +%% `?GL_TEXTURE_MIN_LOD': Sets the minimum level-of-detail parameter. This floating-point +%% value limits the selection of highest resolution mipmap (lowest mipmap level). The initial +%% value is -1000. +%% +%% +%% +%% `?GL_TEXTURE_MAX_LOD': Sets the maximum level-of-detail parameter. This floating-point +%% value limits the selection of the lowest resolution mipmap (highest mipmap level). The +%% initial value is 1000. +%% +%% +%% +%% `?GL_TEXTURE_WRAP_S': Sets the wrap parameter for texture coordinate s to either `?GL_CLAMP_TO_EDGE' +%% , `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. `?GL_CLAMP_TO_BORDER' causes +%% the s coordinate to be clamped to the range [(-1 2/N) 1+(1 2/N)], where N is the size of the texture in +%% the direction of clamping.`?GL_CLAMP_TO_EDGE' causes s coordinates to be clamped +%% to the range [(1 2/N) 1-(1 2/N)], where N is the size of the texture in the direction of clamping. `?GL_REPEAT' +%% causes the integer part of the s coordinate to be ignored; the GL uses only the fractional +%% part, thereby creating a repeating pattern. `?GL_MIRRORED_REPEAT' causes the s +%% coordinate to be set to the fractional part of the texture coordinate if the integer part +%% of s is even; if the integer part of s is odd, then the s texture coordinate is +%% set to 1-frac(s), where frac(s) represents the fractional part of s. Initially, `?GL_TEXTURE_WRAP_S' +%% is set to `?GL_REPEAT'. +%% +%% +%% +%% `?GL_TEXTURE_WRAP_T': Sets the wrap parameter for texture coordinate t to either `?GL_CLAMP_TO_EDGE' +%% , `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. See the discussion under `?GL_TEXTURE_WRAP_S' +%% . Initially, `?GL_TEXTURE_WRAP_T' is set to `?GL_REPEAT'. +%% +%% `?GL_TEXTURE_WRAP_R': Sets the wrap parameter for texture coordinate r to either `?GL_CLAMP_TO_EDGE' +%% , `?GL_MIRRORED_REPEAT', or `?GL_REPEAT'. See the discussion under `?GL_TEXTURE_WRAP_S' +%% . Initially, `?GL_TEXTURE_WRAP_R' is set to `?GL_REPEAT'. +%% +%% `?GL_TEXTURE_BORDER_COLOR': The data in `Params' specifies four values that +%% define the border values that should be used for border texels. If a texel is sampled +%% from the border of the texture, the values of `?GL_TEXTURE_BORDER_COLOR' are interpreted +%% as an RGBA color to match the texture's internal format and substituted for the non-existent +%% texel data. If the texture contains depth components, the first component of `?GL_TEXTURE_BORDER_COLOR' +%% is interpreted as a depth value. The initial value is (0.0, 0.0, 0.0, 0.0). +%% +%% `?GL_TEXTURE_COMPARE_MODE': Specifies the texture comparison mode for currently +%% bound textures. That is, a texture whose internal format is `?GL_DEPTH_COMPONENT_*'; +%% see {@link gl:texImage2D/9} ) Permissible values are: +%% +%% `?GL_COMPARE_REF_TO_TEXTURE': Specifies that the interpolated and clamped r texture +%% coordinate should be compared to the value in the currently bound texture. See the discussion +%% of `?GL_TEXTURE_COMPARE_FUNC' for details of how the comparison is evaluated. The +%% result of the comparison is assigned to the red channel. +%% +%% `?GL_NONE': Specifies that the red channel should be assigned the appropriate value +%% from the currently bound texture. +%% +%% `?GL_TEXTURE_COMPARE_FUNC': Specifies the comparison operator used when `?GL_TEXTURE_COMPARE_MODE' +%% is set to `?GL_COMPARE_REF_TO_TEXTURE'. Permissible values are: +%%
+%% ` Texture Comparison Function '` Computed result '
`?GL_LEQUAL' result={1.0 0.0 &nbsp;&nbsp; r<=(D t) r>(D t))
`?GL_GEQUAL' +%% result={1.0 0.0 &nbsp;&nbsp; r>=(D t) r<(D t))
`?GL_LESS' result={1.0 0.0 &nbsp;&nbsp; r< +%% (D t) r>=(D t))
`?GL_GREATER' +%% result={1.0 0.0 &nbsp;&nbsp; r>(D t) r<=(D t))
`?GL_EQUAL' result={1.0 0.0 &nbsp;&nbsp; +%% r=(D t) r&ne;(D t))
`?GL_NOTEQUAL' +%% result={1.0 0.0 &nbsp;&nbsp; r&ne;(D t) r=(D t))
`?GL_ALWAYS' result= 1.0
+%% `?GL_NEVER' result= 0.0
where r is the current +%% interpolated texture coordinate, and D t is the texture value sampled from the currently +%% bound texture. result is assigned to R t. +%% +%% See external documentation. +-spec samplerParameteri(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: integer(). samplerParameteri(Sampler,Pname,Param) -> cast(5713, <>). -%% @spec (Sampler::integer(),Pname::enum(),Param::[integer()]) -> ok -%% @doc See external documentation. --spec samplerParameteriv(integer(),enum(),[integer()]) -> ok. +%% @doc +%% See {@link samplerParameteri/3} +-spec samplerParameteriv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [integer()]. samplerParameteriv(Sampler,Pname,Param) -> cast(5714, <> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>). -%% @spec (Sampler::integer(),Pname::enum(),Param::float()) -> ok -%% @doc See external documentation. --spec samplerParameterf(integer(),enum(),float()) -> ok. +%% @doc +%% See {@link samplerParameteri/3} +-spec samplerParameterf(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: float(). samplerParameterf(Sampler,Pname,Param) -> cast(5715, <>). -%% @spec (Sampler::integer(),Pname::enum(),Param::[float()]) -> ok -%% @doc See external documentation. --spec samplerParameterfv(integer(),enum(),[float()]) -> ok. +%% @doc +%% See {@link samplerParameteri/3} +-spec samplerParameterfv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [float()]. samplerParameterfv(Sampler,Pname,Param) -> cast(5716, <> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>). -%% @spec (Sampler::integer(),Pname::enum(),Param::[integer()]) -> ok -%% @doc See external documentation. --spec samplerParameterIiv(integer(),enum(),[integer()]) -> ok. +%% @doc +%% See {@link samplerParameteri/3} +-spec samplerParameterIiv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [integer()]. samplerParameterIiv(Sampler,Pname,Param) -> cast(5717, <> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>). -%% @spec (Sampler::integer(),Pname::enum(),Param::[integer()]) -> ok -%% @doc See external documentation. --spec samplerParameterIuiv(integer(),enum(),[integer()]) -> ok. +%% @doc glSamplerParameterI +%% +%% See external documentation. +-spec samplerParameterIuiv(Sampler, Pname, Param) -> ok when Sampler :: integer(),Pname :: enum(),Param :: [integer()]. samplerParameterIuiv(Sampler,Pname,Param) -> cast(5718, <> || C <- Param>>)/binary,0:(((1+length(Param)) rem 2)*32)>>). -%% @spec (Sampler::integer(),Pname::enum()) -> [integer()] -%% @doc See external documentation. --spec getSamplerParameteriv(integer(),enum()) -> [integer()]. +%% @doc Return sampler parameter values +%% +%% ``gl:getSamplerParameter'' returns in `Params' the value or values of the sampler +%% parameter specified as `Pname' . `Sampler' defines the target sampler, and must +%% be the name of an existing sampler object, returned from a previous call to {@link gl:genSamplers/1} +%% . `Pname' accepts the same symbols as {@link gl:samplerParameteri/3} , with the same +%% interpretations: +%% +%% `?GL_TEXTURE_MAG_FILTER': Returns the single-valued texture magnification filter, +%% a symbolic constant. The initial value is `?GL_LINEAR'. +%% +%% `?GL_TEXTURE_MIN_FILTER': Returns the single-valued texture minification filter, +%% a symbolic constant. The initial value is `?GL_NEAREST_MIPMAP_LINEAR'. +%% +%% `?GL_TEXTURE_MIN_LOD': Returns the single-valued texture minimum level-of-detail +%% value. The initial value is -1000. +%% +%% `?GL_TEXTURE_MAX_LOD': Returns the single-valued texture maximum level-of-detail +%% value. The initial value is 1000. +%% +%% `?GL_TEXTURE_WRAP_S': Returns the single-valued wrapping function for texture coordinate +%% s, a symbolic constant. The initial value is `?GL_REPEAT'. +%% +%% `?GL_TEXTURE_WRAP_T': Returns the single-valued wrapping function for texture coordinate +%% t, a symbolic constant. The initial value is `?GL_REPEAT'. +%% +%% `?GL_TEXTURE_WRAP_R': Returns the single-valued wrapping function for texture coordinate +%% r, a symbolic constant. The initial value is `?GL_REPEAT'. +%% +%% `?GL_TEXTURE_BORDER_COLOR': Returns four integer or floating-point numbers that +%% comprise the RGBA color of the texture border. Floating-point values are returned in the +%% range [0 1]. Integer values are returned as a linear mapping of the internal floating-point +%% representation such that 1.0 maps to the most positive representable integer and -1.0 +%% maps to the most negative representable integer. The initial value is (0, 0, 0, 0). +%% +%% `?GL_TEXTURE_COMPARE_MODE': Returns a single-valued texture comparison mode, a symbolic +%% constant. The initial value is `?GL_NONE'. See {@link gl:samplerParameteri/3} . +%% +%% `?GL_TEXTURE_COMPARE_FUNC': Returns a single-valued texture comparison function, +%% a symbolic constant. The initial value is `?GL_LEQUAL'. See {@link gl:samplerParameteri/3} +%% . +%% +%% See external documentation. +-spec getSamplerParameteriv(Sampler, Pname) -> [integer()] when Sampler :: integer(),Pname :: enum(). getSamplerParameteriv(Sampler,Pname) -> call(5719, <>). -%% @spec (Sampler::integer(),Pname::enum()) -> [integer()] -%% @doc See external documentation. --spec getSamplerParameterIiv(integer(),enum()) -> [integer()]. +%% @doc +%% See {@link getSamplerParameteriv/2} +-spec getSamplerParameterIiv(Sampler, Pname) -> [integer()] when Sampler :: integer(),Pname :: enum(). getSamplerParameterIiv(Sampler,Pname) -> call(5720, <>). -%% @spec (Sampler::integer(),Pname::enum()) -> [float()] -%% @doc See external documentation. --spec getSamplerParameterfv(integer(),enum()) -> [float()]. +%% @doc +%% See {@link getSamplerParameteriv/2} +-spec getSamplerParameterfv(Sampler, Pname) -> [float()] when Sampler :: integer(),Pname :: enum(). getSamplerParameterfv(Sampler,Pname) -> call(5721, <>). -%% @spec (Sampler::integer(),Pname::enum()) -> [integer()] -%% @doc See external documentation. --spec getSamplerParameterIuiv(integer(),enum()) -> [integer()]. +%% @doc glGetSamplerParameterI +%% +%% See external documentation. +-spec getSamplerParameterIuiv(Sampler, Pname) -> [integer()] when Sampler :: integer(),Pname :: enum(). getSamplerParameterIuiv(Sampler,Pname) -> call(5722, <>). -%% @spec (Id::integer(),Target::enum()) -> ok -%% @doc See external documentation. --spec queryCounter(integer(),enum()) -> ok. +%% @doc Record the GL time into a query object after all previous commands have reached the GL server but have not yet necessarily executed. +%% +%% ``gl:queryCounter'' causes the GL to record the current time into the query object named +%% `Id' . `Target' must be `?GL_TIMESTAMP'. The time is recorded after all +%% previous commands on the GL client and server state and the framebuffer have been fully +%% realized. When the time is recorded, the query result for that object is marked available. +%% ``gl:queryCounter'' timer queries can be used within a {@link gl:beginQuery/2} / {@link gl:beginQuery/2} +%% block where the target is `?GL_TIME_ELAPSED' and it does not affect the result of +%% that query object. +%% +%% See external documentation. +-spec queryCounter(Id, Target) -> ok when Id :: integer(),Target :: enum(). queryCounter(Id,Target) -> cast(5723, <>). -%% @spec (Id::integer(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getQueryObjecti64v(integer(),enum()) -> integer(). +%% @doc glGetQueryObjecti64v +%% +%% See external documentation. +-spec getQueryObjecti64v(Id, Pname) -> integer() when Id :: integer(),Pname :: enum(). getQueryObjecti64v(Id,Pname) -> call(5724, <>). -%% @spec (Id::integer(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getQueryObjectui64v(integer(),enum()) -> integer(). +%% @doc glGetQueryObjectui64v +%% +%% See external documentation. +-spec getQueryObjectui64v(Id, Pname) -> integer() when Id :: integer(),Pname :: enum(). getQueryObjectui64v(Id,Pname) -> call(5725, <>). -%% @spec (Mode::enum(),Indirect::offset()|mem()) -> ok -%% @doc See external documentation. --spec drawArraysIndirect(enum(),offset()|mem()) -> ok. +%% @doc Render primitives from array data, taking parameters from memory +%% +%% ``gl:drawArraysIndirect'' specifies multiple geometric primitives with very few subroutine +%% calls. ``gl:drawArraysIndirect'' behaves similarly to {@link gl:drawArraysInstancedBaseInstance/5} +%% , execept that the parameters to {@link gl:drawArraysInstancedBaseInstance/5} are stored +%% in memory at the address given by `Indirect' . +%% +%% The parameters addressed by `Indirect' are packed into a structure that takes the +%% form (in C): typedef struct { uint count; uint primCount; uint first; uint baseInstance; +%% } DrawArraysIndirectCommand; const DrawArraysIndirectCommand *cmd = (const DrawArraysIndirectCommand +%% *)indirect; glDrawArraysInstancedBaseInstance(mode, cmd->first, cmd->count, cmd->primCount, +%% cmd->baseInstance); +%% +%% If a buffer is bound to the `?GL_DRAW_INDIRECT_BUFFER' binding at the time of a +%% call to ``gl:drawArraysIndirect'', `Indirect' is interpreted as an offset, in basic +%% machine units, into that buffer and the parameter data is read from the buffer rather +%% than from client memory. +%% +%% In contrast to {@link gl:drawArraysInstancedBaseInstance/5} , the first member of the parameter +%% structure is unsigned, and out-of-range indices do not generate an error. +%% +%% Vertex attributes that are modified by ``gl:drawArraysIndirect'' have an unspecified +%% value after ``gl:drawArraysIndirect'' returns. Attributes that aren't modified remain +%% well defined. +%% +%% See external documentation. +-spec drawArraysIndirect(Mode, Indirect) -> ok when Mode :: enum(),Indirect :: offset()|mem(). drawArraysIndirect(Mode,Indirect) when is_integer(Indirect) -> cast(5726, <>); drawArraysIndirect(Mode,Indirect) -> send_bin(Indirect), cast(5727, <>). -%% @spec (Mode::enum(),Type::enum(),Indirect::offset()|mem()) -> ok -%% @doc See external documentation. --spec drawElementsIndirect(enum(),enum(),offset()|mem()) -> ok. +%% @doc Render indexed primitives from array data, taking parameters from memory +%% +%% ``gl:drawElementsIndirect'' specifies multiple indexed geometric primitives with very +%% few subroutine calls. ``gl:drawElementsIndirect'' behaves similarly to {@link gl:drawElementsInstancedBaseVertexBaseInstance/7} +%% , execpt that the parameters to {@link gl:drawElementsInstancedBaseVertexBaseInstance/7} +%% are stored in memory at the address given by `Indirect' . +%% +%% The parameters addressed by `Indirect' are packed into a structure that takes the +%% form (in C): typedef struct { uint count; uint primCount; uint firstIndex; uint baseVertex; +%% uint baseInstance; } DrawElementsIndirectCommand; +%% +%% ``gl:drawElementsIndirect'' is equivalent to: void glDrawElementsIndirect(GLenum mode, +%% GLenum type, const void * indirect) { const DrawElementsIndirectCommand *cmd = (const +%% DrawElementsIndirectCommand *)indirect; glDrawElementsInstancedBaseVertexBaseInstance(mode, +%% cmd->count, type, cmd->firstIndex + size-of-type, cmd->primCount, cmd->baseVertex, +%% cmd->baseInstance); } +%% +%% If a buffer is bound to the `?GL_DRAW_INDIRECT_BUFFER' binding at the time of a +%% call to ``gl:drawElementsIndirect'', `Indirect' is interpreted as an offset, in +%% basic machine units, into that buffer and the parameter data is read from the buffer rather +%% than from client memory. +%% +%% Note that indices stored in client memory are not supported. If no buffer is bound to +%% the `?GL_ELEMENT_ARRAY_BUFFER' binding, an error will be generated. +%% +%% The results of the operation are undefined if the reservedMustBeZero member of the parameter +%% structure is non-zero. However, no error is generated in this case. +%% +%% Vertex attributes that are modified by ``gl:drawElementsIndirect'' have an unspecified +%% value after ``gl:drawElementsIndirect'' returns. Attributes that aren't modified remain +%% well defined. +%% +%% See external documentation. +-spec drawElementsIndirect(Mode, Type, Indirect) -> ok when Mode :: enum(),Type :: enum(),Indirect :: offset()|mem(). drawElementsIndirect(Mode,Type,Indirect) when is_integer(Indirect) -> cast(5728, <>); drawElementsIndirect(Mode,Type,Indirect) -> send_bin(Indirect), cast(5729, <>). -%% @spec (Location::integer(),X::float()) -> ok -%% @doc See external documentation. --spec uniform1d(integer(),float()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform1d(Location, X) -> ok when Location :: integer(),X :: float(). uniform1d(Location,X) -> cast(5730, <>). -%% @spec (Location::integer(),X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec uniform2d(integer(),float(),float()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform2d(Location, X, Y) -> ok when Location :: integer(),X :: float(),Y :: float(). uniform2d(Location,X,Y) -> cast(5731, <>). -%% @spec (Location::integer(),X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec uniform3d(integer(),float(),float(),float()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform3d(Location, X, Y, Z) -> ok when Location :: integer(),X :: float(),Y :: float(),Z :: float(). uniform3d(Location,X,Y,Z) -> cast(5732, <>). -%% @spec (Location::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec uniform4d(integer(),float(),float(),float(),float()) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform4d(Location, X, Y, Z, W) -> ok when Location :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float(). uniform4d(Location,X,Y,Z,W) -> cast(5733, <>). -%% @spec (Location::integer(),Value::[float()]) -> ok -%% @doc See external documentation. --spec uniform1dv(integer(),[float()]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform1dv(Location, Value) -> ok when Location :: integer(),Value :: [float()]. uniform1dv(Location,Value) -> cast(5734, <> || C <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{float(),float()}]) -> ok -%% @doc See external documentation. --spec uniform2dv(integer(),[{float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform2dv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float()}]. uniform2dv(Location,Value) -> cast(5735, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniform3dv(integer(),[{float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform3dv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float()}]. uniform3dv(Location,Value) -> cast(5736, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniform4dv(integer(),[{float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniform4dv(Location, Value) -> ok when Location :: integer(),Value :: [{float(),float(),float(),float()}]. uniform4dv(Location,Value) -> cast(5737, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix2dv(integer(),0|1,[{float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix2dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}]. uniformMatrix2dv(Location,Transpose,Value) -> cast(5738, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix3dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix3dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix3dv(Location,Transpose,Value) -> cast(5739, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix4dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix4dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix4dv(Location,Transpose,Value) -> cast(5740, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix2x3dv(integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix2x3dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}]. uniformMatrix2x3dv(Location,Transpose,Value) -> cast(5741, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix2x4dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix2x4dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix2x4dv(Location,Transpose,Value) -> cast(5742, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix3x2dv(integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix3x2dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}]. uniformMatrix3x2dv(Location,Transpose,Value) -> cast(5743, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix3x4dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix3x4dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix3x4dv(Location,Transpose,Value) -> cast(5744, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix4x2dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix4x2dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix4x2dv(Location,Transpose,Value) -> cast(5745, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec uniformMatrix4x3dv(integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link uniform1f/2} +-spec uniformMatrix4x3dv(Location, Transpose, Value) -> ok when Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. uniformMatrix4x3dv(Location,Transpose,Value) -> cast(5746, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()} -%% @doc See external documentation. --spec getUniformdv(integer(),integer()) -> {float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}. +%% @doc +%% See {@link getUniformfv/2} +-spec getUniformdv(Program, Location) -> matrix() when Program :: integer(),Location :: integer(). getUniformdv(Program,Location) -> call(5747, <>). -%% @spec (Program::integer(),Shadertype::enum(),Name::string()) -> integer() -%% @doc See external documentation. --spec getSubroutineUniformLocation(integer(),enum(),string()) -> integer(). +%% @doc Retrieve the location of a subroutine uniform of a given shader stage within a program +%% +%% ``gl:getSubroutineUniformLocation'' returns the location of the subroutine uniform variable +%% `Name' in the shader stage of type `Shadertype' attached to `Program' , +%% with behavior otherwise identical to {@link gl:getUniformLocation/2} . +%% +%% If `Name' is not the name of a subroutine uniform in the shader stage, -1 is returned, +%% but no error is generated. If `Name' is the name of a subroutine uniform in the shader +%% stage, a value between zero and the value of `?GL_ACTIVE_SUBROUTINE_LOCATIONS' minus +%% one will be returned. Subroutine locations are assigned using consecutive integers in +%% the range from zero to the value of `?GL_ACTIVE_SUBROUTINE_LOCATIONS' minus one for +%% the shader stage. For active subroutine uniforms declared as arrays, the declared array +%% elements are assigned consecutive locations. +%% +%% See external documentation. +-spec getSubroutineUniformLocation(Program, Shadertype, Name) -> integer() when Program :: integer(),Shadertype :: enum(),Name :: string(). getSubroutineUniformLocation(Program,Shadertype,Name) -> call(5748, <>). -%% @spec (Program::integer(),Shadertype::enum(),Name::string()) -> integer() -%% @doc See external documentation. --spec getSubroutineIndex(integer(),enum(),string()) -> integer(). +%% @doc Retrieve the index of a subroutine uniform of a given shader stage within a program +%% +%% ``gl:getSubroutineIndex'' returns the index of a subroutine uniform within a shader +%% stage attached to a program object. `Program' contains the name of the program to +%% which the shader is attached. `Shadertype' specifies the stage from which to query +%% shader subroutine index. `Name' contains the null-terminated name of the subroutine +%% uniform whose name to query. +%% +%% If `Name' is not the name of a subroutine uniform in the shader stage, `?GL_INVALID_INDEX' +%% is returned, but no error is generated. If `Name' is the name of a subroutine uniform +%% in the shader stage, a value between zero and the value of `?GL_ACTIVE_SUBROUTINES' +%% minus one will be returned. Subroutine indices are assigned using consecutive integers +%% in the range from zero to the value of `?GL_ACTIVE_SUBROUTINES' minus one for the +%% shader stage. +%% +%% See external documentation. +-spec getSubroutineIndex(Program, Shadertype, Name) -> integer() when Program :: integer(),Shadertype :: enum(),Name :: string(). getSubroutineIndex(Program,Shadertype,Name) -> call(5749, <>). -%% @spec (Program::integer(),Shadertype::enum(),Index::integer(),Bufsize::integer()) -> string() -%% @doc See external documentation. --spec getActiveSubroutineUniformName(integer(),enum(),integer(),integer()) -> string(). +%% @doc Query the name of an active shader subroutine uniform +%% +%% ``gl:getActiveSubroutineUniformName'' retrieves the name of an active shader subroutine +%% uniform. `Program' contains the name of the program containing the uniform. `Shadertype' +%% specifies the stage for which which the uniform location, given by `Index' , is valid. +%% `Index' must be between zero and the value of `?GL_ACTIVE_SUBROUTINE_UNIFORMS' +%% minus one for the shader stage. +%% +%% The uniform name is returned as a null-terminated string in `Name' . The actual number +%% of characters written into `Name' , excluding the null terminator is returned in `Length' +%% . If `Length' is `?NULL', no length is returned. The maximum number of characters +%% that may be written into `Name' , including the null terminator, is specified by `Bufsize' +%% . The length of the longest subroutine uniform name in `Program' and `Shadertype' +%% is given by the value of `?GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH', which can be +%% queried with {@link gl:getProgramStageiv/3} . +%% +%% See external documentation. +-spec getActiveSubroutineUniformName(Program, Shadertype, Index, Bufsize) -> string() when Program :: integer(),Shadertype :: enum(),Index :: integer(),Bufsize :: integer(). getActiveSubroutineUniformName(Program,Shadertype,Index,Bufsize) -> call(5750, <>). -%% @spec (Program::integer(),Shadertype::enum(),Index::integer(),Bufsize::integer()) -> string() -%% @doc See external documentation. --spec getActiveSubroutineName(integer(),enum(),integer(),integer()) -> string(). +%% @doc Query the name of an active shader subroutine +%% +%% ``gl:getActiveSubroutineName'' queries the name of an active shader subroutine uniform +%% from the program object given in `Program' . `Index' specifies the index of the +%% shader subroutine uniform within the shader stage given by `Stage' , and must between +%% zero and the value of `?GL_ACTIVE_SUBROUTINES' minus one for the shader stage. +%% +%% The name of the selected subroutine is returned as a null-terminated string in `Name' +%% . The actual number of characters written into `Name' , not including the null-terminator, +%% is is returned in `Length' . If `Length' is `?NULL', no length is returned. +%% The maximum number of characters that may be written into `Name' , including the null-terminator, +%% is given in `Bufsize' . +%% +%% See external documentation. +-spec getActiveSubroutineName(Program, Shadertype, Index, Bufsize) -> string() when Program :: integer(),Shadertype :: enum(),Index :: integer(),Bufsize :: integer(). getActiveSubroutineName(Program,Shadertype,Index,Bufsize) -> call(5751, <>). -%% @spec (Shadertype::enum(),Indices::[integer()]) -> ok -%% @doc See external documentation. --spec uniformSubroutinesuiv(enum(),[integer()]) -> ok. +%% @doc Load active subroutine uniforms +%% +%% ``gl:uniformSubroutines'' loads all active subroutine uniforms for shader stage `Shadertype' +%% of the current program with subroutine indices from `Indices' , storing `Indices[i]' +%% into the uniform at location `I' . `Count' must be equal to the value of `?GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS' +%% for the program currently in use at shader stage `Shadertype' . Furthermore, all +%% values in `Indices' must be less than the value of `?GL_ACTIVE_SUBROUTINES' +%% for the shader stage. +%% +%% See external documentation. +-spec uniformSubroutinesuiv(Shadertype, Indices) -> ok when Shadertype :: enum(),Indices :: [integer()]. uniformSubroutinesuiv(Shadertype,Indices) -> cast(5752, <> || C <- Indices>>)/binary,0:(((length(Indices)) rem 2)*32)>>). -%% @spec (Shadertype::enum(),Location::integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} -%% @doc See external documentation. --spec getUniformSubroutineuiv(enum(),integer()) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()}. +%% @doc Retrieve the value of a subroutine uniform of a given shader stage of the current program +%% +%% ``gl:getUniformSubroutine'' retrieves the value of the subroutine uniform at location `Location' +%% for shader stage `Shadertype' of the current program. `Location' must be less +%% than the value of `?GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS' for the shader currently +%% in use at shader stage `Shadertype' . The value of the subroutine uniform is returned +%% in `Values' . +%% +%% See external documentation. +-spec getUniformSubroutineuiv(Shadertype, Location) -> {integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer(),integer()} when Shadertype :: enum(),Location :: integer(). getUniformSubroutineuiv(Shadertype,Location) -> call(5753, <>). -%% @spec (Program::integer(),Shadertype::enum(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getProgramStageiv(integer(),enum(),enum()) -> integer(). +%% @doc Retrieve properties of a program object corresponding to a specified shader stage +%% +%% ``gl:getProgramStage'' queries a parameter of a shader stage attached to a program object. +%% `Program' contains the name of the program to which the shader is attached. `Shadertype' +%% specifies the stage from which to query the parameter. `Pname' specifies which parameter +%% should be queried. The value or values of the parameter to be queried is returned in the +%% variable whose address is given in `Values' . +%% +%% If `Pname' is `?GL_ACTIVE_SUBROUTINE_UNIFORMS', the number of active subroutine +%% variables in the stage is returned in `Values' . +%% +%% If `Pname' is `?GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS', the number of active +%% subroutine variable locations in the stage is returned in `Values' . +%% +%% If `Pname' is `?GL_ACTIVE_SUBROUTINES', the number of active subroutines in +%% the stage is returned in `Values' . +%% +%% If `Pname' is `?GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH', the length of the +%% longest subroutine uniform for the stage is returned in `Values' . +%% +%% If `Pname' is `?GL_ACTIVE_SUBROUTINE_MAX_LENGTH', the length of the longest +%% subroutine name for the stage is returned in `Values' . The returned name length includes +%% space for the null-terminator. +%% +%% If there is no shader present of type `Shadertype' , the returned value will be consistent +%% with a shader containing no subroutines or subroutine uniforms. +%% +%% See external documentation. +-spec getProgramStageiv(Program, Shadertype, Pname) -> integer() when Program :: integer(),Shadertype :: enum(),Pname :: enum(). getProgramStageiv(Program,Shadertype,Pname) -> call(5754, <>). -%% @spec (Pname::enum(),Value::integer()) -> ok -%% @doc See external documentation. --spec patchParameteri(enum(),integer()) -> ok. +%% @doc Specifies the parameters for patch primitives +%% +%% ``gl:patchParameter'' specifies the parameters that will be used for patch primitives. `Pname' +%% specifies the parameter to modify and must be either `?GL_PATCH_VERTICES', `?GL_PATCH_DEFAULT_OUTER_LEVEL' +%% or `?GL_PATCH_DEFAULT_INNER_LEVEL'. For ``gl:patchParameteri'', `Value' specifies +%% the new value for the parameter specified by `Pname' . For ``gl:patchParameterfv'', +%% `Values' specifies the address of an array containing the new values for the parameter +%% specified by `Pname' . +%% +%% When `Pname' is `?GL_PATCH_VERTICES', `Value' specifies the number of +%% vertices that will be used to make up a single patch primitive. Patch primitives are consumed +%% by the tessellation control shader (if present) and subsequently used for tessellation. +%% When primitives are specified using {@link gl:drawArrays/3} or a similar function, each +%% patch will be made from `Parameter' control points, each represented by a vertex +%% taken from the enabeld vertex arrays. `Parameter' must be greater than zero, and +%% less than or equal to the value of `?GL_MAX_PATCH_VERTICES'. +%% +%% When `Pname' is `?GL_PATCH_DEFAULT_OUTER_LEVEL' or `?GL_PATCH_DEFAULT_INNER_LEVEL' +%% , `Values' contains the address of an array contiaining the default outer or inner +%% tessellation levels, respectively, to be used when no tessellation control shader is present. +%% +%% +%% See external documentation. +-spec patchParameteri(Pname, Value) -> ok when Pname :: enum(),Value :: integer(). patchParameteri(Pname,Value) -> cast(5755, <>). -%% @spec (Pname::enum(),Values::[float()]) -> ok -%% @doc See external documentation. --spec patchParameterfv(enum(),[float()]) -> ok. +%% @doc +%% See {@link patchParameteri/2} +-spec patchParameterfv(Pname, Values) -> ok when Pname :: enum(),Values :: [float()]. patchParameterfv(Pname,Values) -> cast(5756, <> || C <- Values>>)/binary,0:(((length(Values)) rem 2)*32)>>). -%% @spec (Target::enum(),Id::integer()) -> ok -%% @doc See external documentation. --spec bindTransformFeedback(enum(),integer()) -> ok. +%% @doc Bind a transform feedback object +%% +%% ``gl:bindTransformFeedback'' binds the transform feedback object with name `Id' +%% to the current GL state. `Id' must be a name previously returned from a call to {@link gl:genTransformFeedbacks/1} +%% . If `Id' has not previously been bound, a new transform feedback object with name `Id' +%% and initialized with with the default transform state vector is created. +%% +%% In the initial state, a default transform feedback object is bound and treated as a transform +%% feedback object with a name of zero. If the name zero is subsequently bound, the default +%% transform feedback object is again bound to the GL state. +%% +%% While a transform feedback buffer object is bound, GL operations on the target to which +%% it is bound affect the bound transform feedback object, and queries of the target to which +%% a transform feedback object is bound return state from the bound object. When buffer objects +%% are bound for transform feedback, they are attached to the currently bound transform feedback +%% object. Buffer objects are used for trans- form feedback only if they are attached to +%% the currently bound transform feedback object. +%% +%% See external documentation. +-spec bindTransformFeedback(Target, Id) -> ok when Target :: enum(),Id :: integer(). bindTransformFeedback(Target,Id) -> cast(5757, <>). -%% @spec (Ids::[integer()]) -> ok -%% @doc See external documentation. --spec deleteTransformFeedbacks([integer()]) -> ok. +%% @doc Delete transform feedback objects +%% +%% ``gl:deleteTransformFeedbacks'' deletes the `N' transform feedback objects whose +%% names are stored in the array `Ids' . Unused names in `Ids' are ignored, as is +%% the name zero. After a transform feedback object is deleted, its name is again unused +%% and it has no contents. If an active transform feedback object is deleted, its name immediately +%% becomes unused, but the underlying object is not deleted until it is no longer active. +%% +%% See external documentation. +-spec deleteTransformFeedbacks(Ids) -> ok when Ids :: [integer()]. deleteTransformFeedbacks(Ids) -> cast(5758, <<(length(Ids)):?GLuint, (<< <> || C <- Ids>>)/binary,0:(((1+length(Ids)) rem 2)*32)>>). -%% @spec (N::integer()) -> [integer()] -%% @doc See external documentation. --spec genTransformFeedbacks(integer()) -> [integer()]. +%% @doc Reserve transform feedback object names +%% +%% ``gl:genTransformFeedbacks'' returns `N' previously unused transform feedback object +%% names in `Ids' . These names are marked as used, for the purposes of ``gl:genTransformFeedbacks'' +%% only, but they acquire transform feedback state only when they are first bound. +%% +%% See external documentation. +-spec genTransformFeedbacks(N) -> [integer()] when N :: integer(). genTransformFeedbacks(N) -> call(5759, <>). -%% @spec (Id::integer()) -> 0|1 -%% @doc See external documentation. --spec isTransformFeedback(integer()) -> 0|1. +%% @doc Determine if a name corresponds to a transform feedback object +%% +%% ``gl:isTransformFeedback'' returns `?GL_TRUE' if `Id' is currently the name +%% of a transform feedback object. If `Id' is zero, or if `?id' is not the name +%% of a transform feedback object, or if an error occurs, ``gl:isTransformFeedback'' returns +%% `?GL_FALSE'. If `Id' is a name returned by {@link gl:genTransformFeedbacks/1} , +%% but that has not yet been bound through a call to {@link gl:bindTransformFeedback/2} , then +%% the name is not a transform feedback object and ``gl:isTransformFeedback'' returns `?GL_FALSE' +%% . +%% +%% See external documentation. +-spec isTransformFeedback(Id) -> 0|1 when Id :: integer(). isTransformFeedback(Id) -> call(5760, <>). -%% @spec () -> ok -%% @doc See external documentation. +%% @doc Pause transform feedback operations +%% +%% ``gl:pauseTransformFeedback'' pauses transform feedback operations on the currently +%% active transform feedback object. When transform feedback operations are paused, transform +%% feedback is still considered active and changing most transform feedback state related +%% to the object results in an error. However, a new transform feedback object may be bound +%% while transform feedback is paused. +%% +%% See external documentation. -spec pauseTransformFeedback() -> ok. pauseTransformFeedback() -> cast(5761, <<>>). -%% @spec () -> ok -%% @doc See external documentation. +%% @doc Resume transform feedback operations +%% +%% ``gl:resumeTransformFeedback'' resumes transform feedback operations on the currently +%% active transform feedback object. When transform feedback operations are paused, transform +%% feedback is still considered active and changing most transform feedback state related +%% to the object results in an error. However, a new transform feedback object may be bound +%% while transform feedback is paused. +%% +%% See external documentation. -spec resumeTransformFeedback() -> ok. resumeTransformFeedback() -> cast(5762, <<>>). -%% @spec (Mode::enum(),Id::integer()) -> ok -%% @doc See external documentation. --spec drawTransformFeedback(enum(),integer()) -> ok. +%% @doc Render primitives using a count derived from a transform feedback object +%% +%% ``gl:drawTransformFeedback'' draws primitives of a type specified by `Mode' using +%% a count retrieved from the transform feedback specified by `Id' . Calling ``gl:drawTransformFeedback'' +%% is equivalent to calling {@link gl:drawArrays/3} with `Mode' as specified, `First' +%% set to zero, and `Count' set to the number of vertices captured on vertex stream +%% zero the last time transform feedback was active on the transform feedback object named +%% by `Id' . +%% +%% See external documentation. +-spec drawTransformFeedback(Mode, Id) -> ok when Mode :: enum(),Id :: integer(). drawTransformFeedback(Mode,Id) -> cast(5763, <>). -%% @spec (Mode::enum(),Id::integer(),Stream::integer()) -> ok -%% @doc See external documentation. --spec drawTransformFeedbackStream(enum(),integer(),integer()) -> ok. +%% @doc Render primitives using a count derived from a specifed stream of a transform feedback object +%% +%% ``gl:drawTransformFeedbackStream'' draws primitives of a type specified by `Mode' +%% using a count retrieved from the transform feedback stream specified by `Stream' +%% of the transform feedback object specified by `Id' . Calling ``gl:drawTransformFeedbackStream'' +%% is equivalent to calling {@link gl:drawArrays/3} with `Mode' as specified, `First' +%% set to zero, and `Count' set to the number of vertices captured on vertex stream `Stream' +%% the last time transform feedback was active on the transform feedback object named by `Id' +%% . +%% +%% Calling {@link gl:drawTransformFeedback/2} is equivalent to calling ``gl:drawTransformFeedbackStream'' +%% with `Stream' set to zero. +%% +%% See external documentation. +-spec drawTransformFeedbackStream(Mode, Id, Stream) -> ok when Mode :: enum(),Id :: integer(),Stream :: integer(). drawTransformFeedbackStream(Mode,Id,Stream) -> cast(5764, <>). -%% @spec (Target::enum(),Index::integer(),Id::integer()) -> ok -%% @doc See external documentation. --spec beginQueryIndexed(enum(),integer(),integer()) -> ok. +%% @doc glBeginQueryIndexe +%% +%% See external documentation. +-spec beginQueryIndexed(Target, Index, Id) -> ok when Target :: enum(),Index :: integer(),Id :: integer(). beginQueryIndexed(Target,Index,Id) -> cast(5765, <>). -%% @spec (Target::enum(),Index::integer()) -> ok -%% @doc See external documentation. --spec endQueryIndexed(enum(),integer()) -> ok. +%% @doc Delimit the boundaries of a query object on an indexed target +%% +%% ``gl:beginQueryIndexed'' and {@link gl:endQueryIndexed/2} delimit the boundaries of a +%% query object. `Query' must be a name previously returned from a call to {@link gl:genQueries/1} +%% . If a query object with name `Id' does not yet exist it is created with the type +%% determined by `Target' . `Target' must be one of `?GL_SAMPLES_PASSED', `?GL_ANY_SAMPLES_PASSED' +%% , `?GL_PRIMITIVES_GENERATED', `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN', or `?GL_TIME_ELAPSED' +%% . The behavior of the query object depends on its type and is as follows. +%% +%% `Index' specifies the index of the query target and must be between a `Target' -specific +%% maximum. +%% +%% If `Target' is `?GL_SAMPLES_PASSED', `Id' must be an unused name, or the +%% name of an existing occlusion query object. When ``gl:beginQueryIndexed'' is executed, +%% the query object's samples-passed counter is reset to 0. Subsequent rendering will increment +%% the counter for every sample that passes the depth test. If the value of `?GL_SAMPLE_BUFFERS' +%% is 0, then the samples-passed count is incremented by 1 for each fragment. If the value +%% of `?GL_SAMPLE_BUFFERS' is 1, then the samples-passed count is incremented by the +%% number of samples whose coverage bit is set. However, implementations, at their discression +%% may instead increase the samples-passed count by the value of `?GL_SAMPLES' if any +%% sample in the fragment is covered. When ``gl:endQueryIndexed'' is executed, the samples-passed +%% counter is assigned to the query object's result value. This value can be queried by calling +%% {@link gl:getQueryObjectiv/2} with `Pname' `?GL_QUERY_RESULT'. When `Target' +%% is `?GL_SAMPLES_PASSED', `Index' must be zero. +%% +%% If `Target' is `?GL_ANY_SAMPLES_PASSED', `Id' must be an unused name, +%% or the name of an existing boolean occlusion query object. When ``gl:beginQueryIndexed'' +%% is executed, the query object's samples-passed flag is reset to `?GL_FALSE'. Subsequent +%% rendering causes the flag to be set to `?GL_TRUE' if any sample passes the depth +%% test. When ``gl:endQueryIndexed'' is executed, the samples-passed flag is assigned to +%% the query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2} +%% with `Pname' `?GL_QUERY_RESULT'. When `Target' is `?GL_ANY_SAMPLES_PASSED' +%% , `Index' must be zero. +%% +%% If `Target' is `?GL_PRIMITIVES_GENERATED', `Id' must be an unused name, +%% or the name of an existing primitive query object previously bound to the `?GL_PRIMITIVES_GENERATED' +%% query binding. When ``gl:beginQueryIndexed'' is executed, the query object's primitives-generated +%% counter is reset to 0. Subsequent rendering will increment the counter once for every +%% vertex that is emitted from the geometry shader to the stream given by `Index' , or +%% from the vertex shader if `Index' is zero and no geometry shader is present. When ``gl:endQueryIndexed'' +%% is executed, the primitives-generated counter for stream `Index' is assigned to +%% the query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2} +%% with `Pname' `?GL_QUERY_RESULT'. When `Target' is `?GL_PRIMITIVES_GENERATED' +%% , `Index' must be less than the value of `?GL_MAX_VERTEX_STREAMS'. +%% +%% If `Target' is `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN', `Id' must +%% be an unused name, or the name of an existing primitive query object previously bound +%% to the `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN' query binding. When ``gl:beginQueryIndexed'' +%% is executed, the query object's primitives-written counter for the stream specified by `Index' +%% is reset to 0. Subsequent rendering will increment the counter once for every vertex +%% that is written into the bound transform feedback buffer(s) for stream `Index' . If +%% transform feedback mode is not activated between the call to ``gl:beginQueryIndexed'' +%% and ``gl:endQueryIndexed'', the counter will not be incremented. When ``gl:endQueryIndexed'' +%% is executed, the primitives-written counter for stream `Index' is assigned to the +%% query object's result value. This value can be queried by calling {@link gl:getQueryObjectiv/2} +%% with `Pname' `?GL_QUERY_RESULT'. When `Target' is `?GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN' +%% , `Index' must be less than the value of `?GL_MAX_VERTEX_STREAMS'. +%% +%% If `Target' is `?GL_TIME_ELAPSED', `Id' must be an unused name, or the +%% name of an existing timer query object previously bound to the `?GL_TIME_ELAPSED' +%% query binding. When ``gl:beginQueryIndexed'' is executed, the query object's time counter +%% is reset to 0. When ``gl:endQueryIndexed'' is executed, the elapsed server time that +%% has passed since the call to ``gl:beginQueryIndexed'' is written into the query object's +%% time counter. This value can be queried by calling {@link gl:getQueryObjectiv/2} with `Pname' +%% `?GL_QUERY_RESULT'. When `Target' is `?GL_TIME_ELAPSED', `Index' must +%% be zero. +%% +%% Querying the `?GL_QUERY_RESULT' implicitly flushes the GL pipeline until the rendering +%% delimited by the query object has completed and the result is available. `?GL_QUERY_RESULT_AVAILABLE' +%% can be queried to determine if the result is immediately available or if the rendering +%% is not yet complete. +%% +%% See external documentation. +-spec endQueryIndexed(Target, Index) -> ok when Target :: enum(),Index :: integer(). endQueryIndexed(Target,Index) -> cast(5766, <>). -%% @spec (Target::enum(),Index::integer(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getQueryIndexediv(enum(),integer(),enum()) -> integer(). +%% @doc Return parameters of an indexed query object target +%% +%% ``gl:getQueryIndexediv'' returns in `Params' a selected parameter of the indexed +%% query object target specified by `Target' and `Index' . `Index' specifies +%% the index of the query object target and must be between zero and a target-specific maxiumum. +%% +%% +%% `Pname' names a specific query object target parameter. When `Pname' is `?GL_CURRENT_QUERY' +%% , the name of the currently active query for the specified `Index' of `Target' , +%% or zero if no query is active, will be placed in `Params' . If `Pname' is `?GL_QUERY_COUNTER_BITS' +%% , the implementation-dependent number of bits used to hold the result of queries for `Target' +%% is returned in `Params' . +%% +%% See external documentation. +-spec getQueryIndexediv(Target, Index, Pname) -> integer() when Target :: enum(),Index :: integer(),Pname :: enum(). getQueryIndexediv(Target,Index,Pname) -> call(5767, <>). -%% @spec () -> ok -%% @doc See external documentation. +%% @doc Release resources consumed by the implementation's shader compiler +%% +%% ``gl:releaseShaderCompiler'' provides a hint to the implementation that it may free +%% internal resources associated with its shader compiler. {@link gl:compileShader/1} may +%% subsequently be called and the implementation may at that time reallocate resources previously +%% freed by the call to ``gl:releaseShaderCompiler''. +%% +%% See external documentation. -spec releaseShaderCompiler() -> ok. releaseShaderCompiler() -> cast(5768, <<>>). -%% @spec (Shaders::[integer()],Binaryformat::enum(),Binary::binary()) -> ok -%% @doc See external documentation. --spec shaderBinary([integer()],enum(),binary()) -> ok. +%% @doc Load pre-compiled shader binaries +%% +%% ``gl:shaderBinary'' loads pre-compiled shader binary code into the `Count' shader +%% objects whose handles are given in `Shaders' . `Binary' points to `Length' +%% bytes of binary shader code stored in client memory. `BinaryFormat' specifies the +%% format of the pre-compiled code. +%% +%% The binary image contained in `Binary' will be decoded according to the extension +%% specification defining the specified `BinaryFormat' token. OpenGL does not define +%% any specific binary formats, but it does provide a mechanism to obtain token vaues for +%% such formats provided by such extensions. +%% +%% Depending on the types of the shader objects in `Shaders' , ``gl:shaderBinary'' +%% will individually load binary vertex or fragment shaders, or load an executable binary +%% that contains an optimized pair of vertex and fragment shaders stored in the same binary. +%% +%% +%% See external documentation. +-spec shaderBinary(Shaders, Binaryformat, Binary) -> ok when Shaders :: [integer()],Binaryformat :: enum(),Binary :: binary(). shaderBinary(Shaders,Binaryformat,Binary) -> send_bin(Binary), cast(5769, <<(length(Shaders)):?GLuint, (<< <> || C <- Shaders>>)/binary,0:(((1+length(Shaders)) rem 2)*32),Binaryformat:?GLenum>>). -%% @spec (Shadertype::enum(),Precisiontype::enum()) -> {Range::{integer(),integer()},Precision::integer()} -%% @doc See external documentation. --spec getShaderPrecisionFormat(enum(),enum()) -> {{integer(),integer()},integer()}. +%% @doc Retrieve the range and precision for numeric formats supported by the shader compiler +%% +%% ``gl:getShaderPrecisionFormat'' retrieves the numeric range and precision for the implementation's +%% representation of quantities in different numeric formats in specified shader type. `ShaderType' +%% specifies the type of shader for which the numeric precision and range is to be retrieved +%% and must be one of `?GL_VERTEX_SHADER' or `?GL_FRAGMENT_SHADER'. `PrecisionType' +%% specifies the numeric format to query and must be one of `?GL_LOW_FLOAT', `?GL_MEDIUM_FLOAT' +%% `?GL_HIGH_FLOAT', `?GL_LOW_INT', `?GL_MEDIUM_INT', or `?GL_HIGH_INT'. +%% +%% +%% `Range' points to an array of two integers into which the format's numeric range +%% will be returned. If min and max are the smallest values representable in the format, +%% then the values returned are defined to be: `Range' [0] = floor(log2(|min|)) and `Range' +%% [1] = floor(log2(|max|)). +%% +%% `Precision' specifies the address of an integer into which will be written the log2 +%% value of the number of bits of precision of the format. If the smallest representable +%% value greater than 1 is 1 + `eps', then the integer addressed by `Precision' +%% will contain floor(-log2(eps)). +%% +%% See external documentation. +-spec getShaderPrecisionFormat(Shadertype, Precisiontype) -> {Range :: {integer(),integer()},Precision :: integer()} when Shadertype :: enum(),Precisiontype :: enum(). getShaderPrecisionFormat(Shadertype,Precisiontype) -> call(5770, <>). -%% @spec (N::clamp(),F::clamp()) -> ok -%% @doc See external documentation. --spec depthRangef(clamp(),clamp()) -> ok. +%% @doc +%% See {@link depthRange/2} +-spec depthRangef(N, F) -> ok when N :: clamp(),F :: clamp(). depthRangef(N,F) -> cast(5771, <>). -%% @spec (D::clamp()) -> ok -%% @doc See external documentation. --spec clearDepthf(clamp()) -> ok. +%% @doc glClearDepthf +%% +%% See external documentation. +-spec clearDepthf(D) -> ok when D :: clamp(). clearDepthf(D) -> cast(5772, <>). -%% @spec (Program::integer(),BufSize::integer()) -> {BinaryFormat::enum(),Binary::binary()} -%% @doc See external documentation. --spec getProgramBinary(integer(),integer()) -> {enum(),binary()}. +%% @doc Return a binary representation of a program object's compiled and linked executable source +%% +%% ``gl:getProgramBinary'' returns a binary representation of the compiled and linked executable +%% for `Program' into the array of bytes whose address is specified in `Binary' . +%% The maximum number of bytes that may be written into `Binary' is specified by `BufSize' +%% . If the program binary is greater in size than `BufSize' bytes, then an error is +%% generated, otherwise the actual number of bytes written into `Binary' is returned +%% in the variable whose address is given by `Length' . If `Length' is `?NULL', +%% then no length is returned. +%% +%% The format of the program binary written into `Binary' is returned in the variable +%% whose address is given by `BinaryFormat' , and may be implementation dependent. The +%% binary produced by the GL may subsequently be returned to the GL by calling {@link gl:programBinary/3} +%% , with `BinaryFormat' and `Length' set to the values returned by ``gl:getProgramBinary'' +%% , and passing the returned binary data in the `Binary' parameter. +%% +%% See external documentation. +-spec getProgramBinary(Program, BufSize) -> {BinaryFormat :: enum(),Binary :: binary()} when Program :: integer(),BufSize :: integer(). getProgramBinary(Program,BufSize) -> call(5773, <>). -%% @spec (Program::integer(),BinaryFormat::enum(),Binary::binary()) -> ok -%% @doc See external documentation. --spec programBinary(integer(),enum(),binary()) -> ok. +%% @doc Load a program object with a program binary +%% +%% ``gl:programBinary'' loads a program object with a program binary previously returned +%% from {@link gl:getProgramBinary/2} . `BinaryFormat' and `Binary' must be those +%% returned by a previous call to {@link gl:getProgramBinary/2} , and `Length' must be +%% the length returned by {@link gl:getProgramBinary/2} , or by {@link gl:getProgramiv/2} when +%% called with `Pname' set to `?GL_PROGRAM_BINARY_LENGTH'. If these conditions +%% are not met, loading the program binary will fail and `Program' 's `?GL_LINK_STATUS' +%% will be set to `?GL_FALSE'. +%% +%% A program object's program binary is replaced by calls to {@link gl:linkProgram/1} or ``gl:programBinary'' +%% . When linking success or failure is concerned, ``gl:programBinary'' can be considered +%% to perform an implicit linking operation. {@link gl:linkProgram/1} and ``gl:programBinary'' +%% both set the program object's `?GL_LINK_STATUS' to `?GL_TRUE' or `?GL_FALSE' +%% . +%% +%% A successful call to ``gl:programBinary'' will reset all uniform variables to their +%% initial values. The initial value is either the value of the variable's initializer as +%% specified in the original shader source, or zero if no initializer was present. Additionally, +%% all vertex shader input and fragment shader output assignments that were in effect when +%% the program was linked before saving are restored with ``gl:programBinary'' is called. +%% +%% See external documentation. +-spec programBinary(Program, BinaryFormat, Binary) -> ok when Program :: integer(),BinaryFormat :: enum(),Binary :: binary(). programBinary(Program,BinaryFormat,Binary) -> send_bin(Binary), cast(5774, <>). -%% @spec (Program::integer(),Pname::enum(),Value::integer()) -> ok -%% @doc See external documentation. --spec programParameteri(integer(),enum(),integer()) -> ok. +%% @doc Specify a parameter for a program object +%% +%% ``gl:programParameter'' specifies a new value for the parameter nameed by `Pname' +%% for the program object `Program' . +%% +%% If `Pname' is `?GL_PROGRAM_BINARY_RETRIEVABLE_HINT', `Value' should be `?GL_FALSE' +%% or `?GL_TRUE' to indicate to the implementation the intention of the application +%% to retrieve the program's binary representation with {@link gl:getProgramBinary/2} . The +%% implementation may use this information to store information that may be useful for a +%% future query of the program's binary. It is recommended to set `?GL_PROGRAM_BINARY_RETRIEVABLE_HINT' +%% for the program to `?GL_TRUE' before calling {@link gl:linkProgram/1} , and using +%% the program at run-time if the binary is to be retrieved later. +%% +%% If `Pname' is `?GL_PROGRAM_SEPARABLE', `Value' must be `?GL_TRUE' +%% or `?GL_FALSE' and indicates whether `Program' can be bound to individual pipeline +%% stages via {@link gl:useProgramStages/3} . A program's `?GL_PROGRAM_SEPARABLE' parameter +%% must be set to `?GL_TRUE'`before' {@link gl:linkProgram/1} is called in order +%% for it to be usable with a program pipeline object. The initial state of `?GL_PROGRAM_SEPARABLE' +%% is `?GL_FALSE'. +%% +%% See external documentation. +-spec programParameteri(Program, Pname, Value) -> ok when Program :: integer(),Pname :: enum(),Value :: integer(). programParameteri(Program,Pname,Value) -> cast(5775, <>). -%% @spec (Pipeline::integer(),Stages::integer(),Program::integer()) -> ok -%% @doc See external documentation. --spec useProgramStages(integer(),integer(),integer()) -> ok. +%% @doc Bind stages of a program object to a program pipeline +%% +%% ``gl:useProgramStages'' binds executables from a program object associated with a specified +%% set of shader stages to the program pipeline object given by `Pipeline' . `Pipeline' +%% specifies the program pipeline object to which to bind the executables. `Stages' +%% contains a logical combination of bits indicating the shader stages to use within `Program' +%% with the program pipeline object `Pipeline' . `Stages' must be a logical combination +%% of `?GL_VERTEX_SHADER_BIT', `?GL_TESS_CONTROL_SHADER_BIT', `?GL_TESS_EVALUATION_SHADER_BIT' +%% , `?GL_GEOMETRY_SHADER_BIT', and `?GL_FRAGMENT_SHADER_BIT'. Additionally, the +%% special value `?GL_ALL_SHADER_BITS' may be specified to indicate that all executables +%% contained in `Program' should be installed in `Pipeline' . +%% +%% If `Program' refers to a program object with a valid shader attached for an indicated +%% shader stage, ``gl:useProgramStages'' installs the executable code for that stage in +%% the indicated program pipeline object `Pipeline' . If `Program' is zero, or refers +%% to a program object with no valid shader executable for a given stage, it is as if the +%% pipeline object has no programmable stage configured for the indicated shader stages. If `Stages' +%% contains bits other than those listed above, and is not equal to `?GL_ALL_SHADER_BITS' +%% , an error is generated. +%% +%% See external documentation. +-spec useProgramStages(Pipeline, Stages, Program) -> ok when Pipeline :: integer(),Stages :: integer(),Program :: integer(). useProgramStages(Pipeline,Stages,Program) -> cast(5776, <>). -%% @spec (Pipeline::integer(),Program::integer()) -> ok -%% @doc See external documentation. --spec activeShaderProgram(integer(),integer()) -> ok. +%% @doc Set the active program object for a program pipeline object +%% +%% ``gl:activeShaderProgram'' sets the linked program named by `Program' to be the +%% active program for the program pipeline object `Pipeline' . The active program in +%% the active program pipeline object is the target of calls to {@link gl:uniform1f/2} when +%% no program has been made current through a call to {@link gl:useProgram/1} . +%% +%% See external documentation. +-spec activeShaderProgram(Pipeline, Program) -> ok when Pipeline :: integer(),Program :: integer(). activeShaderProgram(Pipeline,Program) -> cast(5777, <>). -%% @spec (Type::enum(),Strings::[string()]) -> integer() -%% @doc See external documentation. --spec createShaderProgramv(enum(),[string()]) -> integer(). +%% @doc glCreateShaderProgramv +%% +%% See external documentation. +-spec createShaderProgramv(Type, Strings) -> integer() when Type :: enum(),Strings :: [string()]. createShaderProgramv(Type,Strings) -> StringsTemp = list_to_binary([[Str|[0]] || Str <- Strings ]), call(5778, <>). -%% @spec (Pipeline::integer()) -> ok -%% @doc See external documentation. --spec bindProgramPipeline(integer()) -> ok. +%% @doc Bind a program pipeline to the current context +%% +%% ``gl:bindProgramPipeline'' binds a program pipeline object to the current context. `Pipeline' +%% must be a name previously returned from a call to {@link gl:genProgramPipelines/1} . If +%% no program pipeline exists with name `Pipeline' then a new pipeline object is created +%% with that name and initialized to the default state vector. +%% +%% When a program pipeline object is bound using ``gl:bindProgramPipeline'', any previous +%% binding is broken and is replaced with a binding to the specified pipeline object. If `Pipeline' +%% is zero, the previous binding is broken and is not replaced, leaving no pipeline object +%% bound. If no current program object has been established by {@link gl:useProgram/1} , the +%% program objects used for each stage and for uniform updates are taken from the bound program +%% pipeline object, if any. If there is a current program object established by {@link gl:useProgram/1} +%% , the bound program pipeline object has no effect on rendering or uniform updates. When +%% a bound program pipeline object is used for rendering, individual shader executables are +%% taken from its program objects. +%% +%% See external documentation. +-spec bindProgramPipeline(Pipeline) -> ok when Pipeline :: integer(). bindProgramPipeline(Pipeline) -> cast(5779, <>). -%% @spec (Pipelines::[integer()]) -> ok -%% @doc See external documentation. --spec deleteProgramPipelines([integer()]) -> ok. +%% @doc Delete program pipeline objects +%% +%% ``gl:deleteProgramPipelines'' deletes the `N' program pipeline objects whose names +%% are stored in the array `Pipelines' . Unused names in `Pipelines' are ignored, +%% as is the name zero. After a program pipeline object is deleted, its name is again unused +%% and it has no contents. If program pipeline object that is currently bound is deleted, +%% the binding for that object reverts to zero and no program pipeline object becomes current. +%% +%% +%% See external documentation. +-spec deleteProgramPipelines(Pipelines) -> ok when Pipelines :: [integer()]. deleteProgramPipelines(Pipelines) -> cast(5780, <<(length(Pipelines)):?GLuint, (<< <> || C <- Pipelines>>)/binary,0:(((1+length(Pipelines)) rem 2)*32)>>). -%% @spec (N::integer()) -> [integer()] -%% @doc See external documentation. --spec genProgramPipelines(integer()) -> [integer()]. +%% @doc Reserve program pipeline object names +%% +%% ``gl:genProgramPipelines'' returns `N' previously unused program pipeline object +%% names in `Pipelines' . These names are marked as used, for the purposes of ``gl:genProgramPipelines'' +%% only, but they acquire program pipeline state only when they are first bound. +%% +%% See external documentation. +-spec genProgramPipelines(N) -> [integer()] when N :: integer(). genProgramPipelines(N) -> call(5781, <>). -%% @spec (Pipeline::integer()) -> 0|1 -%% @doc See external documentation. --spec isProgramPipeline(integer()) -> 0|1. +%% @doc Determine if a name corresponds to a program pipeline object +%% +%% ``gl:isProgramPipeline'' returns `?GL_TRUE' if `Pipeline' is currently the +%% name of a program pipeline object. If `Pipeline' is zero, or if `?pipeline' +%% is not the name of a program pipeline object, or if an error occurs, ``gl:isProgramPipeline'' +%% returns `?GL_FALSE'. If `Pipeline' is a name returned by {@link gl:genProgramPipelines/1} +%% , but that has not yet been bound through a call to {@link gl:bindProgramPipeline/1} , then +%% the name is not a program pipeline object and ``gl:isProgramPipeline'' returns `?GL_FALSE' +%% . +%% +%% See external documentation. +-spec isProgramPipeline(Pipeline) -> 0|1 when Pipeline :: integer(). isProgramPipeline(Pipeline) -> call(5782, <>). -%% @spec (Pipeline::integer(),Pname::enum()) -> integer() -%% @doc See external documentation. --spec getProgramPipelineiv(integer(),enum()) -> integer(). +%% @doc Retrieve properties of a program pipeline object +%% +%% ``gl:getProgramPipelineiv'' retrieves the value of a property of the program pipeline +%% object `Pipeline' . `Pname' specifies the name of the parameter whose value to +%% retrieve. The value of the parameter is written to the variable whose address is given +%% by `Params' . +%% +%% If `Pname' is `?GL_ACTIVE_PROGRAM', the name of the active program object of +%% the program pipeline object is returned in `Params' . +%% +%% If `Pname' is `?GL_VERTEX_SHADER', the name of the current program object for +%% the vertex shader type of the program pipeline object is returned in `Params' . +%% +%% If `Pname' is `?GL_TESS_CONTROL_SHADER', the name of the current program object +%% for the tessellation control shader type of the program pipeline object is returned in `Params' +%% . +%% +%% If `Pname' is `?GL_TESS_EVALUATION_SHADER', the name of the current program +%% object for the tessellation evaluation shader type of the program pipeline object is returned +%% in `Params' . +%% +%% If `Pname' is `?GL_GEOMETRY_SHADER', the name of the current program object +%% for the geometry shader type of the program pipeline object is returned in `Params' . +%% +%% +%% If `Pname' is `?GL_FRAGMENT_SHADER', the name of the current program object +%% for the fragment shader type of the program pipeline object is returned in `Params' . +%% +%% +%% If `Pname' is `?GL_INFO_LOG_LENGTH', the length of the info log, including +%% the null terminator, is returned in `Params' . If there is no info log, zero is returned. +%% +%% +%% See external documentation. +-spec getProgramPipelineiv(Pipeline, Pname) -> integer() when Pipeline :: integer(),Pname :: enum(). getProgramPipelineiv(Pipeline,Pname) -> call(5783, <>). -%% @spec (Program::integer(),Location::integer(),V0::integer()) -> ok -%% @doc See external documentation. --spec programUniform1i(integer(),integer(),integer()) -> ok. +%% @doc Specify the value of a uniform variable for a specified program object +%% +%% ``gl:programUniform'' modifies the value of a uniform variable or a uniform variable +%% array. The location of the uniform variable to be modified is specified by `Location' , +%% which should be a value returned by {@link gl:getUniformLocation/2} . ``gl:programUniform'' +%% operates on the program object specified by `Program' . +%% +%% The commands ``gl:programUniform{1|2|3|4}{f|i|ui}'' are used to change the value of +%% the uniform variable specified by `Location' using the values passed as arguments. +%% The number specified in the command should match the number of components in the data +%% type of the specified uniform variable (e.g., `1' for float, int, unsigned int, bool; +%% `2' for vec2, ivec2, uvec2, bvec2, etc.). The suffix `f' indicates that floating-point +%% values are being passed; the suffix `i' indicates that integer values are being passed; +%% the suffix `ui' indicates that unsigned integer values are being passed, and this +%% type should also match the data type of the specified uniform variable. The `i' variants +%% of this function should be used to provide values for uniform variables defined as int, ivec2 +%% , ivec3, ivec4, or arrays of these. The `ui' variants of this function should be +%% used to provide values for uniform variables defined as unsigned int, uvec2, uvec3, uvec4, +%% or arrays of these. The `f' variants should be used to provide values for uniform +%% variables of type float, vec2, vec3, vec4, or arrays of these. Either the `i', `ui' +%% or `f' variants may be used to provide values for uniform variables of type bool, bvec2 +%% , bvec3, bvec4, or arrays of these. The uniform variable will be set to false if the input +%% value is 0 or 0.0f, and it will be set to true otherwise. +%% +%% All active uniform variables defined in a program object are initialized to 0 when the +%% program object is linked successfully. They retain the values assigned to them by a call +%% to ``gl:programUniform'' until the next successful link operation occurs on the program +%% object, when they are once again initialized to 0. +%% +%% The commands ``gl:programUniform{1|2|3|4}{f|i|ui}v'' can be used to modify a single +%% uniform variable or a uniform variable array. These commands pass a count and a pointer +%% to the values to be loaded into a uniform variable or a uniform variable array. A count +%% of 1 should be used if modifying the value of a single uniform variable, and a count of +%% 1 or greater can be used to modify an entire array or part of an array. When loading `n' +%% elements starting at an arbitrary position `m' in a uniform variable array, elements +%% `m' + `n' - 1 in the array will be replaced with the new values. If `M' + `N' +%% - 1 is larger than the size of the uniform variable array, values for all array elements +%% beyond the end of the array will be ignored. The number specified in the name of the command +%% indicates the number of components for each element in `Value' , and it should match +%% the number of components in the data type of the specified uniform variable (e.g., `1' +%% for float, int, bool; `2' for vec2, ivec2, bvec2, etc.). The data type specified +%% in the name of the command must match the data type for the specified uniform variable +%% as described previously for ``gl:programUniform{1|2|3|4}{f|i|ui}''. +%% +%% For uniform variable arrays, each element of the array is considered to be of the type +%% indicated in the name of the command (e.g., ``gl:programUniform3f'' or ``gl:programUniform3fv'' +%% can be used to load a uniform variable array of type vec3). The number of elements of +%% the uniform variable array to be modified is specified by `Count' +%% +%% The commands ``gl:programUniformMatrix{2|3|4|2x3|3x2|2x4|4x2|3x4|4x3}fv'' are used +%% to modify a matrix or an array of matrices. The numbers in the command name are interpreted +%% as the dimensionality of the matrix. The number `2' indicates a 2 × 2 matrix (i.e., +%% 4 values), the number `3' indicates a 3 × 3 matrix (i.e., 9 values), and the number `4' +%% indicates a 4 × 4 matrix (i.e., 16 values). Non-square matrix dimensionality is explicit, +%% with the first number representing the number of columns and the second number representing +%% the number of rows. For example, `2x4' indicates a 2 × 4 matrix with 2 columns and +%% 4 rows (i.e., 8 values). If `Transpose' is `?GL_FALSE', each matrix is assumed +%% to be supplied in column major order. If `Transpose' is `?GL_TRUE', each matrix +%% is assumed to be supplied in row major order. The `Count' argument indicates the +%% number of matrices to be passed. A count of 1 should be used if modifying the value of +%% a single matrix, and a count greater than 1 can be used to modify an array of matrices. +%% +%% See external documentation. +-spec programUniform1i(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(). programUniform1i(Program,Location,V0) -> cast(5784, <>). -%% @spec (Program::integer(),Location::integer(),Value::[integer()]) -> ok -%% @doc See external documentation. --spec programUniform1iv(integer(),integer(),[integer()]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform1iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [integer()]. programUniform1iv(Program,Location,Value) -> cast(5785, <> || C <- Value>>)/binary,0:(((1+length(Value)) rem 2)*32)>>). -%% @spec (Program::integer(),Location::integer(),V0::float()) -> ok -%% @doc See external documentation. --spec programUniform1f(integer(),integer(),float()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform1f(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: float(). programUniform1f(Program,Location,V0) -> cast(5786, <>). -%% @spec (Program::integer(),Location::integer(),Value::[float()]) -> ok -%% @doc See external documentation. --spec programUniform1fv(integer(),integer(),[float()]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform1fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [float()]. programUniform1fv(Program,Location,Value) -> cast(5787, <> || C <- Value>>)/binary,0:(((1+length(Value)) rem 2)*32)>>). -%% @spec (Program::integer(),Location::integer(),V0::float()) -> ok -%% @doc See external documentation. --spec programUniform1d(integer(),integer(),float()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform1d(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: float(). programUniform1d(Program,Location,V0) -> cast(5788, <>). -%% @spec (Program::integer(),Location::integer(),Value::[float()]) -> ok -%% @doc See external documentation. --spec programUniform1dv(integer(),integer(),[float()]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform1dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [float()]. programUniform1dv(Program,Location,Value) -> cast(5789, <> || C <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::integer()) -> ok -%% @doc See external documentation. --spec programUniform1ui(integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform1ui(Program, Location, V0) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(). programUniform1ui(Program,Location,V0) -> cast(5790, <>). -%% @spec (Program::integer(),Location::integer(),Value::[integer()]) -> ok -%% @doc See external documentation. --spec programUniform1uiv(integer(),integer(),[integer()]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform1uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [integer()]. programUniform1uiv(Program,Location,Value) -> cast(5791, <> || C <- Value>>)/binary,0:(((1+length(Value)) rem 2)*32)>>). -%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer()) -> ok -%% @doc See external documentation. --spec programUniform2i(integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform2i(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(). programUniform2i(Program,Location,V0,V1) -> cast(5792, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer()}]) -> ok -%% @doc See external documentation. --spec programUniform2iv(integer(),integer(),[{integer(),integer()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform2iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer()}]. programUniform2iv(Program,Location,Value) -> cast(5793, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float()) -> ok -%% @doc See external documentation. --spec programUniform2f(integer(),integer(),float(),float()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform2f(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(). programUniform2f(Program,Location,V0,V1) -> cast(5794, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniform2fv(integer(),integer(),[{float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform2fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float()}]. programUniform2fv(Program,Location,Value) -> cast(5795, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float()) -> ok -%% @doc See external documentation. --spec programUniform2d(integer(),integer(),float(),float()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform2d(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(). programUniform2d(Program,Location,V0,V1) -> cast(5796, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniform2dv(integer(),integer(),[{float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform2dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float()}]. programUniform2dv(Program,Location,Value) -> cast(5797, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer()) -> ok -%% @doc See external documentation. --spec programUniform2ui(integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform2ui(Program, Location, V0, V1) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(). programUniform2ui(Program,Location,V0,V1) -> cast(5798, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer()}]) -> ok -%% @doc See external documentation. --spec programUniform2uiv(integer(),integer(),[{integer(),integer()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform2uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer()}]. programUniform2uiv(Program,Location,Value) -> cast(5799, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok -%% @doc See external documentation. --spec programUniform3i(integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform3i(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(). programUniform3i(Program,Location,V0,V1,V2) -> cast(5800, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok -%% @doc See external documentation. --spec programUniform3iv(integer(),integer(),[{integer(),integer(),integer()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform3iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer()}]. programUniform3iv(Program,Location,Value) -> cast(5801, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float(),V2::float()) -> ok -%% @doc See external documentation. --spec programUniform3f(integer(),integer(),float(),float(),float()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform3f(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(). programUniform3f(Program,Location,V0,V1,V2) -> cast(5802, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniform3fv(integer(),integer(),[{float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform3fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float()}]. programUniform3fv(Program,Location,Value) -> cast(5803, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float(),V2::float()) -> ok -%% @doc See external documentation. --spec programUniform3d(integer(),integer(),float(),float(),float()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform3d(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(). programUniform3d(Program,Location,V0,V1,V2) -> cast(5804, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniform3dv(integer(),integer(),[{float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform3dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float()}]. programUniform3dv(Program,Location,Value) -> cast(5805, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok -%% @doc See external documentation. --spec programUniform3ui(integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform3ui(Program, Location, V0, V1, V2) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(). programUniform3ui(Program,Location,V0,V1,V2) -> cast(5806, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok -%% @doc See external documentation. --spec programUniform3uiv(integer(),integer(),[{integer(),integer(),integer()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform3uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer()}]. programUniform3uiv(Program,Location,Value) -> cast(5807, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok -%% @doc See external documentation. --spec programUniform4i(integer(),integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform4i(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer(). programUniform4i(Program,Location,V0,V1,V2,V3) -> cast(5808, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok -%% @doc See external documentation. --spec programUniform4iv(integer(),integer(),[{integer(),integer(),integer(),integer()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform4iv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}]. programUniform4iv(Program,Location,Value) -> cast(5809, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float(),V2::float(),V3::float()) -> ok -%% @doc See external documentation. --spec programUniform4f(integer(),integer(),float(),float(),float(),float()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform4f(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float(). programUniform4f(Program,Location,V0,V1,V2,V3) -> cast(5810, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniform4fv(integer(),integer(),[{float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform4fv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float(),float()}]. programUniform4fv(Program,Location,Value) -> cast(5811, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::float(),V1::float(),V2::float(),V3::float()) -> ok -%% @doc See external documentation. --spec programUniform4d(integer(),integer(),float(),float(),float(),float()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform4d(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: float(),V1 :: float(),V2 :: float(),V3 :: float(). programUniform4d(Program,Location,V0,V1,V2,V3) -> cast(5812, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniform4dv(integer(),integer(),[{float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform4dv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{float(),float(),float(),float()}]. programUniform4dv(Program,Location,Value) -> cast(5813, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok -%% @doc See external documentation. --spec programUniform4ui(integer(),integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform4ui(Program, Location, V0, V1, V2, V3) -> ok when Program :: integer(),Location :: integer(),V0 :: integer(),V1 :: integer(),V2 :: integer(),V3 :: integer(). programUniform4ui(Program,Location,V0,V1,V2,V3) -> cast(5814, <>). -%% @spec (Program::integer(),Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok -%% @doc See external documentation. --spec programUniform4uiv(integer(),integer(),[{integer(),integer(),integer(),integer()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniform4uiv(Program, Location, Value) -> ok when Program :: integer(),Location :: integer(),Value :: [{integer(),integer(),integer(),integer()}]. programUniform4uiv(Program,Location,Value) -> cast(5815, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix2fv(integer(),integer(),0|1,[{float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix2fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}]. programUniformMatrix2fv(Program,Location,Transpose,Value) -> cast(5816, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix3fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix3fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix3fv(Program,Location,Transpose,Value) -> cast(5817, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix4fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix4fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix4fv(Program,Location,Transpose,Value) -> cast(5818, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix2dv(integer(),integer(),0|1,[{float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix2dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float()}]. programUniformMatrix2dv(Program,Location,Transpose,Value) -> cast(5819, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix3dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix3dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix3dv(Program,Location,Transpose,Value) -> cast(5820, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix4dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix4dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix4dv(Program,Location,Transpose,Value) -> cast(5821, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix2x3fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix2x3fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}]. programUniformMatrix2x3fv(Program,Location,Transpose,Value) -> cast(5822, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix3x2fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix3x2fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}]. programUniformMatrix3x2fv(Program,Location,Transpose,Value) -> cast(5823, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix2x4fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix2x4fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix2x4fv(Program,Location,Transpose,Value) -> cast(5824, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix4x2fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix4x2fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix4x2fv(Program,Location,Transpose,Value) -> cast(5825, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix3x4fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix3x4fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix3x4fv(Program,Location,Transpose,Value) -> cast(5826, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix4x3fv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix4x3fv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix4x3fv(Program,Location,Transpose,Value) -> cast(5827, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix2x3dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix2x3dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}]. programUniformMatrix2x3dv(Program,Location,Transpose,Value) -> cast(5828, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix3x2dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix3x2dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float()}]. programUniformMatrix3x2dv(Program,Location,Transpose,Value) -> cast(5829, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix2x4dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix2x4dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix2x4dv(Program,Location,Transpose,Value) -> cast(5830, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix4x2dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix4x2dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix4x2dv(Program,Location,Transpose,Value) -> cast(5831, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix3x4dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix3x4dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix3x4dv(Program,Location,Transpose,Value) -> cast(5832, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>). -%% @spec (Program::integer(),Location::integer(),Transpose::0|1,Value::[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec programUniformMatrix4x3dv(integer(),integer(),0|1,[{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]) -> ok. +%% @doc +%% See {@link programUniform1i/3} +-spec programUniformMatrix4x3dv(Program, Location, Transpose, Value) -> ok when Program :: integer(),Location :: integer(),Transpose :: 0|1,Value :: [{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()}]. programUniformMatrix4x3dv(Program,Location,Transpose,Value) -> cast(5833, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>). -%% @spec (Pipeline::integer()) -> ok -%% @doc See external documentation. --spec validateProgramPipeline(integer()) -> ok. +%% @doc Validate a program pipeline object against current GL state +%% +%% ``gl:validateProgramPipeline'' instructs the implementation to validate the shader executables +%% contained in `Pipeline' against the current GL state. The implementation may use +%% this as an opportunity to perform any internal shader modifications that may be required +%% to ensure correct operation of the installed shaders given the current GL state. +%% +%% After a program pipeline has been validated, its validation status is set to `?GL_TRUE' +%% . The validation status of a program pipeline object may be queried by calling {@link gl:getProgramPipelineiv/2} +%% with parameter `?GL_VALIDATE_STATUS'. +%% +%% If `Pipeline' is a name previously returned from a call to {@link gl:genProgramPipelines/1} +%% but that has not yet been bound by a call to {@link gl:bindProgramPipeline/1} , a new program +%% pipeline object is created with name `Pipeline' and the default state vector. +%% +%% See external documentation. +-spec validateProgramPipeline(Pipeline) -> ok when Pipeline :: integer(). validateProgramPipeline(Pipeline) -> cast(5834, <>). -%% @spec (Pipeline::integer(),BufSize::integer()) -> string() -%% @doc See external documentation. --spec getProgramPipelineInfoLog(integer(),integer()) -> string(). +%% @doc Retrieve the info log string from a program pipeline object +%% +%% ``gl:getProgramPipelineInfoLog'' retrieves the info log for the program pipeline object +%% `Pipeline' . The info log, including its null terminator, is written into the array +%% of characters whose address is given by `InfoLog' . The maximum number of characters +%% that may be written into `InfoLog' is given by `BufSize' , and the actual number +%% of characters written into `InfoLog' is returned in the integer whose address is +%% given by `Length' . If `Length' is `?NULL', no length is returned. +%% +%% The actual length of the info log for the program pipeline may be determined by calling {@link gl:getProgramPipelineiv/2} +%% with `Pname' set to `?GL_INFO_LOG_LENGTH'. +%% +%% See external documentation. +-spec getProgramPipelineInfoLog(Pipeline, BufSize) -> string() when Pipeline :: integer(),BufSize :: integer(). getProgramPipelineInfoLog(Pipeline,BufSize) -> call(5835, <>). -%% @spec (Index::integer(),X::float()) -> ok -%% @doc See external documentation. --spec vertexAttribL1d(integer(),float()) -> ok. +%% @doc glVertexAttribL +%% +%% See external documentation. +-spec vertexAttribL1d(Index, X) -> ok when Index :: integer(),X :: float(). vertexAttribL1d(Index,X) -> cast(5836, <>). -%% @spec (Index::integer(),X::float(),Y::float()) -> ok -%% @doc See external documentation. --spec vertexAttribL2d(integer(),float(),float()) -> ok. +%% @doc glVertexAttribL +%% +%% See external documentation. +-spec vertexAttribL2d(Index, X, Y) -> ok when Index :: integer(),X :: float(),Y :: float(). vertexAttribL2d(Index,X,Y) -> cast(5837, <>). -%% @spec (Index::integer(),X::float(),Y::float(),Z::float()) -> ok -%% @doc See external documentation. --spec vertexAttribL3d(integer(),float(),float(),float()) -> ok. +%% @doc glVertexAttribL +%% +%% See external documentation. +-spec vertexAttribL3d(Index, X, Y, Z) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(). vertexAttribL3d(Index,X,Y,Z) -> cast(5838, <>). -%% @spec (Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec vertexAttribL4d(integer(),float(),float(),float(),float()) -> ok. +%% @doc glVertexAttribL +%% +%% See external documentation. +-spec vertexAttribL4d(Index, X, Y, Z, W) -> ok when Index :: integer(),X :: float(),Y :: float(),Z :: float(),W :: float(). vertexAttribL4d(Index,X,Y,Z,W) -> cast(5839, <>). -%% @spec (Index,{X}) -> ok %% @equiv vertexAttribL1d(Index,X) --spec vertexAttribL1dv(integer(),{float()}) -> ok. +-spec vertexAttribL1dv(Index :: integer(),V) -> ok when V :: {X :: float()}. vertexAttribL1dv(Index,{X}) -> vertexAttribL1d(Index,X). -%% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttribL2d(Index,X,Y) --spec vertexAttribL2dv(integer(),{float(),float()}) -> ok. +-spec vertexAttribL2dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float()}. vertexAttribL2dv(Index,{X,Y}) -> vertexAttribL2d(Index,X,Y). -%% @spec (Index,{X,Y,Z}) -> ok %% @equiv vertexAttribL3d(Index,X,Y,Z) --spec vertexAttribL3dv(integer(),{float(),float(),float()}) -> ok. +-spec vertexAttribL3dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float()}. vertexAttribL3dv(Index,{X,Y,Z}) -> vertexAttribL3d(Index,X,Y,Z). -%% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttribL4d(Index,X,Y,Z,W) --spec vertexAttribL4dv(integer(),{float(),float(),float(),float()}) -> ok. +-spec vertexAttribL4dv(Index :: integer(),V) -> ok when V :: {X :: float(),Y :: float(),Z :: float(),W :: float()}. vertexAttribL4dv(Index,{X,Y,Z,W}) -> vertexAttribL4d(Index,X,Y,Z,W). -%% @spec (Index::integer(),Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok -%% @doc See external documentation. --spec vertexAttribLPointer(integer(),integer(),enum(),integer(),offset()|mem()) -> ok. +%% @doc glVertexAttribLPointer +%% +%% See external documentation. +-spec vertexAttribLPointer(Index, Size, Type, Stride, Pointer) -> ok when Index :: integer(),Size :: integer(),Type :: enum(),Stride :: integer(),Pointer :: offset()|mem(). vertexAttribLPointer(Index,Size,Type,Stride,Pointer) when is_integer(Pointer) -> cast(5840, <>); vertexAttribLPointer(Index,Size,Type,Stride,Pointer) -> send_bin(Pointer), cast(5841, <>). -%% @spec (Index::integer(),Pname::enum()) -> {float(),float(),float(),float()} -%% @doc See external documentation. --spec getVertexAttribLdv(integer(),enum()) -> {float(),float(),float(),float()}. +%% @doc glGetVertexAttribL +%% +%% See external documentation. +-spec getVertexAttribLdv(Index, Pname) -> {float(),float(),float(),float()} when Index :: integer(),Pname :: enum(). getVertexAttribLdv(Index,Pname) -> call(5842, <>). -%% @spec (First::integer(),V::[{float(),float(),float(),float()}]) -> ok -%% @doc See external documentation. --spec viewportArrayv(integer(),[{float(),float(),float(),float()}]) -> ok. +%% @doc glViewportArrayv +%% +%% See external documentation. +-spec viewportArrayv(First, V) -> ok when First :: integer(),V :: [{float(),float(),float(),float()}]. viewportArrayv(First,V) -> cast(5843, <> || {V1,V2,V3,V4} <- V>>)/binary>>). -%% @spec (Index::integer(),X::float(),Y::float(),W::float(),H::float()) -> ok -%% @doc See external documentation. --spec viewportIndexedf(integer(),float(),float(),float(),float()) -> ok. +%% @doc Set a specified viewport +%% +%% ``gl:viewportIndexedf'' and ``gl:viewportIndexedfv'' specify the parameters for a +%% single viewport. `Index' specifies the index of the viewport to modify. `Index' +%% must be less than the value of `?GL_MAX_VIEWPORTS'. For ``gl:viewportIndexedf'', `X' +%% , `Y' , `W' , and `H' specify the left, bottom, width and height of the viewport +%% in pixels, respectively. For ``gl:viewportIndexedfv'', `V' contains the address +%% of an array of floating point values specifying the left ( x), bottom ( y), width ( w), +%% and height ( h) of each viewport, in that order. x and y give the location of the viewport's +%% lower left corner, and w and h give the width and height of the viewport, respectively. +%% The 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: +%% +%% x w=(x nd+1) (width/2)+x +%% +%% y w=(y nd+1) (height/2)+y +%% +%% The location of the viewport's bottom left corner, given by ( x, y) is clamped to be +%% within the implementaiton-dependent viewport bounds range. The viewport bounds range [ +%% min, max] can be determined by calling {@link gl:getBooleanv/1} with argument `?GL_VIEWPORT_BOUNDS_RANGE' +%% . Viewport width and height are silently clamped to a range that depends on the implementation. +%% To query this range, call {@link gl:getBooleanv/1} with argument `?GL_MAX_VIEWPORT_DIMS'. +%% +%% The precision with which the GL interprets the floating point viewport bounds is implementation-dependent +%% and may be determined by querying the impementation-defined constant `?GL_VIEWPORT_SUBPIXEL_BITS' +%% . +%% +%% Calling ``gl:viewportIndexedfv'' is equivalent to calling see `glViewportArray' +%% with `First' set to `Index' , `Count' set to 1 and `V' passsed directly. +%% ``gl:viewportIndexedf'' is equivalent to: void glViewportIndexedf(GLuint index, GLfloat +%% x, GLfloat y, GLfloat w, GLfloat h) { const float v[4] = { x, y, w, h }; glViewportArrayv(index, +%% 1, v); } +%% +%% See external documentation. +-spec viewportIndexedf(Index, X, Y, W, H) -> ok when Index :: integer(),X :: float(),Y :: float(),W :: float(),H :: float(). viewportIndexedf(Index,X,Y,W,H) -> cast(5844, <>). -%% @spec (Index::integer(),V::{float(),float(),float(),float()}) -> ok -%% @doc See external documentation. --spec viewportIndexedfv(integer(),{float(),float(),float(),float()}) -> ok. +%% @doc +%% See {@link viewportIndexedf/5} +-spec viewportIndexedfv(Index, V) -> ok when Index :: integer(),V :: {float(),float(),float(),float()}. viewportIndexedfv(Index,{V1,V2,V3,V4}) -> cast(5845, <>). -%% @spec (First::integer(),V::[{integer(),integer(),integer(),integer()}]) -> ok -%% @doc See external documentation. --spec scissorArrayv(integer(),[{integer(),integer(),integer(),integer()}]) -> ok. +%% @doc glScissorArrayv +%% +%% See external documentation. +-spec scissorArrayv(First, V) -> ok when First :: integer(),V :: [{integer(),integer(),integer(),integer()}]. scissorArrayv(First,V) -> cast(5846, <> || {V1,V2,V3,V4} <- V>>)/binary>>). -%% @spec (Index::integer(),Left::integer(),Bottom::integer(),Width::integer(),Height::integer()) -> ok -%% @doc See external documentation. --spec scissorIndexed(integer(),integer(),integer(),integer(),integer()) -> ok. +%% @doc glScissorIndexe +%% +%% See external documentation. +-spec scissorIndexed(Index, Left, Bottom, Width, Height) -> ok when Index :: integer(),Left :: integer(),Bottom :: integer(),Width :: integer(),Height :: integer(). scissorIndexed(Index,Left,Bottom,Width,Height) -> cast(5847, <>). -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec scissorIndexedv(integer(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc glScissorIndexe +%% +%% See external documentation. +-spec scissorIndexedv(Index, V) -> ok when Index :: integer(),V :: {integer(),integer(),integer(),integer()}. scissorIndexedv(Index,{V1,V2,V3,V4}) -> cast(5848, <>). -%% @spec (First::integer(),V::[{clamp(),clamp()}]) -> ok -%% @doc See external documentation. --spec depthRangeArrayv(integer(),[{clamp(),clamp()}]) -> ok. +%% @doc glDepthRangeArrayv +%% +%% See external documentation. +-spec depthRangeArrayv(First, V) -> ok when First :: integer(),V :: [{clamp(),clamp()}]. depthRangeArrayv(First,V) -> cast(5849, <> || {V1,V2} <- V>>)/binary>>). -%% @spec (Index::integer(),N::clamp(),F::clamp()) -> ok -%% @doc See external documentation. --spec depthRangeIndexed(integer(),clamp(),clamp()) -> ok. +%% @doc glDepthRangeIndexe +%% +%% See external documentation. +-spec depthRangeIndexed(Index, N, F) -> ok when Index :: integer(),N :: clamp(),F :: clamp(). depthRangeIndexed(Index,N,F) -> cast(5850, <>). -%% @spec (Target::enum(),Index::integer()) -> [float()] -%% @doc See external documentation. --spec getFloati_v(enum(),integer()) -> [float()]. +%% @doc +%% See {@link getBooleanv/1} +-spec getFloati_v(Target, Index) -> [float()] when Target :: enum(),Index :: integer(). getFloati_v(Target,Index) -> call(5851, <>). -%% @spec (Target::enum(),Index::integer()) -> [float()] -%% @doc See external documentation. --spec getDoublei_v(enum(),integer()) -> [float()]. +%% @doc +%% See {@link getBooleanv/1} +-spec getDoublei_v(Target, Index) -> [float()] when Target :: enum(),Index :: integer(). getDoublei_v(Target,Index) -> call(5852, <>). -%% @spec (Source::enum(),Type::enum(),Severity::enum(),Ids::[integer()],Enabled::0|1) -> ok -%% @doc See external documentation. --spec debugMessageControlARB(enum(),enum(),enum(),[integer()],0|1) -> ok. +%% @doc glDebugMessageControlARB +%% +%% See external documentation. +-spec debugMessageControlARB(Source, Type, Severity, Ids, Enabled) -> ok when Source :: enum(),Type :: enum(),Severity :: enum(),Ids :: [integer()],Enabled :: 0|1. debugMessageControlARB(Source,Type,Severity,Ids,Enabled) -> cast(5853, <> || C <- Ids>>)/binary,0:(((length(Ids)) rem 2)*32),Enabled:?GLboolean>>). -%% @spec (Source::enum(),Type::enum(),Id::integer(),Severity::enum(),Buf::string()) -> ok -%% @doc See external documentation. --spec debugMessageInsertARB(enum(),enum(),integer(),enum(),string()) -> ok. +%% @doc glDebugMessageInsertARB +%% +%% See external documentation. +-spec debugMessageInsertARB(Source, Type, Id, Severity, Buf) -> ok when Source :: enum(),Type :: enum(),Id :: integer(),Severity :: enum(),Buf :: string(). debugMessageInsertARB(Source,Type,Id,Severity,Buf) -> cast(5854, <>). -%% @spec (Count::integer(),Bufsize::integer()) -> {integer(),Sources::[enum()],Types::[enum()],Ids::[integer()],Severities::[enum()],MessageLog::[string()]} -%% @doc See external documentation. --spec getDebugMessageLogARB(integer(),integer()) -> {integer(),[enum()],[enum()],[integer()],[enum()],[string()]}. +%% @doc glGetDebugMessageLogARB +%% +%% See external documentation. +-spec getDebugMessageLogARB(Count, Bufsize) -> {integer(),Sources :: [enum()],Types :: [enum()],Ids :: [integer()],Severities :: [enum()],MessageLog :: [string()]} when Count :: integer(),Bufsize :: integer(). getDebugMessageLogARB(Count,Bufsize) -> call(5855, <>). -%% @spec () -> enum() -%% @doc See external documentation. +%% @doc glGetGraphicsResetStatusARB +%% +%% See external documentation. -spec getGraphicsResetStatusARB() -> enum(). getGraphicsResetStatusARB() -> call(5856, <<>>). -%% @spec () -> ok -%% @doc See external documentation. --spec resizeBuffersMESA() -> ok. -resizeBuffersMESA() -> - cast(5857, <<>>). - -%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec windowPos4dMESA(float(),float(),float(),float()) -> ok. -windowPos4dMESA(X,Y,Z,W) -> - cast(5858, <>). - -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv windowPos4dMESA(X,Y,Z,W) --spec windowPos4dvMESA({float(),float(),float(),float()}) -> ok. -windowPos4dvMESA({X,Y,Z,W}) -> windowPos4dMESA(X,Y,Z,W). - -%% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok -%% @doc See external documentation. --spec windowPos4fMESA(float(),float(),float(),float()) -> ok. -windowPos4fMESA(X,Y,Z,W) -> - cast(5859, <>). - -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv windowPos4fMESA(X,Y,Z,W) --spec windowPos4fvMESA({float(),float(),float(),float()}) -> ok. -windowPos4fvMESA({X,Y,Z,W}) -> windowPos4fMESA(X,Y,Z,W). - -%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec windowPos4iMESA(integer(),integer(),integer(),integer()) -> ok. -windowPos4iMESA(X,Y,Z,W) -> - cast(5860, <>). - -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv windowPos4iMESA(X,Y,Z,W) --spec windowPos4ivMESA({integer(),integer(),integer(),integer()}) -> ok. -windowPos4ivMESA({X,Y,Z,W}) -> windowPos4iMESA(X,Y,Z,W). - -%% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec windowPos4sMESA(integer(),integer(),integer(),integer()) -> ok. -windowPos4sMESA(X,Y,Z,W) -> - cast(5861, <>). - -%% @spec ({X,Y,Z,W}) -> ok -%% @equiv windowPos4sMESA(X,Y,Z,W) --spec windowPos4svMESA({integer(),integer(),integer(),integer()}) -> ok. -windowPos4svMESA({X,Y,Z,W}) -> windowPos4sMESA(X,Y,Z,W). - -%% @spec (Zmin::clamp(),Zmax::clamp()) -> ok -%% @doc See external documentation. --spec depthBoundsEXT(clamp(),clamp()) -> ok. +%% @doc Draw multiple instances of a range of elements with offset applied to instanced attributes +%% +%% ``gl:drawArraysInstancedBaseInstance'' behaves identically to {@link gl:drawArrays/3} +%% except that `Primcount' instances of the range of elements are executed and the value +%% of the internal counter `InstanceID' advances for each iteration. `InstanceID' +%% is an internal 32-bit integer counter that may be read by a vertex shader as `?gl_InstanceID' +%% . +%% +%% ``gl:drawArraysInstancedBaseInstance'' has the same effect as: if ( mode or count is +%% invalid ) generate appropriate error else { for (int i = 0; i < primcount ; i++) { +%% instanceID = i; glDrawArrays(mode, first, count); } instanceID = 0; } +%% +%% Specific vertex attributes may be classified as `instanced' through the use of {@link gl:vertexAttribDivisor/2} +%% . Instanced vertex attributes supply per-instance vertex data to the vertex shader. The +%% index of the vertex fetched from the enabled instanced vertex attribute arrays is calculated +%% as: |gl_ InstanceID/divisor|&plus; baseInstance. Note that `Baseinstance' does not affect the shader-visible +%% value of `?gl_InstanceID'. +%% +%% See external documentation. +-spec drawArraysInstancedBaseInstance(Mode, First, Count, Primcount, Baseinstance) -> ok when Mode :: enum(),First :: integer(),Count :: integer(),Primcount :: integer(),Baseinstance :: integer(). +drawArraysInstancedBaseInstance(Mode,First,Count,Primcount,Baseinstance) -> + cast(5857, <>). + +%% @doc Draw multiple instances of a set of elements with offset applied to instanced attributes +%% +%% ``gl:drawElementsInstancedBaseInstance'' behaves identically to {@link gl:drawElements/4} +%% except that `Primcount' instances of the set of elements are executed and the value +%% of the internal counter `InstanceID' advances for each iteration. `InstanceID' +%% is an internal 32-bit integer counter that may be read by a vertex shader as `?gl_InstanceID' +%% . +%% +%% ``gl:drawElementsInstancedBaseInstance'' has the same effect as: if (mode, count, or +%% type is invalid ) generate appropriate error else { for (int i = 0; i < primcount ; +%% i++) { instanceID = i; glDrawElements(mode, count, type, indices); } instanceID = 0; } +%% +%% Specific vertex attributes may be classified as `instanced' through the use of {@link gl:vertexAttribDivisor/2} +%% . Instanced vertex attributes supply per-instance vertex data to the vertex shader. The +%% index of the vertex fetched from the enabled instanced vertex attribute arrays is calculated +%% as |gl_ InstanceID/divisor|&plus; baseInstance. Note that `Baseinstance' does not affect the shader-visible +%% value of `?gl_InstanceID'. +%% +%% See external documentation. +-spec drawElementsInstancedBaseInstance(Mode, Count, Type, Indices, Primcount, Baseinstance) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Baseinstance :: integer(). +drawElementsInstancedBaseInstance(Mode,Count,Type,Indices,Primcount,Baseinstance) when is_integer(Indices) -> + cast(5858, <>); +drawElementsInstancedBaseInstance(Mode,Count,Type,Indices,Primcount,Baseinstance) -> + send_bin(Indices), + cast(5859, <>). + +%% @doc Render multiple instances of a set of primitives from array data with a per-element offset +%% +%% ``gl:drawElementsInstancedBaseVertexBaseInstance'' behaves identically to {@link gl:drawElementsInstanced/5} +%% except that the `i'th element transferred by the corresponding draw call will be +%% taken from element `Indices' [i] + `Basevertex' of each enabled array. If the +%% resulting value is larger than the maximum value representable by `Type' , it is as +%% if the calculation were upconverted to 32-bit unsigned integers (with wrapping on overflow +%% conditions). The operation is undefined if the sum would be negative. The `Basevertex' +%% has no effect on the shader-visible value of `?gl_VertexID'. +%% +%% Specific vertex attributes may be classified as `instanced' through the use of {@link gl:vertexAttribDivisor/2} +%% . Instanced vertex attributes supply per-instance vertex data to the vertex shader. The +%% index of the vertex fetched from the enabled instanced vertex attribute arrays is calculated +%% as |gl_ InstanceID/divisor|&plus; baseInstance. Note that `Baseinstance' does not affect the shader-visible +%% value of `?gl_InstanceID'. +%% +%% See external documentation. +-spec drawElementsInstancedBaseVertexBaseInstance(Mode, Count, Type, Indices, Primcount, Basevertex, Baseinstance) -> ok when Mode :: enum(),Count :: integer(),Type :: enum(),Indices :: offset()|mem(),Primcount :: integer(),Basevertex :: integer(),Baseinstance :: integer(). +drawElementsInstancedBaseVertexBaseInstance(Mode,Count,Type,Indices,Primcount,Basevertex,Baseinstance) when is_integer(Indices) -> + cast(5860, <>); +drawElementsInstancedBaseVertexBaseInstance(Mode,Count,Type,Indices,Primcount,Basevertex,Baseinstance) -> + send_bin(Indices), + cast(5861, <>). + +%% @doc glDrawTransformFeedbackInstance +%% +%% See external documentation. +-spec drawTransformFeedbackInstanced(Mode, Id, Primcount) -> ok when Mode :: enum(),Id :: integer(),Primcount :: integer(). +drawTransformFeedbackInstanced(Mode,Id,Primcount) -> + cast(5862, <>). + +%% @doc glDrawTransformFeedbackStreamInstance +%% +%% See external documentation. +-spec drawTransformFeedbackStreamInstanced(Mode, Id, Stream, Primcount) -> ok when Mode :: enum(),Id :: integer(),Stream :: integer(),Primcount :: integer(). +drawTransformFeedbackStreamInstanced(Mode,Id,Stream,Primcount) -> + cast(5863, <>). + +%% @doc glGetInternalformat +%% +%% See external documentation. +-spec getInternalformativ(Target, Internalformat, Pname, BufSize) -> [integer()] when Target :: enum(),Internalformat :: enum(),Pname :: enum(),BufSize :: integer(). +getInternalformativ(Target,Internalformat,Pname,BufSize) -> + call(5864, <>). + +%% @doc Bind a level of a texture to an image unit +%% +%% ``gl:bindImageTexture'' binds a single level of a texture to an image unit for the purpose +%% of reading and writing it from shaders. `Unit' specifies the zero-based index of +%% the image unit to which to bind the texture level. `Texture' specifies the name of +%% an existing texture object to bind to the image unit. If `Texture' is zero, then +%% any existing binding to the image unit is broken. `Level' specifies the level of +%% the texture to bind to the image unit. +%% +%% If `Texture' is the name of a one-, two-, or three-dimensional array texture, a +%% cube map or cube map array texture, or a two-dimensional multisample array texture, then +%% it is possible to bind either the entire array, or only a single layer of the array to +%% the image unit. In such cases, if `Layered' is `?GL_TRUE', the entire array +%% is attached to the image unit and `Layer' is ignored. However, if `Layered' is `?GL_FALSE' +%% then `Layer' specifies the layer of the array to attach to the image unit. +%% +%% `Access' specifies the access types to be performed by shaders and may be set to `?GL_READ_ONLY' +%% , `?GL_WRITE_ONLY', or `?GL_READ_WRITE' to indicate read-only, write-only or +%% read-write access, respectively. Violation of the access type specified in `Access' +%% (for example, if a shader writes to an image bound with `Access' set to `?GL_READ_ONLY' +%% ) will lead to undefined results, possibly including program termination. +%% +%% `Format' specifies the format that is to be used when performing formatted stores +%% into the image from shaders. `Format' must be compatible with the texture's internal +%% format and must be one of the formats listed in the following table. +%% +%% +%% +%% +%% +%% +%%
` Image Unit Format '` Format Qualifier '
`?GL_RGBA32F'rgba32f
`?GL_RGBA16F' +%% rgba16f
`?GL_RG32F'rg32f
`?GL_RG16F' +%% rg16f
`?GL_R11F_G11F_B10F'r11f_g11f_b10f
`?GL_R32F'r32f
`?GL_R16F'r16f
`?GL_RGBA32UI'rgba32ui
`?GL_RGBA16UI' +%% rgba16ui
`?GL_RGB10_A2UI'rgb10_a2ui
`?GL_RGBA8UI' +%% rgba8ui
`?GL_RG32UI'rg32ui
`?GL_RG16UI' +%% rg16ui
`?GL_RG8UI'rg8ui
`?GL_R32UI' +%% r32ui
`?GL_R16UI'r16ui
`?GL_R8UI' +%% r8ui
`?GL_RGBA32I'rgba32i
`?GL_RGBA16I' +%% rgba16i
`?GL_RGBA8I'rgba8i
`?GL_RG32I' +%% rg32i
`?GL_RG16I'rg16i
`?GL_RG8I' +%% rg8i
`?GL_R32I'r32i
`?GL_R16I' +%% r16i
`?GL_R8I'r8i
`?GL_RGBA16' +%% rgba16
`?GL_RGB10_A2'rgb10_a2
`?GL_RGBA8' +%% rgba8
`?GL_RG16'rg16
`?GL_RG8' +%% rg8
`?GL_R16'r16
`?GL_R8'r8
`?GL_RGBA16_SNORM'rgba16_snorm
`?GL_RGBA8_SNORM' +%% rgba8_snorm
`?GL_RG16_SNORM'rg16_snorm
`?GL_RG8_SNORM'rg8_snorm
`?GL_R16_SNORM'r16_snorm +%%
`?GL_R8_SNORM'r8_snorm
+%% +%% When a texture is bound to an image unit, the `Format' parameter for the image unit +%% need not exactly match the texture internal format as long as the formats are considered +%% compatible as defined in the OpenGL Specification. The matching criterion used for a given +%% texture may be determined by calling {@link gl:getTexParameterfv/2} with `Value' set +%% to `?GL_IMAGE_FORMAT_COMPATIBILITY_TYPE', with return values of `?GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE' +%% and `?GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS', specifying matches by size and class, +%% respectively. +%% +%% See external documentation. +-spec bindImageTexture(Unit, Texture, Level, Layered, Layer, Access, Format) -> ok when Unit :: integer(),Texture :: integer(),Level :: integer(),Layered :: 0|1,Layer :: integer(),Access :: enum(),Format :: enum(). +bindImageTexture(Unit,Texture,Level,Layered,Layer,Access,Format) -> + cast(5865, <>). + +%% @doc Defines a barrier ordering memory transactions +%% +%% ``gl:memoryBarrier'' defines a barrier ordering the memory transactions issued prior +%% to the command relative to those issued after the barrier. For the purposes of this ordering, +%% memory transactions performed by shaders are considered to be issued by the rendering +%% command that triggered the execution of the shader. `Barriers' is a bitfield indicating +%% the set of operations that are synchronized with shader stores; the bits used in `Barriers' +%% are as follows: +%% +%% +%% +%% `?GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT': If set, vertex data sourced from buffer objects +%% after the barrier will reflect data written by shaders prior to the barrier. The set of +%% buffer objects affected by this bit is derived from the buffer object bindings used for +%% generic vertex attributes derived from the `?GL_VERTEX_ATTRIB_ARRAY_BUFFER' bindings. +%% +%% +%% `?GL_ELEMENT_ARRAY_BARRIER_BIT': If set, vertex array indices sourced from buffer +%% objects after the barrier will reflect data written by shaders prior to the barrier. The +%% buffer objects affected by this bit are derived from the `?GL_ELEMENT_ARRAY_BUFFER' +%% binding. +%% +%% `?GL_UNIFORM_BARRIER_BIT': Shader uniforms sourced from buffer objects after the +%% barrier will reflect data written by shaders prior to the barrier. +%% +%% `?GL_TEXTURE_FETCH_BARRIER_BIT': Texture fetches from shaders, including fetches +%% from buffer object memory via buffer textures, after the barrier will reflect data written +%% by shaders prior to the barrier. +%% +%% `?GL_SHADER_IMAGE_ACCESS_BARRIER_BIT': Memory accesses using shader image load, +%% store, and atomic built-in functions issued after the barrier will reflect data written +%% by shaders prior to the barrier. Additionally, image stores and atomics issued after the +%% barrier will not execute until all memory accesses (e.g., loads, stores, texture fetches, +%% vertex fetches) initiated prior to the barrier complete. +%% +%% `?GL_COMMAND_BARRIER_BIT': Command data sourced from buffer objects by Draw*Indirect +%% commands after the barrier will reflect data written by shaders prior to the barrier. +%% The buffer objects affected by this bit are derived from the `?GL_DRAW_INDIRECT_BUFFER' +%% binding. +%% +%% `?GL_PIXEL_BUFFER_BARRIER_BIT': Reads and writes of buffer objects via the `?GL_PIXEL_PACK_BUFFER' +%% and `?GL_PIXEL_UNPACK_BUFFER' bindings (via {@link gl:readPixels/7} , {@link gl:texSubImage1D/7} +%% , etc.) after the barrier will reflect data written by shaders prior to the barrier. Additionally, +%% buffer object writes issued after the barrier will wait on the completion of all shader +%% writes initiated prior to the barrier. +%% +%% `?GL_TEXTURE_UPDATE_BARRIER_BIT': Writes to a texture via ``gl:tex(Sub)Image*'', ``gl:copyTex(Sub)Image*'' +%% , ``gl:compressedTex(Sub)Image*'', and reads via {@link gl:getTexImage/5} after the barrier +%% will reflect data written by shaders prior to the barrier. Additionally, texture writes +%% from these commands issued after the barrier will not execute until all shader writes +%% initiated prior to the barrier complete. +%% +%% `?GL_BUFFER_UPDATE_BARRIER_BIT': Reads or writes via {@link gl:bufferSubData/4} , {@link gl:copyBufferSubData/5} +%% , or {@link gl:getBufferSubData/4} , or to buffer object memory mapped by see `glMapBuffer' +%% or see `glMapBufferRange' after the barrier will reflect data written by shaders +%% prior to the barrier. Additionally, writes via these commands issued after the barrier +%% will wait on the completion of any shader writes to the same memory initiated prior to +%% the barrier. +%% +%% `?GL_FRAMEBUFFER_BARRIER_BIT': Reads and writes via framebuffer object attachments +%% after the barrier will reflect data written by shaders prior to the barrier. Additionally, +%% framebuffer writes issued after the barrier will wait on the completion of all shader +%% writes issued prior to the barrier. +%% +%% `?GL_TRANSFORM_FEEDBACK_BARRIER_BIT': Writes via transform feedback bindings after +%% the barrier will reflect data written by shaders prior to the barrier. Additionally, transform +%% feedback writes issued after the barrier will wait on the completion of all shader writes +%% issued prior to the barrier. +%% +%% `?GL_ATOMIC_COUNTER_BARRIER_BIT': Accesses to atomic counters after the barrier +%% will reflect writes prior to the barrier. +%% +%% If `Barriers' is `?GL_ALL_BARRIER_BITS', shader memory accesses will be synchronized +%% relative to all the operations described above. +%% +%% Implementations may cache buffer object and texture image memory that could be written +%% by shaders in multiple caches; for example, there may be separate caches for texture, +%% vertex fetching, and one or more caches for shader memory accesses. Implementations are +%% not required to keep these caches coherent with shader memory writes. Stores issued by +%% one invocation may not be immediately observable by other pipeline stages or other shader +%% invocations because the value stored may remain in a cache local to the processor executing +%% the store, or because data overwritten by the store is still in a cache elsewhere in the +%% system. When ``gl:memoryBarrier'' is called, the GL flushes and/or invalidates any caches +%% relevant to the operations specified by the `Barriers' parameter to ensure consistent +%% ordering of operations across the barrier. +%% +%% To allow for independent shader invocations to communicate by reads and writes to a common +%% memory address, image variables in the OpenGL Shading Language may be declared as "coherent". +%% Buffer object or texture image memory accessed through such variables may be cached only +%% if caches are automatically updated due to stores issued by any other shader invocation. +%% If the same address is accessed using both coherent and non-coherent variables, the accesses +%% using variables declared as coherent will observe the results stored using coherent variables +%% in other invocations. Using variables declared as "coherent" guarantees only that the +%% results of stores will be immediately visible to shader invocations using similarly-declared +%% variables; calling ``gl:memoryBarrier'' is required to ensure that the stores are visible +%% to other operations. +%% +%% The following guidelines may be helpful in choosing when to use coherent memory accesses +%% and when to use barriers. +%% +%% Data that are read-only or constant may be accessed without using coherent variables or +%% calling MemoryBarrier(). Updates to the read-only data via API calls such as BufferSubData +%% will invalidate shader caches implicitly as required. +%% +%% Data that are shared between shader invocations at a fine granularity (e.g., written by +%% one invocation, consumed by another invocation) should use coherent variables to read +%% and write the shared data. +%% +%% Data written by one shader invocation and consumed by other shader invocations launched +%% as a result of its execution ("dependent invocations") should use coherent variables in +%% the producing shader invocation and call memoryBarrier() after the last write. The consuming +%% shader invocation should also use coherent variables. +%% +%% Data written to image variables in one rendering pass and read by the shader in a later +%% pass need not use coherent variables or memoryBarrier(). Calling MemoryBarrier() with +%% the SHADER_IMAGE_ACCESS_BARRIER_BIT set in `Barriers' between passes is necessary. +%% +%% Data written by the shader in one rendering pass and read by another mechanism (e.g., +%% vertex or index buffer pulling) in a later pass need not use coherent variables or memoryBarrier(). +%% Calling ``gl:memoryBarrier'' with the appropriate bits set in `Barriers' between +%% passes is necessary. +%% +%% See external documentation. +-spec memoryBarrier(Barriers) -> ok when Barriers :: integer(). +memoryBarrier(Barriers) -> + cast(5866, <>). + +%% @doc Simultaneously specify storage for all levels of a one-dimensional texture +%% +%% ``gl:texStorage1D'' specifies the storage requirements for all levels of a one-dimensional +%% texture simultaneously. Once a texture is specified with this command, the format and +%% dimensions of all levels become immutable unless it is a proxy texture. The contents of +%% the image may still be modified, however, its storage requirements may not change. Such +%% a texture is referred to as an `immutable-format' texture. +%% +%% Calling ``gl:texStorage1D'' is equivalent, assuming no errors are generated, to executing +%% the following pseudo-code: for (i = 0; i < levels; i++) { glTexImage1D(target, i, +%% internalformat, width, 0, format, type, NULL); width = max(1, (width / 2)); } +%% +%% Since no texture data is actually provided, the values used in the pseudo-code for `Format' +%% and `Type' are irrelevant and may be considered to be any values that are legal +%% for the chosen `Internalformat' enumerant. `Internalformat' must be one of the +%% sized internal formats given in Table 1 below, one of the sized depth-component formats `?GL_DEPTH_COMPONENT32F' +%% , `?GL_DEPTH_COMPONENT24', or `?GL_DEPTH_COMPONENT16', or one of the combined +%% depth-stencil formats, `?GL_DEPTH32F_STENCIL8', or `?GL_DEPTH24_STENCIL8'. Upon +%% success, the value of `?GL_TEXTURE_IMMUTABLE_FORMAT' becomes `?GL_TRUE'. The +%% value of `?GL_TEXTURE_IMMUTABLE_FORMAT' may be discovered by calling {@link gl:getTexParameterfv/2} +%% with `Pname' set to `?GL_TEXTURE_IMMUTABLE_FORMAT'. No further changes to the +%% dimensions or format of the texture object may be made. Using any command that might alter +%% the dimensions or format of the texture object (such as {@link gl:texImage1D/8} or another +%% call to ``gl:texStorage1D'') will result in the generation of a `?GL_INVALID_OPERATION' +%% error, even if it would not, in fact, alter the dimensions or format of the object. +%% +%% +%% +%% See external documentation. +-spec texStorage1D(Target, Levels, Internalformat, Width) -> ok when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer(). +texStorage1D(Target,Levels,Internalformat,Width) -> + cast(5867, <>). + +%% @doc Simultaneously specify storage for all levels of a two-dimensional or one-dimensional array texture +%% +%% ``gl:texStorage2D'' specifies the storage requirements for all levels of a two-dimensional +%% texture or one-dimensional texture array simultaneously. Once a texture is specified with +%% this command, the format and dimensions of all levels become immutable unless it is a +%% proxy texture. The contents of the image may still be modified, however, its storage requirements +%% may not change. Such a texture is referred to as an `immutable-format' texture. +%% +%% The behavior of ``gl:texStorage2D'' depends on the `Target' parameter. When `Target' +%% is `?GL_TEXTURE_2D', `?GL_PROXY_TEXTURE_2D', `?GL_TEXTURE_RECTANGLE', `?GL_PROXY_TEXTURE_RECTANGLE' +%% or `?GL_PROXY_TEXTURE_CUBE_MAP', calling ``gl:texStorage2D'' is equivalent, assuming +%% no errors are generated, to executing the following pseudo-code: for (i = 0; i < levels; +%% i++) { glTexImage2D(target, i, internalformat, width, height, 0, format, type, NULL); +%% width = max(1, (width / 2)); height = max(1, (height / 2)); } +%% +%% When `Target' is `?GL_TEXTURE_CUBE_MAP', ``gl:texStorage2D'' is equivalent +%% to: for (i = 0; i < levels; i++) { for (face in (+X, -X, +Y, -Y, +Z, -Z)) { glTexImage2D(face, +%% i, internalformat, width, height, 0, format, type, NULL); } width = max(1, (width / 2)); +%% height = max(1, (height / 2)); } +%% +%% When `Target' is `?GL_TEXTURE_1D' or `?GL_TEXTURE_1D_ARRAY', ``gl:texStorage2D'' +%% is equivalent to: for (i = 0; i < levels; i++) { glTexImage2D(target, i, internalformat, +%% width, height, 0, format, type, NULL); width = max(1, (width / 2)); } +%% +%% Since no texture data is actually provided, the values used in the pseudo-code for `Format' +%% and `Type' are irrelevant and may be considered to be any values that are legal +%% for the chosen `Internalformat' enumerant. `Internalformat' must be one of the +%% sized internal formats given in Table 1 below, one of the sized depth-component formats `?GL_DEPTH_COMPONENT32F' +%% , `?GL_DEPTH_COMPONENT24', or `?GL_DEPTH_COMPONENT16', or one of the combined +%% depth-stencil formats, `?GL_DEPTH32F_STENCIL8', or `?GL_DEPTH24_STENCIL8'. Upon +%% success, the value of `?GL_TEXTURE_IMMUTABLE_FORMAT' becomes `?GL_TRUE'. The +%% value of `?GL_TEXTURE_IMMUTABLE_FORMAT' may be discovered by calling {@link gl:getTexParameterfv/2} +%% with `Pname' set to `?GL_TEXTURE_IMMUTABLE_FORMAT'. No further changes to the +%% dimensions or format of the texture object may be made. Using any command that might alter +%% the dimensions or format of the texture object (such as {@link gl:texImage2D/9} or another +%% call to ``gl:texStorage2D'') will result in the generation of a `?GL_INVALID_OPERATION' +%% error, even if it would not, in fact, alter the dimensions or format of the object. +%% +%% +%% +%% See external documentation. +-spec texStorage2D(Target, Levels, Internalformat, Width, Height) -> ok when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(). +texStorage2D(Target,Levels,Internalformat,Width,Height) -> + cast(5868, <>). + +%% @doc Simultaneously specify storage for all levels of a three-dimensional, two-dimensional array or cube-map array texture +%% +%% ``gl:texStorage3D'' specifies the storage requirements for all levels of a three-dimensional, +%% two-dimensional array or cube-map array texture simultaneously. Once a texture is specified +%% with this command, the format and dimensions of all levels become immutable unless it +%% is a proxy texture. The contents of the image may still be modified, however, its storage +%% requirements may not change. Such a texture is referred to as an `immutable-format' +%% texture. +%% +%% The behavior of ``gl:texStorage3D'' depends on the `Target' parameter. When `Target' +%% is `?GL_TEXTURE_3D', or `?GL_PROXY_TEXTURE_3D', calling ``gl:texStorage3D'' +%% is equivalent, assuming no errors are generated, to executing the following pseudo-code: +%% for (i = 0; i < levels; i++) { glTexImage3D(target, i, internalformat, width, height, +%% depth, 0, format, type, NULL); width = max(1, (width / 2)); height = max(1, (height / +%% 2)); depth = max(1, (depth / 2)); } +%% +%% When `Target' is `?GL_TEXTURE_2D_ARRAY', `?GL_PROXY_TEXTURE_2D_ARRAY', `?GL_TEXTURE_CUBE_MAP_ARRAY' +%% , or `?GL_PROXY_TEXTURE_CUBE_MAP_ARRAY', ``gl:texStorage3D'' is equivalent to: +%% for (i = 0; i < levels; i++) { glTexImage3D(target, i, internalformat, width, height, +%% depth, 0, format, type, NULL); width = max(1, (width / 2)); height = max(1, (height / +%% 2)); } +%% +%% Since no texture data is actually provided, the values used in the pseudo-code for `Format' +%% and `Type' are irrelevant and may be considered to be any values that are legal +%% for the chosen `Internalformat' enumerant. `Internalformat' must be one of the +%% sized internal formats given in Table 1 below, one of the sized depth-component formats `?GL_DEPTH_COMPONENT32F' +%% , `?GL_DEPTH_COMPONENT24', or `?GL_DEPTH_COMPONENT16', or one of the combined +%% depth-stencil formats, `?GL_DEPTH32F_STENCIL8', or `?GL_DEPTH24_STENCIL8'. Upon +%% success, the value of `?GL_TEXTURE_IMMUTABLE_FORMAT' becomes `?GL_TRUE'. The +%% value of `?GL_TEXTURE_IMMUTABLE_FORMAT' may be discovered by calling {@link gl:getTexParameterfv/2} +%% with `Pname' set to `?GL_TEXTURE_IMMUTABLE_FORMAT'. No further changes to the +%% dimensions or format of the texture object may be made. Using any command that might alter +%% the dimensions or format of the texture object (such as {@link gl:texImage3D/10} or another +%% call to ``gl:texStorage3D'') will result in the generation of a `?GL_INVALID_OPERATION' +%% error, even if it would not, in fact, alter the dimensions or format of the object. +%% +%% +%% +%% See external documentation. +-spec texStorage3D(Target, Levels, Internalformat, Width, Height, Depth) -> ok when Target :: enum(),Levels :: integer(),Internalformat :: enum(),Width :: integer(),Height :: integer(),Depth :: integer(). +texStorage3D(Target,Levels,Internalformat,Width,Height,Depth) -> + cast(5869, <>). + +%% @doc glDepthBoundsEXT +%% +%% See external documentation. +-spec depthBoundsEXT(Zmin, Zmax) -> ok when Zmin :: clamp(),Zmax :: clamp(). depthBoundsEXT(Zmin,Zmax) -> - cast(5862, <>). + cast(5870, <>). -%% @spec (StencilTagBits::integer(),StencilClearTag::integer()) -> ok -%% @doc See external documentation. --spec stencilClearTagEXT(integer(),integer()) -> ok. +%% @doc glStencilClearTagEXT +%% +%% See external documentation. +-spec stencilClearTagEXT(StencilTagBits, StencilClearTag) -> ok when StencilTagBits :: integer(),StencilClearTag :: integer(). stencilClearTagEXT(StencilTagBits,StencilClearTag) -> - cast(5863, <>). + cast(5871, <>). diff --git a/lib/wx/src/gen/glu.erl b/lib/wx/src/gen/glu.erl index c16f0cf125..2c82c9792f 100644 --- a/lib/wx/src/gen/glu.erl +++ b/lib/wx/src/gen/glu.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% Copyright Ericsson AB 2008-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -25,11 +25,6 @@ %% %% Booleans are represented by integers 0 and 1. -%% @type mem(). memory block -%% @type enum(). An integer defined in gl.hrl -%% @type offset(). An integer which is an offset in an array -%% @type clamp(). A float clamped between 0.0 - 1.0 - -module(glu). -compile(inline). -define(GLenum,32/native-unsigned). @@ -53,8 +48,13 @@ -define(GLsync,64/native-unsigned). -define(GLuint64,64/native-unsigned). -define(GLint64,64/native-signed). --type enum() :: non_neg_integer(). --type mem() :: binary() | tuple(). +-type vertex() :: {float(), float(), float()}. +-type enum() :: non_neg_integer(). %% See wx/include/gl.hrl or glu.hrl +-type matrix() :: {float(),float(),float(),float(), + float(),float(),float(),float(), + float(),float(),float(),float(), + float(),float(),float(),float()}. +-type mem() :: binary() | tuple(). %% Memory block -export([tesselate/2,build1DMipmapLevels/9,build1DMipmaps/6,build2DMipmapLevels/10, build2DMipmaps/7,build3DMipmapLevels/11,build3DMipmaps/8,checkExtension/2, @@ -66,193 +66,676 @@ -import(gl, [call/2,cast/2,send_bin/1]). %% API -%% @spec (Vec3, [Vec3]) -> {Triangles, VertexPos} -%% Vec3 = {float(),float(),float()} -%% Triangles = [VertexIndex::integer()] -%% VertexPos = binary() %% @doc General purpose polygon triangulation. %% The first argument is the normal and the second a list of %% vertex positions. Returned is a list of indecies of the vertices %% and a binary (64bit native float) containing an array of %% vertex positions, it starts with the vertices in Vs and %% may contain newly created vertices in the end. +-spec tesselate(Normal, [Vs]) -> {Triangles, VertexPos} + when Normal :: vertex(), Vs :: vertex(), + Triangles :: [integer()], VertexPos :: binary(). tesselate({Nx,Ny,Nz}, Vs) -> call(5000, <<(length(Vs)):32/native,0:32, Nx:?GLdouble,Ny:?GLdouble,Nz:?GLdouble, (<< <> || {Vx,Vy,Vz} <- Vs>>)/binary >>). -%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Format::enum(),Type::enum(),Level::integer(),Base::integer(),Max::integer(),Data::binary()) -> integer() -%% @doc See external documentation. --spec build1DMipmapLevels(enum(),integer(),integer(),enum(),enum(),integer(),integer(),integer(),binary()) -> integer(). +%% @doc Builds a subset of one-dimensional mipmap levels +%% +%% ``glu:build1DMipmapLevels'' builds a subset of prefiltered one-dimensional texture maps +%% of decreasing resolutions called a mipmap. This is used for the antialiasing of texture +%% mapped primitives. +%% +%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1} +%% ). +%% +%% A series of mipmap levels from `Base' to `Max' is built by decimating `Data' +%% in half until size 1*1 is reached. At each level, each texel in the halved mipmap +%% level is an average of the corresponding two texels in the larger mipmap level. {@link gl:texImage1D/8} +%% is called to load these mipmap levels from `Base' to `Max' . If `Max' is +%% larger than the highest mipmap level for the texture of the specified size, then a GLU +%% error code is returned (see {@link glu:errorString/1} ) and nothing is loaded. +%% +%% For example, if `Level' is 2 and `Width' is 16, the following levels are possible: +%% 16*1, 8*1, 4*1, 2*1, 1*1. These correspond to levels 2 through 6 respectively. +%% If `Base' is 3 and `Max' is 5, then only mipmap levels 8*1, 4*1 and 2*1 +%% are loaded. However, if `Max' is 7, then an error is returned and nothing is loaded +%% since `Max' is larger than the highest mipmap level which is, in this case, 6. +%% +%% The highest mipmap level can be derived from the formula log 2(width*2 level). +%% +%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values +%% for `Type' parameter. See the {@link gl:drawPixels/5} reference page for a description +%% of the acceptable values for `Level' parameter. +%% +%% See external documentation. +-spec build1DMipmapLevels(Target, InternalFormat, Width, Format, Type, Level, Base, Max, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Level :: integer(),Base :: integer(),Max :: integer(),Data :: binary(). build1DMipmapLevels(Target,InternalFormat,Width,Format,Type,Level,Base,Max,Data) -> send_bin(Data), call(5010, <>). -%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Format::enum(),Type::enum(),Data::binary()) -> integer() -%% @doc See external documentation. --spec build1DMipmaps(enum(),integer(),integer(),enum(),enum(),binary()) -> integer(). +%% @doc Builds a one-dimensional mipmap +%% +%% ``glu:build1DMipmaps'' builds a series of prefiltered one-dimensional texture maps of +%% decreasing resolutions called a mipmap. This is used for the antialiasing of texture mapped +%% primitives. +%% +%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1} +%% ). +%% +%% Initially, the `Width' of `Data' is checked to see if it is a power of 2. If +%% not, a copy of `Data' is scaled up or down to the nearest power of 2. (If `Width' +%% is exactly between powers of 2, then the copy of `Data' will scale upwards.) This +%% copy will be used for subsequent mipmapping operations described below. For example, if `Width' +%% is 57, then a copy of `Data' will scale up to 64 before mipmapping takes place. +%% +%% Then, proxy textures (see {@link gl:texImage1D/8} ) are used to determine if the implementation +%% can fit the requested texture. If not, `Width' is continually halved until it fits. +%% +%% Next, a series of mipmap levels is built by decimating a copy of `Data' in half +%% until size 1*1 is reached. At each level, each texel in the halved mipmap level is an +%% average of the corresponding two texels in the larger mipmap level. +%% +%% {@link gl:texImage1D/8} is called to load each of these mipmap levels. Level 0 is a copy +%% of `Data' . The highest level is (log 2)(width). For example, if `Width' is 64 and the implementation +%% can store a texture of this size, the following mipmap levels are built: 64*1, 32*1, +%% 16*1, 8*1, 4*1, 2*1, and 1*1. These correspond to levels 0 through 6, respectively. +%% +%% +%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values +%% for the `Type' parameter. See the {@link gl:drawPixels/5} reference page for a description +%% of the acceptable values for the `Data' parameter. +%% +%% See external documentation. +-spec build1DMipmaps(Target, InternalFormat, Width, Format, Type, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Format :: enum(),Type :: enum(),Data :: binary(). build1DMipmaps(Target,InternalFormat,Width,Format,Type,Data) -> send_bin(Data), call(5011, <>). -%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Level::integer(),Base::integer(),Max::integer(),Data::binary()) -> integer() -%% @doc See external documentation. --spec build2DMipmapLevels(enum(),integer(),integer(),integer(),enum(),enum(),integer(),integer(),integer(),binary()) -> integer(). +%% @doc Builds a subset of two-dimensional mipmap levels +%% +%% ``glu:build2DMipmapLevels'' builds a subset of prefiltered two-dimensional texture maps +%% of decreasing resolutions called a mipmap. This is used for the antialiasing of texture +%% mapped primitives. +%% +%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1} +%% ). +%% +%% A series of mipmap levels from `Base' to `Max' is built by decimating `Data' +%% in half along both dimensions until size 1*1 is reached. At each level, each texel +%% in the halved mipmap level is an average of the corresponding four texels in the larger +%% mipmap level. (In the case of rectangular images, the decimation will ultimately reach +%% an N*1 or 1*N configuration. Here, two texels are averaged instead.) {@link gl:texImage2D/9} +%% is called to load these mipmap levels from `Base' to `Max' . If `Max' is +%% larger than the highest mipmap level for the texture of the specified size, then a GLU +%% error code is returned (see {@link glu:errorString/1} ) and nothing is loaded. +%% +%% For example, if `Level' is 2 and `Width' is 16 and `Height' is 8, the +%% following levels are possible: 16*8, 8*4, 4*2, 2*1, 1*1. These correspond to +%% levels 2 through 6 respectively. If `Base' is 3 and `Max' is 5, then only mipmap +%% levels 8*4, 4*2, and 2*1 are loaded. However, if `Max' is 7, then an error is +%% returned and nothing is loaded since `Max' is larger than the highest mipmap level +%% which is, in this case, 6. +%% +%% The highest mipmap level can be derived from the formula log 2(max(width height)*2 level). +%% +%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values +%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description +%% of the acceptable values for `Type' parameter. +%% +%% See external documentation. +-spec build2DMipmapLevels(Target, InternalFormat, Width, Height, Format, Type, Level, Base, Max, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Level :: integer(),Base :: integer(),Max :: integer(),Data :: binary(). build2DMipmapLevels(Target,InternalFormat,Width,Height,Format,Type,Level,Base,Max,Data) -> send_bin(Data), call(5012, <>). -%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Data::binary()) -> integer() -%% @doc See external documentation. --spec build2DMipmaps(enum(),integer(),integer(),integer(),enum(),enum(),binary()) -> integer(). +%% @doc Builds a two-dimensional mipmap +%% +%% ``glu:build2DMipmaps'' builds a series of prefiltered two-dimensional texture maps of +%% decreasing resolutions called a mipmap. This is used for the antialiasing of texture-mapped +%% primitives. +%% +%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1} +%% ). +%% +%% Initially, the `Width' and `Height' of `Data' are checked to see if they +%% are a power of 2. If not, a copy of `Data' (not `Data' ), is scaled up or down +%% to the nearest power of 2. This copy will be used for subsequent mipmapping operations +%% described below. (If `Width' or `Height' is exactly between powers of 2, then +%% the copy of `Data' will scale upwards.) For example, if `Width' is 57 and `Height' +%% is 23, then a copy of `Data' will scale up to 64 in `Width' and down to 16 +%% in depth, before mipmapping takes place. +%% +%% Then, proxy textures (see {@link gl:texImage2D/9} ) are used to determine if the implementation +%% can fit the requested texture. If not, both dimensions are continually halved until it +%% fits. (If the OpenGL version is (<= 1.0, both maximum texture dimensions are clamped +%% to the value returned by {@link gl:getBooleanv/1} with the argument `?GLU_MAX_TEXTURE_SIZE' +%% .) +%% +%% Next, a series of mipmap levels is built by decimating a copy of `Data' in half +%% along both dimensions until size 1*1 is reached. At each level, each texel in the halved +%% mipmap level is an average of the corresponding four texels in the larger mipmap level. +%% (In the case of rectangular images, the decimation will ultimately reach an N*1 or 1*N +%% configuration. Here, two texels are averaged instead.) +%% +%% {@link gl:texImage2D/9} is called to load each of these mipmap levels. Level 0 is a copy +%% of `Data' . The highest level is (log 2)(max(width height)). For example, if `Width' is 64 and `Height' +%% is 16 and the implementation can store a texture of this size, the following mipmap levels +%% are built: 64*16, 32*8, 16*4, 8*2, 4*1, 2*1, and 1*1 These correspond to +%% levels 0 through 6, respectively. +%% +%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values +%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description +%% of the acceptable values for `Type' parameter. +%% +%% See external documentation. +-spec build2DMipmaps(Target, InternalFormat, Width, Height, Format, Type, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Format :: enum(),Type :: enum(),Data :: binary(). build2DMipmaps(Target,InternalFormat,Width,Height,Format,Type,Data) -> send_bin(Data), call(5013, <>). -%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Height::integer(),Depth::integer(),Format::enum(),Type::enum(),Level::integer(),Base::integer(),Max::integer(),Data::binary()) -> integer() -%% @doc See external documentation. --spec build3DMipmapLevels(enum(),integer(),integer(),integer(),integer(),enum(),enum(),integer(),integer(),integer(),binary()) -> integer(). +%% @doc Builds a subset of three-dimensional mipmap levels +%% +%% ``glu:build3DMipmapLevels'' builds a subset of prefiltered three-dimensional texture +%% maps of decreasing resolutions called a mipmap. This is used for the antialiasing of texture +%% mapped primitives. +%% +%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1} +%% ). +%% +%% A series of mipmap levels from `Base' to `Max' is built by decimating `Data' +%% in half along both dimensions until size 1*1*1 is reached. At each level, each texel +%% in the halved mipmap level is an average of the corresponding eight texels in the larger +%% mipmap level. (If exactly one of the dimensions is 1, four texels are averaged. If exactly +%% two of the dimensions are 1, two texels are averaged.) {@link gl:texImage3D/10} is called +%% to load these mipmap levels from `Base' to `Max' . If `Max' is larger than +%% the highest mipmap level for the texture of the specified size, then a GLU error code +%% is returned (see {@link glu:errorString/1} ) and nothing is loaded. +%% +%% For example, if `Level' is 2 and `Width' is 16, `Height' is 8 and `Depth' +%% is 4, the following levels are possible: 16*8*4, 8*4*2, 4*2*1, 2*1*1, 1*1*1. +%% These correspond to levels 2 through 6 respectively. If `Base' is 3 and `Max' +%% is 5, then only mipmap levels 8*4*2, 4*2*1, and 2*1*1 are loaded. However, if `Max' +%% is 7, then an error is returned and nothing is loaded, since `Max' is larger than +%% the highest mipmap level which is, in this case, 6. +%% +%% The highest mipmap level can be derived from the formula log 2(max(width height depth)*2 level). +%% +%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values +%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description +%% of the acceptable values for `Type' parameter. +%% +%% See external documentation. +-spec build3DMipmapLevels(Target, InternalFormat, Width, Height, Depth, Format, Type, Level, Base, Max, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Level :: integer(),Base :: integer(),Max :: integer(),Data :: binary(). build3DMipmapLevels(Target,InternalFormat,Width,Height,Depth,Format,Type,Level,Base,Max,Data) -> send_bin(Data), call(5014, <>). -%% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Height::integer(),Depth::integer(),Format::enum(),Type::enum(),Data::binary()) -> integer() -%% @doc See external documentation. --spec build3DMipmaps(enum(),integer(),integer(),integer(),integer(),enum(),enum(),binary()) -> integer(). +%% @doc Builds a three-dimensional mipmap +%% +%% ``glu:build3DMipmaps'' builds a series of prefiltered three-dimensional texture maps +%% of decreasing resolutions called a mipmap. This is used for the antialiasing of texture-mapped +%% primitives. +%% +%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1} +%% ). +%% +%% Initially, the `Width' , `Height' and `Depth' of `Data' are checked +%% to see if they are a power of 2. If not, a copy of `Data' is made and scaled up or +%% down to the nearest power of 2. (If `Width' , `Height' , or `Depth' is exactly +%% between powers of 2, then the copy of `Data' will scale upwards.) This copy will +%% be used for subsequent mipmapping operations described below. For example, if `Width' +%% is 57, `Height' is 23, and `Depth' is 24, then a copy of `Data' will scale +%% up to 64 in width, down to 16 in height, and up to 32 in depth before mipmapping takes +%% place. +%% +%% Then, proxy textures (see {@link gl:texImage3D/10} ) are used to determine if the implementation +%% can fit the requested texture. If not, all three dimensions are continually halved until +%% it fits. +%% +%% Next, a series of mipmap levels is built by decimating a copy of `Data' in half +%% along all three dimensions until size 1*1*1 is reached. At each level, each texel in +%% the halved mipmap level is an average of the corresponding eight texels in the larger +%% mipmap level. (If exactly one of the dimensions is 1, four texels are averaged. If exactly +%% two of the dimensions are 1, two texels are averaged.) +%% +%% {@link gl:texImage3D/10} is called to load each of these mipmap levels. Level 0 is a copy +%% of `Data' . The highest level is (log 2)(max(width height depth)). For example, if `Width' is 64, `Height' +%% is 16, and `Depth' is 32, and the implementation can store a texture of this size, +%% the following mipmap levels are built: 64*16*32, 32*8*16, 16*4*8, 8*2*4, 4*1*2, +%% 2*1*1, and 1*1*1. These correspond to levels 0 through 6, respectively. +%% +%% See the {@link gl:texImage1D/8} reference page for a description of the acceptable values +%% for `Format' parameter. See the {@link gl:drawPixels/5} reference page for a description +%% of the acceptable values for `Type' parameter. +%% +%% See external documentation. +-spec build3DMipmaps(Target, InternalFormat, Width, Height, Depth, Format, Type, Data) -> integer() when Target :: enum(),InternalFormat :: integer(),Width :: integer(),Height :: integer(),Depth :: integer(),Format :: enum(),Type :: enum(),Data :: binary(). build3DMipmaps(Target,InternalFormat,Width,Height,Depth,Format,Type,Data) -> send_bin(Data), call(5015, <>). -%% @spec (ExtName::string(),ExtString::string()) -> 0|1 -%% @doc See external documentation. --spec checkExtension(string(),string()) -> 0|1. +%% @doc Determines if an extension name is supported +%% +%% ``glu:checkExtension'' returns `?GLU_TRUE' if `ExtName' is supported otherwise +%% `?GLU_FALSE' is returned. +%% +%% This is used to check for the presence for OpenGL, GLU, or GLX extension names by passing +%% the extension strings returned by {@link gl:getString/1} , {@link glu:getString/1} , see `glXGetClientString' +%% , see `glXQueryExtensionsString', or see `glXQueryServerString', respectively, +%% as `ExtString' . +%% +%% See external documentation. +-spec checkExtension(ExtName, ExtString) -> 0|1 when ExtName :: string(),ExtString :: string(). checkExtension(ExtName,ExtString) -> call(5016, <<(list_to_binary([ExtName|[0]]))/binary,0:((8-((length(ExtName)+ 1) rem 8)) rem 8),(list_to_binary([ExtString|[0]]))/binary,0:((8-((length(ExtString)+ 1) rem 8)) rem 8)>>). -%% @spec (Quad::integer(),Base::float(),Top::float(),Height::float(),Slices::integer(),Stacks::integer()) -> ok -%% @doc See external documentation. --spec cylinder(integer(),float(),float(),float(),integer(),integer()) -> ok. +%% @doc Draw a cylinder +%% +%% ``glu:cylinder'' draws a cylinder oriented along the `z' axis. The base of the +%% cylinder is placed at `z' = 0 and the top at z= height. Like a sphere, a cylinder +%% is subdivided around the `z' axis into slices and along the `z' axis into stacks. +%% +%% +%% Note that if `Top' is set to 0.0, this routine generates a cone. +%% +%% If the orientation is set to `?GLU_OUTSIDE' (with {@link glu:quadricOrientation/2} ), +%% then any generated normals point away from the `z' axis. Otherwise, they point toward +%% the `z' axis. +%% +%% If texturing is turned on (with {@link glu:quadricTexture/2} ), then texture coordinates +%% are generated so that `t' ranges linearly from 0.0 at `z' = 0 to 1.0 at `z' +%% = `Height' , and `s' ranges from 0.0 at the +`y' axis, to 0.25 at the +`x' +%% axis, to 0.5 at the -`y' axis, to 0.75 at the -`x' axis, and back to 1.0 +%% at the +`y' axis. +%% +%% See external documentation. +-spec cylinder(Quad, Base, Top, Height, Slices, Stacks) -> ok when Quad :: integer(),Base :: float(),Top :: float(),Height :: float(),Slices :: integer(),Stacks :: integer(). cylinder(Quad,Base,Top,Height,Slices,Stacks) -> cast(5017, <>). -%% @spec (Quad::integer()) -> ok -%% @doc See external documentation. --spec deleteQuadric(integer()) -> ok. +%% @doc Destroy a quadrics object +%% +%% ``glu:deleteQuadric'' destroys the quadrics object (created with {@link glu:newQuadric/0} ) +%% and frees any memory it uses. Once ``glu:deleteQuadric'' has been called, `Quad' +%% cannot be used again. +%% +%% See external documentation. +-spec deleteQuadric(Quad) -> ok when Quad :: integer(). deleteQuadric(Quad) -> cast(5018, <>). -%% @spec (Quad::integer(),Inner::float(),Outer::float(),Slices::integer(),Loops::integer()) -> ok -%% @doc See external documentation. --spec disk(integer(),float(),float(),integer(),integer()) -> ok. +%% @doc Draw a disk +%% +%% ``glu:disk'' renders a disk on the `z' = 0 plane. The disk has a radius of `Outer' +%% and contains a concentric circular hole with a radius of `Inner' . If `Inner' +%% is 0, then no hole is generated. The disk is subdivided around the `z' axis into +%% slices (like pizza slices) and also about the `z' axis into rings (as specified by `Slices' +%% and `Loops' , respectively). +%% +%% With respect to orientation, the +`z' side of the disk is considered to be ``outside'' +%% (see {@link glu:quadricOrientation/2} ). This means that if the orientation is set to `?GLU_OUTSIDE' +%% , then any normals generated point along the +`z' axis. Otherwise, they point along +%% the -`z' axis. +%% +%% If texturing has been turned on (with {@link glu:quadricTexture/2} ), texture coordinates +%% are generated linearly such that where r= outer, the value at (`r', 0, 0) is (1, +%% 0.5), at (0, `r', 0) it is (0.5, 1), at (-`r', 0, 0) it is (0, 0.5), and at +%% (0, -`r', 0) it is (0.5, 0). +%% +%% See external documentation. +-spec disk(Quad, Inner, Outer, Slices, Loops) -> ok when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer(). disk(Quad,Inner,Outer,Slices,Loops) -> cast(5019, <>). -%% @spec (Error::enum()) -> string() -%% @doc See external documentation. --spec errorString(enum()) -> string(). +%% @doc Produce an error string from a GL or GLU error code +%% +%% ``glu:errorString'' produces an error string from a GL or GLU error code. The string +%% is in ISO Latin 1 format. For example, ``glu:errorString''(`?GLU_OUT_OF_MEMORY') +%% returns the string `out of memory'. +%% +%% The standard GLU error codes are `?GLU_INVALID_ENUM', `?GLU_INVALID_VALUE', +%% and `?GLU_OUT_OF_MEMORY'. Certain other GLU functions can return specialized error +%% codes through callbacks. See the {@link gl:getError/0} reference page for the list of +%% GL error codes. +%% +%% See external documentation. +-spec errorString(Error) -> string() when Error :: enum(). errorString(Error) -> call(5020, <>). -%% @spec (Name::enum()) -> string() -%% @doc See external documentation. --spec getString(enum()) -> string(). +%% @doc Return a string describing the GLU version or GLU extensions +%% +%% ``glu:getString'' returns a pointer to a static string describing the GLU version or +%% the GLU extensions that are supported. +%% +%% The version number is one of the following forms: +%% +%% `major_number.minor_number'`major_number.minor_number.release_number'. +%% +%% The version string is of the following form: +%% +%% `version number<space>vendor-specific information' +%% +%% Vendor-specific information is optional. Its format and contents depend on the implementation. +%% +%% +%% The standard GLU contains a basic set of features and capabilities. If a company or group +%% of companies wish to support other features, these may be included as extensions to the +%% GLU. If `Name' is `?GLU_EXTENSIONS', then ``glu:getString'' returns a space-separated +%% list of names of supported GLU extensions. (Extension names never contain spaces.) +%% +%% All strings are null-terminated. +%% +%% See external documentation. +-spec getString(Name) -> string() when Name :: enum(). getString(Name) -> call(5021, <>). -%% @spec (EyeX::float(),EyeY::float(),EyeZ::float(),CenterX::float(),CenterY::float(),CenterZ::float(),UpX::float(),UpY::float(),UpZ::float()) -> ok -%% @doc See external documentation. --spec lookAt(float(),float(),float(),float(),float(),float(),float(),float(),float()) -> ok. +%% @doc Define a viewing transformation +%% +%% ``glu:lookAt'' creates a viewing matrix derived from an eye point, a reference point +%% indicating the center of the scene, and an `UP' vector. +%% +%% The matrix maps the reference point to the negative `z' axis and the eye point to +%% the origin. When a typical projection matrix is used, the center of the scene therefore +%% maps to the center of the viewport. Similarly, the direction described by the `UP' +%% vector projected onto the viewing plane is mapped to the positive `y' axis so that +%% it points upward in the viewport. The `UP' vector must not be parallel to the line +%% of sight from the eye point to the reference point. +%% +%% Let +%% +%% F=(centerX-eyeX centerY-eyeY centerZ-eyeZ) +%% +%% Let `UP' be the vector (upX upY upZ). +%% +%% Then normalize as follows: f= F/(||F||) +%% +%% UP"= UP/(||UP||) +%% +%% Finally, let s= f*UP", and u= s*f. +%% +%% M is then constructed as follows: M=(s[0] s[1] s[2] 0 u[0] u[1] u[2] 0-f[0]-f[1]-f[2] 0 0 0 0 1) +%% +%% and ``glu:lookAt'' is equivalent to glMultMatrixf(M); glTranslated(-eyex, -eyey, +%% -eyez); +%% +%% See external documentation. +-spec lookAt(EyeX, EyeY, EyeZ, CenterX, CenterY, CenterZ, UpX, UpY, UpZ) -> ok when EyeX :: float(),EyeY :: float(),EyeZ :: float(),CenterX :: float(),CenterY :: float(),CenterZ :: float(),UpX :: float(),UpY :: float(),UpZ :: float(). lookAt(EyeX,EyeY,EyeZ,CenterX,CenterY,CenterZ,UpX,UpY,UpZ) -> cast(5022, <>). -%% @spec () -> integer() -%% @doc See external documentation. +%% @doc Create a quadrics object +%% +%% ``glu:newQuadric'' creates and returns a pointer to a new quadrics object. This object +%% must be referred to when calling quadrics rendering and control functions. A return value +%% of 0 means that there is not enough memory to allocate the object. +%% +%% See external documentation. -spec newQuadric() -> integer(). newQuadric() -> call(5023, <<>>). -%% @spec (Left::float(),Right::float(),Bottom::float(),Top::float()) -> ok -%% @doc See external documentation. --spec ortho2D(float(),float(),float(),float()) -> ok. +%% @doc Define a 2D orthographic projection matrix +%% +%% ``glu:ortho2D'' sets up a two-dimensional orthographic viewing region. This is equivalent +%% to calling {@link gl:ortho/6} with near= -1 and far= 1. +%% +%% See external documentation. +-spec ortho2D(Left, Right, Bottom, Top) -> ok when Left :: float(),Right :: float(),Bottom :: float(),Top :: float(). ortho2D(Left,Right,Bottom,Top) -> cast(5024, <>). -%% @spec (Quad::integer(),Inner::float(),Outer::float(),Slices::integer(),Loops::integer(),Start::float(),Sweep::float()) -> ok -%% @doc See external documentation. --spec partialDisk(integer(),float(),float(),integer(),integer(),float(),float()) -> ok. +%% @doc Draw an arc of a disk +%% +%% ``glu:partialDisk'' renders a partial disk on the z= 0 plane. A partial disk is similar +%% to a full disk, except that only the subset of the disk from `Start' through `Start' +%% + `Sweep' is included (where 0 degrees is along the +f2yf axis, 90 degrees along +%% the +`x' axis, 180 degrees along the -`y' axis, and 270 degrees along the -`x' +%% axis). +%% +%% The partial disk has a radius of `Outer' and contains a concentric circular hole +%% with a radius of `Inner' . If `Inner' is 0, then no hole is generated. The partial +%% disk is subdivided around the `z' axis into slices (like pizza slices) and also about +%% the `z' axis into rings (as specified by `Slices' and `Loops' , respectively). +%% +%% +%% With respect to orientation, the +`z' side of the partial disk is considered to +%% be outside (see {@link glu:quadricOrientation/2} ). This means that if the orientation +%% is set to `?GLU_OUTSIDE', then any normals generated point along the +`z' axis. +%% Otherwise, they point along the -`z' axis. +%% +%% If texturing is turned on (with {@link glu:quadricTexture/2} ), texture coordinates are +%% generated linearly such that where r= outer, the value at (`r', 0, 0) is (1.0, +%% 0.5), at (0, `r', 0) it is (0.5, 1.0), at (-`r', 0, 0) it is (0.0, 0.5), and +%% at (0, -`r', 0) it is (0.5, 0.0). +%% +%% See external documentation. +-spec partialDisk(Quad, Inner, Outer, Slices, Loops, Start, Sweep) -> ok when Quad :: integer(),Inner :: float(),Outer :: float(),Slices :: integer(),Loops :: integer(),Start :: float(),Sweep :: float(). partialDisk(Quad,Inner,Outer,Slices,Loops,Start,Sweep) -> cast(5025, <>). -%% @spec (Fovy::float(),Aspect::float(),ZNear::float(),ZFar::float()) -> ok -%% @doc See external documentation. --spec perspective(float(),float(),float(),float()) -> ok. +%% @doc Set up a perspective projection matrix +%% +%% ``glu:perspective'' specifies a viewing frustum into the world coordinate system. In +%% general, the aspect ratio in ``glu:perspective'' should match the aspect ratio of the +%% associated viewport. For example, aspect= 2.0 means the viewer's angle of view is twice +%% as wide in `x' as it is in `y'. If the viewport is twice as wide as it is tall, +%% it displays the image without distortion. +%% +%% The matrix generated by ``glu:perspective'' is multipled by the current matrix, just +%% as if {@link gl:multMatrixd/1} were called with the generated matrix. To load the perspective +%% matrix onto the current matrix stack instead, precede the call to ``glu:perspective'' +%% with a call to {@link gl:loadIdentity/0} . +%% +%% Given `f' defined as follows: +%% +%% f= cotangent(fovy/2) The generated matrix is +%% +%% (f/aspect 0 0 0 0 f 0 0 0 0(zFar+zNear)/(zNear-zFar)(2*zFar*zNear)/(zNear-zFar) 0 0 -1 0) +%% +%% See external documentation. +-spec perspective(Fovy, Aspect, ZNear, ZFar) -> ok when Fovy :: float(),Aspect :: float(),ZNear :: float(),ZFar :: float(). perspective(Fovy,Aspect,ZNear,ZFar) -> cast(5026, <>). -%% @spec (X::float(),Y::float(),DelX::float(),DelY::float(),Viewport::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec pickMatrix(float(),float(),float(),float(),{integer(),integer(),integer(),integer()}) -> ok. +%% @doc Define a picking region +%% +%% ``glu:pickMatrix'' creates a projection matrix that can be used to restrict drawing +%% to a small region of the viewport. This is typically useful to determine what objects +%% are being drawn near the cursor. Use ``glu:pickMatrix'' to restrict drawing to a small +%% region around the cursor. Then, enter selection mode (with {@link gl:renderMode/1} ) and +%% rerender the scene. All primitives that would have been drawn near the cursor are identified +%% and stored in the selection buffer. +%% +%% The matrix created by ``glu:pickMatrix'' is multiplied by the current matrix just as +%% if {@link gl:multMatrixd/1} is called with the generated matrix. To effectively use the +%% generated pick matrix for picking, first call {@link gl:loadIdentity/0} to load an identity +%% matrix onto the perspective matrix stack. Then call ``glu:pickMatrix'', and, finally, +%% call a command (such as {@link glu:perspective/4} ) to multiply the perspective matrix by +%% the pick matrix. +%% +%% When using ``glu:pickMatrix'' to pick NURBS, be careful to turn off the NURBS property +%% `?GLU_AUTO_LOAD_MATRIX'. If `?GLU_AUTO_LOAD_MATRIX' is not turned off, then +%% any NURBS surface rendered is subdivided differently with the pick matrix than the way +%% it was subdivided without the pick matrix. +%% +%% See external documentation. +-spec pickMatrix(X, Y, DelX, DelY, Viewport) -> ok when X :: float(),Y :: float(),DelX :: float(),DelY :: float(),Viewport :: {integer(),integer(),integer(),integer()}. pickMatrix(X,Y,DelX,DelY,{V1,V2,V3,V4}) -> cast(5027, <>). -%% @spec (ObjX::float(),ObjY::float(),ObjZ::float(),Model::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},Proj::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},View::{integer(),integer(),integer(),integer()}) -> {integer(),WinX::float(),WinY::float(),WinZ::float()} -%% @doc See external documentation. --spec project(float(),float(),float(),{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{integer(),integer(),integer(),integer()}) -> {integer(),float(),float(),float()}. +%% @doc Map object coordinates to window coordinates +%% +%% ``glu:project'' transforms the specified object coordinates into window coordinates +%% using `Model' , `Proj' , and `View' . The result is stored in `WinX' , `WinY' +%% , and `WinZ' . A return value of `?GLU_TRUE' indicates success, a return value +%% of `?GLU_FALSE' indicates failure. +%% +%% To compute the coordinates, let v=(objX objY objZ 1.0) represented as a matrix with 4 rows and 1 column. +%% Then ``glu:project'' computes v" as follows: +%% +%% v"= P*M*v +%% +%% where P is the current projection matrix `Proj' and M is the current modelview +%% matrix `Model' (both represented as 4*4 matrices in column-major order). +%% +%% The window coordinates are then computed as follows: +%% +%% winX= view(0)+view(2)*(v"(0)+1)/2 +%% +%% winY= view(1)+view(3)*(v"(1)+1)/2 +%% +%% winZ=(v"(2)+1)/2 +%% +%% +%% +%% See external documentation. +-spec project(ObjX, ObjY, ObjZ, Model, Proj, View) -> {integer(),WinX :: float(),WinY :: float(),WinZ :: float()} when ObjX :: float(),ObjY :: float(),ObjZ :: float(),Model :: matrix(),Proj :: matrix(),View :: {integer(),integer(),integer(),integer()}. project(ObjX,ObjY,ObjZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16},{V1,V2,V3,V4}) -> call(5028, <>); project(ObjX,ObjY,ObjZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12},{V1,V2,V3,V4}) -> call(5028, <>). -%% @spec (Quad::integer(),Draw::enum()) -> ok -%% @doc See external documentation. --spec quadricDrawStyle(integer(),enum()) -> ok. +%% @doc Specify the draw style desired for quadrics +%% +%% ``glu:quadricDrawStyle'' specifies the draw style for quadrics rendered with `Quad' . +%% The legal values are as follows: +%% +%% `?GLU_FILL': Quadrics are rendered with polygon primitives. The polygons are drawn +%% in a counterclockwise fashion with respect to their normals (as defined with {@link glu:quadricOrientation/2} +%% ). +%% +%% `?GLU_LINE': Quadrics are rendered as a set of lines. +%% +%% `?GLU_SILHOUETTE': Quadrics are rendered as a set of lines, except that edges separating +%% coplanar faces will not be drawn. +%% +%% `?GLU_POINT': Quadrics are rendered as a set of points. +%% +%% See external documentation. +-spec quadricDrawStyle(Quad, Draw) -> ok when Quad :: integer(),Draw :: enum(). quadricDrawStyle(Quad,Draw) -> cast(5029, <>). -%% @spec (Quad::integer(),Normal::enum()) -> ok -%% @doc See external documentation. --spec quadricNormals(integer(),enum()) -> ok. +%% @doc Specify what kind of normals are desired for quadrics +%% +%% ``glu:quadricNormals'' specifies what kind of normals are desired for quadrics rendered +%% with `Quad' . The legal values are as follows: +%% +%% `?GLU_NONE': No normals are generated. +%% +%% `?GLU_FLAT': One normal is generated for every facet of a quadric. +%% +%% `?GLU_SMOOTH': One normal is generated for every vertex of a quadric. This is the +%% initial value. +%% +%% See external documentation. +-spec quadricNormals(Quad, Normal) -> ok when Quad :: integer(),Normal :: enum(). quadricNormals(Quad,Normal) -> cast(5030, <>). -%% @spec (Quad::integer(),Orientation::enum()) -> ok -%% @doc See external documentation. --spec quadricOrientation(integer(),enum()) -> ok. +%% @doc Specify inside/outside orientation for quadrics +%% +%% ``glu:quadricOrientation'' specifies what kind of orientation is desired for quadrics +%% rendered with `Quad' . The `Orientation' values are as follows: +%% +%% `?GLU_OUTSIDE': Quadrics are drawn with normals pointing outward (the initial value). +%% +%% +%% `?GLU_INSIDE': Quadrics are drawn with normals pointing inward. +%% +%% Note that the interpretation of `outward' and `inward' depends on the quadric +%% being drawn. +%% +%% See external documentation. +-spec quadricOrientation(Quad, Orientation) -> ok when Quad :: integer(),Orientation :: enum(). quadricOrientation(Quad,Orientation) -> cast(5031, <>). -%% @spec (Quad::integer(),Texture::0|1) -> ok -%% @doc See external documentation. --spec quadricTexture(integer(),0|1) -> ok. +%% @doc Specify if texturing is desired for quadrics +%% +%% ``glu:quadricTexture'' specifies if texture coordinates should be generated for quadrics +%% rendered with `Quad' . If the value of `Texture' is `?GLU_TRUE', then texture +%% coordinates are generated, and if `Texture' is `?GLU_FALSE', they are not. +%% The initial value is `?GLU_FALSE'. +%% +%% The manner in which texture coordinates are generated depends upon the specific quadric +%% rendered. +%% +%% See external documentation. +-spec quadricTexture(Quad, Texture) -> ok when Quad :: integer(),Texture :: 0|1. quadricTexture(Quad,Texture) -> cast(5032, <>). -%% @spec (Format::enum(),WIn::integer(),HIn::integer(),TypeIn::enum(),DataIn::binary(),WOut::integer(),HOut::integer(),TypeOut::enum(),DataOut::mem()) -> integer() -%% @doc See external documentation. --spec scaleImage(enum(),integer(),integer(),enum(),binary(),integer(),integer(),enum(),mem()) -> integer(). +%% @doc Scale an image to an arbitrary size +%% +%% ``glu:scaleImage'' scales a pixel image using the appropriate pixel store modes to +%% unpack data from the source image and pack data into the destination image. +%% +%% When shrinking an image, ``glu:scaleImage'' uses a box filter to sample the source +%% image and create pixels for the destination image. When magnifying an image, the pixels +%% from the source image are linearly interpolated to create the destination image. +%% +%% A return value of zero indicates success, otherwise a GLU error code is returned (see {@link glu:errorString/1} +%% ). +%% +%% See the {@link gl:readPixels/7} reference page for a description of the acceptable values +%% for the `Format' , `TypeIn' , and `TypeOut' parameters. +%% +%% See external documentation. +-spec scaleImage(Format, WIn, HIn, TypeIn, DataIn, WOut, HOut, TypeOut, DataOut) -> integer() when Format :: enum(),WIn :: integer(),HIn :: integer(),TypeIn :: enum(),DataIn :: binary(),WOut :: integer(),HOut :: integer(),TypeOut :: enum(),DataOut :: mem(). scaleImage(Format,WIn,HIn,TypeIn,DataIn,WOut,HOut,TypeOut,DataOut) -> send_bin(DataIn), send_bin(DataOut), call(5033, <>). -%% @spec (Quad::integer(),Radius::float(),Slices::integer(),Stacks::integer()) -> ok -%% @doc See external documentation. --spec sphere(integer(),float(),integer(),integer()) -> ok. +%% @doc Draw a sphere +%% +%% ``glu:sphere'' draws a sphere of the given radius centered around the origin. The sphere +%% is subdivided around the `z' axis into slices and along the `z' axis into +%% stacks (similar to lines of longitude and latitude). +%% +%% If the orientation is set to `?GLU_OUTSIDE' (with {@link glu:quadricOrientation/2} ), +%% then any normals generated point away from the center of the sphere. Otherwise, they +%% point toward the center of the sphere. +%% +%% If texturing is turned on (with {@link glu:quadricTexture/2} ), then texture coordinates +%% are generated so that `t' ranges from 0.0 at z=-radius to 1.0 at z= radius (`t' +%% increases linearly along longitudinal lines), and `s' ranges from 0.0 at the +`y' +%% axis, to 0.25 at the +`x' axis, to 0.5 at the -`y' axis, to 0.75 at the -`x' +%% axis, and back to 1.0 at the +`y' axis. +%% +%% See external documentation. +-spec sphere(Quad, Radius, Slices, Stacks) -> ok when Quad :: integer(),Radius :: float(),Slices :: integer(),Stacks :: integer(). sphere(Quad,Radius,Slices,Stacks) -> cast(5034, <>). -%% @spec (WinX::float(),WinY::float(),WinZ::float(),Model::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},Proj::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},View::{integer(),integer(),integer(),integer()}) -> {integer(),ObjX::float(),ObjY::float(),ObjZ::float()} -%% @doc See external documentation. --spec unProject(float(),float(),float(),{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{integer(),integer(),integer(),integer()}) -> {integer(),float(),float(),float()}. +%% @doc Map window coordinates to object coordinates +%% +%% ``glu:unProject'' maps the specified window coordinates into object coordinates using `Model' +%% , `Proj' , and `View' . The result is stored in `ObjX' , `ObjY' , and `ObjZ' +%% . A return value of `?GLU_TRUE' indicates success; a return value of `?GLU_FALSE' +%% indicates failure. +%% +%% To compute the coordinates (objX objY objZ), ``glu:unProject'' multiplies the normalized device coordinates +%% by the inverse of `Model' * `Proj' as follows: +%% +%% (objX objY objZ W)= INV(P M) ((2(winX-view[0]))/(view[2])-1(2(winY-view[1]))/(view[3])-1 2(winZ)-1 1) INV denotes matrix inversion. W is an unused variable, included for consistent +%% matrix notation. +%% +%% See external documentation. +-spec unProject(WinX, WinY, WinZ, Model, Proj, View) -> {integer(),ObjX :: float(),ObjY :: float(),ObjZ :: float()} when WinX :: float(),WinY :: float(),WinZ :: float(),Model :: matrix(),Proj :: matrix(),View :: {integer(),integer(),integer(),integer()}. unProject(WinX,WinY,WinZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16},{V1,V2,V3,V4}) -> call(5035, <>); unProject(WinX,WinY,WinZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12},{V1,V2,V3,V4}) -> call(5035, <>). -%% @spec (WinX::float(),WinY::float(),WinZ::float(),ClipW::float(),Model::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},Proj::{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},View::{integer(),integer(),integer(),integer()},NearVal::float(),FarVal::float()) -> {integer(),ObjX::float(),ObjY::float(),ObjZ::float(),ObjW::float()} -%% @doc See external documentation. --spec unProject4(float(),float(),float(),float(),{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float(),float()},{integer(),integer(),integer(),integer()},float(),float()) -> {integer(),float(),float(),float(),float()}. +%% @doc +%% See {@link unProject/6} +-spec unProject4(WinX, WinY, WinZ, ClipW, Model, Proj, View, NearVal, FarVal) -> {integer(),ObjX :: float(),ObjY :: float(),ObjZ :: float(),ObjW :: float()} when WinX :: float(),WinY :: float(),WinZ :: float(),ClipW :: float(),Model :: matrix(),Proj :: matrix(),View :: {integer(),integer(),integer(),integer()},NearVal :: float(),FarVal :: float(). unProject4(WinX,WinY,WinZ,ClipW,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16},{V1,V2,V3,V4},NearVal,FarVal) -> call(5036, <>); unProject4(WinX,WinY,WinZ,ClipW,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12},{P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12},{V1,V2,V3,V4},NearVal,FarVal) -> -- cgit v1.2.3