From a9f305c51ebccefc3ce6725b4f90700a7d250287 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Wed, 6 Oct 2010 14:05:36 +0200 Subject: Split opengl functionality into separate dynamic library The idea is to build a separate opengl library which can be reused by other erlang applications. --- lib/wx/Makefile | 4 +- lib/wx/api_gen/gl_gen_c.erl | 28 +- lib/wx/api_gen/gl_gen_erl.erl | 61 +- lib/wx/api_gen/wx_gen_cpp.erl | 12 +- lib/wx/api_gen/wx_gen_erl.erl | 17 + lib/wx/api_gen/wxapi.conf | 49 +- lib/wx/c_src/Makefile.in | 68 +- lib/wx/c_src/egl_impl.cpp | 316 +++++++++ lib/wx/c_src/egl_impl.h | 146 ++++ lib/wx/c_src/gen/gl_funcs.cpp | 445 ++++++------ lib/wx/c_src/gen/wxe_funcs.cpp | 10 + lib/wx/c_src/wxe_driver.h | 5 +- lib/wx/c_src/wxe_gl.cpp | 335 ++------- lib/wx/c_src/wxe_gl.h | 119 +--- lib/wx/c_src/wxe_impl.cpp | 2 - lib/wx/src/gen/gl.erl | 1510 ++++++++++++++++++++-------------------- lib/wx/src/gen/glu.erl | 85 ++- lib/wx/src/gen/wxGLCanvas.erl | 2 + lib/wx/src/wx.erl | 10 +- lib/wx/src/wxe.hrl | 8 +- lib/wx/src/wxe_master.erl | 21 +- 21 files changed, 1749 insertions(+), 1504 deletions(-) create mode 100644 lib/wx/c_src/egl_impl.cpp create mode 100644 lib/wx/c_src/egl_impl.h diff --git a/lib/wx/Makefile b/lib/wx/Makefile index 83f545b662..0bc89e08ad 100644 --- a/lib/wx/Makefile +++ b/lib/wx/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2008-2009. All Rights Reserved. +# Copyright Ericsson AB 2008-2010. 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 @@ -23,7 +23,7 @@ SUBDIRS = src ifeq ($(CAN_BUILD_DRIVER), true) SUBDIRS += c_src endif -SUBDIRS += examples demos doc/src +SUBDIRS += examples doc/src CLEANDIRS = $(SUBDIRS) api_gen ifeq ($(INSIDE_ERLSRC),true) diff --git a/lib/wx/api_gen/gl_gen_c.erl b/lib/wx/api_gen/gl_gen_c.erl index 3293050ab9..99dd2e58ea 100644 --- a/lib/wx/api_gen/gl_gen_c.erl +++ b/lib/wx/api_gen/gl_gen_c.erl @@ -47,30 +47,16 @@ gen(GLFuncs, GLUFuncs) -> w("/***** This file is generated do not edit ****/~n~n", []), w("#include ~n", []), w("#include ~n", []), - w("#include \"../wxe_impl.h\"~n", []), - w("#include \"../wxe_gl.h\"~n", []), + w("#include \"../egl_impl.h\"~n", []), w("#include \"gl_fdefs.h\"~n", []), w("~nint gl_error_op;~n", []), - w("void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins[]){~n", + w("void egl_dispatch(int op, char *bp, ErlDrvPort port, ErlDrvTermData caller, char *bins[]){~n", []), w(" gl_error_op = op;~n", []), - w(" if(caller != gl_active) {~n", []), - w(" wxGLCanvas * current = glc[caller];~n", []), - w(" if(current) { gl_active = caller; current->SetCurrent();}~n", []), - w(" else {~n " - " ErlDrvTermData rt[] = // Error msg~n" - " {ERL_DRV_ATOM, driver_mk_atom((char *) \"_wxe_error_\"),~n" - " ERL_DRV_INT, op,~n" - " ERL_DRV_ATOM, driver_mk_atom((char *) \"no_gl_context\"),~n" - " ERL_DRV_TUPLE,3};~n" - " driver_send_term(WXE_DRV_PORT,caller,rt,8);~n" - " return ;~n }~n };~n~n", []), w(" switch(op)~n{~n",[]), - w(" case 5000:~n wxe_tess_impl(bp, caller);~n break;~n", []), - w(" case WXE_BIN_INCR:~n driver_binary_inc_refc(bins[0]->bin);~n break;~n",[]), - w(" case WXE_BIN_DECR:~n driver_binary_dec_refc(bins[0]->bin);~n break;~n",[]), + w(" case 5000:~n erl_tess_impl(bp, port, caller);~n break;~n", []), [funcs(F) || F <- GLUFuncs], [funcs(F) || F <- GLFuncs], @@ -171,10 +157,10 @@ decode_arg(P=#arg{where=c},A) -> {P,A}; decode_arg(P=#arg{in=false},A) -> {P,A}; decode_arg(P=#arg{name=Name,type=#type{name=Type,base=binary}},A0) -> - w(" ~s *~s = (~s *) bins[~p]->base;~n", [Type,Name,Type,next_id(bin_count)]), + w(" ~s *~s = (~s *) bins[~p];~n", [Type,Name,Type,next_id(bin_count)]), {P, A0}; decode_arg(P=#arg{name=Name,type=#type{name=Type,base=memory}},A0) -> - w(" ~s *~s = (~s *) bins[~p]->base;~n", [Type,Name,Type,next_id(bin_count)]), + w(" ~s *~s = (~s *) bins[~p];~n", [Type,Name,Type,next_id(bin_count)]), {P, A0}; decode_arg(P=#arg{name=Name,type=#type{name=T,base=string,single=list}},A0) -> A = align(4,A0), @@ -322,7 +308,7 @@ build_return_vals(Type,As) -> w(" rt[AP++]=ERL_DRV_ATOM;" " rt[AP++]=driver_mk_atom((char *) \"ok\");~n",[]), w(" rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;~n",[]), - w(" driver_send_term(WXE_DRV_PORT,caller,rt,AP);~n",[]), + w(" driver_send_term(port,caller,rt,AP);~n",[]), ok end; {Val,Vars,Cnt} -> @@ -348,7 +334,7 @@ build_return_vals(Type,As) -> w(" rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;~n",[]), w(" if (AP != ~s ) fprintf(stderr, \"%d: ERROR AP mismatch %d %d\\r\\n\",__LINE__,AP,~s);~n", [CSize,CSize]), - w(" driver_send_term(WXE_DRV_PORT,caller,rt,AP);~n",[]), + w(" driver_send_term(port,caller,rt,AP);~n",[]), case Vars of none -> ignore; _ -> diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl index ce35484561..36a6ea2373 100644 --- a/lib/wx/api_gen/gl_gen_erl.erl +++ b/lib/wx/api_gen/gl_gen_erl.erl @@ -49,7 +49,7 @@ glu_defines(Defs) -> w("~n%% GLU DEFINITIONS~n~n", []), w("%% This file is generated DO NOT EDIT~n~n", []), [gen_define(Def) || Def=#def{} <- Defs], - close(), + close(), ok. gen_define(#def{name=N, val=Val, type=int}) -> @@ -90,22 +90,51 @@ gl_api(Fs) -> w("%% See www.opengl.org~n",[]), w("%%~n", []), w("%% Booleans are represented by integers 0 and 1.~n~n", []), - w("%% @type wx_mem(). see wx.erl on memory allocation functions~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("-compile(inline).~n", []), - %% w("-compile(export_all).~n~n", []), - %% w("-compile(binary_comprehension).~n~n", []), - w("-include(\"wxe.hrl\").~n", []), +%% w("-include(\"wxe.hrl\").~n", []), [w("-define(~s,~s).~n", [GL,Erl]) || {GL,Erl} <- types()], 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", []), + w("call(Op, Args) ->~n", []), + w(" Port = get(opengl_port), ~n", []), + w(" _ = erlang:port_control(Port,Op,Args),~n", []), + w(" rec().~n", []), + w(" ~n", []), + w("%% @hidden~n", []), + w("cast(Op, Args) ->~n", []), + w(" Port = get(opengl_port), ~n", []), + w(" _ = erlang:port_control(Port,Op,Args),~n", []), + w(" ok.~n", []), + w(" ~n", []), + w("%% @hidden~n", []), + w("rec() ->~n", []), + w(" receive ~n", []), + w(" {'_egl_result_', Res} -> Res;~n", []), + w(" {'_egl_error_', Res} -> error({error,Res})~n", []), + w(" end.~n", []), + w("~n", []), + w("%% @hidden~n", []), + w("send_bin(Bin) when is_binary(Bin) ->~n", []), + w(" Port = get(opengl_port), ~n", []), + w(" erlang:port_command(Port,Bin);~n", []), + w("send_bin(Tuple) when is_tuple(Tuple) ->~n", []), + w(" Port = get(opengl_port), ~n", []), + w(" case element(2, Tuple) of~n", []), + w(" Bin when is_binary(Bin) ->~n", []), + w(" erlang:port_command(Port,Bin)~n", []), + w(" end.~n", []), + w("~n", []), + w("~n%% API~n~n", []), [gen_funcs(F) || F <- Fs], close(), @@ -120,20 +149,20 @@ glu_api(Fs) -> w("%% See www.opengl.org~n",[]), w("%%~n", []), w("%% Booleans are represented by integers 0 and 1.~n~n", []), - w("%% @type wx_mem(). see wx.erl on memory allocation functions~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("-compile(inline).~n", []), - w("-include(\"wxe.hrl\").~n", []), + %%w("-include(\"wxe.hrl\").~n", []), [w("-define(~s,~s).~n", [GL,Erl]) || {GL,Erl} <- types()], 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",[]), @@ -148,13 +177,13 @@ glu_api(Fs) -> "%% may contain newly created vertices in the end.~n", []), w("tesselate({Nx,Ny,Nz}, Vs) ->~n",[]), - w(" wxe_util:call(5000, <<(length(Vs)):32/native,0:32,~n" + w(" call(5000, <<(length(Vs)):32/native,0:32,~n" " Nx:?GLdouble,Ny:?GLdouble,Nz:?GLdouble,~n" " (<< <>~n" " || {Vx,Vy,Vz} <- Vs>>)/binary >>).~n~n", []), [gen_funcs(F) || F <- Fs], - close(), + close(), ok. gen_funcs([F]) when is_list(F) -> @@ -229,9 +258,9 @@ gen_func(_F=#func{name=Name,type=T,params=As,id=MId}) -> {StrArgs,_} = marshal_args(PreAs), case have_return_vals(T,As) of true -> - w(" wxe_util:call(~p, <<~s>>)", [MId, StrArgs]); + w(" call(~p, <<~s>>)", [MId, StrArgs]); false -> - w(" wxe_util:cast(~p, <<~s>>)", [MId, StrArgs]) + w(" cast(~p, <<~s>>)", [MId, StrArgs]) end. func_arg(#arg{in=In,where=W,name=Name,type=Type}) @@ -302,7 +331,7 @@ doc_arg_type3(#type{base=guard_int}) -> "offset()|binary()"; doc_arg_type3(#type{base=string}) -> "string()"; doc_arg_type3(#type{base=bool}) -> "0|1"; doc_arg_type3(#type{base=binary}) -> "binary()"; -doc_arg_type3(#type{base=memory}) -> "wx:wx_mem()". +doc_arg_type3(#type{base=memory}) -> "mem()". guard_test(As) -> Str = args(fun(#arg{name=N,type=#type{base=guard_int}}) -> @@ -316,10 +345,10 @@ guard_test(As) -> end. pre_marshal([#arg{name=N,in=true,type=#type{base=binary}}|R]) -> - w(" wxe_util:send_bin(~s),~n", [erl_arg_name(N)]), + w(" send_bin(~s),~n", [erl_arg_name(N)]), pre_marshal(R); pre_marshal([#arg{name=N,type=#type{base=memory}}|R]) -> - w(" wxe_util:send_bin(~s#wx_mem.bin),~n", [erl_arg_name(N)]), + 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]) -> %% With null terminations diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 846cec46c4..4bcdbe6a68 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -152,6 +152,7 @@ gen_funcs(Defs) -> w("#include \"../wxe_impl.h\"~n"), w("#include \"../wxe_events.h\"~n"), w("#include \"../wxe_return.h\"~n"), + w("#include \"../wxe_gl.h\"~n"), w("#include \"wxe_macros.h\"~n"), w("#include \"wxe_derived_dest.h\"~n~n"), @@ -176,6 +177,9 @@ gen_funcs(Defs) -> " rt.addAtom(\"ok\");~n" " break;~n" " }~n"), + w(" case WXE_BIN_INCR:~n driver_binary_inc_refc(Ecmd.bin[0]->bin);~n break;~n",[]), + w(" case WXE_BIN_DECR:~n driver_binary_dec_refc(Ecmd.bin[0]->bin);~n break;~n",[]), + w(" case WXE_INIT_OPENGL:~n wxe_initOpenGL(rt, bp);~n break;~n",[]), Res = [gen_class(Class) || Class <- Defs], @@ -266,13 +270,13 @@ gen_method(CName, M=#method{name=N,params=Ps0,type=T,method_type=MT,id=MethodId Def =/= none, In =/= false, Where =/= c], decode_options(Opts, Align), case M#method.pre_hook of - undefined -> skip; - Pre -> w(" ~s;~n", [Pre]) + {c,Pre} -> w(" ~s;~n", [Pre]); + _ -> skip end, Ps3 = call_wx(N,{MT,CName},T,Ps2), case M#method.post_hook of - undefined -> skip; - Post -> w(" ~s;~n", [Post]) + {c, Post} -> w(" ~s;~n", [Post]); + _ -> skip end, free_args(), build_return_vals(T,Ps3), diff --git a/lib/wx/api_gen/wx_gen_erl.erl b/lib/wx/api_gen/wx_gen_erl.erl index 7962dd9fbf..8648174b5b 100644 --- a/lib/wx/api_gen/wx_gen_erl.erl +++ b/lib/wx/api_gen/wx_gen_erl.erl @@ -270,6 +270,16 @@ gen_method2(M=#method{name=N,alias=A,params=Ps,type=T,method_type=MT,id=MethodId MId = arg_type_tests(Args, "?" ++ get_unique_name(MethodId)), {MArgs,Align} = marshal_args(Args), MOpts = marshal_opts(Optional, Align, Args), + case M#method.pre_hook of + {erl,Pre} -> w(" ~s~n", [Pre]); + _ -> skip + end, + + case M#method.post_hook of + {erl,_} -> w(" _Result = ~n", []); + _ -> skip + end, + case have_return_vals(T, Ps) of _ when MT =:= constructor -> w(" wxe_util:construct(~s,~n <<~s~s>>)", [MId, MArgs,MOpts]); @@ -278,6 +288,13 @@ gen_method2(M=#method{name=N,alias=A,params=Ps,type=T,method_type=MT,id=MethodId false -> w(" wxe_util:cast(~s,~n <<~s~s>>)", [MId, MArgs,MOpts]) end, + case M#method.post_hook of + {erl,Post} -> + w(" ~s~n", [Post]), + w(" _Result~n", []); + _ -> skip + end, + erase(current_func), M. diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf index 6bafda5b9d..14f5f7e267 100644 --- a/lib/wx/api_gen/wxapi.conf +++ b/lib/wx/api_gen/wxapi.conf @@ -505,15 +505,15 @@ {"data",[in,{base,binary}]}, {"alpha",[in,{base,binary}]}, {{4,pre_hook}, - "if(!static_data) {" - "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}, + {c, "if(!static_data) {" + "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}}, {{5,pre_hook}, - "if(!static_data) {" - " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" - " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" - " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"} + {c, "if(!static_data) {" + " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" + " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" + " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}} ]}, '~wxImage',%'AddHandler', 'Blur','BlurHorizontal','BlurVertical', @@ -524,15 +524,15 @@ {"data",[in,{base,binary}]}, {"alpha",[in,{base,binary}]}, {{4,pre_hook}, - "if(!static_data) {" - "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}, + {c, "if(!static_data) {" + "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}}, {{5,pre_hook}, - "if(!static_data) {" - " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" - " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" - " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"} + {c, "if(!static_data) {" + " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" + " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" + " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}} ]}, 'Destroy','FindFirstUnusedColour', % 'FindHandler', 'GetImageExtWildcard', @@ -551,15 +551,15 @@ 'Rotate90','SaveFile','Scale','Size', {'SetAlpha', [{{2,"alpha"},[in,{base,binary}, {def, none}]}, {{2,pre_hook}, - "if(!static_data) {" - "alpha = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(alpha,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"} + {c, "if(!static_data) {" + "alpha = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(alpha,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}} ]}, {'SetData', [{"data",[in,{base,binary}]}, {pre_hook, - "if(!static_data) {" - "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"} + {c, "if(!static_data) {" + "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}} ]}, 'SetMask','SetMaskColour','SetMaskFromImage','SetOption', 'SetPalette', @@ -1146,9 +1146,10 @@ {class, wxGLCanvas, wxWindow, [{skip, [{'SetCurrent', 2}]}], %% NA MAC - [{'wxGLCanvas', [{"attribList", [in, {single,array}]}]}, + [{'wxGLCanvas', [{"attribList", [in, {single,array}]}, + {pre_hook, {erl, "wxe_master:init_opengl(),"}}]}, 'GetContext', - {'SetCurrent', [{post_hook,"if(This->GetContext()) setActiveGL(Ecmd.caller,This)"}]}, + {'SetCurrent', [{post_hook,{c, "if(This->GetContext()) setActiveGL(Ecmd.caller,This)"}}]}, %%{'SetColour', [{"colour", [in, {single,array}]}]}, 'SwapBuffers']}. diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in index 8710641b57..9c85549a5c 100644 --- a/lib/wx/c_src/Makefile.in +++ b/lib/wx/c_src/Makefile.in @@ -32,14 +32,16 @@ endif SO_EXT = @SO_EXT@ -GENERAL = wxe_driver wxe_ps_init wxe_impl wxePrintout wxe_return +GENERAL = wxe_driver wxe_ps_init wxe_impl wxePrintout wxe_return wxe_gl GENERAL_H = wxe_driver.h wxe_impl.h wxe_return.h GENERATED_F = wxe_funcs wxe_events wxe_init -GENERATED_H = gen/wxe_macros.h gen/glu_finit.h gen/gl_finit.h gen/gl_fdefs.h +GENERATED_H = gen/wxe_macros.h + +GL_H = egl_impl.h gen/glu_finit.h gen/gl_finit.h gen/gl_fdefs.h HAVE_OPENGL = true -OPENGL_F = gl_funcs wxe_gl +OPENGL_F = gl_funcs egl_impl ifneq ($(INSIDE_ERLSRC),true) @@ -60,9 +62,9 @@ SYS_TYPE = @WXERL_SYS_TYPE@ GENERAL_O = $(GENERAL:%=$(SYS_TYPE)/%.o) GENERATED_O = $(GENERATED_F:%=$(SYS_TYPE)/%.o) ifeq ($(HAVE_OPENGL), true) - OPENGL_O = $(OPENGL_F:%=$(SYS_TYPE)/%.o) + GL_OBJECTS = $(OPENGL_F:%=$(SYS_TYPE)/%.o) else - OPENGL_O = + GL_OBJECTS = endif RC_FILE_EXT = @RC_FILE_TYPE@ @@ -72,9 +74,11 @@ else RC_FILE = endif -OBJECTS = $(GENERAL_O) $(GENERATED_O) $(OPENGL_O) $(RC_FILE) +WX_OBJECTS = $(GENERAL_O) $(GENERATED_O) $(RC_FILE) + +OBJECTS = $(WX_OBJECTS) $(OPENGL_O) -TARGET_API = wxe_driver +TARGET_APIS = wxe_driver erl_gl TARGET_DIR = ../priv/$(SYS_TYPE) # -O2 -funroll-loops -ffast-math -fomit-frame-pointer @@ -87,31 +91,36 @@ LD = $(CPP) LDFLAGS = @LDFLAGS@ RESCOMP = @WX_RESCOMP@ - ifeq (@WX_HAVE_STATIC_LIBS@,true) -WX_LIBS = @WX_LIBS_STATIC@ +OPT_WX_LIBS = @WX_LIBS_STATIC@ DEBUG_WX_LIBS = @DEBUG_WX_LIBS_STATIC@ else -WX_LIBS = @WX_LIBS@ +OPT_WX_LIBS = @WX_LIBS@ DEBUG_WX_LIBS = @DEBUG_WX_LIBS@ endif ifeq ($(TYPE),debug) -CFLAGS = @DEBUG_WX_CFLAGS@ @DEBUG_CFLAGS@ -CPP_FLAGS = @DEBUG_WX_CXXFLAGS@ @DEBUG_CXXFLAGS@ -LIBS = $(DEBUG_WX_LIBS) +WX_CFLAGS = @DEBUG_WX_CFLAGS@ +CFLAGS = @DEBUG_CFLAGS@ +WX_CXX_FLAGS = @DEBUG_WX_CXXFLAGS@ +CXX_FLAGS = @DEBUG_CXXFLAGS@ +WX_LIBS = $(DEBUG_WX_LIBS) else -CFLAGS = @WX_CFLAGS@ @CFLAGS@ -CPP_FLAGS = @WX_CXXFLAGS@ @CXXFLAGS@ -LIBS = $(WX_LIBS) +WX_CFLAGS = @WX_CFLAGS@ +CFLAGS = @CFLAGS@ +WX_CXX_FLAGS = @WX_CXXFLAGS@ +CXX_FLAGS = @CXXFLAGS@ +WX_LIBS = $(OPT_WX_LIBS) endif -CC_O = $(CC) -c $(CFLAGS) $(COMMON_CFLAGS) -CPP_O = $(CPP) -c $(CPP_FLAGS) $(COMMON_CFLAGS) +CL_LIBS = -lGL -lGLU + +CC_O = $(CC) -c $(CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS) +CPP_O = $(CPP) -c $(CXX_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS) # Targets -opt: $(TARGET_DIR)/$(TARGET_API)$(SO_EXT) +opt: $(TARGET_DIR)/wxe_driver$(SO_EXT) $(TARGET_DIR)/erl_gl$(SO_EXT) debug: @${MAKE} TYPE=debug @@ -132,20 +141,22 @@ complete_clean: docs: +$(GL_OBJECTS): $(GL_H) +$(WX_OBJECTS): $(GENERATED_H) $(GENERAL_H) -$(SYS_TYPE)/%.o: %.cpp $(GENERATED_H) $(GENERAL_H) +$(SYS_TYPE)/%.o: %.cpp mkdir -p $(SYS_TYPE) $(CPP_O) $< -o $@ -$(SYS_TYPE)/%.o: %.c $(GENERATED_H) $(GENERAL_H) +$(SYS_TYPE)/%.o: %.c mkdir -p $(SYS_TYPE) $(CC_O) $< -o $@ -$(SYS_TYPE)/%.o: gen/%.cpp $(GENERATED_H) $(GENERAL_H) +$(SYS_TYPE)/%.o: gen/%.cpp mkdir -p $(SYS_TYPE) $(CPP_O) $< -o $@ -$(SYS_TYPE)/%.o: gen/%.c $(GENERATED_H) $(GENERAL_H) +$(SYS_TYPE)/%.o: gen/%.c mkdir -p $(SYS_TYPE) $(CC_O) $< -o $@ @@ -153,9 +164,13 @@ $(SYS_TYPE)/wxe_win32.$(RC_FILE_EXT): wxe_win32.rc mkdir -p $(SYS_TYPE) $(RESCOMP) -o $@ $< -$(TARGET_DIR)/$(TARGET_API)$(SO_EXT): $(OBJECTS) +$(TARGET_DIR)/wxe_driver$(SO_EXT): $(WX_OBJECTS) + mkdir -p $(TARGET_DIR) + $(LD) $(LDFLAGS) $(WX_OBJECTS) $(WX_LIBS) -o $@ + +$(TARGET_DIR)/erl_gl$(SO_EXT): $(GL_OBJECTS) mkdir -p $(TARGET_DIR) - $(LD) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@ + $(CC) $(LDFLAGS) $(GL_OBJECTS) $(CL_LIBS) -o $@ # ---------------------------------------------------- @@ -167,7 +182,8 @@ release_spec: opt $(INSTALL_DIR) $(RELSYSDIR)/priv/$(SYS_TYPE) $(INSTALL_DATA) ../priv/erlang-logo32.png $(RELSYSDIR)/priv/ $(INSTALL_DATA) ../priv/erlang-logo64.png $(RELSYSDIR)/priv/ - $(INSTALL_PROGRAM) $(TARGET_DIR)/$(TARGET_API)$(SO_EXT) $(RELSYSDIR)/priv/$(SYS_TYPE) + $(INSTALL_PROGRAM) $(TARGET_DIR)/wxe_driver$(SO_EXT) $(RELSYSDIR)/priv/$(SYS_TYPE) + $(INSTALL_PROGRAM) $(TARGET_DIR)/erl_gl$(SO_EXT) $(RELSYSDIR)/priv/$(SYS_TYPE) release_docs_spec: diff --git a/lib/wx/c_src/egl_impl.cpp b/lib/wx/c_src/egl_impl.cpp new file mode 100644 index 0000000000..9240bc49f0 --- /dev/null +++ b/lib/wx/c_src/egl_impl.cpp @@ -0,0 +1,316 @@ +/* + * %CopyrightBegin% + * + * Copyright Ericsson AB 2010. 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% + */ + +#include +#include + +#include "egl_impl.h" + +#define WX_DEF_EXTS +#include "gen/gl_fdefs.h" +#include "gen/gl_finit.h" +#include "gen/glu_finit.h" + +void init_tess(); +void exit_tess(); +int load_gl_functions(); + +/* **************************************************************************** + * OPENGL INITIALIZATION + *****************************************************************************/ + +int egl_initiated = 0; + +#ifdef _WIN32 +void * dlsym(HMODULE Lib, const char *func) { + void * funcp; + if((funcp = (void *) GetProcAddress(Lib, func))) + return funcp; + else + return (void *) wglGetProcAddress(func); +} +#endif + +int egl_init_opengl() +{ + if(egl_initiated == 0) { + if(load_gl_functions()) { + init_tess(); + egl_initiated = 1; + } + } + return 1; +} + +int load_gl_functions() { +#ifdef _MACOSX + char * DLName = "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"; + void * LIBhandle = dlopen(DLName, RTLD_LAZY); +#elif defined(_WIN32) + WCHAR * DLName = wxT("opengl32.dll"); + HMODULE LIBhandle = LoadLibrary(DLName); +#else + char * DLName = (char *) "libGL.so"; + void * LIBhandle = dlopen(DLName, RTLD_LAZY); +#endif + // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName); + void * func = NULL; + int i; + + if(LIBhandle) { + for(i=0; gl_fns[i].name != NULL; i++) { + if((func = dlsym(LIBhandle, gl_fns[i].name))) { + * (void **) (gl_fns[i].func) = func; + // fprintf(stderr, "GL LOADED %s \r\n", gl_fns[i].name); + } else { + if(gl_fns[i].alt != NULL) { + if((func = dlsym(LIBhandle, gl_fns[i].alt))) { + * (void **) (gl_fns[i].func) = func; + // fprintf(stderr, "GL LOADED %s \r\n", gl_fns[i].alt); + } else { + * (void **) (gl_fns[i].func) = (void *) &gl_error; + // fprintf(stderr, "GL Skipped %s and %s \r\n", gl_fns[i].name, gl_fns[i].alt); + }; + } else { + * (void **) (gl_fns[i].func) = (void *) &gl_error; + // fprintf(stderr, "GL Skipped %s \r\n", gl_fns[i].name); + } + } + } +#ifdef _WIN32 + FreeLibrary(LIBhandle); +#else + dlclose(LIBhandle); +#endif + // fprintf(stderr, "OPENGL library is loaded\r\n"); + } else { +// wxString msg; +// msg.Printf(wxT("Could NOT load OpenGL library: ")); +// #ifdef _WIN32 +// msg += DLName; +// #else +// msg += wxString::FromAscii((char *)DLName); +// #endif +// send_msg("error", &msg); + fprintf(stderr, "Could NOT load OpenGL library: %s\r\n", DLName); + }; + +#ifdef _MACOSX + DLName = "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib"; + LIBhandle = dlopen(DLName, RTLD_LAZY); +#elif defined(_WIN32) + DLName = wxT("glu32.dll"); + LIBhandle = LoadLibrary(DLName); +#else + DLName = (char *) "libGLU.so"; + LIBhandle = dlopen(DLName, RTLD_LAZY); +#endif + // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName); + func = NULL; + + if(LIBhandle) { + for(i=0; glu_fns[i].name != NULL; i++) { + if((func = dlsym(LIBhandle, glu_fns[i].name))) { + * (void **) (glu_fns[i].func) = func; + } else { + if(glu_fns[i].alt != NULL) { + if((func = dlsym(LIBhandle, glu_fns[i].alt))) { + * (void **) (glu_fns[i].func) = func; + } else { + * (void **) (glu_fns[i].func) = (void *) &gl_error; + // fprintf(stderr, "GLU Skipped %s\r\n", glu_fns[i].alt); + }; + } else { + * (void **) (glu_fns[i].func) = (void *) &gl_error; + // fprintf(stderr, "GLU Skipped %s\r\n", glu_fns[i].name); + } + } + } +#ifdef _WIN32 + FreeLibrary(LIBhandle); +#else + dlclose(LIBhandle); +#endif + // fprintf(stderr, "GLU library is loaded\r\n"); + } else { +// wxString msg; +// msg.Printf(wxT("Could NOT load OpenGL GLU library: ")); +// #ifdef _WIN32 +// msg += DLName; +// #else +// msg += wxString::FromAscii((char *)DLName); +// #endif +// send_msg("error", &msg); + fprintf(stderr, "Could NOT load OpenGL GLU library: %s\r\n", DLName); + }; + + return 1; +} + +void gl_error() { + // int AP = 0; ErlDrvTermData rt[8]; + // rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *)"_wxe_error_"); + // rt[AP++] = ERL_DRV_INT; rt[AP++] = (int) gl_error_op; + // rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *)"undef"); + // rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; + // driver_send_term(WXE_DRV_PORT,gl_active,rt,AP); + // BUGBUG + fprintf(stderr, "OpenGL Extension not available : %d\r\n", gl_error_op); +} + +/* ******************************************************************************* + * GLU Tesselation special + * ******************************************************************************/ + +static GLUtesselator* tess; +static GLdouble* tess_coords; +static GLdouble* tess_alloc_vertex; +static int* tess_vertices; + +void CALLBACK +egl_ogla_vertex(GLdouble* coords) +{ + /* fprintf(stderr, "%d\r\n", (int) (coords - tess_coords) / 3); */ + + *tess_vertices++ = (int) (coords - tess_coords) / 3; +} + +void CALLBACK +egl_ogla_edge_flag(GLboolean flag) +{ +} + +void CALLBACK +egl_ogla_error(GLenum errorCode) +{ + const GLubyte *err; + err = gluErrorString(errorCode); + // wxString msg; + // msg.Printf(wxT("Tesselation error: %d: "), (int)errorCode); + // msg += wxString::FromAscii((char *) err); + // send_msg("error", &msg); + fprintf(stderr, "Tesselation error: %d\r\n", (int) errorCode); +} + +void CALLBACK +egl_ogla_combine(GLdouble coords[3], + void* vertex_data[4], + GLfloat w[4], + void **dataOut) +{ + GLdouble* vertex = tess_alloc_vertex; + + tess_alloc_vertex += 3; + +#if 0 + fprintf(stderr, "combine: "); + int i; + for (i = 0; i < 4; i++) { + if (w[i] > 0.0) { + fprintf(stderr, "%d(%g) ", (int) vertex_data[i], w[i]); + } + } + fprintf(stderr, "\r\n"); + fprintf(stderr, "%g %g %g\r\n", vertex[0], vertex[1], vertex[2]); +#endif + + vertex[0] = coords[0]; + vertex[1] = coords[1]; + vertex[2] = coords[2]; + *dataOut = vertex; +} + +void init_tess() +{ + tess = gluNewTess(); + + gluTessCallback(tess, GLU_TESS_VERTEX, (GLUfuncptr) egl_ogla_vertex); + gluTessCallback(tess, GLU_TESS_EDGE_FLAG, (GLUfuncptr) egl_ogla_edge_flag); + gluTessCallback(tess, GLU_TESS_COMBINE, (GLUfuncptr) egl_ogla_combine); + gluTessCallback(tess, GLU_TESS_ERROR, (GLUfuncptr) egl_ogla_error); + +} + +void exit_tess() +{ + gluDeleteTess(tess); +} + +int erl_tess_impl(char* buff, ErlDrvPort port, ErlDrvTermData caller) +{ + ErlDrvBinary* bin; + int i; + GLdouble* new_vertices; + int *vertices; + int num_vertices; + GLdouble *n; + int n_pos, AP, res; + + num_vertices = * (int *) buff; buff += 8; /* Align */ + n = (double *) buff; buff += 8*3; + + bin = driver_alloc_binary(num_vertices*6*sizeof(GLdouble)); + new_vertices = tess_coords = (double *) bin->orig_bytes; + memcpy(tess_coords,buff,num_vertices*3*sizeof(GLdouble)); + tess_alloc_vertex = tess_coords + num_vertices*3; + +#if 0 + fprintf(stderr, "n=%d\r\n", num_vertices); +#endif + vertices = (int *) driver_alloc(sizeof(int) * 16*num_vertices); + + tess_vertices = vertices; + + gluTessNormal(tess, n[0], n[1], n[2]); + gluTessBeginPolygon(tess, 0); + gluTessBeginContour(tess); + for (i = 0; i < num_vertices; i++) { + gluTessVertex(tess, tess_coords+3*i, tess_coords+3*i); + } + gluTessEndContour(tess); + gluTessEndPolygon(tess); + + n_pos = (tess_vertices - vertices); + + AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData) * (13+n_pos*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + + for(i=0; i < n_pos; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (int) vertices[i]; + }; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = n_pos+1; + + rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) bin; + rt[AP++] = (tess_alloc_vertex-new_vertices)*sizeof(GLdouble); rt[AP++] = 0; + + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; // Return tuple {list, Bin} + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; // Result tuple + + res = driver_send_term(port,caller,rt,AP); + /* fprintf(stderr, "List %d: %d %d %d \r\n", */ + /* res, */ + /* n_pos, */ + /* (tess_alloc_vertex-new_vertices)*sizeof(GLdouble), */ + /* num_vertices*6*sizeof(GLdouble)); */ + driver_free_binary(bin); + driver_free(vertices); + driver_free(rt); + return 0; +} diff --git a/lib/wx/c_src/egl_impl.h b/lib/wx/c_src/egl_impl.h new file mode 100644 index 0000000000..60be2c41d2 --- /dev/null +++ b/lib/wx/c_src/egl_impl.h @@ -0,0 +1,146 @@ +/* + * %CopyrightBegin% + * + * Copyright Ericsson AB 2010. 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% + */ + +#include "erl_driver.h" + +/* Wrap everything from glext.h so we are not dependent on the user version of it */ + +#ifndef _WIN32 +# include +#endif + +#ifndef __WXMAC__ +# include +# include /* Header File For The OpenGL Library */ +#else +# include /* Header File For The OpenGL Library */ +#endif + +#ifndef CALLBACK +# define CALLBACK +#endif + +#ifdef _WIN32 +# ifndef _GLUfuncptr +// Visual studio CPP ++ compiler +# define _GLUfuncptr void (_stdcall *)() +# endif +#endif + +#ifdef _GLUfuncptr +# define GLUfuncptr _GLUfuncptr +#elif defined(TESS_CB_TIGER_STYLE) +# define GLUfuncptr GLvoid (*)(...) +#else +# define GLUfuncptr GLvoid (*)() +#endif + +#ifdef WIN32 +#include +#include +#elif defined(HAVE_GL_GL_H) +#include +#elif defined(HAVE_OPENGL_GL_H) +#endif + +#ifndef APIENTRY +#define APIENTRY +#endif + +/* Some new GL types (eliminates the need for glext.h) */ + +#ifndef HAVE_GLINTPTR +#ifndef HAVE_GLINTPTRARB +# include +/* GL types for handling large vertex buffer objects */ +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; +#endif /* HAVE_GLINTPTRARB */ +typedef GLintptrARB GLintptr; +typedef GLsizeiptrARB GLsizeiptr; +#endif /* HAVE_GLINTPTR */ + +#ifndef HAVE_GLCHAR +# ifndef HAVE_GLCHARARB +/* GL types for handling shader object handles and characters */ +typedef char GLcharARB; /* native character */ +typedef unsigned int GLhandleARB; /* shader object handle */ +#endif /* HAVE_GLCHARARB */ +typedef GLcharARB GLchar; +#endif + +#ifndef HAVE_GLHALFARB +/* GL types for "half" precision (s10e5) float data in host memory */ +typedef unsigned short GLhalfARB; +#endif + +/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +/* (as used in the GLX_OML_sync_control extension). */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include +#elif defined(__sun__) +#include +#if defined(__STDC__) +#if defined(__arch64__) +typedef long int int64_t; +typedef unsigned long int uint64_t; +#else +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#endif /* __arch64__ */ +#endif /* __STDC__ */ +#elif defined( __VMS ) +#include +#elif defined(__SCO__) || defined(__USLC__) +#include +#elif defined(__UNIXOS2__) || defined(__SOL64__) +typedef long int int32_t; +typedef long long int int64_t; +typedef unsigned long long int uint64_t; +#elif defined(WIN32) && defined(_MSC_VER) +typedef long int int32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#elif defined(WIN32) && defined(__GNUC__) +#include +#else +#include /* Fallback option */ +#endif + +#ifndef HAVE_GLINT64EXT +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; +#endif + +/* External Api */ + +#ifdef _WIN32 +__declspec(dllexport) int egl_init_opengl(); +__declspec(dllexport) void egl_dispatch(int, char *, ErlDrvPort, ErlDrvTermData, char **); +#else +extern "C" int egl_init_opengl(); +extern "C" void egl_dispatch(int, char *, ErlDrvPort, ErlDrvTermData, char **); +#endif + +/* internal */ +int erl_tess_impl(char* buff, ErlDrvPort port, ErlDrvTermData caller); +void gl_error(); +extern int gl_error_op; +extern ErlDrvTermData gl_active; + diff --git a/lib/wx/c_src/gen/gl_funcs.cpp b/lib/wx/c_src/gen/gl_funcs.cpp index 95d3c23b23..3bda818366 100644 --- a/lib/wx/c_src/gen/gl_funcs.cpp +++ b/lib/wx/c_src/gen/gl_funcs.cpp @@ -20,37 +20,16 @@ #include #include -#include "../wxe_impl.h" -#include "../wxe_gl.h" +#include "../egl_impl.h" #include "gl_fdefs.h" int gl_error_op; -void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins[]){ +void egl_dispatch(int op, char *bp, ErlDrvPort port, ErlDrvTermData caller, char *bins[]){ gl_error_op = op; - if(caller != gl_active) { - wxGLCanvas * current = glc[caller]; - if(current) { gl_active = caller; current->SetCurrent();} - else { - ErlDrvTermData rt[] = // Error msg - {ERL_DRV_ATOM, driver_mk_atom((char *) "_wxe_error_"), - ERL_DRV_INT, op, - ERL_DRV_ATOM, driver_mk_atom((char *) "no_gl_context"), - ERL_DRV_TUPLE,3}; - driver_send_term(WXE_DRV_PORT,caller,rt,8); - return ; - } - }; - switch(op) { case 5000: - wxe_tess_impl(bp, caller); - break; - case WXE_BIN_INCR: - driver_binary_inc_refc(bins[0]->bin); - break; - case WXE_BIN_DECR: - driver_binary_dec_refc(bins[0]->bin); + erl_tess_impl(bp, port, caller); break; case 5010: { // gluBuild1DMipmapLevels GLenum *target = (GLenum *) bp; bp += 4; @@ -61,14 +40,14 @@ case 5010: { // gluBuild1DMipmapLevels GLint *level = (GLint *) bp; bp += 4; GLint *base = (GLint *) bp; bp += 4; GLint *max = (GLint *) bp; bp += 4; - void *data = (void *) bins[0]->base; + void *data = (void *) bins[0]; GLint result = wegluBuild1DMipmapLevels(*target,*internalFormat,*width,*format,*type,*level,*base,*max,data); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5011: { // gluBuild1DMipmaps GLenum *target = (GLenum *) bp; bp += 4; @@ -76,14 +55,14 @@ case 5011: { // gluBuild1DMipmaps GLsizei *width = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - void *data = (void *) bins[0]->base; + void *data = (void *) bins[0]; GLint result = wegluBuild1DMipmaps(*target,*internalFormat,*width,*format,*type,data); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5012: { // gluBuild2DMipmapLevels GLenum *target = (GLenum *) bp; bp += 4; @@ -95,14 +74,14 @@ case 5012: { // gluBuild2DMipmapLevels GLint *level = (GLint *) bp; bp += 4; GLint *base = (GLint *) bp; bp += 4; GLint *max = (GLint *) bp; bp += 4; - void *data = (void *) bins[0]->base; + void *data = (void *) bins[0]; GLint result = wegluBuild2DMipmapLevels(*target,*internalFormat,*width,*height,*format,*type,*level,*base,*max,data); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5013: { // gluBuild2DMipmaps GLenum *target = (GLenum *) bp; bp += 4; @@ -111,14 +90,14 @@ case 5013: { // gluBuild2DMipmaps GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - void *data = (void *) bins[0]->base; + void *data = (void *) bins[0]; GLint result = wegluBuild2DMipmaps(*target,*internalFormat,*width,*height,*format,*type,data); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5014: { // gluBuild3DMipmapLevels GLenum *target = (GLenum *) bp; bp += 4; @@ -131,14 +110,14 @@ case 5014: { // gluBuild3DMipmapLevels GLint *level = (GLint *) bp; bp += 4; GLint *base = (GLint *) bp; bp += 4; GLint *max = (GLint *) bp; bp += 4; - void *data = (void *) bins[0]->base; + void *data = (void *) bins[0]; GLint result = wegluBuild3DMipmapLevels(*target,*internalFormat,*width,*height,*depth,*format,*type,*level,*base,*max,data); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5015: { // gluBuild3DMipmaps GLenum *target = (GLenum *) bp; bp += 4; @@ -148,14 +127,14 @@ case 5015: { // gluBuild3DMipmaps GLsizei *depth = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - void *data = (void *) bins[0]->base; + void *data = (void *) bins[0]; GLint result = wegluBuild3DMipmaps(*target,*internalFormat,*width,*height,*depth,*format,*type,data); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5016: { // gluCheckExtension int * extNameLen = (int *) bp; bp += 4; @@ -168,7 +147,7 @@ case 5016: { // gluCheckExtension rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5017: { // gluCylinder GLUquadric * quad = (GLUquadric *) * (GLuint64EXT *) bp; bp += 8; @@ -199,7 +178,7 @@ case 5020: { // gluErrorString rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) result; rt[AP++] = strlen((char *) result); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5021: { // gluGetString GLenum *name = (GLenum *) bp; bp += 4; @@ -209,7 +188,7 @@ case 5021: { // gluGetString rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) result; rt[AP++] = strlen((char *) result); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5022: { // gluLookAt GLdouble *eyeX = (GLdouble *) bp; bp += 8; @@ -230,7 +209,7 @@ case 5023: { // gluNewQuadric rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5024: { // gluOrtho2D GLdouble *left = (GLdouble *) bp; bp += 8; @@ -284,7 +263,7 @@ case 5028: { // gluProject rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5029: { // gluQuadricDrawStyle GLUquadric * quad = (GLUquadric *) * (GLuint64EXT *) bp; bp += 8; @@ -311,18 +290,18 @@ case 5033: { // gluScaleImage GLsizei *wIn = (GLsizei *) bp; bp += 4; GLsizei *hIn = (GLsizei *) bp; bp += 4; GLenum *typeIn = (GLenum *) bp; bp += 4; - void *dataIn = (void *) bins[0]->base; + void *dataIn = (void *) bins[0]; GLsizei *wOut = (GLsizei *) bp; bp += 4; GLsizei *hOut = (GLsizei *) bp; bp += 4; GLenum *typeOut = (GLenum *) bp; bp += 4; - GLvoid *dataOut = (GLvoid *) bins[1]->base; + GLvoid *dataOut = (GLvoid *) bins[1]; GLint result = wegluScaleImage(*format,*wIn,*hIn,*typeIn,dataIn,*wOut,*hOut,*typeOut,dataOut); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5034: { // gluSphere GLUquadric * quad = (GLUquadric *) * (GLuint64EXT *) bp; bp += 8; @@ -351,7 +330,7 @@ case 5035: { // gluUnProject rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5036: { // gluUnProject4 GLdouble *winX = (GLdouble *) bp; bp += 8; @@ -378,7 +357,7 @@ case 5036: { // gluUnProject4 rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 5; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 16 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,16); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5037: { // glAccum GLenum *op = (GLenum *) bp; bp += 4; @@ -406,7 +385,7 @@ case 5039: { // glAreTexturesResident rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 11 + (*texturesLen)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,11 + (*texturesLen)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(residences); }; break; @@ -440,7 +419,7 @@ case 5044: { // glBitmap GLfloat *yorig = (GLfloat *) bp; bp += 4; GLfloat *xmove = (GLfloat *) bp; bp += 4; GLfloat *ymove = (GLfloat *) bp; bp += 4; - GLubyte *bitmap = (GLubyte *) bins[0]->base; + GLubyte *bitmap = (GLubyte *) bins[0]; weglBitmap(*width,*height,*xorig,*yorig,*xmove,*ymove,bitmap); }; break; case 5045: { // glBlendFunc @@ -580,7 +559,7 @@ 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]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglColorPointer(*size,*type,*stride,pointer); }; break; case 5075: { // glCopyPixels @@ -688,7 +667,7 @@ 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]->base; + GLvoid *indices = (GLvoid *) bins[0]; weglDrawElements(*mode,*count,*type,indices); }; break; case 5092: { // glDrawPixels @@ -704,7 +683,7 @@ case 5093: { // glDrawPixels GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]->base; + GLvoid *pixels = (GLvoid *) bins[0]; weglDrawPixels(*width,*height,*format,*type,pixels); }; break; case 5094: { // glEdgeFlagv @@ -718,7 +697,7 @@ case 5095: { // glEdgeFlagPointer }; break; case 5096: { // glEdgeFlagPointer GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglEdgeFlagPointer(*stride,pointer); }; break; case 5097: { // glEnable @@ -777,13 +756,13 @@ case 5108: { // glEvalPoint2 case 5109: { // glFeedbackBuffer GLsizei *size = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLfloat *buffer = (GLfloat *) bins[0]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5110: { // glFinish weglFinish(); @@ -834,7 +813,7 @@ case 5118: { // glGenLists rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5119: { // glGenTextures GLsizei *n = (GLsizei *) bp; bp += 4; @@ -849,7 +828,7 @@ case 5119: { // glGenTextures rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(textures); }; break; @@ -879,7 +858,7 @@ case 5120: { // glGetBooleanv rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5121: { // glGetClipPlane GLenum *plane = (GLenum *) bp; bp += 4; @@ -895,7 +874,7 @@ case 5121: { // glGetClipPlane rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5122: { // glGetDoublev GLenum *pname = (GLenum *) bp; bp += 4; @@ -923,7 +902,7 @@ case 5122: { // glGetDoublev rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5123: { // glGetError GLenum result = weglGetError(); @@ -932,7 +911,7 @@ case 5123: { // glGetError rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5124: { // glGetFloatv GLenum *pname = (GLenum *) bp; bp += 4; @@ -961,7 +940,7 @@ case 5124: { // glGetFloatv rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5125: { // glGetIntegerv GLenum *pname = (GLenum *) bp; bp += 4; @@ -989,7 +968,7 @@ case 5125: { // glGetIntegerv rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5126: { // glGetLightfv GLenum *light = (GLenum *) bp; bp += 4; @@ -1007,7 +986,7 @@ case 5126: { // glGetLightfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5127: { // glGetLightiv GLenum *light = (GLenum *) bp; bp += 4; @@ -1024,40 +1003,40 @@ case 5127: { // glGetLightiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5128: { // glGetMapdv GLenum *target = (GLenum *) bp; bp += 4; GLenum *query = (GLenum *) bp; bp += 4; - GLdouble *v = (GLdouble *) bins[0]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5129: { // glGetMapfv GLenum *target = (GLenum *) bp; bp += 4; GLenum *query = (GLenum *) bp; bp += 4; - GLfloat *v = (GLfloat *) bins[0]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + 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]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5131: { // glGetMaterialfv GLenum *face = (GLenum *) bp; bp += 4; @@ -1075,7 +1054,7 @@ case 5131: { // glGetMaterialfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5132: { // glGetMaterialiv GLenum *face = (GLenum *) bp; bp += 4; @@ -1092,37 +1071,37 @@ case 5132: { // glGetMaterialiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5133: { // glGetPixelMapfv GLenum *map = (GLenum *) bp; bp += 4; - GLfloat *values = (GLfloat *) bins[0]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5134: { // glGetPixelMapuiv GLenum *map = (GLenum *) bp; bp += 4; - GLuint *values = (GLuint *) bins[0]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5135: { // glGetPixelMapusv GLenum *map = (GLenum *) bp; bp += 4; - GLushort *values = (GLushort *) bins[0]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5136: { // glGetPolygonStipple GLubyte mask[128]; @@ -1134,7 +1113,7 @@ case 5136: { // glGetPolygonStipple rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) BinCopy; rt[AP++] = 128; rt[AP++] = 0; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free_binary(BinCopy); }; break; case 5137: { // glGetString @@ -1145,7 +1124,7 @@ case 5137: { // glGetString rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) result; rt[AP++] = strlen((char *) result); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5138: { // glGetTexEnvfv GLenum *target = (GLenum *) bp; bp += 4; @@ -1163,7 +1142,7 @@ case 5138: { // glGetTexEnvfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5139: { // glGetTexEnviv GLenum *target = (GLenum *) bp; bp += 4; @@ -1180,7 +1159,7 @@ case 5139: { // glGetTexEnviv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5140: { // glGetTexGendv GLenum *coord = (GLenum *) bp; bp += 4; @@ -1197,7 +1176,7 @@ case 5140: { // glGetTexGendv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5141: { // glGetTexGenfv GLenum *coord = (GLenum *) bp; bp += 4; @@ -1215,7 +1194,7 @@ case 5141: { // glGetTexGenfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5142: { // glGetTexGeniv GLenum *coord = (GLenum *) bp; bp += 4; @@ -1232,20 +1211,20 @@ case 5142: { // glGetTexGeniv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; 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]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5144: { // glGetTexLevelParameterfv GLenum *target = (GLenum *) bp; bp += 4; @@ -1261,7 +1240,7 @@ case 5144: { // glGetTexLevelParameterfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5145: { // glGetTexLevelParameteriv GLenum *target = (GLenum *) bp; bp += 4; @@ -1276,7 +1255,7 @@ case 5145: { // glGetTexLevelParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5146: { // glGetTexParameterfv GLenum *target = (GLenum *) bp; bp += 4; @@ -1294,7 +1273,7 @@ case 5146: { // glGetTexParameterfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5147: { // glGetTexParameteriv GLenum *target = (GLenum *) bp; bp += 4; @@ -1311,7 +1290,7 @@ case 5147: { // glGetTexParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5148: { // glHint GLenum *target = (GLenum *) bp; bp += 4; @@ -1331,7 +1310,7 @@ case 5150: { // glIndexPointer case 5151: { // glIndexPointer GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglIndexPointer(*type,*stride,pointer); }; break; case 5152: { // glIndexdv @@ -1366,7 +1345,7 @@ case 5158: { // glInterleavedArrays case 5159: { // glInterleavedArrays GLenum *format = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglInterleavedArrays(*format,*stride,pointer); }; break; case 5160: { // glIsEnabled @@ -1377,7 +1356,7 @@ case 5160: { // glIsEnabled rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5161: { // glIsList GLuint *list = (GLuint *) bp; bp += 4; @@ -1387,7 +1366,7 @@ case 5161: { // glIsList rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5162: { // glIsTexture GLuint *texture = (GLuint *) bp; bp += 4; @@ -1397,7 +1376,7 @@ case 5162: { // glIsTexture rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5163: { // glLightModelf GLenum *pname = (GLenum *) bp; bp += 4; @@ -1486,7 +1465,7 @@ case 5179: { // glMap1d GLdouble *u2 = (GLdouble *) bp; bp += 8; GLint *stride = (GLint *) bp; bp += 4; GLint *order = (GLint *) bp; bp += 4; - GLdouble *points = (GLdouble *) bins[0]->base; + GLdouble *points = (GLdouble *) bins[0]; weglMap1d(*target,*u1,*u2,*stride,*order,points); }; break; case 5180: { // glMap1f @@ -1495,7 +1474,7 @@ case 5180: { // glMap1f GLfloat *u2 = (GLfloat *) bp; bp += 4; GLint *stride = (GLint *) bp; bp += 4; GLint *order = (GLint *) bp; bp += 4; - GLfloat *points = (GLfloat *) bins[0]->base; + GLfloat *points = (GLfloat *) bins[0]; weglMap1f(*target,*u1,*u2,*stride,*order,points); }; break; case 5181: { // glMap2d @@ -1509,7 +1488,7 @@ case 5181: { // glMap2d GLdouble *v2 = (GLdouble *) bp; bp += 8; GLint *vstride = (GLint *) bp; bp += 4; GLint *vorder = (GLint *) bp; bp += 4; - GLdouble *points = (GLdouble *) bins[0]->base; + GLdouble *points = (GLdouble *) bins[0]; weglMap2d(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points); }; break; case 5182: { // glMap2f @@ -1522,7 +1501,7 @@ case 5182: { // glMap2f GLfloat *v2 = (GLfloat *) bp; bp += 4; GLint *vstride = (GLint *) bp; bp += 4; GLint *vorder = (GLint *) bp; bp += 4; - GLfloat *points = (GLfloat *) bins[0]->base; + GLfloat *points = (GLfloat *) bins[0]; weglMap2f(*target,*u1,*u2,*ustride,*uorder,*v1,*v2,*vstride,*vorder,points); }; break; case 5183: { // glMapGrid1d @@ -1630,7 +1609,7 @@ case 5200: { // glNormalPointer case 5201: { // glNormalPointer GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglNormalPointer(*type,*stride,pointer); }; break; case 5202: { // glOrtho @@ -1649,19 +1628,19 @@ case 5203: { // glPassThrough case 5204: { // glPixelMapfv GLenum *map = (GLenum *) bp; bp += 4; GLsizei *mapsize = (GLsizei *) bp; bp += 4; - GLfloat *values = (GLfloat *) bins[0]->base; + GLfloat *values = (GLfloat *) bins[0]; weglPixelMapfv(*map,*mapsize,values); }; break; case 5205: { // glPixelMapuiv GLenum *map = (GLenum *) bp; bp += 4; GLsizei *mapsize = (GLsizei *) bp; bp += 4; - GLuint *values = (GLuint *) bins[0]->base; + GLuint *values = (GLuint *) bins[0]; weglPixelMapuiv(*map,*mapsize,values); }; break; case 5206: { // glPixelMapusv GLenum *map = (GLenum *) bp; bp += 4; GLsizei *mapsize = (GLsizei *) bp; bp += 4; - GLushort *values = (GLushort *) bins[0]->base; + GLushort *values = (GLushort *) bins[0]; weglPixelMapusv(*map,*mapsize,values); }; break; case 5207: { // glPixelStoref @@ -1704,7 +1683,7 @@ case 5214: { // glPolygonOffset weglPolygonOffset(*factor,*units); }; break; case 5215: { // glPolygonStipple - GLubyte *mask = (GLubyte *) bins[0]->base; + GLubyte *mask = (GLubyte *) bins[0]; weglPolygonStipple(mask); }; break; case 5216: { // glPopAttrib @@ -1800,13 +1779,13 @@ case 5238: { // glReadPixels GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5239: { // glRectd GLdouble *x1 = (GLdouble *) bp; bp += 8; @@ -1864,7 +1843,7 @@ case 5247: { // glRenderMode rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5248: { // glRotated GLdouble *angle = (GLdouble *) bp; bp += 8; @@ -1901,13 +1880,13 @@ case 5252: { // glScissor }; break; case 5253: { // glSelectBuffer GLsizei *size = (GLsizei *) bp; bp += 4; - GLuint *buffer = (GLuint *) bins[0]->base; + 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 *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5254: { // glShadeModel GLenum *mode = (GLenum *) bp; bp += 4; @@ -2004,7 +1983,7 @@ case 5275: { // glTexCoordPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglTexCoordPointer(*size,*type,*stride,pointer); }; break; case 5276: { // glTexEnvf @@ -2091,7 +2070,7 @@ case 5287: { // glTexImage1D GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]->base; + GLvoid *pixels = (GLvoid *) bins[0]; weglTexImage1D(*target,*level,*internalformat,*width,*border,*format,*type,pixels); }; break; case 5288: { // glTexImage2D @@ -2115,7 +2094,7 @@ case 5289: { // glTexImage2D GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]->base; + GLvoid *pixels = (GLvoid *) bins[0]; weglTexImage2D(*target,*level,*internalformat,*width,*height,*border,*format,*type,pixels); }; break; case 5290: { // glTexParameterf @@ -2161,7 +2140,7 @@ case 5295: { // glTexSubImage1D GLsizei *width = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]->base; + GLvoid *pixels = (GLvoid *) bins[0]; weglTexSubImage1D(*target,*level,*xoffset,*width,*format,*type,pixels); }; break; case 5296: { // glTexSubImage2D @@ -2185,7 +2164,7 @@ case 5297: { // glTexSubImage2D GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]->base; + GLvoid *pixels = (GLvoid *) bins[0]; weglTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*type,pixels); }; break; case 5298: { // glTranslated @@ -2259,7 +2238,7 @@ case 5313: { // glVertexPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglVertexPointer(*size,*type,*stride,pointer); }; break; case 5314: { // glViewport @@ -2295,7 +2274,7 @@ case 5318: { // glDrawRangeElements GLuint *end = (GLuint *) bp; bp += 4; GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) bins[0]->base; + GLvoid *indices = (GLvoid *) bins[0]; weglDrawRangeElements(*mode,*start,*end,*count,*type,indices); }; break; case 5319: { // glTexImage3D @@ -2321,7 +2300,7 @@ case 5320: { // glTexImage3D GLint *border = (GLint *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]->base; + GLvoid *pixels = (GLvoid *) bins[0]; weglTexImage3D(*target,*level,*internalformat,*width,*height,*depth,*border,*format,*type,pixels); }; break; case 5321: { // glTexSubImage3D @@ -2349,7 +2328,7 @@ case 5322: { // glTexSubImage3D GLsizei *depth = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *pixels = (GLvoid *) bins[0]->base; + GLvoid *pixels = (GLvoid *) bins[0]; weglTexSubImage3D(*target,*level,*xoffset,*yoffset,*zoffset,*width,*height,*depth,*format,*type,pixels); }; break; case 5323: { // glCopyTexSubImage3D @@ -2379,7 +2358,7 @@ case 5325: { // glColorTable GLsizei *width = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *table = (GLvoid *) bins[0]->base; + GLvoid *table = (GLvoid *) bins[0]; weglColorTable(*target,*internalformat,*width,*format,*type,table); }; break; case 5326: { // glColorTableParameterfv @@ -2406,13 +2385,13 @@ case 5329: { // glGetColorTable GLenum *target = (GLenum *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *table = (GLvoid *) bins[0]->base; + GLvoid *table = (GLvoid *) bins[0]; weglGetColorTable(*target,*format,*type,table); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5330: { // glGetColorTableParameterfv GLenum *target = (GLenum *) bp; bp += 4; @@ -2430,7 +2409,7 @@ case 5330: { // glGetColorTableParameterfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5331: { // glGetColorTableParameteriv GLenum *target = (GLenum *) bp; bp += 4; @@ -2447,7 +2426,7 @@ case 5331: { // glGetColorTableParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5332: { // glColorSubTable GLenum *target = (GLenum *) bp; bp += 4; @@ -2464,7 +2443,7 @@ case 5333: { // glColorSubTable GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; weglColorSubTable(*target,*start,*count,*format,*type,data); }; break; case 5334: { // glCopyColorSubTable @@ -2490,7 +2469,7 @@ case 5336: { // glConvolutionFilter1D GLsizei *width = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *image = (GLvoid *) bins[0]->base; + GLvoid *image = (GLvoid *) bins[0]; weglConvolutionFilter1D(*target,*internalformat,*width,*format,*type,image); }; break; case 5337: { // glConvolutionFilter2D @@ -2510,7 +2489,7 @@ case 5338: { // glConvolutionFilter2D GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *image = (GLvoid *) bins[0]->base; + GLvoid *image = (GLvoid *) bins[0]; weglConvolutionFilter2D(*target,*internalformat,*width,*height,*format,*type,image); }; break; case 5339: { // glConvolutionParameterfv @@ -2548,13 +2527,13 @@ case 5343: { // glGetConvolutionFilter GLenum *target = (GLenum *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *image = (GLvoid *) bins[0]->base; + GLvoid *image = (GLvoid *) bins[0]; weglGetConvolutionFilter(*target,*format,*type,image); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5344: { // glGetConvolutionParameterfv GLenum *target = (GLenum *) bp; bp += 4; @@ -2572,7 +2551,7 @@ case 5344: { // glGetConvolutionParameterfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5345: { // glGetConvolutionParameteriv GLenum *target = (GLenum *) bp; bp += 4; @@ -2589,7 +2568,7 @@ case 5345: { // glGetConvolutionParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5346: { // glSeparableFilter2D GLenum *target = (GLenum *) bp; bp += 4; @@ -2609,8 +2588,8 @@ case 5347: { // glSeparableFilter2D GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *row = (GLvoid *) bins[0]->base; - GLvoid *column = (GLvoid *) bins[1]->base; + GLvoid *row = (GLvoid *) bins[0]; + GLvoid *column = (GLvoid *) bins[1]; weglSeparableFilter2D(*target,*internalformat,*width,*height,*format,*type,row,column); }; break; case 5348: { // glGetHistogram @@ -2619,13 +2598,13 @@ case 5348: { // glGetHistogram bp += 3; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *values = (GLvoid *) bins[0]->base; + GLvoid *values = (GLvoid *) bins[0]; weglGetHistogram(*target,*reset,*format,*type,values); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5349: { // glGetHistogramParameterfv GLenum *target = (GLenum *) bp; bp += 4; @@ -2640,7 +2619,7 @@ case 5349: { // glGetHistogramParameterfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5350: { // glGetHistogramParameteriv GLenum *target = (GLenum *) bp; bp += 4; @@ -2654,7 +2633,7 @@ case 5350: { // glGetHistogramParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5351: { // glGetMinmax GLenum *target = (GLenum *) bp; bp += 4; @@ -2662,13 +2641,13 @@ case 5351: { // glGetMinmax bp += 3; GLenum *format = (GLenum *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *values = (GLvoid *) bins[0]->base; + GLvoid *values = (GLvoid *) bins[0]; weglGetMinmax(*target,*reset,*format,*type,values); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5352: { // glGetMinmaxParameterfv GLenum *target = (GLenum *) bp; bp += 4; @@ -2683,7 +2662,7 @@ case 5352: { // glGetMinmaxParameterfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5353: { // glGetMinmaxParameteriv GLenum *target = (GLenum *) bp; bp += 4; @@ -2697,7 +2676,7 @@ case 5353: { // glGetMinmaxParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5354: { // glHistogram GLenum *target = (GLenum *) bp; bp += 4; @@ -2750,7 +2729,7 @@ case 5361: { // glCompressedTexImage3D GLsizei *depth = (GLsizei *) bp; bp += 4; GLint *border = (GLint *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; weglCompressedTexImage3D(*target,*level,*internalformat,*width,*height,*depth,*border,*imageSize,data); }; break; case 5362: { // glCompressedTexImage2D @@ -2772,7 +2751,7 @@ case 5363: { // glCompressedTexImage2D GLsizei *height = (GLsizei *) bp; bp += 4; GLint *border = (GLint *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; weglCompressedTexImage2D(*target,*level,*internalformat,*width,*height,*border,*imageSize,data); }; break; case 5364: { // glCompressedTexImage1D @@ -2792,7 +2771,7 @@ case 5365: { // glCompressedTexImage1D GLsizei *width = (GLsizei *) bp; bp += 4; GLint *border = (GLint *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; weglCompressedTexImage1D(*target,*level,*internalformat,*width,*border,*imageSize,data); }; break; case 5366: { // glCompressedTexSubImage3D @@ -2820,7 +2799,7 @@ case 5367: { // glCompressedTexSubImage3D GLsizei *depth = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; weglCompressedTexSubImage3D(*target,*level,*xoffset,*yoffset,*zoffset,*width,*height,*depth,*format,*imageSize,data); }; break; case 5368: { // glCompressedTexSubImage2D @@ -2844,7 +2823,7 @@ case 5369: { // glCompressedTexSubImage2D GLsizei *height = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; weglCompressedTexSubImage2D(*target,*level,*xoffset,*yoffset,*width,*height,*format,*imageSize,data); }; break; case 5370: { // glCompressedTexSubImage1D @@ -2864,19 +2843,19 @@ case 5371: { // glCompressedTexSubImage1D GLsizei *width = (GLsizei *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLsizei *imageSize = (GLsizei *) bp; bp += 4; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; weglCompressedTexSubImage1D(*target,*level,*xoffset,*width,*format,*imageSize,data); }; break; case 5372: { // glGetCompressedTexImage GLenum *target = (GLenum *) bp; bp += 4; GLint *level = (GLint *) bp; bp += 4; - GLvoid *img = (GLvoid *) bins[0]->base; + GLvoid *img = (GLvoid *) bins[0]; weglGetCompressedTexImage(*target,*level,img); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5373: { // glClientActiveTexture GLenum *texture = (GLenum *) bp; bp += 4; @@ -3036,7 +3015,7 @@ case 5402: { // glFogCoordPointer case 5403: { // glFogCoordPointer GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglFogCoordPointer(*type,*stride,pointer); }; break; case 5404: { // glSecondaryColor3bv @@ -3082,7 +3061,7 @@ case 5413: { // glSecondaryColorPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglSecondaryColorPointer(*size,*type,*stride,pointer); }; break; case 5414: { // glWindowPos2dv @@ -3130,7 +3109,7 @@ case 5422: { // glGenQueries rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(ids); }; break; @@ -3147,7 +3126,7 @@ case 5424: { // glIsQuery rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5425: { // glBeginQuery GLenum *target = (GLenum *) bp; bp += 4; @@ -3168,7 +3147,7 @@ case 5427: { // glGetQueryiv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5428: { // glGetQueryObjectiv GLuint *id = (GLuint *) bp; bp += 4; @@ -3180,7 +3159,7 @@ case 5428: { // glGetQueryObjectiv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5429: { // glGetQueryObjectuiv GLuint *id = (GLuint *) bp; bp += 4; @@ -3192,7 +3171,7 @@ case 5429: { // glGetQueryObjectuiv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5430: { // glBindBuffer GLenum *target = (GLenum *) bp; bp += 4; @@ -3217,7 +3196,7 @@ case 5432: { // glGenBuffers rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(buffers); }; break; @@ -3229,7 +3208,7 @@ case 5433: { // glIsBuffer rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5434: { // glBufferData GLenum *target = (GLenum *) bp; bp += 4; @@ -3243,7 +3222,7 @@ case 5435: { // glBufferData GLenum *target = (GLenum *) bp; bp += 4; bp += 4; GLsizeiptr size = (GLsizeiptr) * (GLuint64EXT *) bp; bp += 8; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; GLenum *usage = (GLenum *) bp; bp += 4; weglBufferData(*target,size,data,*usage); }; break; @@ -3260,7 +3239,7 @@ case 5437: { // glBufferSubData bp += 4; GLintptr offset = (GLintptr) * (GLuint64EXT *) bp; bp += 8; GLsizeiptr size = (GLsizeiptr) * (GLuint64EXT *) bp; bp += 8; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; weglBufferSubData(*target,offset,size,data); }; break; case 5438: { // glGetBufferSubData @@ -3268,13 +3247,13 @@ case 5438: { // glGetBufferSubData bp += 4; GLintptr offset = (GLintptr) * (GLuint64EXT *) bp; bp += 8; GLsizeiptr size = (GLsizeiptr) * (GLuint64EXT *) bp; bp += 8; - GLvoid *data = (GLvoid *) bins[0]->base; + GLvoid *data = (GLvoid *) bins[0]; weglGetBufferSubData(*target,offset,size,data); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5439: { // glGetBufferParameteriv GLenum *target = (GLenum *) bp; bp += 4; @@ -3286,7 +3265,7 @@ case 5439: { // glGetBufferParameteriv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5440: { // glBlendEquationSeparate GLenum *modeRGB = (GLenum *) bp; bp += 4; @@ -3340,7 +3319,7 @@ case 5448: { // glCreateProgram rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5449: { // glCreateShader GLenum *type = (GLenum *) bp; bp += 4; @@ -3350,7 +3329,7 @@ case 5449: { // glCreateShader rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5450: { // glDeleteProgram GLuint *program = (GLuint *) bp; bp += 4; @@ -3391,7 +3370,7 @@ case 5455: { // glGetActiveAttrib rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(name); }; break; case 5456: { // glGetActiveUniform @@ -3412,7 +3391,7 @@ case 5456: { // glGetActiveUniform rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(name); }; break; case 5457: { // glGetAttachedShaders @@ -3430,7 +3409,7 @@ case 5457: { // glGetAttachedShaders rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*count)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*count)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*count)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(obj); }; break; @@ -3444,7 +3423,7 @@ case 5458: { // glGetAttribLocation rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5459: { // glGetProgramiv GLuint *program = (GLuint *) bp; bp += 4; @@ -3456,7 +3435,7 @@ case 5459: { // glGetProgramiv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5460: { // glGetProgramInfoLog GLuint *program = (GLuint *) bp; bp += 4; @@ -3470,7 +3449,7 @@ case 5460: { // glGetProgramInfoLog rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) infoLog; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(infoLog); }; break; case 5461: { // glGetShaderiv @@ -3483,7 +3462,7 @@ case 5461: { // glGetShaderiv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5462: { // glGetShaderInfoLog GLuint *shader = (GLuint *) bp; bp += 4; @@ -3497,7 +3476,7 @@ case 5462: { // glGetShaderInfoLog rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) infoLog; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(infoLog); }; break; case 5463: { // glGetShaderSource @@ -3512,7 +3491,7 @@ case 5463: { // glGetShaderSource rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) source; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(source); }; break; case 5464: { // glGetUniformLocation @@ -3525,7 +3504,7 @@ case 5464: { // glGetUniformLocation rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5465: { // glGetUniformfv GLuint *program = (GLuint *) bp; bp += 4; @@ -3555,7 +3534,7 @@ case 5465: { // glGetUniformfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5466: { // glGetUniformiv GLuint *program = (GLuint *) bp; bp += 4; @@ -3584,7 +3563,7 @@ case 5466: { // glGetUniformiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5467: { // glGetVertexAttribdv GLuint *index = (GLuint *) bp; bp += 4; @@ -3601,7 +3580,7 @@ case 5467: { // glGetVertexAttribdv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5468: { // glGetVertexAttribfv GLuint *index = (GLuint *) bp; bp += 4; @@ -3619,7 +3598,7 @@ case 5468: { // glGetVertexAttribfv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5469: { // glGetVertexAttribiv GLuint *index = (GLuint *) bp; bp += 4; @@ -3636,7 +3615,7 @@ case 5469: { // glGetVertexAttribiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5470: { // glIsProgram GLuint *program = (GLuint *) bp; bp += 4; @@ -3646,7 +3625,7 @@ case 5470: { // glIsProgram rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5471: { // glIsShader GLuint *shader = (GLuint *) bp; bp += 4; @@ -3656,7 +3635,7 @@ case 5471: { // glIsShader rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5472: { // glLinkProgram GLuint *program = (GLuint *) bp; bp += 4; @@ -3942,7 +3921,7 @@ case 5519: { // glVertexAttribPointer GLboolean *normalized = (GLboolean *) bp; bp += 1; bp += 3; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglVertexAttribPointer(*index,*size,*type,*normalized,*stride,pointer); }; break; case 5520: { // glUniformMatrix2x3fv @@ -4028,7 +4007,7 @@ case 5527: { // glGetBooleani_v rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5528: { // glGetIntegeri_v GLenum *target = (GLenum *) bp; bp += 4; @@ -4057,7 +4036,7 @@ case 5528: { // glGetIntegeri_v rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5529: { // glEnablei GLenum *target = (GLenum *) bp; bp += 4; @@ -4078,7 +4057,7 @@ case 5531: { // glIsEnabledi rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5532: { // glBeginTransformFeedback GLenum *primitiveMode = (GLenum *) bp; bp += 4; @@ -4133,7 +4112,7 @@ case 5537: { // glGetTransformFeedbackVarying rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(name); }; break; case 5538: { // glClampColor @@ -4162,7 +4141,7 @@ case 5542: { // glVertexAttribIPointer GLint *size = (GLint *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; GLsizei *stride = (GLsizei *) bp; bp += 4; - GLvoid *pointer = (GLvoid *) bins[0]->base; + GLvoid *pointer = (GLvoid *) bins[0]; weglVertexAttribIPointer(*index,*size,*type,*stride,pointer); }; break; case 5543: { // glGetVertexAttribIiv @@ -4180,7 +4159,7 @@ case 5543: { // glGetVertexAttribIiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5544: { // glGetVertexAttribIuiv GLuint *index = (GLuint *) bp; bp += 4; @@ -4197,7 +4176,7 @@ case 5544: { // glGetVertexAttribIuiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5545: { // glGetUniformuiv GLuint *program = (GLuint *) bp; bp += 4; @@ -4226,7 +4205,7 @@ case 5545: { // glGetUniformuiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5546: { // glBindFragDataLocation GLuint *program = (GLuint *) bp; bp += 4; @@ -4245,7 +4224,7 @@ case 5547: { // glGetFragDataLocation rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5548: { // glUniform1ui GLint *location = (GLint *) bp; bp += 4; @@ -4326,7 +4305,7 @@ case 5558: { // glGetTexParameterIiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5559: { // glGetTexParameterIuiv GLenum *target = (GLenum *) bp; bp += 4; @@ -4343,7 +4322,7 @@ case 5559: { // glGetTexParameterIuiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5560: { // glClearBufferiv GLenum *buffer = (GLenum *) bp; bp += 4; @@ -4382,7 +4361,7 @@ case 5564: { // glGetStringi rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) result; rt[AP++] = strlen((char *) result); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5565: { // glVertexAttribI1iv GLuint *index = (GLuint *) bp; bp += 4; @@ -4463,7 +4442,7 @@ case 5579: { // glDrawElementsInstanced GLenum *mode = (GLenum *) bp; bp += 4; GLsizei *count = (GLsizei *) bp; bp += 4; GLenum *type = (GLenum *) bp; bp += 4; - GLvoid *indices = (GLvoid *) bins[0]->base; + GLvoid *indices = (GLvoid *) bins[0]; GLsizei *primcount = (GLsizei *) bp; bp += 4; weglDrawElementsInstanced(*mode,*count,*type,indices,*primcount); }; break; @@ -4586,7 +4565,7 @@ case 5602: { // glGenProgramsARB rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(programs); }; break; @@ -4665,7 +4644,7 @@ case 5611: { // glGetProgramEnvParameterdvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5612: { // glGetProgramEnvParameterfvARB GLenum *target = (GLenum *) bp; bp += 4; @@ -4683,7 +4662,7 @@ case 5612: { // glGetProgramEnvParameterfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5613: { // glGetProgramLocalParameterdvARB GLenum *target = (GLenum *) bp; bp += 4; @@ -4700,7 +4679,7 @@ case 5613: { // glGetProgramLocalParameterdvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5614: { // glGetProgramLocalParameterfvARB GLenum *target = (GLenum *) bp; bp += 4; @@ -4718,18 +4697,18 @@ case 5614: { // glGetProgramLocalParameterfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5615: { // glGetProgramStringARB GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; - GLvoid *string = (GLvoid *) bins[0]->base; + GLvoid *string = (GLvoid *) bins[0]; weglGetProgramStringARB(*target,*pname,string); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5616: { // glDeleteObjectARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; @@ -4743,7 +4722,7 @@ case 5617: { // glGetHandleARB rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5618: { // glDetachObjectARB GLhandleARB containerObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; @@ -4758,7 +4737,7 @@ case 5619: { // glCreateShaderObjectARB rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5620: { // glShaderSourceARB GLhandleARB shaderObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; @@ -4783,7 +4762,7 @@ case 5622: { // glCreateProgramObjectARB rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5623: { // glAttachObjectARB GLhandleARB containerObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; @@ -4813,7 +4792,7 @@ case 5627: { // glGetObjectParameterfvARB rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) ¶msConv; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5628: { // glGetObjectParameterivARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; @@ -4825,7 +4804,7 @@ case 5628: { // glGetObjectParameterivARB rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5629: { // glGetInfoLogARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; @@ -4839,7 +4818,7 @@ case 5629: { // glGetInfoLogARB rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) infoLog; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(infoLog); }; break; case 5630: { // glGetAttachedObjectsARB @@ -4857,7 +4836,7 @@ case 5630: { // glGetAttachedObjectsARB rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*count)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*count)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*count)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(obj); }; break; @@ -4871,7 +4850,7 @@ case 5631: { // glGetUniformLocationARB rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5632: { // glGetActiveUniformARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; @@ -4891,7 +4870,7 @@ case 5632: { // glGetActiveUniformARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(name); }; break; case 5633: { // glGetUniformfvARB @@ -4922,7 +4901,7 @@ case 5633: { // glGetUniformfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5634: { // glGetUniformivARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; @@ -4951,7 +4930,7 @@ case 5634: { // glGetUniformivARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5635: { // glGetShaderSourceARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; @@ -4965,7 +4944,7 @@ case 5635: { // glGetShaderSourceARB rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) source; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(source); }; break; case 5636: { // glBindAttribLocationARB @@ -4993,7 +4972,7 @@ case 5637: { // glGetActiveAttribARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(name); }; break; case 5638: { // glGetAttribLocationARB @@ -5006,7 +4985,7 @@ case 5638: { // glGetAttribLocationARB rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5639: { // glIsRenderbuffer GLuint *renderbuffer = (GLuint *) bp; bp += 4; @@ -5016,7 +4995,7 @@ case 5639: { // glIsRenderbuffer rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5640: { // glBindRenderbuffer GLenum *target = (GLenum *) bp; bp += 4; @@ -5041,7 +5020,7 @@ case 5642: { // glGenRenderbuffers rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(renderbuffers); }; break; @@ -5062,7 +5041,7 @@ case 5644: { // glGetRenderbufferParameteriv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5645: { // glIsFramebuffer GLuint *framebuffer = (GLuint *) bp; bp += 4; @@ -5072,7 +5051,7 @@ case 5645: { // glIsFramebuffer rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5646: { // glBindFramebuffer GLenum *target = (GLenum *) bp; bp += 4; @@ -5097,7 +5076,7 @@ case 5648: { // glGenFramebuffers rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(framebuffers); }; break; @@ -5109,7 +5088,7 @@ case 5649: { // glCheckFramebufferStatus rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5650: { // glFramebufferTexture1D GLenum *target = (GLenum *) bp; bp += 4; @@ -5154,7 +5133,7 @@ case 5654: { // glGetFramebufferAttachmentParameteriv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5655: { // glGenerateMipmap GLenum *target = (GLenum *) bp; bp += 4; @@ -5244,7 +5223,7 @@ case 5666: { // glGenVertexArrays rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(arrays); }; break; @@ -5256,7 +5235,7 @@ case 5667: { // glIsVertexArray rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5668: { // glGetUniformIndices GLuint *program = (GLuint *) bp; bp += 4; @@ -5278,7 +5257,7 @@ case 5668: { // glGetUniformIndices rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*uniformNamesLen)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*uniformNamesLen)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*uniformNamesLen)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(uniformIndices); driver_free(uniformNames); @@ -5299,7 +5278,7 @@ case 5669: { // glGetActiveUniformsiv rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*uniformIndicesLen)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 + (*uniformIndicesLen)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*uniformIndicesLen)*2); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(params); }; break; @@ -5316,7 +5295,7 @@ case 5670: { // glGetActiveUniformName rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) uniformName; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(uniformName); }; break; case 5671: { // glGetUniformBlockIndex @@ -5329,19 +5308,19 @@ case 5671: { // glGetUniformBlockIndex rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5672: { // glGetActiveUniformBlockiv GLuint *program = (GLuint *) bp; bp += 4; GLuint *uniformBlockIndex = (GLuint *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; - GLint *params = (GLint *) bins[0]->base; + GLint *params = (GLint *) bins[0]; weglGetActiveUniformBlockiv(*program,*uniformBlockIndex,*pname,params); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "ok"); rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); }; break; case 5673: { // glGetActiveUniformBlockName GLuint *program = (GLuint *) bp; bp += 4; @@ -5356,7 +5335,7 @@ case 5673: { // glGetActiveUniformBlockName rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) uniformBlockName; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); - driver_send_term(WXE_DRV_PORT,caller,rt,AP); + driver_send_term(port,caller,rt,AP); driver_free(uniformBlockName); }; break; case 5674: { // glUniformBlockBinding diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp index 8c056bbb91..479d7679a4 100644 --- a/lib/wx/c_src/gen/wxe_funcs.cpp +++ b/lib/wx/c_src/gen/wxe_funcs.cpp @@ -23,6 +23,7 @@ #include "../wxe_impl.h" #include "../wxe_events.h" #include "../wxe_return.h" +#include "../wxe_gl.h" #include "wxe_macros.h" #include "wxe_derived_dest.h" @@ -43,6 +44,15 @@ void WxeApp::wxe_dispatch(wxeCommand& Ecmd) rt.addAtom("ok"); break; } + case WXE_BIN_INCR: + driver_binary_inc_refc(Ecmd.bin[0]->bin); + break; + case WXE_BIN_DECR: + driver_binary_dec_refc(Ecmd.bin[0]->bin); + break; + case WXE_INIT_OPENGL: + wxe_initOpenGL(rt, bp); + break; case 98: { // wxeEvtListener::wxeEvtListener wxeEvtListener *Result = new wxeEvtListener(Ecmd.port); rt.addRef(getRef((void *)Result,memenv), "wxeEvtListener"); diff --git a/lib/wx/c_src/wxe_driver.h b/lib/wx/c_src/wxe_driver.h index 13a17e356f..5c5b8614ed 100644 --- a/lib/wx/c_src/wxe_driver.h +++ b/lib/wx/c_src/wxe_driver.h @@ -83,8 +83,9 @@ extern char * erl_wx_privdir; #define WXE_CB_START 8 #define WXE_DEBUG_DRIVER 9 #define WXE_DEBUG_PING 10 -#define WXE_BIN_INCR 5001 -#define WXE_BIN_DECR 5002 +#define WXE_BIN_INCR 11 +#define WXE_BIN_DECR 12 +#define WXE_INIT_OPENGL 13 #define OPENGL_START 5000 diff --git a/lib/wx/c_src/wxe_gl.cpp b/lib/wx/c_src/wxe_gl.cpp index 63dd68fa5e..eb4462047f 100644 --- a/lib/wx/c_src/wxe_gl.cpp +++ b/lib/wx/c_src/wxe_gl.cpp @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2009. All Rights Reserved. + * Copyright Ericsson AB 2008-2010. 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,303 +19,104 @@ #include #include +#include #include "wxe_impl.h" - -#include "wxe_gl.h" +#include "wxe_return.h" #define WX_DEF_EXTS -#include "gen/gl_fdefs.h" -#include "gen/gl_finit.h" -#include "gen/glu_finit.h" /* **************************************************************************** * Opengl context management * * ****************************************************************************/ -int gl_initiated = FALSE; +int erl_gl_initiated = FALSE; ErlDrvTermData gl_active = 0; wxeGLC glc; -void setActiveGL(ErlDrvTermData caller, wxGLCanvas *canvas) -{ - if(gl_initiated == FALSE) { - initOpenGL(); - init_tess(); - gl_initiated = TRUE; - } - gl_active = caller; - glc[caller] = canvas; -} - -void deleteActiveGL(wxGLCanvas *canvas) -{ - gl_active = 0; - wxeGLC::iterator it; - for(it = glc.begin(); it != glc.end(); ++it) { - if(it->second == canvas) { - it->second = (wxGLCanvas *) 0; - } - } -} - -/* **************************************************************************** - * OPENGL INITIALIZATION - *****************************************************************************/ +typedef void (*WXE_GL_DISPATCH) (int, char *, ErlDrvPort, ErlDrvTermData, char **); +WXE_GL_DISPATCH wxe_gl_dispatch; #ifdef _WIN32 void * dlsym(HMODULE Lib, const char *func) { - void * funcp; - if((funcp = (void *) GetProcAddress(Lib, func))) - return funcp; - else - return (void *) wglGetProcAddress(func); + funcp = (void *) GetProcAddress(Lib, func); + return funcp; } #endif -int initOpenGL() -{ -#ifdef _MACOSX - char * DLName = "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"; - void * LIBhandle = dlopen(DLName, RTLD_LAZY); -#elif defined(_WIN32) - WCHAR * DLName = wxT("opengl32.dll"); - HMODULE LIBhandle = LoadLibrary(DLName); -#else - char * DLName = (char *) "libGL.so"; - void * LIBhandle = dlopen(DLName, RTLD_LAZY); -#endif - // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName); - void * func = NULL; - int i; - - if(LIBhandle) { - for(i=0; gl_fns[i].name != NULL; i++) { - if((func = dlsym(LIBhandle, gl_fns[i].name))) { - * (void **) (gl_fns[i].func) = func; - // fprintf(stderr, "GL LOADED %s \r\n", gl_fns[i].name); - } else { - if(gl_fns[i].alt != NULL) { - if((func = dlsym(LIBhandle, gl_fns[i].alt))) { - * (void **) (gl_fns[i].func) = func; - // fprintf(stderr, "GL LOADED %s \r\n", gl_fns[i].alt); - } else { - * (void **) (gl_fns[i].func) = (void *) &gl_error; - // fprintf(stderr, "GL Skipped %s and %s \r\n", gl_fns[i].name, gl_fns[i].alt); - }; +void wxe_initOpenGL(wxeReturn rt, char *bp) { + void * LIBhandle; + int (*init_opengl) (); + + if(erl_gl_initiated == FALSE) { + if((LIBhandle = dlopen(bp, RTLD_LAZY))) { + *(void **) (&init_opengl) = dlsym(LIBhandle, "egl_init_opengl"); + wxe_gl_dispatch = (WXE_GL_DISPATCH) dlsym(LIBhandle, "egl_dispatch"); + if(init_opengl && wxe_gl_dispatch) { + (*init_opengl)(); + rt.addAtom((char *) "ok"); + rt.add(wxString::FromAscii("initiated")); + rt.addTupleCount(2); + erl_gl_initiated = TRUE; } else { - * (void **) (gl_fns[i].func) = (void *) &gl_error; - // fprintf(stderr, "GL Skipped %s \r\n", gl_fns[i].name); + wxString msg; + msg.Printf(wxT("In library: ")); + msg += wxString::FromAscii(bp); + msg += wxT(" functions: "); + if(!init_opengl) + msg += wxT("egl_init_opengl "); + if(!wxe_gl_dispatch) + msg += wxT("egl_dispatch "); + rt.addAtom((char *) "error"); + rt.add(msg); + rt.addTupleCount(2); } - } } -#ifdef _WIN32 - FreeLibrary(LIBhandle); -#else - dlclose(LIBhandle); -#endif - // fprintf(stderr, "OPENGL library is loaded\r\n"); } else { - wxString msg; - msg.Printf(wxT("Could NOT load OpenGL library: ")); -#ifdef _WIN32 - msg += DLName; -#else - msg += wxString::FromAscii((char *)DLName); -#endif - send_msg("error", &msg); - }; - -#ifdef _MACOSX - DLName = "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib"; - LIBhandle = dlopen(DLName, RTLD_LAZY); -#elif defined(_WIN32) - DLName = wxT("glu32.dll"); - LIBhandle = LoadLibrary(DLName); -#else - DLName = (char *) "libGLU.so"; - LIBhandle = dlopen(DLName, RTLD_LAZY); -#endif - // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName); - func = NULL; - - if(LIBhandle) { - for(i=0; glu_fns[i].name != NULL; i++) { - if((func = dlsym(LIBhandle, glu_fns[i].name))) { - * (void **) (glu_fns[i].func) = func; - } else { - if(glu_fns[i].alt != NULL) { - if((func = dlsym(LIBhandle, glu_fns[i].alt))) { - * (void **) (glu_fns[i].func) = func; - } else { - * (void **) (glu_fns[i].func) = (void *) &gl_error; - // fprintf(stderr, "GLU Skipped %s\r\n", glu_fns[i].alt); - }; - } else { - * (void **) (glu_fns[i].func) = (void *) &gl_error; - // fprintf(stderr, "GLU Skipped %s\r\n", glu_fns[i].name); - } - } - } -#ifdef _WIN32 - FreeLibrary(LIBhandle); -#else - dlclose(LIBhandle); -#endif - // fprintf(stderr, "GLU library is loaded\r\n"); - } else { - wxString msg; - msg.Printf(wxT("Could NOT load OpenGL GLU library: ")); -#ifdef _WIN32 - msg += DLName; -#else - msg += wxString::FromAscii((char *)DLName); -#endif - send_msg("error", &msg); - }; - return 0; -} - -void gl_error() { - int AP = 0; ErlDrvTermData rt[8]; - rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *)"_wxe_error_"); - rt[AP++] = ERL_DRV_INT; rt[AP++] = (int) gl_error_op; - rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *)"undef"); - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; - driver_send_term(WXE_DRV_PORT,gl_active,rt,AP); -} - -/* ******************************************************************************* - * GLU Tesselation special - * ******************************************************************************/ - -static GLUtesselator* tess; -static GLdouble* tess_coords; -static GLdouble* tess_alloc_vertex; -static int* tess_vertices; - -void CALLBACK -wxe_ogla_vertex(GLdouble* coords) -{ - /* fprintf(stderr, "%d\r\n", (int) (coords - tess_coords) / 3); */ - - *tess_vertices++ = (int) (coords - tess_coords) / 3; -} - -void CALLBACK -wxe_ogla_edge_flag(GLboolean flag) -{ + rt.addAtom((char *) "ok"); + rt.add(wxString::FromAscii("already initilized")); + rt.addTupleCount(2); + } + rt.send(); } -void CALLBACK -wxe_ogla_error(GLenum errorCode) +void setActiveGL(ErlDrvTermData caller, wxGLCanvas *canvas) { - const GLubyte *err; - err = gluErrorString(errorCode); - wxString msg; - msg.Printf(wxT("Tesselation error: %d: "), (int)errorCode); - msg += wxString::FromAscii((char *) err); - send_msg("error", &msg); + gl_active = caller; + glc[caller] = canvas; } -void CALLBACK -wxe_ogla_combine(GLdouble coords[3], - void* vertex_data[4], - GLfloat w[4], - void **dataOut) +void deleteActiveGL(wxGLCanvas *canvas) { - GLdouble* vertex = tess_alloc_vertex; - - tess_alloc_vertex += 3; - -#if 0 - fprintf(stderr, "combine: "); - int i; - for (i = 0; i < 4; i++) { - if (w[i] > 0.0) { - fprintf(stderr, "%d(%g) ", (int) vertex_data[i], w[i]); + gl_active = 0; + wxeGLC::iterator it; + for(it = glc.begin(); it != glc.end(); ++it) { + if(it->second == canvas) { + it->second = (wxGLCanvas *) 0; } } - fprintf(stderr, "\r\n"); - fprintf(stderr, "%g %g %g\r\n", vertex[0], vertex[1], vertex[2]); -#endif - - vertex[0] = coords[0]; - vertex[1] = coords[1]; - vertex[2] = coords[2]; - *dataOut = vertex; -} - -void init_tess() -{ - tess = gluNewTess(); - - gluTessCallback(tess, GLU_TESS_VERTEX, (GLUfuncptr) wxe_ogla_vertex); - gluTessCallback(tess, GLU_TESS_EDGE_FLAG, (GLUfuncptr) wxe_ogla_edge_flag); - gluTessCallback(tess, GLU_TESS_COMBINE, (GLUfuncptr) wxe_ogla_combine); - gluTessCallback(tess, GLU_TESS_ERROR, (GLUfuncptr) wxe_ogla_error); - -} - -void exit_tess() -{ - gluDeleteTess(tess); } -int wxe_tess_impl(char* buff, ErlDrvTermData caller) -{ - ErlDrvBinary* bin; - int i; - int num_vertices = * (int *) buff; buff += 8; // Align - GLdouble *n = (double *) buff; buff += 8*3; - - GLdouble* new_vertices; - bin = driver_alloc_binary(num_vertices*6*sizeof(GLdouble)); - new_vertices = tess_coords = (double *) bin->orig_bytes; - memcpy(tess_coords,buff,num_vertices*3*sizeof(GLdouble)); - tess_alloc_vertex = tess_coords + num_vertices*3; - -#if 0 - fprintf(stderr, "n=%d\r\n", num_vertices); -#endif - int *vertices; - vertices = (int *) driver_alloc(sizeof(int) * 16*num_vertices); - - tess_vertices = vertices; - - gluTessNormal(tess, n[0], n[1], n[2]); - gluTessBeginPolygon(tess, 0); - gluTessBeginContour(tess); - for (i = 0; i < num_vertices; i++) { - gluTessVertex(tess, tess_coords+3*i, tess_coords+3*i); - } - gluTessEndContour(tess); - gluTessEndPolygon(tess); - - int n_pos = (tess_vertices - vertices); - - int AP = 0; ErlDrvTermData *rt; - rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData) * (13+n_pos*2)); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); - - for(i=0; i < n_pos; i++) { - rt[AP++] = ERL_DRV_INT; rt[AP++] = (int) vertices[i]; +void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins[]){ + if(caller != gl_active) { + wxGLCanvas * current = glc[caller]; + if(current) { gl_active = caller; current->SetCurrent();} + else { + ErlDrvTermData rt[] = // Error msg + {ERL_DRV_ATOM, driver_mk_atom((char *) "_wxe_error_"), + ERL_DRV_INT, op, + ERL_DRV_ATOM, driver_mk_atom((char *) "no_gl_context"), + ERL_DRV_TUPLE,3}; + driver_send_term(WXE_DRV_PORT,caller,rt,8); + return ; + } }; - rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = n_pos+1; - - rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) bin; - rt[AP++] = (tess_alloc_vertex-new_vertices)*sizeof(GLdouble); rt[AP++] = 0; - - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; // Return tuple {list, Bin} - rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; // Result tuple - - driver_send_term(WXE_DRV_PORT,caller,rt,AP); -// fprintf(stderr, "List %d %d %d \r\n", -// n_pos, -// (tess_alloc_vertex-new_vertices)*sizeof(GLdouble), -// num_vertices*6*sizeof(GLdouble)); - driver_free_binary(bin); - driver_free(vertices); - driver_free(rt); - return 0; + char * bs[3]; + for(int i=0; i<3; i++) { + if(bins[i]) + bs[i] = bins[i]->base; + else + bs[i] = NULL; + } + wxe_gl_dispatch(op, bp, WXE_DRV_PORT, caller, bs); } diff --git a/lib/wx/c_src/wxe_gl.h b/lib/wx/c_src/wxe_gl.h index 3a47b3c1bd..1b556ff4ec 100644 --- a/lib/wx/c_src/wxe_gl.h +++ b/lib/wx/c_src/wxe_gl.h @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2008-2009. All Rights Reserved. + * Copyright Ericsson AB 2008-2010. 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 @@ -17,119 +17,6 @@ * %CopyrightEnd% */ +#include "egl_impl.h" -#ifndef _WIN32 -# include -#endif - -#ifndef __WXMAC__ -# include -# include /* Header File For The OpenGL Library */ -#else -# include /* Header File For The OpenGL Library */ -#endif - -#ifndef CALLBACK -# define CALLBACK -#endif - -#ifdef _WIN32 -# ifndef _GLUfuncptr -// Visual studio CPP ++ compiler -# define _GLUfuncptr void (_stdcall *)() -# endif -#endif - -#ifdef _GLUfuncptr -# define GLUfuncptr _GLUfuncptr -#elif defined(TESS_CB_TIGER_STYLE) -# define GLUfuncptr GLvoid (*)(...) -#else -# define GLUfuncptr GLvoid (*)() -#endif - -#ifdef WIN32 -#include -#include -#elif defined(HAVE_GL_GL_H) -#include -#elif defined(HAVE_OPENGL_GL_H) -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif - -int initOpenGL(); -void gl_error(); -extern int gl_error_op; -extern ErlDrvTermData gl_active; - -/* Some new GL types (eliminates the need for glext.h) */ - -#ifndef HAVE_GLINTPTR -#ifndef HAVE_GLINTPTRARB -# include -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptrARB; -typedef ptrdiff_t GLsizeiptrARB; -#endif /* HAVE_GLINTPTRARB */ -typedef GLintptrARB GLintptr; -typedef GLsizeiptrARB GLsizeiptr; -#endif /* HAVE_GLINTPTR */ - -#ifndef HAVE_GLCHAR -# ifndef HAVE_GLCHARARB -/* GL types for handling shader object handles and characters */ -typedef char GLcharARB; /* native character */ -typedef unsigned int GLhandleARB; /* shader object handle */ -#endif /* HAVE_GLCHARARB */ -typedef GLcharARB GLchar; -#endif - -#ifndef HAVE_GLHALFARB -/* GL types for "half" precision (s10e5) float data in host memory */ -typedef unsigned short GLhalfARB; -#endif - -/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ -/* (as used in the GLX_OML_sync_control extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include -#elif defined(__sun__) -#include -#if defined(__STDC__) -#if defined(__arch64__) -typedef long int int64_t; -typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#elif defined(WIN32) && defined(_MSC_VER) -typedef long int int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#elif defined(WIN32) && defined(__GNUC__) -#include -#else -#include /* Fallback option */ -#endif - -#ifndef HAVE_GLINT64EXT -typedef int64_t GLint64EXT; -typedef uint64_t GLuint64EXT; -#endif - -void init_tess(); -void exit_tess(); -int wxe_tess_impl(char* buff, ErlDrvTermData caller); +void wxe_initOpenGL(wxeReturn, char*); diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp index 6d2926ce4e..79d1a29519 100644 --- a/lib/wx/c_src/wxe_impl.cpp +++ b/lib/wx/c_src/wxe_impl.cpp @@ -68,7 +68,6 @@ ErlDrvTermData wxe_batch_caller = 0; ErlDrvTermData init_caller = 0; // extern opengl -extern int gl_initiated; void gl_dispatch(int op, char *bp, ErlDrvTermData caller, WXEBinRef *bins[]); @@ -265,7 +264,6 @@ bool WxeApp::OnInit() init_nonconsts(global_me, init_caller); erl_drv_mutex_lock(wxe_status_m); wxe_status = WXE_INITIATED; - gl_initiated = FALSE; erl_drv_cond_signal(wxe_status_c); erl_drv_mutex_unlock(wxe_status_m); return TRUE; diff --git a/lib/wx/src/gen/gl.erl b/lib/wx/src/gen/gl.erl index 62d0ff6aed..e26fa02729 100644 --- a/lib/wx/src/gen/gl.erl +++ b/lib/wx/src/gen/gl.erl @@ -25,14 +25,13 @@ %% %% Booleans are represented by integers 0 and 1. -%% @type wx_mem(). see wx.erl on memory allocation functions +%% @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). --include("wxe.hrl"). -define(GLenum,32/native-unsigned). -define(GLboolean,8/native-unsigned). -define(GLbitfield,32/native-unsigned). @@ -215,103 +214,134 @@ windowPos4ivMESA/1,windowPos4sMESA/4,windowPos4svMESA/1,depthBoundsEXT/2, stencilClearTagEXT/2]). +-export([call/2, cast/2, send_bin/1]). +%% @hidden +call(Op, Args) -> + Port = get(opengl_port), + _ = erlang:port_control(Port,Op,Args), + rec(). + +%% @hidden +cast(Op, Args) -> + Port = get(opengl_port), + _ = erlang:port_control(Port,Op,Args), + ok. + +%% @hidden +rec() -> + receive + {'_egl_result_', Res} -> Res; + {'_egl_error_', Res} -> error({error,Res}) + end. + +%% @hidden +send_bin(Bin) when is_binary(Bin) -> + Port = get(opengl_port), + erlang:port_command(Port,Bin); +send_bin(Tuple) when is_tuple(Tuple) -> + Port = get(opengl_port), + case element(2, Tuple) of + Bin when is_binary(Bin) -> + erlang:port_command(Port,Bin) + end. + %% API %% @spec (Op::enum(),Value::float()) -> ok %% @doc See external documentation. accum(Op,Value) -> - wxe_util:cast(5037, <>). + cast(5037, <>). %% @spec (Func::enum(),Ref::clamp()) -> ok %% @doc See external documentation. alphaFunc(Func,Ref) -> - wxe_util:cast(5038, <>). + cast(5038, <>). %% @spec (Textures::[integer()]) -> {0|1,Residences::[0|1]} %% @doc See external documentation. areTexturesResident(Textures) -> - wxe_util:call(5039, <<(length(Textures)):?GLuint, + call(5039, <<(length(Textures)):?GLuint, (<< <> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>). %% @spec (I::integer()) -> ok %% @doc See external documentation. arrayElement(I) -> - wxe_util:cast(5040, <>). + cast(5040, <>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. 'begin'(Mode) -> - wxe_util:cast(5041, <>). + cast(5041, <>). %% @spec (Target::enum(),Texture::integer()) -> ok %% @doc See external documentation. bindTexture(Target,Texture) -> - wxe_util:cast(5042, <>). + cast(5042, <>). %% @spec (Width::integer(),Height::integer(),Xorig::float(),Yorig::float(),Xmove::float(),Ymove::float(),Bitmap::offset()|binary()) -> ok %% @doc See external documentation. bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) when is_integer(Bitmap) -> - wxe_util:cast(5043, <>); + cast(5043, <>); bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) -> - wxe_util:send_bin(Bitmap), - wxe_util:cast(5044, <>). + send_bin(Bitmap), + cast(5044, <>). %% @spec (Sfactor::enum(),Dfactor::enum()) -> ok %% @doc See external documentation. blendFunc(Sfactor,Dfactor) -> - wxe_util:cast(5045, <>). + cast(5045, <>). %% @spec (List::integer()) -> ok %% @doc See external documentation. callList(List) -> - wxe_util:cast(5046, <>). + cast(5046, <>). %% @spec (Lists::[integer()]) -> ok %% @doc See external documentation. callLists(Lists) -> - wxe_util:cast(5047, <<(length(Lists)):?GLuint, + cast(5047, <<(length(Lists)):?GLuint, (<< <> || C <- Lists>>)/binary,0:(((1+length(Lists)) rem 2)*32)>>). %% @spec (Mask::integer()) -> ok %% @doc See external documentation. clear(Mask) -> - wxe_util:cast(5048, <>). + cast(5048, <>). %% @spec (Red::float(),Green::float(),Blue::float(),Alpha::float()) -> ok %% @doc See external documentation. clearAccum(Red,Green,Blue,Alpha) -> - wxe_util:cast(5049, <>). + cast(5049, <>). %% @spec (Red::clamp(),Green::clamp(),Blue::clamp(),Alpha::clamp()) -> ok %% @doc See external documentation. clearColor(Red,Green,Blue,Alpha) -> - wxe_util:cast(5050, <>). + cast(5050, <>). %% @spec (Depth::clamp()) -> ok %% @doc See external documentation. clearDepth(Depth) -> - wxe_util:cast(5051, <>). + cast(5051, <>). %% @spec (C::float()) -> ok %% @doc See external documentation. clearIndex(C) -> - wxe_util:cast(5052, <>). + cast(5052, <>). %% @spec (S::integer()) -> ok %% @doc See external documentation. clearStencil(S) -> - wxe_util:cast(5053, <>). + cast(5053, <>). %% @spec (Plane::enum(),Equation::{float()}) -> ok %% @doc See external documentation. clipPlane(Plane,{E1,E2,E3,E4}) -> - wxe_util:cast(5054, <>). + cast(5054, <>). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. color3b(Red,Green,Blue) -> - wxe_util:cast(5055, <>). + cast(5055, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3b(Red,Green,Blue) @@ -320,7 +350,7 @@ color3bv({Red,Green,Blue}) -> color3b(Red,Green,Blue). %% @spec (Red::float(),Green::float(),Blue::float()) -> ok %% @doc See external documentation. color3d(Red,Green,Blue) -> - wxe_util:cast(5056, <>). + cast(5056, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3d(Red,Green,Blue) @@ -329,7 +359,7 @@ color3dv({Red,Green,Blue}) -> color3d(Red,Green,Blue). %% @spec (Red::float(),Green::float(),Blue::float()) -> ok %% @doc See external documentation. color3f(Red,Green,Blue) -> - wxe_util:cast(5057, <>). + cast(5057, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3f(Red,Green,Blue) @@ -338,7 +368,7 @@ color3fv({Red,Green,Blue}) -> color3f(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. color3i(Red,Green,Blue) -> - wxe_util:cast(5058, <>). + cast(5058, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3i(Red,Green,Blue) @@ -347,7 +377,7 @@ color3iv({Red,Green,Blue}) -> color3i(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. color3s(Red,Green,Blue) -> - wxe_util:cast(5059, <>). + cast(5059, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3s(Red,Green,Blue) @@ -356,7 +386,7 @@ color3sv({Red,Green,Blue}) -> color3s(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. color3ub(Red,Green,Blue) -> - wxe_util:cast(5060, <>). + cast(5060, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3ub(Red,Green,Blue) @@ -365,7 +395,7 @@ color3ubv({Red,Green,Blue}) -> color3ub(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. color3ui(Red,Green,Blue) -> - wxe_util:cast(5061, <>). + cast(5061, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3ui(Red,Green,Blue) @@ -374,7 +404,7 @@ color3uiv({Red,Green,Blue}) -> color3ui(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. color3us(Red,Green,Blue) -> - wxe_util:cast(5062, <>). + cast(5062, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3us(Red,Green,Blue) @@ -383,7 +413,7 @@ color3usv({Red,Green,Blue}) -> color3us(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok %% @doc See external documentation. color4b(Red,Green,Blue,Alpha) -> - wxe_util:cast(5063, <>). + cast(5063, <>). %% @spec ({Red,Green,Blue,Alpha}) -> ok %% @equiv color4b(Red,Green,Blue,Alpha) @@ -392,7 +422,7 @@ color4bv({Red,Green,Blue,Alpha}) -> color4b(Red,Green,Blue,Alpha). %% @spec (Red::float(),Green::float(),Blue::float(),Alpha::float()) -> ok %% @doc See external documentation. color4d(Red,Green,Blue,Alpha) -> - wxe_util:cast(5064, <>). + cast(5064, <>). %% @spec ({Red,Green,Blue,Alpha}) -> ok %% @equiv color4d(Red,Green,Blue,Alpha) @@ -401,7 +431,7 @@ color4dv({Red,Green,Blue,Alpha}) -> color4d(Red,Green,Blue,Alpha). %% @spec (Red::float(),Green::float(),Blue::float(),Alpha::float()) -> ok %% @doc See external documentation. color4f(Red,Green,Blue,Alpha) -> - wxe_util:cast(5065, <>). + cast(5065, <>). %% @spec ({Red,Green,Blue,Alpha}) -> ok %% @equiv color4f(Red,Green,Blue,Alpha) @@ -410,7 +440,7 @@ color4fv({Red,Green,Blue,Alpha}) -> color4f(Red,Green,Blue,Alpha). %% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok %% @doc See external documentation. color4i(Red,Green,Blue,Alpha) -> - wxe_util:cast(5066, <>). + cast(5066, <>). %% @spec ({Red,Green,Blue,Alpha}) -> ok %% @equiv color4i(Red,Green,Blue,Alpha) @@ -419,7 +449,7 @@ color4iv({Red,Green,Blue,Alpha}) -> color4i(Red,Green,Blue,Alpha). %% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok %% @doc See external documentation. color4s(Red,Green,Blue,Alpha) -> - wxe_util:cast(5067, <>). + cast(5067, <>). %% @spec ({Red,Green,Blue,Alpha}) -> ok %% @equiv color4s(Red,Green,Blue,Alpha) @@ -428,7 +458,7 @@ color4sv({Red,Green,Blue,Alpha}) -> color4s(Red,Green,Blue,Alpha). %% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok %% @doc See external documentation. color4ub(Red,Green,Blue,Alpha) -> - wxe_util:cast(5068, <>). + cast(5068, <>). %% @spec ({Red,Green,Blue,Alpha}) -> ok %% @equiv color4ub(Red,Green,Blue,Alpha) @@ -437,7 +467,7 @@ color4ubv({Red,Green,Blue,Alpha}) -> color4ub(Red,Green,Blue,Alpha). %% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok %% @doc See external documentation. color4ui(Red,Green,Blue,Alpha) -> - wxe_util:cast(5069, <>). + cast(5069, <>). %% @spec ({Red,Green,Blue,Alpha}) -> ok %% @equiv color4ui(Red,Green,Blue,Alpha) @@ -446,7 +476,7 @@ color4uiv({Red,Green,Blue,Alpha}) -> color4ui(Red,Green,Blue,Alpha). %% @spec (Red::integer(),Green::integer(),Blue::integer(),Alpha::integer()) -> ok %% @doc See external documentation. color4us(Red,Green,Blue,Alpha) -> - wxe_util:cast(5070, <>). + cast(5070, <>). %% @spec ({Red,Green,Blue,Alpha}) -> ok %% @equiv color4us(Red,Green,Blue,Alpha) @@ -455,125 +485,125 @@ color4usv({Red,Green,Blue,Alpha}) -> color4us(Red,Green,Blue,Alpha). %% @spec (Red::0|1,Green::0|1,Blue::0|1,Alpha::0|1) -> ok %% @doc See external documentation. colorMask(Red,Green,Blue,Alpha) -> - wxe_util:cast(5071, <>). + cast(5071, <>). %% @spec (Face::enum(),Mode::enum()) -> ok %% @doc See external documentation. colorMaterial(Face,Mode) -> - wxe_util:cast(5072, <>). + cast(5072, <>). %% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. colorPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5073, <>); + cast(5073, <>); colorPointer(Size,Type,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5074, <>). + send_bin(Pointer), + cast(5074, <>). %% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer(),Type::enum()) -> ok %% @doc See external documentation. copyPixels(X,Y,Width,Height,Type) -> - wxe_util:cast(5075, <>). + cast(5075, <>). %% @spec (Target::enum(),Level::integer(),InternalFormat::enum(),X::integer(),Y::integer(),Width::integer(),Border::integer()) -> ok %% @doc See external documentation. copyTexImage1D(Target,Level,InternalFormat,X,Y,Width,Border) -> - wxe_util:cast(5076, <>). + cast(5076, <>). %% @spec (Target::enum(),Level::integer(),InternalFormat::enum(),X::integer(),Y::integer(),Width::integer(),Height::integer(),Border::integer()) -> ok %% @doc See external documentation. copyTexImage2D(Target,Level,InternalFormat,X,Y,Width,Height,Border) -> - wxe_util:cast(5077, <>). + cast(5077, <>). %% @spec (Target::enum(),Level::integer(),Xoffset::integer(),X::integer(),Y::integer(),Width::integer()) -> ok %% @doc See external documentation. copyTexSubImage1D(Target,Level,Xoffset,X,Y,Width) -> - wxe_util:cast(5078, <>). + cast(5078, <>). %% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok %% @doc See external documentation. copyTexSubImage2D(Target,Level,Xoffset,Yoffset,X,Y,Width,Height) -> - wxe_util:cast(5079, <>). + cast(5079, <>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. cullFace(Mode) -> - wxe_util:cast(5080, <>). + cast(5080, <>). %% @spec (List::integer(),Range::integer()) -> ok %% @doc See external documentation. deleteLists(List,Range) -> - wxe_util:cast(5081, <>). + cast(5081, <>). %% @spec (Textures::[integer()]) -> ok %% @doc See external documentation. deleteTextures(Textures) -> - wxe_util:cast(5082, <<(length(Textures)):?GLuint, + cast(5082, <<(length(Textures)):?GLuint, (<< <> || C <- Textures>>)/binary,0:(((1+length(Textures)) rem 2)*32)>>). %% @spec (Func::enum()) -> ok %% @doc See external documentation. depthFunc(Func) -> - wxe_util:cast(5083, <>). + cast(5083, <>). %% @spec (Flag::0|1) -> ok %% @doc See external documentation. depthMask(Flag) -> - wxe_util:cast(5084, <>). + cast(5084, <>). %% @spec (ZNear::clamp(),ZFar::clamp()) -> ok %% @doc See external documentation. depthRange(ZNear,ZFar) -> - wxe_util:cast(5085, <>). + cast(5085, <>). %% @spec (Cap::enum()) -> ok %% @doc See external documentation. disable(Cap) -> - wxe_util:cast(5086, <>). + cast(5086, <>). %% @spec (Array::enum()) -> ok %% @doc See external documentation. disableClientState(Array) -> - wxe_util:cast(5087, <>). + cast(5087, <>). %% @spec (Mode::enum(),First::integer(),Count::integer()) -> ok %% @doc See external documentation. drawArrays(Mode,First,Count) -> - wxe_util:cast(5088, <>). + cast(5088, <>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. drawBuffer(Mode) -> - wxe_util:cast(5089, <>). + cast(5089, <>). %% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|binary()) -> ok %% @doc See external documentation. drawElements(Mode,Count,Type,Indices) when is_integer(Indices) -> - wxe_util:cast(5090, <>); + cast(5090, <>); drawElements(Mode,Count,Type,Indices) -> - wxe_util:send_bin(Indices), - wxe_util:cast(5091, <>). + send_bin(Indices), + cast(5091, <>). %% @spec (Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::offset()|binary()) -> ok %% @doc See external documentation. drawPixels(Width,Height,Format,Type,Pixels) when is_integer(Pixels) -> - wxe_util:cast(5092, <>); + cast(5092, <>); drawPixels(Width,Height,Format,Type,Pixels) -> - wxe_util:send_bin(Pixels), - wxe_util:cast(5093, <>). + send_bin(Pixels), + cast(5093, <>). %% @spec (Flag::0|1) -> ok %% @doc See external documentation. edgeFlag(Flag) -> - wxe_util:cast(5094, <>). + cast(5094, <>). %% @spec (Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. edgeFlagPointer(Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5095, <>); + cast(5095, <>); edgeFlagPointer(Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5096, <>). + send_bin(Pointer), + cast(5096, <>). %% @spec ({Flag}) -> ok %% @equiv edgeFlag(Flag) @@ -582,27 +612,27 @@ edgeFlagv({Flag}) -> edgeFlag(Flag). %% @spec (Cap::enum()) -> ok %% @doc See external documentation. enable(Cap) -> - wxe_util:cast(5097, <>). + cast(5097, <>). %% @spec (Array::enum()) -> ok %% @doc See external documentation. enableClientState(Array) -> - wxe_util:cast(5098, <>). + cast(5098, <>). %% @spec () -> ok %% @doc See external documentation. 'end'() -> - wxe_util:cast(5099, <<>>). + cast(5099, <<>>). %% @spec () -> ok %% @doc See external documentation. endList() -> - wxe_util:cast(5100, <<>>). + cast(5100, <<>>). %% @spec (U::float()) -> ok %% @doc See external documentation. evalCoord1d(U) -> - wxe_util:cast(5101, <>). + cast(5101, <>). %% @spec ({U}) -> ok %% @equiv evalCoord1d(U) @@ -611,7 +641,7 @@ evalCoord1dv({U}) -> evalCoord1d(U). %% @spec (U::float()) -> ok %% @doc See external documentation. evalCoord1f(U) -> - wxe_util:cast(5102, <>). + cast(5102, <>). %% @spec ({U}) -> ok %% @equiv evalCoord1f(U) @@ -620,7 +650,7 @@ evalCoord1fv({U}) -> evalCoord1f(U). %% @spec (U::float(),V::float()) -> ok %% @doc See external documentation. evalCoord2d(U,V) -> - wxe_util:cast(5103, <>). + cast(5103, <>). %% @spec ({U,V}) -> ok %% @equiv evalCoord2d(U,V) @@ -629,7 +659,7 @@ evalCoord2dv({U,V}) -> evalCoord2d(U,V). %% @spec (U::float(),V::float()) -> ok %% @doc See external documentation. evalCoord2f(U,V) -> - wxe_util:cast(5104, <>). + cast(5104, <>). %% @spec ({U,V}) -> ok %% @equiv evalCoord2f(U,V) @@ -638,250 +668,250 @@ evalCoord2fv({U,V}) -> evalCoord2f(U,V). %% @spec (Mode::enum(),I1::integer(),I2::integer()) -> ok %% @doc See external documentation. evalMesh1(Mode,I1,I2) -> - wxe_util:cast(5105, <>). + cast(5105, <>). %% @spec (Mode::enum(),I1::integer(),I2::integer(),J1::integer(),J2::integer()) -> ok %% @doc See external documentation. evalMesh2(Mode,I1,I2,J1,J2) -> - wxe_util:cast(5106, <>). + cast(5106, <>). %% @spec (I::integer()) -> ok %% @doc See external documentation. evalPoint1(I) -> - wxe_util:cast(5107, <>). + cast(5107, <>). %% @spec (I::integer(),J::integer()) -> ok %% @doc See external documentation. evalPoint2(I,J) -> - wxe_util:cast(5108, <>). + cast(5108, <>). -%% @spec (Size::integer(),Type::enum(),Buffer::wx:wx_mem()) -> ok +%% @spec (Size::integer(),Type::enum(),Buffer::mem()) -> ok %% @doc See external documentation. feedbackBuffer(Size,Type,Buffer) -> - wxe_util:send_bin(Buffer#wx_mem.bin), - wxe_util:call(5109, <>). + send_bin(Buffer), + call(5109, <>). %% @spec () -> ok %% @doc See external documentation. finish() -> - wxe_util:cast(5110, <<>>). + cast(5110, <<>>). %% @spec () -> ok %% @doc See external documentation. flush() -> - wxe_util:cast(5111, <<>>). + cast(5111, <<>>). %% @spec (Pname::enum(),Param::float()) -> ok %% @doc See external documentation. fogf(Pname,Param) -> - wxe_util:cast(5112, <>). + cast(5112, <>). %% @spec (Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. fogfv(Pname,Params) -> - wxe_util:cast(5113, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). %% @spec (Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. fogi(Pname,Param) -> - wxe_util:cast(5114, <>). + cast(5114, <>). %% @spec (Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. fogiv(Pname,Params) -> - wxe_util:cast(5115, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. frontFace(Mode) -> - wxe_util:cast(5116, <>). + cast(5116, <>). %% @spec (Left::float(),Right::float(),Bottom::float(),Top::float(),ZNear::float(),ZFar::float()) -> ok %% @doc See external documentation. frustum(Left,Right,Bottom,Top,ZNear,ZFar) -> - wxe_util:cast(5117, <>). + cast(5117, <>). %% @spec (Range::integer()) -> integer() %% @doc See external documentation. genLists(Range) -> - wxe_util:call(5118, <>). + call(5118, <>). %% @spec (N::integer()) -> [integer()] %% @doc See external documentation. genTextures(N) -> - wxe_util:call(5119, <>). + call(5119, <>). %% @spec (Pname::enum()) -> [0|1] %% @doc See external documentation. getBooleanv(Pname) -> - wxe_util:call(5120, <>). + call(5120, <>). %% @spec (Plane::enum()) -> {float()} %% @doc See external documentation. getClipPlane(Plane) -> - wxe_util:call(5121, <>). + call(5121, <>). %% @spec (Pname::enum()) -> [float()] %% @doc See external documentation. getDoublev(Pname) -> - wxe_util:call(5122, <>). + call(5122, <>). %% @spec () -> enum() %% @doc See external documentation. getError() -> - wxe_util:call(5123, <<>>). + call(5123, <<>>). %% @spec (Pname::enum()) -> [float()] %% @doc See external documentation. getFloatv(Pname) -> - wxe_util:call(5124, <>). + call(5124, <>). %% @spec (Pname::enum()) -> [integer()] %% @doc See external documentation. getIntegerv(Pname) -> - wxe_util:call(5125, <>). + call(5125, <>). %% @spec (Light::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getLightfv(Light,Pname) -> - wxe_util:call(5126, <>). + call(5126, <>). %% @spec (Light::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getLightiv(Light,Pname) -> - wxe_util:call(5127, <>). + call(5127, <>). -%% @spec (Target::enum(),Query::enum(),V::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Query::enum(),V::mem()) -> ok %% @doc See external documentation. getMapdv(Target,Query,V) -> - wxe_util:send_bin(V#wx_mem.bin), - wxe_util:call(5128, <>). + send_bin(V), + call(5128, <>). -%% @spec (Target::enum(),Query::enum(),V::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Query::enum(),V::mem()) -> ok %% @doc See external documentation. getMapfv(Target,Query,V) -> - wxe_util:send_bin(V#wx_mem.bin), - wxe_util:call(5129, <>). + send_bin(V), + call(5129, <>). -%% @spec (Target::enum(),Query::enum(),V::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Query::enum(),V::mem()) -> ok %% @doc See external documentation. getMapiv(Target,Query,V) -> - wxe_util:send_bin(V#wx_mem.bin), - wxe_util:call(5130, <>). + send_bin(V), + call(5130, <>). %% @spec (Face::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getMaterialfv(Face,Pname) -> - wxe_util:call(5131, <>). + call(5131, <>). %% @spec (Face::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getMaterialiv(Face,Pname) -> - wxe_util:call(5132, <>). + call(5132, <>). -%% @spec (Map::enum(),Values::wx:wx_mem()) -> ok +%% @spec (Map::enum(),Values::mem()) -> ok %% @doc See external documentation. getPixelMapfv(Map,Values) -> - wxe_util:send_bin(Values#wx_mem.bin), - wxe_util:call(5133, <>). + send_bin(Values), + call(5133, <>). -%% @spec (Map::enum(),Values::wx:wx_mem()) -> ok +%% @spec (Map::enum(),Values::mem()) -> ok %% @doc See external documentation. getPixelMapuiv(Map,Values) -> - wxe_util:send_bin(Values#wx_mem.bin), - wxe_util:call(5134, <>). + send_bin(Values), + call(5134, <>). -%% @spec (Map::enum(),Values::wx:wx_mem()) -> ok +%% @spec (Map::enum(),Values::mem()) -> ok %% @doc See external documentation. getPixelMapusv(Map,Values) -> - wxe_util:send_bin(Values#wx_mem.bin), - wxe_util:call(5135, <>). + send_bin(Values), + call(5135, <>). %% @spec () -> binary() %% @doc See external documentation. getPolygonStipple() -> - wxe_util:call(5136, <<>>). + call(5136, <<>>). %% @spec (Name::enum()) -> string() %% @doc See external documentation. getString(Name) -> - wxe_util:call(5137, <>). + call(5137, <>). %% @spec (Target::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getTexEnvfv(Target,Pname) -> - wxe_util:call(5138, <>). + call(5138, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getTexEnviv(Target,Pname) -> - wxe_util:call(5139, <>). + call(5139, <>). %% @spec (Coord::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getTexGendv(Coord,Pname) -> - wxe_util:call(5140, <>). + call(5140, <>). %% @spec (Coord::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getTexGenfv(Coord,Pname) -> - wxe_util:call(5141, <>). + call(5141, <>). %% @spec (Coord::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getTexGeniv(Coord,Pname) -> - wxe_util:call(5142, <>). + call(5142, <>). -%% @spec (Target::enum(),Level::integer(),Format::enum(),Type::enum(),Pixels::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Level::integer(),Format::enum(),Type::enum(),Pixels::mem()) -> ok %% @doc See external documentation. getTexImage(Target,Level,Format,Type,Pixels) -> - wxe_util:send_bin(Pixels#wx_mem.bin), - wxe_util:call(5143, <>). + send_bin(Pixels), + call(5143, <>). %% @spec (Target::enum(),Level::integer(),Pname::enum()) -> {float()} %% @doc See external documentation. getTexLevelParameterfv(Target,Level,Pname) -> - wxe_util:call(5144, <>). + call(5144, <>). %% @spec (Target::enum(),Level::integer(),Pname::enum()) -> {integer()} %% @doc See external documentation. getTexLevelParameteriv(Target,Level,Pname) -> - wxe_util:call(5145, <>). + call(5145, <>). %% @spec (Target::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getTexParameterfv(Target,Pname) -> - wxe_util:call(5146, <>). + call(5146, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getTexParameteriv(Target,Pname) -> - wxe_util:call(5147, <>). + call(5147, <>). %% @spec (Target::enum(),Mode::enum()) -> ok %% @doc See external documentation. hint(Target,Mode) -> - wxe_util:cast(5148, <>). + cast(5148, <>). %% @spec (Mask::integer()) -> ok %% @doc See external documentation. indexMask(Mask) -> - wxe_util:cast(5149, <>). + cast(5149, <>). %% @spec (Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. indexPointer(Type,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5150, <>); + cast(5150, <>); indexPointer(Type,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5151, <>). + send_bin(Pointer), + cast(5151, <>). %% @spec (C::float()) -> ok %% @doc See external documentation. indexd(C) -> - wxe_util:cast(5152, <>). + cast(5152, <>). %% @spec ({C}) -> ok %% @equiv indexd(C) @@ -890,7 +920,7 @@ indexdv({C}) -> indexd(C). %% @spec (C::float()) -> ok %% @doc See external documentation. indexf(C) -> - wxe_util:cast(5153, <>). + cast(5153, <>). %% @spec ({C}) -> ok %% @equiv indexf(C) @@ -899,7 +929,7 @@ indexfv({C}) -> indexf(C). %% @spec (C::integer()) -> ok %% @doc See external documentation. indexi(C) -> - wxe_util:cast(5154, <>). + cast(5154, <>). %% @spec ({C}) -> ok %% @equiv indexi(C) @@ -908,7 +938,7 @@ indexiv({C}) -> indexi(C). %% @spec (C::integer()) -> ok %% @doc See external documentation. indexs(C) -> - wxe_util:cast(5155, <>). + cast(5155, <>). %% @spec ({C}) -> ok %% @equiv indexs(C) @@ -917,7 +947,7 @@ indexsv({C}) -> indexs(C). %% @spec (C::integer()) -> ok %% @doc See external documentation. indexub(C) -> - wxe_util:cast(5156, <>). + cast(5156, <>). %% @spec ({C}) -> ok %% @equiv indexub(C) @@ -926,213 +956,213 @@ indexubv({C}) -> indexub(C). %% @spec () -> ok %% @doc See external documentation. initNames() -> - wxe_util:cast(5157, <<>>). + cast(5157, <<>>). %% @spec (Format::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. interleavedArrays(Format,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5158, <>); + cast(5158, <>); interleavedArrays(Format,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5159, <>). + send_bin(Pointer), + cast(5159, <>). %% @spec (Cap::enum()) -> 0|1 %% @doc See external documentation. isEnabled(Cap) -> - wxe_util:call(5160, <>). + call(5160, <>). %% @spec (List::integer()) -> 0|1 %% @doc See external documentation. isList(List) -> - wxe_util:call(5161, <>). + call(5161, <>). %% @spec (Texture::integer()) -> 0|1 %% @doc See external documentation. isTexture(Texture) -> - wxe_util:call(5162, <>). + call(5162, <>). %% @spec (Pname::enum(),Param::float()) -> ok %% @doc See external documentation. lightModelf(Pname,Param) -> - wxe_util:cast(5163, <>). + cast(5163, <>). %% @spec (Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. lightModelfv(Pname,Params) -> - wxe_util:cast(5164, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). %% @spec (Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. lightModeli(Pname,Param) -> - wxe_util:cast(5165, <>). + cast(5165, <>). %% @spec (Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. lightModeliv(Pname,Params) -> - wxe_util:cast(5166, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). %% @spec (Light::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. lightf(Light,Pname,Param) -> - wxe_util:cast(5167, <>). + cast(5167, <>). %% @spec (Light::enum(),Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. lightfv(Light,Pname,Params) -> - wxe_util:cast(5168, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Light::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. lighti(Light,Pname,Param) -> - wxe_util:cast(5169, <>). + cast(5169, <>). %% @spec (Light::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. lightiv(Light,Pname,Params) -> - wxe_util:cast(5170, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Factor::integer(),Pattern::integer()) -> ok %% @doc See external documentation. lineStipple(Factor,Pattern) -> - wxe_util:cast(5171, <>). + cast(5171, <>). %% @spec (Width::float()) -> ok %% @doc See external documentation. lineWidth(Width) -> - wxe_util:cast(5172, <>). + cast(5172, <>). %% @spec (Base::integer()) -> ok %% @doc See external documentation. listBase(Base) -> - wxe_util:cast(5173, <>). + cast(5173, <>). %% @spec () -> ok %% @doc See external documentation. loadIdentity() -> - wxe_util:cast(5174, <<>>). + cast(5174, <<>>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5175, <>); + cast(5175, <>); loadMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5175, <>). + cast(5175, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5176, <>); + cast(5176, <>); loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5176, <>). + cast(5176, <>). %% @spec (Name::integer()) -> ok %% @doc See external documentation. loadName(Name) -> - wxe_util:cast(5177, <>). + cast(5177, <>). %% @spec (Opcode::enum()) -> ok %% @doc See external documentation. logicOp(Opcode) -> - wxe_util:cast(5178, <>). + cast(5178, <>). %% @spec (Target::enum(),U1::float(),U2::float(),Stride::integer(),Order::integer(),Points::binary()) -> ok %% @doc See external documentation. map1d(Target,U1,U2,Stride,Order,Points) -> - wxe_util:send_bin(Points), - wxe_util:cast(5179, <>). + send_bin(Points), + cast(5179, <>). %% @spec (Target::enum(),U1::float(),U2::float(),Stride::integer(),Order::integer(),Points::binary()) -> ok %% @doc See external documentation. map1f(Target,U1,U2,Stride,Order,Points) -> - wxe_util:send_bin(Points), - wxe_util:cast(5180, <>). + send_bin(Points), + cast(5180, <>). %% @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. map2d(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) -> - wxe_util:send_bin(Points), - wxe_util:cast(5181, <>). + send_bin(Points), + cast(5181, <>). %% @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. map2f(Target,U1,U2,Ustride,Uorder,V1,V2,Vstride,Vorder,Points) -> - wxe_util:send_bin(Points), - wxe_util:cast(5182, <>). + send_bin(Points), + cast(5182, <>). %% @spec (Un::integer(),U1::float(),U2::float()) -> ok %% @doc See external documentation. mapGrid1d(Un,U1,U2) -> - wxe_util:cast(5183, <>). + cast(5183, <>). %% @spec (Un::integer(),U1::float(),U2::float()) -> ok %% @doc See external documentation. mapGrid1f(Un,U1,U2) -> - wxe_util:cast(5184, <>). + cast(5184, <>). %% @spec (Un::integer(),U1::float(),U2::float(),Vn::integer(),V1::float(),V2::float()) -> ok %% @doc See external documentation. mapGrid2d(Un,U1,U2,Vn,V1,V2) -> - wxe_util:cast(5185, <>). + cast(5185, <>). %% @spec (Un::integer(),U1::float(),U2::float(),Vn::integer(),V1::float(),V2::float()) -> ok %% @doc See external documentation. mapGrid2f(Un,U1,U2,Vn,V1,V2) -> - wxe_util:cast(5186, <>). + cast(5186, <>). %% @spec (Face::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. materialf(Face,Pname,Param) -> - wxe_util:cast(5187, <>). + cast(5187, <>). %% @spec (Face::enum(),Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. materialfv(Face,Pname,Params) -> - wxe_util:cast(5188, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Face::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. materiali(Face,Pname,Param) -> - wxe_util:cast(5189, <>). + cast(5189, <>). %% @spec (Face::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. materialiv(Face,Pname,Params) -> - wxe_util:cast(5190, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. matrixMode(Mode) -> - wxe_util:cast(5191, <>). + cast(5191, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5192, <>); + cast(5192, <>); multMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5192, <>). + cast(5192, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5193, <>); + cast(5193, <>); multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5193, <>). + cast(5193, <>). %% @spec (List::integer(),Mode::enum()) -> ok %% @doc See external documentation. newList(List,Mode) -> - wxe_util:cast(5194, <>). + cast(5194, <>). %% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok %% @doc See external documentation. normal3b(Nx,Ny,Nz) -> - wxe_util:cast(5195, <>). + cast(5195, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3b(Nx,Ny,Nz) @@ -1141,7 +1171,7 @@ normal3bv({Nx,Ny,Nz}) -> normal3b(Nx,Ny,Nz). %% @spec (Nx::float(),Ny::float(),Nz::float()) -> ok %% @doc See external documentation. normal3d(Nx,Ny,Nz) -> - wxe_util:cast(5196, <>). + cast(5196, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3d(Nx,Ny,Nz) @@ -1150,7 +1180,7 @@ normal3dv({Nx,Ny,Nz}) -> normal3d(Nx,Ny,Nz). %% @spec (Nx::float(),Ny::float(),Nz::float()) -> ok %% @doc See external documentation. normal3f(Nx,Ny,Nz) -> - wxe_util:cast(5197, <>). + cast(5197, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3f(Nx,Ny,Nz) @@ -1159,7 +1189,7 @@ normal3fv({Nx,Ny,Nz}) -> normal3f(Nx,Ny,Nz). %% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok %% @doc See external documentation. normal3i(Nx,Ny,Nz) -> - wxe_util:cast(5198, <>). + cast(5198, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3i(Nx,Ny,Nz) @@ -1168,7 +1198,7 @@ normal3iv({Nx,Ny,Nz}) -> normal3i(Nx,Ny,Nz). %% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok %% @doc See external documentation. normal3s(Nx,Ny,Nz) -> - wxe_util:cast(5199, <>). + cast(5199, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3s(Nx,Ny,Nz) @@ -1177,136 +1207,136 @@ normal3sv({Nx,Ny,Nz}) -> normal3s(Nx,Ny,Nz). %% @spec (Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. normalPointer(Type,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5200, <>); + cast(5200, <>); normalPointer(Type,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5201, <>). + send_bin(Pointer), + cast(5201, <>). %% @spec (Left::float(),Right::float(),Bottom::float(),Top::float(),ZNear::float(),ZFar::float()) -> ok %% @doc See external documentation. ortho(Left,Right,Bottom,Top,ZNear,ZFar) -> - wxe_util:cast(5202, <>). + cast(5202, <>). %% @spec (Token::float()) -> ok %% @doc See external documentation. passThrough(Token) -> - wxe_util:cast(5203, <>). + cast(5203, <>). %% @spec (Map::enum(),Mapsize::integer(),Values::binary()) -> ok %% @doc See external documentation. pixelMapfv(Map,Mapsize,Values) -> - wxe_util:send_bin(Values), - wxe_util:cast(5204, <>). + send_bin(Values), + cast(5204, <>). %% @spec (Map::enum(),Mapsize::integer(),Values::binary()) -> ok %% @doc See external documentation. pixelMapuiv(Map,Mapsize,Values) -> - wxe_util:send_bin(Values), - wxe_util:cast(5205, <>). + send_bin(Values), + cast(5205, <>). %% @spec (Map::enum(),Mapsize::integer(),Values::binary()) -> ok %% @doc See external documentation. pixelMapusv(Map,Mapsize,Values) -> - wxe_util:send_bin(Values), - wxe_util:cast(5206, <>). + send_bin(Values), + cast(5206, <>). %% @spec (Pname::enum(),Param::float()) -> ok %% @doc See external documentation. pixelStoref(Pname,Param) -> - wxe_util:cast(5207, <>). + cast(5207, <>). %% @spec (Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. pixelStorei(Pname,Param) -> - wxe_util:cast(5208, <>). + cast(5208, <>). %% @spec (Pname::enum(),Param::float()) -> ok %% @doc See external documentation. pixelTransferf(Pname,Param) -> - wxe_util:cast(5209, <>). + cast(5209, <>). %% @spec (Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. pixelTransferi(Pname,Param) -> - wxe_util:cast(5210, <>). + cast(5210, <>). %% @spec (Xfactor::float(),Yfactor::float()) -> ok %% @doc See external documentation. pixelZoom(Xfactor,Yfactor) -> - wxe_util:cast(5211, <>). + cast(5211, <>). %% @spec (Size::float()) -> ok %% @doc See external documentation. pointSize(Size) -> - wxe_util:cast(5212, <>). + cast(5212, <>). %% @spec (Face::enum(),Mode::enum()) -> ok %% @doc See external documentation. polygonMode(Face,Mode) -> - wxe_util:cast(5213, <>). + cast(5213, <>). %% @spec (Factor::float(),Units::float()) -> ok %% @doc See external documentation. polygonOffset(Factor,Units) -> - wxe_util:cast(5214, <>). + cast(5214, <>). %% @spec (Mask::binary()) -> ok %% @doc See external documentation. polygonStipple(Mask) -> - wxe_util:send_bin(Mask), - wxe_util:cast(5215, <<>>). + send_bin(Mask), + cast(5215, <<>>). %% @spec () -> ok %% @doc See external documentation. popAttrib() -> - wxe_util:cast(5216, <<>>). + cast(5216, <<>>). %% @spec () -> ok %% @doc See external documentation. popClientAttrib() -> - wxe_util:cast(5217, <<>>). + cast(5217, <<>>). %% @spec () -> ok %% @doc See external documentation. popMatrix() -> - wxe_util:cast(5218, <<>>). + cast(5218, <<>>). %% @spec () -> ok %% @doc See external documentation. popName() -> - wxe_util:cast(5219, <<>>). + cast(5219, <<>>). %% @spec (Textures::[integer()],Priorities::[clamp()]) -> ok %% @doc See external documentation. prioritizeTextures(Textures,Priorities) -> - wxe_util:cast(5220, <<(length(Textures)):?GLuint, + 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)>>). %% @spec (Mask::integer()) -> ok %% @doc See external documentation. pushAttrib(Mask) -> - wxe_util:cast(5221, <>). + cast(5221, <>). %% @spec (Mask::integer()) -> ok %% @doc See external documentation. pushClientAttrib(Mask) -> - wxe_util:cast(5222, <>). + cast(5222, <>). %% @spec () -> ok %% @doc See external documentation. pushMatrix() -> - wxe_util:cast(5223, <<>>). + cast(5223, <<>>). %% @spec (Name::integer()) -> ok %% @doc See external documentation. pushName(Name) -> - wxe_util:cast(5224, <>). + cast(5224, <>). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. rasterPos2d(X,Y) -> - wxe_util:cast(5225, <>). + cast(5225, <>). %% @spec ({X,Y}) -> ok %% @equiv rasterPos2d(X,Y) @@ -1315,7 +1345,7 @@ rasterPos2dv({X,Y}) -> rasterPos2d(X,Y). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. rasterPos2f(X,Y) -> - wxe_util:cast(5226, <>). + cast(5226, <>). %% @spec ({X,Y}) -> ok %% @equiv rasterPos2f(X,Y) @@ -1324,7 +1354,7 @@ rasterPos2fv({X,Y}) -> rasterPos2f(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. rasterPos2i(X,Y) -> - wxe_util:cast(5227, <>). + cast(5227, <>). %% @spec ({X,Y}) -> ok %% @equiv rasterPos2i(X,Y) @@ -1333,7 +1363,7 @@ rasterPos2iv({X,Y}) -> rasterPos2i(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. rasterPos2s(X,Y) -> - wxe_util:cast(5228, <>). + cast(5228, <>). %% @spec ({X,Y}) -> ok %% @equiv rasterPos2s(X,Y) @@ -1342,7 +1372,7 @@ rasterPos2sv({X,Y}) -> rasterPos2s(X,Y). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. rasterPos3d(X,Y,Z) -> - wxe_util:cast(5229, <>). + cast(5229, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv rasterPos3d(X,Y,Z) @@ -1351,7 +1381,7 @@ rasterPos3dv({X,Y,Z}) -> rasterPos3d(X,Y,Z). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. rasterPos3f(X,Y,Z) -> - wxe_util:cast(5230, <>). + cast(5230, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv rasterPos3f(X,Y,Z) @@ -1360,7 +1390,7 @@ rasterPos3fv({X,Y,Z}) -> rasterPos3f(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. rasterPos3i(X,Y,Z) -> - wxe_util:cast(5231, <>). + cast(5231, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv rasterPos3i(X,Y,Z) @@ -1369,7 +1399,7 @@ rasterPos3iv({X,Y,Z}) -> rasterPos3i(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. rasterPos3s(X,Y,Z) -> - wxe_util:cast(5232, <>). + cast(5232, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv rasterPos3s(X,Y,Z) @@ -1378,7 +1408,7 @@ rasterPos3sv({X,Y,Z}) -> rasterPos3s(X,Y,Z). %% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. rasterPos4d(X,Y,Z,W) -> - wxe_util:cast(5233, <>). + cast(5233, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv rasterPos4d(X,Y,Z,W) @@ -1387,7 +1417,7 @@ rasterPos4dv({X,Y,Z,W}) -> rasterPos4d(X,Y,Z,W). %% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. rasterPos4f(X,Y,Z,W) -> - wxe_util:cast(5234, <>). + cast(5234, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv rasterPos4f(X,Y,Z,W) @@ -1396,7 +1426,7 @@ rasterPos4fv({X,Y,Z,W}) -> rasterPos4f(X,Y,Z,W). %% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. rasterPos4i(X,Y,Z,W) -> - wxe_util:cast(5235, <>). + cast(5235, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv rasterPos4i(X,Y,Z,W) @@ -1405,7 +1435,7 @@ rasterPos4iv({X,Y,Z,W}) -> rasterPos4i(X,Y,Z,W). %% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. rasterPos4s(X,Y,Z,W) -> - wxe_util:cast(5236, <>). + cast(5236, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv rasterPos4s(X,Y,Z,W) @@ -1414,114 +1444,114 @@ rasterPos4sv({X,Y,Z,W}) -> rasterPos4s(X,Y,Z,W). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. readBuffer(Mode) -> - wxe_util:cast(5237, <>). + cast(5237, <>). -%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::wx:wx_mem()) -> ok +%% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::mem()) -> ok %% @doc See external documentation. readPixels(X,Y,Width,Height,Format,Type,Pixels) -> - wxe_util:send_bin(Pixels#wx_mem.bin), - wxe_util:call(5238, <>). + send_bin(Pixels), + call(5238, <>). %% @spec (X1::float(),Y1::float(),X2::float(),Y2::float()) -> ok %% @doc See external documentation. rectd(X1,Y1,X2,Y2) -> - wxe_util:cast(5239, <>). + cast(5239, <>). %% @spec (V1::{float()},V2::{float()}) -> ok %% @doc See external documentation. rectdv({V1,V2},{V1,V2}) -> - wxe_util:cast(5240, <>). + cast(5240, <>). %% @spec (X1::float(),Y1::float(),X2::float(),Y2::float()) -> ok %% @doc See external documentation. rectf(X1,Y1,X2,Y2) -> - wxe_util:cast(5241, <>). + cast(5241, <>). %% @spec (V1::{float()},V2::{float()}) -> ok %% @doc See external documentation. rectfv({V1,V2},{V1,V2}) -> - wxe_util:cast(5242, <>). + cast(5242, <>). %% @spec (X1::integer(),Y1::integer(),X2::integer(),Y2::integer()) -> ok %% @doc See external documentation. recti(X1,Y1,X2,Y2) -> - wxe_util:cast(5243, <>). + cast(5243, <>). %% @spec (V1::{integer()},V2::{integer()}) -> ok %% @doc See external documentation. rectiv({V1,V2},{V1,V2}) -> - wxe_util:cast(5244, <>). + cast(5244, <>). %% @spec (X1::integer(),Y1::integer(),X2::integer(),Y2::integer()) -> ok %% @doc See external documentation. rects(X1,Y1,X2,Y2) -> - wxe_util:cast(5245, <>). + cast(5245, <>). %% @spec (V1::{integer()},V2::{integer()}) -> ok %% @doc See external documentation. rectsv({V1,V2},{V1,V2}) -> - wxe_util:cast(5246, <>). + cast(5246, <>). %% @spec (Mode::enum()) -> integer() %% @doc See external documentation. renderMode(Mode) -> - wxe_util:call(5247, <>). + call(5247, <>). %% @spec (Angle::float(),X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. rotated(Angle,X,Y,Z) -> - wxe_util:cast(5248, <>). + cast(5248, <>). %% @spec (Angle::float(),X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. rotatef(Angle,X,Y,Z) -> - wxe_util:cast(5249, <>). + cast(5249, <>). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. scaled(X,Y,Z) -> - wxe_util:cast(5250, <>). + cast(5250, <>). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. scalef(X,Y,Z) -> - wxe_util:cast(5251, <>). + cast(5251, <>). %% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok %% @doc See external documentation. scissor(X,Y,Width,Height) -> - wxe_util:cast(5252, <>). + cast(5252, <>). -%% @spec (Size::integer(),Buffer::wx:wx_mem()) -> ok +%% @spec (Size::integer(),Buffer::mem()) -> ok %% @doc See external documentation. selectBuffer(Size,Buffer) -> - wxe_util:send_bin(Buffer#wx_mem.bin), - wxe_util:call(5253, <>). + send_bin(Buffer), + call(5253, <>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. shadeModel(Mode) -> - wxe_util:cast(5254, <>). + cast(5254, <>). %% @spec (Func::enum(),Ref::integer(),Mask::integer()) -> ok %% @doc See external documentation. stencilFunc(Func,Ref,Mask) -> - wxe_util:cast(5255, <>). + cast(5255, <>). %% @spec (Mask::integer()) -> ok %% @doc See external documentation. stencilMask(Mask) -> - wxe_util:cast(5256, <>). + cast(5256, <>). %% @spec (Fail::enum(),Zfail::enum(),Zpass::enum()) -> ok %% @doc See external documentation. stencilOp(Fail,Zfail,Zpass) -> - wxe_util:cast(5257, <>). + cast(5257, <>). %% @spec (S::float()) -> ok %% @doc See external documentation. texCoord1d(S) -> - wxe_util:cast(5258, <>). + cast(5258, <>). %% @spec ({S}) -> ok %% @equiv texCoord1d(S) @@ -1530,7 +1560,7 @@ texCoord1dv({S}) -> texCoord1d(S). %% @spec (S::float()) -> ok %% @doc See external documentation. texCoord1f(S) -> - wxe_util:cast(5259, <>). + cast(5259, <>). %% @spec ({S}) -> ok %% @equiv texCoord1f(S) @@ -1539,7 +1569,7 @@ texCoord1fv({S}) -> texCoord1f(S). %% @spec (S::integer()) -> ok %% @doc See external documentation. texCoord1i(S) -> - wxe_util:cast(5260, <>). + cast(5260, <>). %% @spec ({S}) -> ok %% @equiv texCoord1i(S) @@ -1548,7 +1578,7 @@ texCoord1iv({S}) -> texCoord1i(S). %% @spec (S::integer()) -> ok %% @doc See external documentation. texCoord1s(S) -> - wxe_util:cast(5261, <>). + cast(5261, <>). %% @spec ({S}) -> ok %% @equiv texCoord1s(S) @@ -1557,7 +1587,7 @@ texCoord1sv({S}) -> texCoord1s(S). %% @spec (S::float(),T::float()) -> ok %% @doc See external documentation. texCoord2d(S,T) -> - wxe_util:cast(5262, <>). + cast(5262, <>). %% @spec ({S,T}) -> ok %% @equiv texCoord2d(S,T) @@ -1566,7 +1596,7 @@ texCoord2dv({S,T}) -> texCoord2d(S,T). %% @spec (S::float(),T::float()) -> ok %% @doc See external documentation. texCoord2f(S,T) -> - wxe_util:cast(5263, <>). + cast(5263, <>). %% @spec ({S,T}) -> ok %% @equiv texCoord2f(S,T) @@ -1575,7 +1605,7 @@ texCoord2fv({S,T}) -> texCoord2f(S,T). %% @spec (S::integer(),T::integer()) -> ok %% @doc See external documentation. texCoord2i(S,T) -> - wxe_util:cast(5264, <>). + cast(5264, <>). %% @spec ({S,T}) -> ok %% @equiv texCoord2i(S,T) @@ -1584,7 +1614,7 @@ texCoord2iv({S,T}) -> texCoord2i(S,T). %% @spec (S::integer(),T::integer()) -> ok %% @doc See external documentation. texCoord2s(S,T) -> - wxe_util:cast(5265, <>). + cast(5265, <>). %% @spec ({S,T}) -> ok %% @equiv texCoord2s(S,T) @@ -1593,7 +1623,7 @@ texCoord2sv({S,T}) -> texCoord2s(S,T). %% @spec (S::float(),T::float(),R::float()) -> ok %% @doc See external documentation. texCoord3d(S,T,R) -> - wxe_util:cast(5266, <>). + cast(5266, <>). %% @spec ({S,T,R}) -> ok %% @equiv texCoord3d(S,T,R) @@ -1602,7 +1632,7 @@ texCoord3dv({S,T,R}) -> texCoord3d(S,T,R). %% @spec (S::float(),T::float(),R::float()) -> ok %% @doc See external documentation. texCoord3f(S,T,R) -> - wxe_util:cast(5267, <>). + cast(5267, <>). %% @spec ({S,T,R}) -> ok %% @equiv texCoord3f(S,T,R) @@ -1611,7 +1641,7 @@ texCoord3fv({S,T,R}) -> texCoord3f(S,T,R). %% @spec (S::integer(),T::integer(),R::integer()) -> ok %% @doc See external documentation. texCoord3i(S,T,R) -> - wxe_util:cast(5268, <>). + cast(5268, <>). %% @spec ({S,T,R}) -> ok %% @equiv texCoord3i(S,T,R) @@ -1620,7 +1650,7 @@ texCoord3iv({S,T,R}) -> texCoord3i(S,T,R). %% @spec (S::integer(),T::integer(),R::integer()) -> ok %% @doc See external documentation. texCoord3s(S,T,R) -> - wxe_util:cast(5269, <>). + cast(5269, <>). %% @spec ({S,T,R}) -> ok %% @equiv texCoord3s(S,T,R) @@ -1629,7 +1659,7 @@ texCoord3sv({S,T,R}) -> texCoord3s(S,T,R). %% @spec (S::float(),T::float(),R::float(),Q::float()) -> ok %% @doc See external documentation. texCoord4d(S,T,R,Q) -> - wxe_util:cast(5270, <>). + cast(5270, <>). %% @spec ({S,T,R,Q}) -> ok %% @equiv texCoord4d(S,T,R,Q) @@ -1638,7 +1668,7 @@ texCoord4dv({S,T,R,Q}) -> texCoord4d(S,T,R,Q). %% @spec (S::float(),T::float(),R::float(),Q::float()) -> ok %% @doc See external documentation. texCoord4f(S,T,R,Q) -> - wxe_util:cast(5271, <>). + cast(5271, <>). %% @spec ({S,T,R,Q}) -> ok %% @equiv texCoord4f(S,T,R,Q) @@ -1647,7 +1677,7 @@ texCoord4fv({S,T,R,Q}) -> texCoord4f(S,T,R,Q). %% @spec (S::integer(),T::integer(),R::integer(),Q::integer()) -> ok %% @doc See external documentation. texCoord4i(S,T,R,Q) -> - wxe_util:cast(5272, <>). + cast(5272, <>). %% @spec ({S,T,R,Q}) -> ok %% @equiv texCoord4i(S,T,R,Q) @@ -1656,7 +1686,7 @@ texCoord4iv({S,T,R,Q}) -> texCoord4i(S,T,R,Q). %% @spec (S::integer(),T::integer(),R::integer(),Q::integer()) -> ok %% @doc See external documentation. texCoord4s(S,T,R,Q) -> - wxe_util:cast(5273, <>). + cast(5273, <>). %% @spec ({S,T,R,Q}) -> ok %% @equiv texCoord4s(S,T,R,Q) @@ -1665,134 +1695,134 @@ texCoord4sv({S,T,R,Q}) -> texCoord4s(S,T,R,Q). %% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. texCoordPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5274, <>); + cast(5274, <>); texCoordPointer(Size,Type,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5275, <>). + send_bin(Pointer), + cast(5275, <>). %% @spec (Target::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. texEnvf(Target,Pname,Param) -> - wxe_util:cast(5276, <>). + cast(5276, <>). %% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. texEnvfv(Target,Pname,Params) -> - wxe_util:cast(5277, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Target::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. texEnvi(Target,Pname,Param) -> - wxe_util:cast(5278, <>). + cast(5278, <>). %% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. texEnviv(Target,Pname,Params) -> - wxe_util:cast(5279, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Coord::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. texGend(Coord,Pname,Param) -> - wxe_util:cast(5280, <>). + cast(5280, <>). %% @spec (Coord::enum(),Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. texGendv(Coord,Pname,Params) -> - wxe_util:cast(5281, <> ||C <- tuple_to_list(Params)>>)/binary>>). %% @spec (Coord::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. texGenf(Coord,Pname,Param) -> - wxe_util:cast(5282, <>). + cast(5282, <>). %% @spec (Coord::enum(),Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. texGenfv(Coord,Pname,Params) -> - wxe_util:cast(5283, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Coord::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. texGeni(Coord,Pname,Param) -> - wxe_util:cast(5284, <>). + cast(5284, <>). %% @spec (Coord::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. texGeniv(Coord,Pname,Params) -> - wxe_util:cast(5285, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Target::enum(),Level::integer(),Internalformat::integer(),Width::integer(),Border::integer(),Format::enum(),Type::enum(),Pixels::offset()|binary()) -> ok %% @doc See external documentation. texImage1D(Target,Level,Internalformat,Width,Border,Format,Type,Pixels) when is_integer(Pixels) -> - wxe_util:cast(5286, <>); + cast(5286, <>); texImage1D(Target,Level,Internalformat,Width,Border,Format,Type,Pixels) -> - wxe_util:send_bin(Pixels), - wxe_util:cast(5287, <>). + send_bin(Pixels), + cast(5287, <>). %% @spec (Target::enum(),Level::integer(),Internalformat::integer(),Width::integer(),Height::integer(),Border::integer(),Format::enum(),Type::enum(),Pixels::offset()|binary()) -> ok %% @doc See external documentation. texImage2D(Target,Level,Internalformat,Width,Height,Border,Format,Type,Pixels) when is_integer(Pixels) -> - wxe_util:cast(5288, <>); + cast(5288, <>); texImage2D(Target,Level,Internalformat,Width,Height,Border,Format,Type,Pixels) -> - wxe_util:send_bin(Pixels), - wxe_util:cast(5289, <>). + send_bin(Pixels), + cast(5289, <>). %% @spec (Target::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. texParameterf(Target,Pname,Param) -> - wxe_util:cast(5290, <>). + cast(5290, <>). %% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. texParameterfv(Target,Pname,Params) -> - wxe_util:cast(5291, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Target::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. texParameteri(Target,Pname,Param) -> - wxe_util:cast(5292, <>). + cast(5292, <>). %% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. texParameteriv(Target,Pname,Params) -> - wxe_util:cast(5293, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Width::integer(),Format::enum(),Type::enum(),Pixels::offset()|binary()) -> ok %% @doc See external documentation. texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) when is_integer(Pixels) -> - wxe_util:cast(5294, <>); + cast(5294, <>); texSubImage1D(Target,Level,Xoffset,Width,Format,Type,Pixels) -> - wxe_util:send_bin(Pixels), - wxe_util:cast(5295, <>). + send_bin(Pixels), + cast(5295, <>). %% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::offset()|binary()) -> ok %% @doc See external documentation. texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) when is_integer(Pixels) -> - wxe_util:cast(5296, <>); + cast(5296, <>); texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) -> - wxe_util:send_bin(Pixels), - wxe_util:cast(5297, <>). + send_bin(Pixels), + cast(5297, <>). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. translated(X,Y,Z) -> - wxe_util:cast(5298, <>). + cast(5298, <>). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. translatef(X,Y,Z) -> - wxe_util:cast(5299, <>). + cast(5299, <>). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. vertex2d(X,Y) -> - wxe_util:cast(5300, <>). + cast(5300, <>). %% @spec ({X,Y}) -> ok %% @equiv vertex2d(X,Y) @@ -1801,7 +1831,7 @@ vertex2dv({X,Y}) -> vertex2d(X,Y). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. vertex2f(X,Y) -> - wxe_util:cast(5301, <>). + cast(5301, <>). %% @spec ({X,Y}) -> ok %% @equiv vertex2f(X,Y) @@ -1810,7 +1840,7 @@ vertex2fv({X,Y}) -> vertex2f(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. vertex2i(X,Y) -> - wxe_util:cast(5302, <>). + cast(5302, <>). %% @spec ({X,Y}) -> ok %% @equiv vertex2i(X,Y) @@ -1819,7 +1849,7 @@ vertex2iv({X,Y}) -> vertex2i(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. vertex2s(X,Y) -> - wxe_util:cast(5303, <>). + cast(5303, <>). %% @spec ({X,Y}) -> ok %% @equiv vertex2s(X,Y) @@ -1828,7 +1858,7 @@ vertex2sv({X,Y}) -> vertex2s(X,Y). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. vertex3d(X,Y,Z) -> - wxe_util:cast(5304, <>). + cast(5304, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv vertex3d(X,Y,Z) @@ -1837,7 +1867,7 @@ vertex3dv({X,Y,Z}) -> vertex3d(X,Y,Z). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. vertex3f(X,Y,Z) -> - wxe_util:cast(5305, <>). + cast(5305, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv vertex3f(X,Y,Z) @@ -1846,7 +1876,7 @@ vertex3fv({X,Y,Z}) -> vertex3f(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. vertex3i(X,Y,Z) -> - wxe_util:cast(5306, <>). + cast(5306, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv vertex3i(X,Y,Z) @@ -1855,7 +1885,7 @@ vertex3iv({X,Y,Z}) -> vertex3i(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. vertex3s(X,Y,Z) -> - wxe_util:cast(5307, <>). + cast(5307, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv vertex3s(X,Y,Z) @@ -1864,7 +1894,7 @@ vertex3sv({X,Y,Z}) -> vertex3s(X,Y,Z). %% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. vertex4d(X,Y,Z,W) -> - wxe_util:cast(5308, <>). + cast(5308, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv vertex4d(X,Y,Z,W) @@ -1873,7 +1903,7 @@ vertex4dv({X,Y,Z,W}) -> vertex4d(X,Y,Z,W). %% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. vertex4f(X,Y,Z,W) -> - wxe_util:cast(5309, <>). + cast(5309, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv vertex4f(X,Y,Z,W) @@ -1882,7 +1912,7 @@ vertex4fv({X,Y,Z,W}) -> vertex4f(X,Y,Z,W). %% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. vertex4i(X,Y,Z,W) -> - wxe_util:cast(5310, <>). + cast(5310, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv vertex4i(X,Y,Z,W) @@ -1891,7 +1921,7 @@ vertex4iv({X,Y,Z,W}) -> vertex4i(X,Y,Z,W). %% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. vertex4s(X,Y,Z,W) -> - wxe_util:cast(5311, <>). + cast(5311, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv vertex4s(X,Y,Z,W) @@ -1900,127 +1930,127 @@ vertex4sv({X,Y,Z,W}) -> vertex4s(X,Y,Z,W). %% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. vertexPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5312, <>); + cast(5312, <>); vertexPointer(Size,Type,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5313, <>). + send_bin(Pointer), + cast(5313, <>). %% @spec (X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok %% @doc See external documentation. viewport(X,Y,Width,Height) -> - wxe_util:cast(5314, <>). + cast(5314, <>). %% @spec (Red::clamp(),Green::clamp(),Blue::clamp(),Alpha::clamp()) -> ok %% @doc See external documentation. blendColor(Red,Green,Blue,Alpha) -> - wxe_util:cast(5315, <>). + cast(5315, <>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. blendEquation(Mode) -> - wxe_util:cast(5316, <>). + cast(5316, <>). %% @spec (Mode::enum(),Start::integer(),End::integer(),Count::integer(),Type::enum(),Indices::offset()|binary()) -> ok %% @doc See external documentation. drawRangeElements(Mode,Start,End,Count,Type,Indices) when is_integer(Indices) -> - wxe_util:cast(5317, <>); + cast(5317, <>); drawRangeElements(Mode,Start,End,Count,Type,Indices) -> - wxe_util:send_bin(Indices), - wxe_util:cast(5318, <>). + 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()|binary()) -> ok %% @doc See external documentation. texImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,Format,Type,Pixels) when is_integer(Pixels) -> - wxe_util:cast(5319, <>); + cast(5319, <>); texImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,Format,Type,Pixels) -> - wxe_util:send_bin(Pixels), - wxe_util:cast(5320, <>). + send_bin(Pixels), + 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()|binary()) -> ok %% @doc See external documentation. texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Type,Pixels) when is_integer(Pixels) -> - wxe_util:cast(5321, <>); + cast(5321, <>); texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Type,Pixels) -> - wxe_util:send_bin(Pixels), - wxe_util:cast(5322, <>). + 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. copyTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,X,Y,Width,Height) -> - wxe_util:cast(5323, <>). + cast(5323, <>). %% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Format::enum(),Type::enum(),Table::offset()|binary()) -> ok %% @doc See external documentation. colorTable(Target,Internalformat,Width,Format,Type,Table) when is_integer(Table) -> - wxe_util:cast(5324, <>); + cast(5324, <>); colorTable(Target,Internalformat,Width,Format,Type,Table) -> - wxe_util:send_bin(Table), - wxe_util:cast(5325, <>). + send_bin(Table), + cast(5325, <>). %% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. colorTableParameterfv(Target,Pname,{P1,P2,P3,P4}) -> - wxe_util:cast(5326, <>). + cast(5326, <>). %% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. colorTableParameteriv(Target,Pname,{P1,P2,P3,P4}) -> - wxe_util:cast(5327, <>). + cast(5327, <>). %% @spec (Target::enum(),Internalformat::enum(),X::integer(),Y::integer(),Width::integer()) -> ok %% @doc See external documentation. copyColorTable(Target,Internalformat,X,Y,Width) -> - wxe_util:cast(5328, <>). + cast(5328, <>). -%% @spec (Target::enum(),Format::enum(),Type::enum(),Table::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Format::enum(),Type::enum(),Table::mem()) -> ok %% @doc See external documentation. getColorTable(Target,Format,Type,Table) -> - wxe_util:send_bin(Table#wx_mem.bin), - wxe_util:call(5329, <>). + send_bin(Table), + call(5329, <>). %% @spec (Target::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getColorTableParameterfv(Target,Pname) -> - wxe_util:call(5330, <>). + call(5330, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getColorTableParameteriv(Target,Pname) -> - wxe_util:call(5331, <>). + call(5331, <>). %% @spec (Target::enum(),Start::integer(),Count::integer(),Format::enum(),Type::enum(),Data::offset()|binary()) -> ok %% @doc See external documentation. colorSubTable(Target,Start,Count,Format,Type,Data) when is_integer(Data) -> - wxe_util:cast(5332, <>); + cast(5332, <>); colorSubTable(Target,Start,Count,Format,Type,Data) -> - wxe_util:send_bin(Data), - wxe_util:cast(5333, <>). + send_bin(Data), + cast(5333, <>). %% @spec (Target::enum(),Start::integer(),X::integer(),Y::integer(),Width::integer()) -> ok %% @doc See external documentation. copyColorSubTable(Target,Start,X,Y,Width) -> - wxe_util:cast(5334, <>). + cast(5334, <>). %% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Format::enum(),Type::enum(),Image::offset()|binary()) -> ok %% @doc See external documentation. convolutionFilter1D(Target,Internalformat,Width,Format,Type,Image) when is_integer(Image) -> - wxe_util:cast(5335, <>); + cast(5335, <>); convolutionFilter1D(Target,Internalformat,Width,Format,Type,Image) -> - wxe_util:send_bin(Image), - wxe_util:cast(5336, <>). + send_bin(Image), + cast(5336, <>). %% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Image::offset()|binary()) -> ok %% @doc See external documentation. convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) when is_integer(Image) -> - wxe_util:cast(5337, <>); + cast(5337, <>); convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) -> - wxe_util:send_bin(Image), - wxe_util:cast(5338, <>). + send_bin(Image), + cast(5338, <>). %% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. convolutionParameterf(Target,Pname,Params) -> - wxe_util:cast(5339, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Target,Pname,{Params}) -> ok @@ -2030,7 +2060,7 @@ convolutionParameterfv(Target,Pname,{Params}) -> convolutionParameterf(Target,P %% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. convolutionParameteri(Target,Pname,Params) -> - wxe_util:cast(5340, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Target,Pname,{Params}) -> ok @@ -2040,163 +2070,163 @@ convolutionParameteriv(Target,Pname,{Params}) -> convolutionParameteri(Target,P %% @spec (Target::enum(),Internalformat::enum(),X::integer(),Y::integer(),Width::integer()) -> ok %% @doc See external documentation. copyConvolutionFilter1D(Target,Internalformat,X,Y,Width) -> - wxe_util:cast(5341, <>). + cast(5341, <>). %% @spec (Target::enum(),Internalformat::enum(),X::integer(),Y::integer(),Width::integer(),Height::integer()) -> ok %% @doc See external documentation. copyConvolutionFilter2D(Target,Internalformat,X,Y,Width,Height) -> - wxe_util:cast(5342, <>). + cast(5342, <>). -%% @spec (Target::enum(),Format::enum(),Type::enum(),Image::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Format::enum(),Type::enum(),Image::mem()) -> ok %% @doc See external documentation. getConvolutionFilter(Target,Format,Type,Image) -> - wxe_util:send_bin(Image#wx_mem.bin), - wxe_util:call(5343, <>). + send_bin(Image), + call(5343, <>). %% @spec (Target::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getConvolutionParameterfv(Target,Pname) -> - wxe_util:call(5344, <>). + call(5344, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getConvolutionParameteriv(Target,Pname) -> - wxe_util:call(5345, <>). + call(5345, <>). %% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Row::offset()|binary(),Column::offset()|binary()) -> ok %% @doc See external documentation. separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) when is_integer(Row), is_integer(Column) -> - wxe_util:cast(5346, <>); + cast(5346, <>); separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) -> - wxe_util:send_bin(Row), - wxe_util:send_bin(Column), - wxe_util:cast(5347, <>). + send_bin(Row), + send_bin(Column), + cast(5347, <>). -%% @spec (Target::enum(),Reset::0|1,Format::enum(),Type::enum(),Values::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Reset::0|1,Format::enum(),Type::enum(),Values::mem()) -> ok %% @doc See external documentation. getHistogram(Target,Reset,Format,Type,Values) -> - wxe_util:send_bin(Values#wx_mem.bin), - wxe_util:call(5348, <>). + send_bin(Values), + call(5348, <>). %% @spec (Target::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getHistogramParameterfv(Target,Pname) -> - wxe_util:call(5349, <>). + call(5349, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getHistogramParameteriv(Target,Pname) -> - wxe_util:call(5350, <>). + call(5350, <>). -%% @spec (Target::enum(),Reset::0|1,Format::enum(),Type::enum(),Values::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Reset::0|1,Format::enum(),Type::enum(),Values::mem()) -> ok %% @doc See external documentation. getMinmax(Target,Reset,Format,Type,Values) -> - wxe_util:send_bin(Values#wx_mem.bin), - wxe_util:call(5351, <>). + send_bin(Values), + call(5351, <>). %% @spec (Target::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. getMinmaxParameterfv(Target,Pname) -> - wxe_util:call(5352, <>). + call(5352, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getMinmaxParameteriv(Target,Pname) -> - wxe_util:call(5353, <>). + call(5353, <>). %% @spec (Target::enum(),Width::integer(),Internalformat::enum(),Sink::0|1) -> ok %% @doc See external documentation. histogram(Target,Width,Internalformat,Sink) -> - wxe_util:cast(5354, <>). + cast(5354, <>). %% @spec (Target::enum(),Internalformat::enum(),Sink::0|1) -> ok %% @doc See external documentation. minmax(Target,Internalformat,Sink) -> - wxe_util:cast(5355, <>). + cast(5355, <>). %% @spec (Target::enum()) -> ok %% @doc See external documentation. resetHistogram(Target) -> - wxe_util:cast(5356, <>). + cast(5356, <>). %% @spec (Target::enum()) -> ok %% @doc See external documentation. resetMinmax(Target) -> - wxe_util:cast(5357, <>). + cast(5357, <>). %% @spec (Texture::enum()) -> ok %% @doc See external documentation. activeTexture(Texture) -> - wxe_util:cast(5358, <>). + cast(5358, <>). %% @spec (Value::clamp(),Invert::0|1) -> ok %% @doc See external documentation. sampleCoverage(Value,Invert) -> - wxe_util:cast(5359, <>). + cast(5359, <>). %% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Height::integer(),Depth::integer(),Border::integer(),ImageSize::integer(),Data::offset()|binary()) -> ok %% @doc See external documentation. compressedTexImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,ImageSize,Data) when is_integer(Data) -> - wxe_util:cast(5360, <>); + cast(5360, <>); compressedTexImage3D(Target,Level,Internalformat,Width,Height,Depth,Border,ImageSize,Data) -> - wxe_util:send_bin(Data), - wxe_util:cast(5361, <>). + send_bin(Data), + cast(5361, <>). %% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Height::integer(),Border::integer(),ImageSize::integer(),Data::offset()|binary()) -> ok %% @doc See external documentation. compressedTexImage2D(Target,Level,Internalformat,Width,Height,Border,ImageSize,Data) when is_integer(Data) -> - wxe_util:cast(5362, <>); + cast(5362, <>); compressedTexImage2D(Target,Level,Internalformat,Width,Height,Border,ImageSize,Data) -> - wxe_util:send_bin(Data), - wxe_util:cast(5363, <>). + send_bin(Data), + cast(5363, <>). %% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Border::integer(),ImageSize::integer(),Data::offset()|binary()) -> ok %% @doc See external documentation. compressedTexImage1D(Target,Level,Internalformat,Width,Border,ImageSize,Data) when is_integer(Data) -> - wxe_util:cast(5364, <>); + cast(5364, <>); compressedTexImage1D(Target,Level,Internalformat,Width,Border,ImageSize,Data) -> - wxe_util:send_bin(Data), - wxe_util:cast(5365, <>). + 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()|binary()) -> ok %% @doc See external documentation. compressedTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,ImageSize,Data) when is_integer(Data) -> - wxe_util:cast(5366, <>); + cast(5366, <>); compressedTexSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,ImageSize,Data) -> - wxe_util:send_bin(Data), - wxe_util:cast(5367, <>). + send_bin(Data), + cast(5367, <>). %% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Width::integer(),Height::integer(),Format::enum(),ImageSize::integer(),Data::offset()|binary()) -> ok %% @doc See external documentation. compressedTexSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,ImageSize,Data) when is_integer(Data) -> - wxe_util:cast(5368, <>); + cast(5368, <>); compressedTexSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,ImageSize,Data) -> - wxe_util:send_bin(Data), - wxe_util:cast(5369, <>). + send_bin(Data), + cast(5369, <>). %% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Width::integer(),Format::enum(),ImageSize::integer(),Data::offset()|binary()) -> ok %% @doc See external documentation. compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) when is_integer(Data) -> - wxe_util:cast(5370, <>); + cast(5370, <>); compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) -> - wxe_util:send_bin(Data), - wxe_util:cast(5371, <>). + send_bin(Data), + cast(5371, <>). -%% @spec (Target::enum(),Level::integer(),Img::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Level::integer(),Img::mem()) -> ok %% @doc See external documentation. getCompressedTexImage(Target,Level,Img) -> - wxe_util:send_bin(Img#wx_mem.bin), - wxe_util:call(5372, <>). + send_bin(Img), + call(5372, <>). %% @spec (Texture::enum()) -> ok %% @doc See external documentation. clientActiveTexture(Texture) -> - wxe_util:cast(5373, <>). + cast(5373, <>). %% @spec (Target::enum(),S::float()) -> ok %% @doc See external documentation. multiTexCoord1d(Target,S) -> - wxe_util:cast(5374, <>). + cast(5374, <>). %% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1d(Target,S) @@ -2205,7 +2235,7 @@ multiTexCoord1dv(Target,{S}) -> multiTexCoord1d(Target,S). %% @spec (Target::enum(),S::float()) -> ok %% @doc See external documentation. multiTexCoord1f(Target,S) -> - wxe_util:cast(5375, <>). + cast(5375, <>). %% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1f(Target,S) @@ -2214,7 +2244,7 @@ multiTexCoord1fv(Target,{S}) -> multiTexCoord1f(Target,S). %% @spec (Target::enum(),S::integer()) -> ok %% @doc See external documentation. multiTexCoord1i(Target,S) -> - wxe_util:cast(5376, <>). + cast(5376, <>). %% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1i(Target,S) @@ -2223,7 +2253,7 @@ multiTexCoord1iv(Target,{S}) -> multiTexCoord1i(Target,S). %% @spec (Target::enum(),S::integer()) -> ok %% @doc See external documentation. multiTexCoord1s(Target,S) -> - wxe_util:cast(5377, <>). + cast(5377, <>). %% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1s(Target,S) @@ -2232,7 +2262,7 @@ multiTexCoord1sv(Target,{S}) -> multiTexCoord1s(Target,S). %% @spec (Target::enum(),S::float(),T::float()) -> ok %% @doc See external documentation. multiTexCoord2d(Target,S,T) -> - wxe_util:cast(5378, <>). + cast(5378, <>). %% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2d(Target,S,T) @@ -2241,7 +2271,7 @@ multiTexCoord2dv(Target,{S,T}) -> multiTexCoord2d(Target,S,T). %% @spec (Target::enum(),S::float(),T::float()) -> ok %% @doc See external documentation. multiTexCoord2f(Target,S,T) -> - wxe_util:cast(5379, <>). + cast(5379, <>). %% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2f(Target,S,T) @@ -2250,7 +2280,7 @@ multiTexCoord2fv(Target,{S,T}) -> multiTexCoord2f(Target,S,T). %% @spec (Target::enum(),S::integer(),T::integer()) -> ok %% @doc See external documentation. multiTexCoord2i(Target,S,T) -> - wxe_util:cast(5380, <>). + cast(5380, <>). %% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2i(Target,S,T) @@ -2259,7 +2289,7 @@ multiTexCoord2iv(Target,{S,T}) -> multiTexCoord2i(Target,S,T). %% @spec (Target::enum(),S::integer(),T::integer()) -> ok %% @doc See external documentation. multiTexCoord2s(Target,S,T) -> - wxe_util:cast(5381, <>). + cast(5381, <>). %% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2s(Target,S,T) @@ -2268,7 +2298,7 @@ multiTexCoord2sv(Target,{S,T}) -> multiTexCoord2s(Target,S,T). %% @spec (Target::enum(),S::float(),T::float(),R::float()) -> ok %% @doc See external documentation. multiTexCoord3d(Target,S,T,R) -> - wxe_util:cast(5382, <>). + cast(5382, <>). %% @spec (Target,{S,T,R}) -> ok %% @equiv multiTexCoord3d(Target,S,T,R) @@ -2277,7 +2307,7 @@ multiTexCoord3dv(Target,{S,T,R}) -> multiTexCoord3d(Target,S,T,R). %% @spec (Target::enum(),S::float(),T::float(),R::float()) -> ok %% @doc See external documentation. multiTexCoord3f(Target,S,T,R) -> - wxe_util:cast(5383, <>). + cast(5383, <>). %% @spec (Target,{S,T,R}) -> ok %% @equiv multiTexCoord3f(Target,S,T,R) @@ -2286,7 +2316,7 @@ multiTexCoord3fv(Target,{S,T,R}) -> multiTexCoord3f(Target,S,T,R). %% @spec (Target::enum(),S::integer(),T::integer(),R::integer()) -> ok %% @doc See external documentation. multiTexCoord3i(Target,S,T,R) -> - wxe_util:cast(5384, <>). + cast(5384, <>). %% @spec (Target,{S,T,R}) -> ok %% @equiv multiTexCoord3i(Target,S,T,R) @@ -2295,7 +2325,7 @@ multiTexCoord3iv(Target,{S,T,R}) -> multiTexCoord3i(Target,S,T,R). %% @spec (Target::enum(),S::integer(),T::integer(),R::integer()) -> ok %% @doc See external documentation. multiTexCoord3s(Target,S,T,R) -> - wxe_util:cast(5385, <>). + cast(5385, <>). %% @spec (Target,{S,T,R}) -> ok %% @equiv multiTexCoord3s(Target,S,T,R) @@ -2304,7 +2334,7 @@ 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. multiTexCoord4d(Target,S,T,R,Q) -> - wxe_util:cast(5386, <>). + cast(5386, <>). %% @spec (Target,{S,T,R,Q}) -> ok %% @equiv multiTexCoord4d(Target,S,T,R,Q) @@ -2313,7 +2343,7 @@ 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. multiTexCoord4f(Target,S,T,R,Q) -> - wxe_util:cast(5387, <>). + cast(5387, <>). %% @spec (Target,{S,T,R,Q}) -> ok %% @equiv multiTexCoord4f(Target,S,T,R,Q) @@ -2322,7 +2352,7 @@ 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. multiTexCoord4i(Target,S,T,R,Q) -> - wxe_util:cast(5388, <>). + cast(5388, <>). %% @spec (Target,{S,T,R,Q}) -> ok %% @equiv multiTexCoord4i(Target,S,T,R,Q) @@ -2331,7 +2361,7 @@ 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. multiTexCoord4s(Target,S,T,R,Q) -> - wxe_util:cast(5389, <>). + cast(5389, <>). %% @spec (Target,{S,T,R,Q}) -> ok %% @equiv multiTexCoord4s(Target,S,T,R,Q) @@ -2340,69 +2370,69 @@ multiTexCoord4sv(Target,{S,T,R,Q}) -> multiTexCoord4s(Target,S,T,R,Q). %% @spec (M::{float()}) -> ok %% @doc See external documentation. loadTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5390, <>); + cast(5390, <>); loadTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5390, <>). + cast(5390, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. loadTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5391, <>); + cast(5391, <>); loadTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5391, <>). + cast(5391, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. multTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5392, <>); + cast(5392, <>); multTransposeMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5392, <>). + cast(5392, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5393, <>); + cast(5393, <>); multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5393, <>). + cast(5393, <>). %% @spec (SfactorRGB::enum(),DfactorRGB::enum(),SfactorAlpha::enum(),DfactorAlpha::enum()) -> ok %% @doc See external documentation. blendFuncSeparate(SfactorRGB,DfactorRGB,SfactorAlpha,DfactorAlpha) -> - wxe_util:cast(5394, <>). + cast(5394, <>). %% @spec (Mode::enum(),First::[integer()],Count::[integer()]) -> ok %% @doc See external documentation. multiDrawArrays(Mode,First,Count) -> - wxe_util: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. pointParameterf(Pname,Param) -> - wxe_util:cast(5396, <>). + cast(5396, <>). %% @spec (Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. pointParameterfv(Pname,Params) -> - wxe_util: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. pointParameteri(Pname,Param) -> - wxe_util:cast(5398, <>). + cast(5398, <>). %% @spec (Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. pointParameteriv(Pname,Params) -> - wxe_util:cast(5399, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((0+size(Params)) rem 2)*32)>>). %% @spec (Coord::float()) -> ok %% @doc See external documentation. fogCoordf(Coord) -> - wxe_util:cast(5400, <>). + cast(5400, <>). %% @spec ({Coord}) -> ok %% @equiv fogCoordf(Coord) @@ -2411,7 +2441,7 @@ fogCoordfv({Coord}) -> fogCoordf(Coord). %% @spec (Coord::float()) -> ok %% @doc See external documentation. fogCoordd(Coord) -> - wxe_util:cast(5401, <>). + cast(5401, <>). %% @spec ({Coord}) -> ok %% @equiv fogCoordd(Coord) @@ -2420,15 +2450,15 @@ fogCoorddv({Coord}) -> fogCoordd(Coord). %% @spec (Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. fogCoordPointer(Type,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5402, <>); + cast(5402, <>); fogCoordPointer(Type,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5403, <>). + send_bin(Pointer), + cast(5403, <>). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. secondaryColor3b(Red,Green,Blue) -> - wxe_util:cast(5404, <>). + cast(5404, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3b(Red,Green,Blue) @@ -2437,7 +2467,7 @@ secondaryColor3bv({Red,Green,Blue}) -> secondaryColor3b(Red,Green,Blue). %% @spec (Red::float(),Green::float(),Blue::float()) -> ok %% @doc See external documentation. secondaryColor3d(Red,Green,Blue) -> - wxe_util:cast(5405, <>). + cast(5405, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3d(Red,Green,Blue) @@ -2446,7 +2476,7 @@ secondaryColor3dv({Red,Green,Blue}) -> secondaryColor3d(Red,Green,Blue). %% @spec (Red::float(),Green::float(),Blue::float()) -> ok %% @doc See external documentation. secondaryColor3f(Red,Green,Blue) -> - wxe_util:cast(5406, <>). + cast(5406, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3f(Red,Green,Blue) @@ -2455,7 +2485,7 @@ secondaryColor3fv({Red,Green,Blue}) -> secondaryColor3f(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. secondaryColor3i(Red,Green,Blue) -> - wxe_util:cast(5407, <>). + cast(5407, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3i(Red,Green,Blue) @@ -2464,7 +2494,7 @@ secondaryColor3iv({Red,Green,Blue}) -> secondaryColor3i(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. secondaryColor3s(Red,Green,Blue) -> - wxe_util:cast(5408, <>). + cast(5408, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3s(Red,Green,Blue) @@ -2473,7 +2503,7 @@ secondaryColor3sv({Red,Green,Blue}) -> secondaryColor3s(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. secondaryColor3ub(Red,Green,Blue) -> - wxe_util:cast(5409, <>). + cast(5409, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3ub(Red,Green,Blue) @@ -2482,7 +2512,7 @@ secondaryColor3ubv({Red,Green,Blue}) -> secondaryColor3ub(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. secondaryColor3ui(Red,Green,Blue) -> - wxe_util:cast(5410, <>). + cast(5410, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3ui(Red,Green,Blue) @@ -2491,7 +2521,7 @@ secondaryColor3uiv({Red,Green,Blue}) -> secondaryColor3ui(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. secondaryColor3us(Red,Green,Blue) -> - wxe_util:cast(5411, <>). + cast(5411, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3us(Red,Green,Blue) @@ -2500,15 +2530,15 @@ secondaryColor3usv({Red,Green,Blue}) -> secondaryColor3us(Red,Green,Blue). %% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. secondaryColorPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5412, <>); + cast(5412, <>); secondaryColorPointer(Size,Type,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5413, <>). + send_bin(Pointer), + cast(5413, <>). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. windowPos2d(X,Y) -> - wxe_util:cast(5414, <>). + cast(5414, <>). %% @spec ({X,Y}) -> ok %% @equiv windowPos2d(X,Y) @@ -2517,7 +2547,7 @@ windowPos2dv({X,Y}) -> windowPos2d(X,Y). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. windowPos2f(X,Y) -> - wxe_util:cast(5415, <>). + cast(5415, <>). %% @spec ({X,Y}) -> ok %% @equiv windowPos2f(X,Y) @@ -2526,7 +2556,7 @@ windowPos2fv({X,Y}) -> windowPos2f(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. windowPos2i(X,Y) -> - wxe_util:cast(5416, <>). + cast(5416, <>). %% @spec ({X,Y}) -> ok %% @equiv windowPos2i(X,Y) @@ -2535,7 +2565,7 @@ windowPos2iv({X,Y}) -> windowPos2i(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. windowPos2s(X,Y) -> - wxe_util:cast(5417, <>). + cast(5417, <>). %% @spec ({X,Y}) -> ok %% @equiv windowPos2s(X,Y) @@ -2544,7 +2574,7 @@ windowPos2sv({X,Y}) -> windowPos2s(X,Y). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. windowPos3d(X,Y,Z) -> - wxe_util:cast(5418, <>). + cast(5418, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3d(X,Y,Z) @@ -2553,7 +2583,7 @@ windowPos3dv({X,Y,Z}) -> windowPos3d(X,Y,Z). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. windowPos3f(X,Y,Z) -> - wxe_util:cast(5419, <>). + cast(5419, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3f(X,Y,Z) @@ -2562,7 +2592,7 @@ windowPos3fv({X,Y,Z}) -> windowPos3f(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. windowPos3i(X,Y,Z) -> - wxe_util:cast(5420, <>). + cast(5420, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3i(X,Y,Z) @@ -2571,7 +2601,7 @@ windowPos3iv({X,Y,Z}) -> windowPos3i(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. windowPos3s(X,Y,Z) -> - wxe_util:cast(5421, <>). + cast(5421, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3s(X,Y,Z) @@ -2580,384 +2610,384 @@ windowPos3sv({X,Y,Z}) -> windowPos3s(X,Y,Z). %% @spec (N::integer()) -> [integer()] %% @doc See external documentation. genQueries(N) -> - wxe_util:call(5422, <>). + call(5422, <>). %% @spec (Ids::[integer()]) -> ok %% @doc See external documentation. deleteQueries(Ids) -> - wxe_util:cast(5423, <<(length(Ids)):?GLuint, + cast(5423, <<(length(Ids)):?GLuint, (<< <> || C <- Ids>>)/binary,0:(((1+length(Ids)) rem 2)*32)>>). %% @spec (Id::integer()) -> 0|1 %% @doc See external documentation. isQuery(Id) -> - wxe_util:call(5424, <>). + call(5424, <>). %% @spec (Target::enum(),Id::integer()) -> ok %% @doc See external documentation. beginQuery(Target,Id) -> - wxe_util:cast(5425, <>). + cast(5425, <>). %% @spec (Target::enum()) -> ok %% @doc See external documentation. endQuery(Target) -> - wxe_util:cast(5426, <>). + cast(5426, <>). %% @spec (Target::enum(),Pname::enum()) -> integer() %% @doc See external documentation. getQueryiv(Target,Pname) -> - wxe_util:call(5427, <>). + call(5427, <>). %% @spec (Id::integer(),Pname::enum()) -> integer() %% @doc See external documentation. getQueryObjectiv(Id,Pname) -> - wxe_util:call(5428, <>). + call(5428, <>). %% @spec (Id::integer(),Pname::enum()) -> integer() %% @doc See external documentation. getQueryObjectuiv(Id,Pname) -> - wxe_util:call(5429, <>). + call(5429, <>). %% @spec (Target::enum(),Buffer::integer()) -> ok %% @doc See external documentation. bindBuffer(Target,Buffer) -> - wxe_util:cast(5430, <>). + cast(5430, <>). %% @spec (Buffers::[integer()]) -> ok %% @doc See external documentation. deleteBuffers(Buffers) -> - wxe_util:cast(5431, <<(length(Buffers)):?GLuint, + cast(5431, <<(length(Buffers)):?GLuint, (<< <> || C <- Buffers>>)/binary,0:(((1+length(Buffers)) rem 2)*32)>>). %% @spec (N::integer()) -> [integer()] %% @doc See external documentation. genBuffers(N) -> - wxe_util:call(5432, <>). + call(5432, <>). %% @spec (Buffer::integer()) -> 0|1 %% @doc See external documentation. isBuffer(Buffer) -> - wxe_util:call(5433, <>). + call(5433, <>). %% @spec (Target::enum(),Size::integer(),Data::offset()|binary(),Usage::enum()) -> ok %% @doc See external documentation. bufferData(Target,Size,Data,Usage) when is_integer(Data) -> - wxe_util:cast(5434, <>); + cast(5434, <>); bufferData(Target,Size,Data,Usage) -> - wxe_util:send_bin(Data), - wxe_util:cast(5435, <>). + send_bin(Data), + cast(5435, <>). %% @spec (Target::enum(),Offset::integer(),Size::integer(),Data::offset()|binary()) -> ok %% @doc See external documentation. bufferSubData(Target,Offset,Size,Data) when is_integer(Data) -> - wxe_util:cast(5436, <>); + cast(5436, <>); bufferSubData(Target,Offset,Size,Data) -> - wxe_util:send_bin(Data), - wxe_util:cast(5437, <>). + send_bin(Data), + cast(5437, <>). -%% @spec (Target::enum(),Offset::integer(),Size::integer(),Data::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Offset::integer(),Size::integer(),Data::mem()) -> ok %% @doc See external documentation. getBufferSubData(Target,Offset,Size,Data) -> - wxe_util:send_bin(Data#wx_mem.bin), - wxe_util:call(5438, <>). + send_bin(Data), + call(5438, <>). %% @spec (Target::enum(),Pname::enum()) -> integer() %% @doc See external documentation. getBufferParameteriv(Target,Pname) -> - wxe_util:call(5439, <>). + call(5439, <>). %% @spec (ModeRGB::enum(),ModeAlpha::enum()) -> ok %% @doc See external documentation. blendEquationSeparate(ModeRGB,ModeAlpha) -> - wxe_util:cast(5440, <>). + cast(5440, <>). %% @spec (Bufs::[enum()]) -> ok %% @doc See external documentation. drawBuffers(Bufs) -> - wxe_util:cast(5441, <<(length(Bufs)):?GLuint, + 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. stencilOpSeparate(Face,Sfail,Dpfail,Dppass) -> - wxe_util:cast(5442, <>). + cast(5442, <>). %% @spec (Frontfunc::enum(),Backfunc::enum(),Ref::integer(),Mask::integer()) -> ok %% @doc See external documentation. stencilFuncSeparate(Frontfunc,Backfunc,Ref,Mask) -> - wxe_util:cast(5443, <>). + cast(5443, <>). %% @spec (Face::enum(),Mask::integer()) -> ok %% @doc See external documentation. stencilMaskSeparate(Face,Mask) -> - wxe_util:cast(5444, <>). + cast(5444, <>). %% @spec (Program::integer(),Shader::integer()) -> ok %% @doc See external documentation. attachShader(Program,Shader) -> - wxe_util:cast(5445, <>). + cast(5445, <>). %% @spec (Program::integer(),Index::integer(),Name::string()) -> ok %% @doc See external documentation. bindAttribLocation(Program,Index,Name) -> - wxe_util:cast(5446, <>). + cast(5446, <>). %% @spec (Shader::integer()) -> ok %% @doc See external documentation. compileShader(Shader) -> - wxe_util:cast(5447, <>). + cast(5447, <>). %% @spec () -> integer() %% @doc See external documentation. createProgram() -> - wxe_util:call(5448, <<>>). + call(5448, <<>>). %% @spec (Type::enum()) -> integer() %% @doc See external documentation. createShader(Type) -> - wxe_util:call(5449, <>). + call(5449, <>). %% @spec (Program::integer()) -> ok %% @doc See external documentation. deleteProgram(Program) -> - wxe_util:cast(5450, <>). + cast(5450, <>). %% @spec (Shader::integer()) -> ok %% @doc See external documentation. deleteShader(Shader) -> - wxe_util:cast(5451, <>). + cast(5451, <>). %% @spec (Program::integer(),Shader::integer()) -> ok %% @doc See external documentation. detachShader(Program,Shader) -> - wxe_util:cast(5452, <>). + cast(5452, <>). %% @spec (Index::integer()) -> ok %% @doc See external documentation. disableVertexAttribArray(Index) -> - wxe_util:cast(5453, <>). + cast(5453, <>). %% @spec (Index::integer()) -> ok %% @doc See external documentation. enableVertexAttribArray(Index) -> - wxe_util:cast(5454, <>). + cast(5454, <>). %% @spec (Program::integer(),Index::integer(),BufSize::integer()) -> {Size::integer(),Type::enum(),Name::string()} %% @doc See external documentation. getActiveAttrib(Program,Index,BufSize) -> - wxe_util:call(5455, <>). + call(5455, <>). %% @spec (Program::integer(),Index::integer(),BufSize::integer()) -> {Size::integer(),Type::enum(),Name::string()} %% @doc See external documentation. getActiveUniform(Program,Index,BufSize) -> - wxe_util:call(5456, <>). + call(5456, <>). %% @spec (Program::integer(),MaxCount::integer()) -> [integer()] %% @doc See external documentation. getAttachedShaders(Program,MaxCount) -> - wxe_util:call(5457, <>). + call(5457, <>). %% @spec (Program::integer(),Name::string()) -> integer() %% @doc See external documentation. getAttribLocation(Program,Name) -> - wxe_util:call(5458, <>). + call(5458, <>). %% @spec (Program::integer(),Pname::enum()) -> integer() %% @doc See external documentation. getProgramiv(Program,Pname) -> - wxe_util:call(5459, <>). + call(5459, <>). %% @spec (Program::integer(),BufSize::integer()) -> string() %% @doc See external documentation. getProgramInfoLog(Program,BufSize) -> - wxe_util:call(5460, <>). + call(5460, <>). %% @spec (Shader::integer(),Pname::enum()) -> integer() %% @doc See external documentation. getShaderiv(Shader,Pname) -> - wxe_util:call(5461, <>). + call(5461, <>). %% @spec (Shader::integer(),BufSize::integer()) -> string() %% @doc See external documentation. getShaderInfoLog(Shader,BufSize) -> - wxe_util:call(5462, <>). + call(5462, <>). %% @spec (Shader::integer(),BufSize::integer()) -> string() %% @doc See external documentation. getShaderSource(Shader,BufSize) -> - wxe_util:call(5463, <>). + call(5463, <>). %% @spec (Program::integer(),Name::string()) -> integer() %% @doc See external documentation. getUniformLocation(Program,Name) -> - wxe_util:call(5464, <>). + call(5464, <>). %% @spec (Program::integer(),Location::integer()) -> {float()} %% @doc See external documentation. getUniformfv(Program,Location) -> - wxe_util:call(5465, <>). + call(5465, <>). %% @spec (Program::integer(),Location::integer()) -> {integer()} %% @doc See external documentation. getUniformiv(Program,Location) -> - wxe_util:call(5466, <>). + call(5466, <>). %% @spec (Index::integer(),Pname::enum()) -> {float()} %% @doc See external documentation. getVertexAttribdv(Index,Pname) -> - wxe_util:call(5467, <>). + call(5467, <>). %% @spec (Index::integer(),Pname::enum()) -> {float()} %% @doc See external documentation. getVertexAttribfv(Index,Pname) -> - wxe_util:call(5468, <>). + call(5468, <>). %% @spec (Index::integer(),Pname::enum()) -> {integer()} %% @doc See external documentation. getVertexAttribiv(Index,Pname) -> - wxe_util:call(5469, <>). + call(5469, <>). %% @spec (Program::integer()) -> 0|1 %% @doc See external documentation. isProgram(Program) -> - wxe_util:call(5470, <>). + call(5470, <>). %% @spec (Shader::integer()) -> 0|1 %% @doc See external documentation. isShader(Shader) -> - wxe_util:call(5471, <>). + call(5471, <>). %% @spec (Program::integer()) -> ok %% @doc See external documentation. linkProgram(Program) -> - wxe_util:cast(5472, <>). + cast(5472, <>). %% @spec (Shader::integer(),String::[string()]) -> ok %% @doc See external documentation. shaderSource(Shader,String) -> StringTemp = list_to_binary([[Str|[0]] || Str <- String ]), - wxe_util:cast(5473, <>). + cast(5473, <>). %% @spec (Program::integer()) -> ok %% @doc See external documentation. useProgram(Program) -> - wxe_util:cast(5474, <>). + cast(5474, <>). %% @spec (Location::integer(),V0::float()) -> ok %% @doc See external documentation. uniform1f(Location,V0) -> - wxe_util:cast(5475, <>). + cast(5475, <>). %% @spec (Location::integer(),V0::float(),V1::float()) -> ok %% @doc See external documentation. uniform2f(Location,V0,V1) -> - wxe_util:cast(5476, <>). + cast(5476, <>). %% @spec (Location::integer(),V0::float(),V1::float(),V2::float()) -> ok %% @doc See external documentation. uniform3f(Location,V0,V1,V2) -> - wxe_util:cast(5477, <>). + cast(5477, <>). %% @spec (Location::integer(),V0::float(),V1::float(),V2::float(),V3::float()) -> ok %% @doc See external documentation. uniform4f(Location,V0,V1,V2,V3) -> - wxe_util:cast(5478, <>). + cast(5478, <>). %% @spec (Location::integer(),V0::integer()) -> ok %% @doc See external documentation. uniform1i(Location,V0) -> - wxe_util:cast(5479, <>). + cast(5479, <>). %% @spec (Location::integer(),V0::integer(),V1::integer()) -> ok %% @doc See external documentation. uniform2i(Location,V0,V1) -> - wxe_util:cast(5480, <>). + cast(5480, <>). %% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok %% @doc See external documentation. uniform3i(Location,V0,V1,V2) -> - wxe_util:cast(5481, <>). + cast(5481, <>). %% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok %% @doc See external documentation. uniform4i(Location,V0,V1,V2,V3) -> - wxe_util:cast(5482, <>). + cast(5482, <>). %% @spec (Location::integer(),Value::[float()]) -> ok %% @doc See external documentation. uniform1fv(Location,Value) -> - wxe_util:cast(5483, <> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>). %% @spec (Location::integer(),Value::[{float()}]) -> ok %% @doc See external documentation. uniform2fv(Location,Value) -> - wxe_util:cast(5484, <> || {V1,V2} <- Value>>)/binary>>). %% @spec (Location::integer(),Value::[{float()}]) -> ok %% @doc See external documentation. uniform3fv(Location,Value) -> - wxe_util:cast(5485, <> || {V1,V2,V3} <- Value>>)/binary>>). %% @spec (Location::integer(),Value::[{float()}]) -> ok %% @doc See external documentation. uniform4fv(Location,Value) -> - wxe_util:cast(5486, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). %% @spec (Location::integer(),Value::[integer()]) -> ok %% @doc See external documentation. uniform1iv(Location,Value) -> - wxe_util:cast(5487, <> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>). %% @spec (Location::integer(),Value::[{integer()}]) -> ok %% @doc See external documentation. uniform2iv(Location,Value) -> - wxe_util:cast(5488, <> || {V1,V2} <- Value>>)/binary>>). %% @spec (Location::integer(),Value::[{integer()}]) -> ok %% @doc See external documentation. uniform3iv(Location,Value) -> - wxe_util:cast(5489, <> || {V1,V2,V3} <- Value>>)/binary>>). %% @spec (Location::integer(),Value::[{integer()}]) -> ok %% @doc See external documentation. uniform4iv(Location,Value) -> - wxe_util:cast(5490, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). %% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok %% @doc See external documentation. uniformMatrix2fv(Location,Transpose,Value) -> - wxe_util:cast(5491, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). %% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok %% @doc See external documentation. uniformMatrix3fv(Location,Transpose,Value) -> - wxe_util:cast(5492, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9} <- Value>>)/binary>>). %% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok %% @doc See external documentation. uniformMatrix4fv(Location,Transpose,Value) -> - wxe_util: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. validateProgram(Program) -> - wxe_util:cast(5494, <>). + cast(5494, <>). %% @spec (Index::integer(),X::float()) -> ok %% @doc See external documentation. vertexAttrib1d(Index,X) -> - wxe_util:cast(5495, <>). + cast(5495, <>). %% @spec (Index,{X}) -> ok %% @equiv vertexAttrib1d(Index,X) @@ -2966,7 +2996,7 @@ vertexAttrib1dv(Index,{X}) -> vertexAttrib1d(Index,X). %% @spec (Index::integer(),X::float()) -> ok %% @doc See external documentation. vertexAttrib1f(Index,X) -> - wxe_util:cast(5496, <>). + cast(5496, <>). %% @spec (Index,{X}) -> ok %% @equiv vertexAttrib1f(Index,X) @@ -2975,7 +3005,7 @@ vertexAttrib1fv(Index,{X}) -> vertexAttrib1f(Index,X). %% @spec (Index::integer(),X::integer()) -> ok %% @doc See external documentation. vertexAttrib1s(Index,X) -> - wxe_util:cast(5497, <>). + cast(5497, <>). %% @spec (Index,{X}) -> ok %% @equiv vertexAttrib1s(Index,X) @@ -2984,7 +3014,7 @@ vertexAttrib1sv(Index,{X}) -> vertexAttrib1s(Index,X). %% @spec (Index::integer(),X::float(),Y::float()) -> ok %% @doc See external documentation. vertexAttrib2d(Index,X,Y) -> - wxe_util:cast(5498, <>). + cast(5498, <>). %% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttrib2d(Index,X,Y) @@ -2993,7 +3023,7 @@ vertexAttrib2dv(Index,{X,Y}) -> vertexAttrib2d(Index,X,Y). %% @spec (Index::integer(),X::float(),Y::float()) -> ok %% @doc See external documentation. vertexAttrib2f(Index,X,Y) -> - wxe_util:cast(5499, <>). + cast(5499, <>). %% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttrib2f(Index,X,Y) @@ -3002,7 +3032,7 @@ vertexAttrib2fv(Index,{X,Y}) -> vertexAttrib2f(Index,X,Y). %% @spec (Index::integer(),X::integer(),Y::integer()) -> ok %% @doc See external documentation. vertexAttrib2s(Index,X,Y) -> - wxe_util:cast(5500, <>). + cast(5500, <>). %% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttrib2s(Index,X,Y) @@ -3011,7 +3041,7 @@ vertexAttrib2sv(Index,{X,Y}) -> vertexAttrib2s(Index,X,Y). %% @spec (Index::integer(),X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. vertexAttrib3d(Index,X,Y,Z) -> - wxe_util:cast(5501, <>). + cast(5501, <>). %% @spec (Index,{X,Y,Z}) -> ok %% @equiv vertexAttrib3d(Index,X,Y,Z) @@ -3020,7 +3050,7 @@ vertexAttrib3dv(Index,{X,Y,Z}) -> vertexAttrib3d(Index,X,Y,Z). %% @spec (Index::integer(),X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. vertexAttrib3f(Index,X,Y,Z) -> - wxe_util:cast(5502, <>). + cast(5502, <>). %% @spec (Index,{X,Y,Z}) -> ok %% @equiv vertexAttrib3f(Index,X,Y,Z) @@ -3029,7 +3059,7 @@ vertexAttrib3fv(Index,{X,Y,Z}) -> vertexAttrib3f(Index,X,Y,Z). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. vertexAttrib3s(Index,X,Y,Z) -> - wxe_util:cast(5503, <>). + cast(5503, <>). %% @spec (Index,{X,Y,Z}) -> ok %% @equiv vertexAttrib3s(Index,X,Y,Z) @@ -3038,22 +3068,22 @@ vertexAttrib3sv(Index,{X,Y,Z}) -> vertexAttrib3s(Index,X,Y,Z). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4Nbv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5504, <>). + cast(5504, <>). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4Niv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5505, <>). + cast(5505, <>). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4Nsv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5506, <>). + cast(5506, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. vertexAttrib4Nub(Index,X,Y,Z,W) -> - wxe_util:cast(5507, <>). + cast(5507, <>). %% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttrib4Nub(Index,X,Y,Z,W) @@ -3062,22 +3092,22 @@ vertexAttrib4Nubv(Index,{X,Y,Z,W}) -> vertexAttrib4Nub(Index,X,Y,Z,W). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4Nuiv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5508, <>). + cast(5508, <>). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4Nusv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5509, <>). + cast(5509, <>). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4bv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5510, <>). + cast(5510, <>). %% @spec (Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. vertexAttrib4d(Index,X,Y,Z,W) -> - wxe_util:cast(5511, <>). + cast(5511, <>). %% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttrib4d(Index,X,Y,Z,W) @@ -3086,7 +3116,7 @@ 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. vertexAttrib4f(Index,X,Y,Z,W) -> - wxe_util:cast(5512, <>). + cast(5512, <>). %% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttrib4f(Index,X,Y,Z,W) @@ -3095,12 +3125,12 @@ vertexAttrib4fv(Index,{X,Y,Z,W}) -> vertexAttrib4f(Index,X,Y,Z,W). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4iv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5513, <>). + cast(5513, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. vertexAttrib4s(Index,X,Y,Z,W) -> - wxe_util:cast(5514, <>). + cast(5514, <>). %% @spec (Index,{X,Y,Z,W}) -> ok %% @equiv vertexAttrib4s(Index,X,Y,Z,W) @@ -3109,304 +3139,304 @@ vertexAttrib4sv(Index,{X,Y,Z,W}) -> vertexAttrib4s(Index,X,Y,Z,W). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4ubv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5515, <>). + cast(5515, <>). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4uiv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5516, <>). + cast(5516, <>). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttrib4usv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5517, <>). + cast(5517, <>). %% @spec (Index::integer(),Size::integer(),Type::enum(),Normalized::0|1,Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. vertexAttribPointer(Index,Size,Type,Normalized,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5518, <>); + cast(5518, <>); vertexAttribPointer(Index,Size,Type,Normalized,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5519, <>). + send_bin(Pointer), + cast(5519, <>). %% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok %% @doc See external documentation. uniformMatrix2x3fv(Location,Transpose,Value) -> - wxe_util:cast(5520, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). %% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok %% @doc See external documentation. uniformMatrix3x2fv(Location,Transpose,Value) -> - wxe_util:cast(5521, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). %% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok %% @doc See external documentation. uniformMatrix2x4fv(Location,Transpose,Value) -> - wxe_util:cast(5522, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). %% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok %% @doc See external documentation. uniformMatrix4x2fv(Location,Transpose,Value) -> - wxe_util:cast(5523, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). %% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok %% @doc See external documentation. uniformMatrix3x4fv(Location,Transpose,Value) -> - wxe_util:cast(5524, <> || {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12} <- Value>>)/binary>>). %% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok %% @doc See external documentation. uniformMatrix4x3fv(Location,Transpose,Value) -> - wxe_util: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. colorMaski(Index,R,G,B,A) -> - wxe_util:cast(5526, <>). + cast(5526, <>). %% @spec (Target::enum(),Index::integer()) -> [0|1] %% @doc See external documentation. getBooleani_v(Target,Index) -> - wxe_util:call(5527, <>). + call(5527, <>). %% @spec (Target::enum(),Index::integer()) -> [integer()] %% @doc See external documentation. getIntegeri_v(Target,Index) -> - wxe_util:call(5528, <>). + call(5528, <>). %% @spec (Target::enum(),Index::integer()) -> ok %% @doc See external documentation. enablei(Target,Index) -> - wxe_util:cast(5529, <>). + cast(5529, <>). %% @spec (Target::enum(),Index::integer()) -> ok %% @doc See external documentation. disablei(Target,Index) -> - wxe_util:cast(5530, <>). + cast(5530, <>). %% @spec (Target::enum(),Index::integer()) -> 0|1 %% @doc See external documentation. isEnabledi(Target,Index) -> - wxe_util:call(5531, <>). + call(5531, <>). %% @spec (PrimitiveMode::enum()) -> ok %% @doc See external documentation. beginTransformFeedback(PrimitiveMode) -> - wxe_util:cast(5532, <>). + cast(5532, <>). %% @spec () -> ok %% @doc See external documentation. endTransformFeedback() -> - wxe_util:cast(5533, <<>>). + cast(5533, <<>>). %% @spec (Target::enum(),Index::integer(),Buffer::integer(),Offset::integer(),Size::integer()) -> ok %% @doc See external documentation. bindBufferRange(Target,Index,Buffer,Offset,Size) -> - wxe_util:cast(5534, <>). + cast(5534, <>). %% @spec (Target::enum(),Index::integer(),Buffer::integer()) -> ok %% @doc See external documentation. bindBufferBase(Target,Index,Buffer) -> - wxe_util:cast(5535, <>). + cast(5535, <>). %% @spec (Program::integer(),Varyings::[string()],BufferMode::enum()) -> ok %% @doc See external documentation. transformFeedbackVaryings(Program,Varyings,BufferMode) -> VaryingsTemp = list_to_binary([[Str|[0]] || Str <- Varyings ]), - wxe_util:cast(5536, <>). + cast(5536, <>). %% @spec (Program::integer(),Index::integer(),BufSize::integer()) -> {Size::integer(),Type::enum(),Name::string()} %% @doc See external documentation. getTransformFeedbackVarying(Program,Index,BufSize) -> - wxe_util:call(5537, <>). + call(5537, <>). %% @spec (Target::enum(),Clamp::enum()) -> ok %% @doc See external documentation. clampColor(Target,Clamp) -> - wxe_util:cast(5538, <>). + cast(5538, <>). %% @spec (Id::integer(),Mode::enum()) -> ok %% @doc See external documentation. beginConditionalRender(Id,Mode) -> - wxe_util:cast(5539, <>). + cast(5539, <>). %% @spec () -> ok %% @doc See external documentation. endConditionalRender() -> - wxe_util:cast(5540, <<>>). + cast(5540, <<>>). %% @spec (Index::integer(),Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok %% @doc See external documentation. vertexAttribIPointer(Index,Size,Type,Stride,Pointer) when is_integer(Pointer) -> - wxe_util:cast(5541, <>); + cast(5541, <>); vertexAttribIPointer(Index,Size,Type,Stride,Pointer) -> - wxe_util:send_bin(Pointer), - wxe_util:cast(5542, <>). + send_bin(Pointer), + cast(5542, <>). %% @spec (Index::integer(),Pname::enum()) -> {integer()} %% @doc See external documentation. getVertexAttribIiv(Index,Pname) -> - wxe_util:call(5543, <>). + call(5543, <>). %% @spec (Index::integer(),Pname::enum()) -> {integer()} %% @doc See external documentation. getVertexAttribIuiv(Index,Pname) -> - wxe_util:call(5544, <>). + call(5544, <>). %% @spec (Program::integer(),Location::integer()) -> {integer()} %% @doc See external documentation. getUniformuiv(Program,Location) -> - wxe_util:call(5545, <>). + call(5545, <>). %% @spec (Program::integer(),Color::integer(),Name::string()) -> ok %% @doc See external documentation. bindFragDataLocation(Program,Color,Name) -> - wxe_util:cast(5546, <>). + cast(5546, <>). %% @spec (Program::integer(),Name::string()) -> integer() %% @doc See external documentation. getFragDataLocation(Program,Name) -> - wxe_util:call(5547, <>). + call(5547, <>). %% @spec (Location::integer(),V0::integer()) -> ok %% @doc See external documentation. uniform1ui(Location,V0) -> - wxe_util:cast(5548, <>). + cast(5548, <>). %% @spec (Location::integer(),V0::integer(),V1::integer()) -> ok %% @doc See external documentation. uniform2ui(Location,V0,V1) -> - wxe_util:cast(5549, <>). + cast(5549, <>). %% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok %% @doc See external documentation. uniform3ui(Location,V0,V1,V2) -> - wxe_util:cast(5550, <>). + cast(5550, <>). %% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok %% @doc See external documentation. uniform4ui(Location,V0,V1,V2,V3) -> - wxe_util:cast(5551, <>). + cast(5551, <>). %% @spec (Location::integer(),Value::[integer()]) -> ok %% @doc See external documentation. uniform1uiv(Location,Value) -> - wxe_util:cast(5552, <> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>). %% @spec (Location::integer(),Value::[{integer()}]) -> ok %% @doc See external documentation. uniform2uiv(Location,Value) -> - wxe_util:cast(5553, <> || {V1,V2} <- Value>>)/binary>>). %% @spec (Location::integer(),Value::[{integer()}]) -> ok %% @doc See external documentation. uniform3uiv(Location,Value) -> - wxe_util:cast(5554, <> || {V1,V2,V3} <- Value>>)/binary>>). %% @spec (Location::integer(),Value::[{integer()}]) -> ok %% @doc See external documentation. uniform4uiv(Location,Value) -> - wxe_util:cast(5555, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). %% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. texParameterIiv(Target,Pname,Params) -> - wxe_util:cast(5556, <> ||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. texParameterIuiv(Target,Pname,Params) -> - wxe_util:cast(5557, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getTexParameterIiv(Target,Pname) -> - wxe_util:call(5558, <>). + call(5558, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. getTexParameterIuiv(Target,Pname) -> - wxe_util:call(5559, <>). + call(5559, <>). %% @spec (Buffer::enum(),Drawbuffer::integer(),Value::{integer()}) -> ok %% @doc See external documentation. clearBufferiv(Buffer,Drawbuffer,Value) -> - wxe_util:cast(5560, <> ||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. clearBufferuiv(Buffer,Drawbuffer,Value) -> - wxe_util:cast(5561, <> ||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. clearBufferfv(Buffer,Drawbuffer,Value) -> - wxe_util:cast(5562, <> ||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. clearBufferfi(Buffer,Drawbuffer,Depth,Stencil) -> - wxe_util:cast(5563, <>). + cast(5563, <>). %% @spec (Name::enum(),Index::integer()) -> string() %% @doc See external documentation. getStringi(Name,Index) -> - wxe_util:call(5564, <>). + call(5564, <>). %% @spec (Index::integer(),X::integer()) -> ok %% @doc See external documentation. vertexAttribI1i(Index,X) -> - wxe_util:cast(5565, <>). + cast(5565, <>). %% @spec (Index::integer(),X::integer(),Y::integer()) -> ok %% @doc See external documentation. vertexAttribI2i(Index,X,Y) -> - wxe_util:cast(5566, <>). + cast(5566, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. vertexAttribI3i(Index,X,Y,Z) -> - wxe_util:cast(5567, <>). + cast(5567, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. vertexAttribI4i(Index,X,Y,Z,W) -> - wxe_util:cast(5568, <>). + cast(5568, <>). %% @spec (Index::integer(),X::integer()) -> ok %% @doc See external documentation. vertexAttribI1ui(Index,X) -> - wxe_util:cast(5569, <>). + cast(5569, <>). %% @spec (Index::integer(),X::integer(),Y::integer()) -> ok %% @doc See external documentation. vertexAttribI2ui(Index,X,Y) -> - wxe_util:cast(5570, <>). + cast(5570, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. vertexAttribI3ui(Index,X,Y,Z) -> - wxe_util:cast(5571, <>). + cast(5571, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. vertexAttribI4ui(Index,X,Y,Z,W) -> - wxe_util:cast(5572, <>). + cast(5572, <>). %% @spec (Index,{X}) -> ok %% @equiv vertexAttribI1i(Index,X) @@ -3443,553 +3473,553 @@ vertexAttribI4uiv(Index,{X,Y,Z,W}) -> vertexAttribI4ui(Index,X,Y,Z,W). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttribI4bv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5573, <>). + cast(5573, <>). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttribI4sv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5574, <>). + cast(5574, <>). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttribI4ubv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5575, <>). + cast(5575, <>). %% @spec (Index::integer(),V::{integer()}) -> ok %% @doc See external documentation. vertexAttribI4usv(Index,{V1,V2,V3,V4}) -> - wxe_util:cast(5576, <>). + cast(5576, <>). %% @spec (Mode::enum(),First::integer(),Count::integer(),Primcount::integer()) -> ok %% @doc See external documentation. drawArraysInstanced(Mode,First,Count,Primcount) -> - wxe_util:cast(5577, <>). + cast(5577, <>). %% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|binary(),Primcount::integer()) -> ok %% @doc See external documentation. drawElementsInstanced(Mode,Count,Type,Indices,Primcount) when is_integer(Indices) -> - wxe_util:cast(5578, <>); + cast(5578, <>); drawElementsInstanced(Mode,Count,Type,Indices,Primcount) -> - wxe_util:send_bin(Indices), - wxe_util:cast(5579, <>). + send_bin(Indices), + cast(5579, <>). %% @spec (Target::enum(),Internalformat::enum(),Buffer::integer()) -> ok %% @doc See external documentation. texBuffer(Target,Internalformat,Buffer) -> - wxe_util:cast(5580, <>). + cast(5580, <>). %% @spec (Index::integer()) -> ok %% @doc See external documentation. primitiveRestartIndex(Index) -> - wxe_util:cast(5581, <>). + cast(5581, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5582, <>); + cast(5582, <>); loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5582, <>). + cast(5582, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5583, <>); + cast(5583, <>); loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5583, <>). + cast(5583, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5584, <>); + cast(5584, <>); multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5584, <>). + cast(5584, <>). %% @spec (M::{float()}) -> ok %% @doc See external documentation. multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - wxe_util:cast(5585, <>); + cast(5585, <>); multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - wxe_util:cast(5585, <>). + cast(5585, <>). %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. weightbvARB(Weights) -> - wxe_util:cast(5586, <<(length(Weights)):?GLuint, + cast(5586, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:((8-((length(Weights)+ 4) rem 8)) rem 8)>>). %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. weightsvARB(Weights) -> - wxe_util:cast(5587, <<(length(Weights)):?GLuint, + cast(5587, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:((8-((length(Weights)*2+ 4) rem 8)) rem 8)>>). %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. weightivARB(Weights) -> - wxe_util:cast(5588, <<(length(Weights)):?GLuint, + cast(5588, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>). %% @spec (Weights::[float()]) -> ok %% @doc See external documentation. weightfvARB(Weights) -> - wxe_util:cast(5589, <<(length(Weights)):?GLuint, + cast(5589, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>). %% @spec (Weights::[float()]) -> ok %% @doc See external documentation. weightdvARB(Weights) -> - wxe_util:cast(5590, <<(length(Weights)):?GLuint,0:32, + cast(5590, <<(length(Weights)):?GLuint,0:32, (<< <> || C <- Weights>>)/binary>>). %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. weightubvARB(Weights) -> - wxe_util:cast(5591, <<(length(Weights)):?GLuint, + cast(5591, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:((8-((length(Weights)+ 4) rem 8)) rem 8)>>). %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. weightusvARB(Weights) -> - wxe_util:cast(5592, <<(length(Weights)):?GLuint, + cast(5592, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:((8-((length(Weights)*2+ 4) rem 8)) rem 8)>>). %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. weightuivARB(Weights) -> - wxe_util:cast(5593, <<(length(Weights)):?GLuint, + cast(5593, <<(length(Weights)):?GLuint, (<< <> || C <- Weights>>)/binary,0:(((1+length(Weights)) rem 2)*32)>>). %% @spec (Count::integer()) -> ok %% @doc See external documentation. vertexBlendARB(Count) -> - wxe_util:cast(5594, <>). + cast(5594, <>). %% @spec (Index::integer()) -> ok %% @doc See external documentation. currentPaletteMatrixARB(Index) -> - wxe_util:cast(5595, <>). + cast(5595, <>). %% @spec (Indices::[integer()]) -> ok %% @doc See external documentation. matrixIndexubvARB(Indices) -> - wxe_util:cast(5596, <<(length(Indices)):?GLuint, + cast(5596, <<(length(Indices)):?GLuint, (<< <> || C <- Indices>>)/binary,0:((8-((length(Indices)+ 4) rem 8)) rem 8)>>). %% @spec (Indices::[integer()]) -> ok %% @doc See external documentation. matrixIndexusvARB(Indices) -> - wxe_util:cast(5597, <<(length(Indices)):?GLuint, + cast(5597, <<(length(Indices)):?GLuint, (<< <> || C <- Indices>>)/binary,0:((8-((length(Indices)*2+ 4) rem 8)) rem 8)>>). %% @spec (Indices::[integer()]) -> ok %% @doc See external documentation. matrixIndexuivARB(Indices) -> - wxe_util:cast(5598, <<(length(Indices)):?GLuint, + cast(5598, <<(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. programStringARB(Target,Format,String) -> - wxe_util:cast(5599, <>). + cast(5599, <>). %% @spec (Target::enum(),Program::integer()) -> ok %% @doc See external documentation. bindProgramARB(Target,Program) -> - wxe_util:cast(5600, <>). + cast(5600, <>). %% @spec (Programs::[integer()]) -> ok %% @doc See external documentation. deleteProgramsARB(Programs) -> - wxe_util:cast(5601, <<(length(Programs)):?GLuint, + cast(5601, <<(length(Programs)):?GLuint, (<< <> || C <- Programs>>)/binary,0:(((1+length(Programs)) rem 2)*32)>>). %% @spec (N::integer()) -> [integer()] %% @doc See external documentation. genProgramsARB(N) -> - wxe_util:call(5602, <>). + call(5602, <>). %% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. programEnvParameter4dARB(Target,Index,X,Y,Z,W) -> - wxe_util:cast(5603, <>). + cast(5603, <>). %% @spec (Target::enum(),Index::integer(),Params::{float()}) -> ok %% @doc See external documentation. programEnvParameter4dvARB(Target,Index,{P1,P2,P3,P4}) -> - wxe_util:cast(5604, <>). + cast(5604, <>). %% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. programEnvParameter4fARB(Target,Index,X,Y,Z,W) -> - wxe_util:cast(5605, <>). + cast(5605, <>). %% @spec (Target::enum(),Index::integer(),Params::{float()}) -> ok %% @doc See external documentation. programEnvParameter4fvARB(Target,Index,{P1,P2,P3,P4}) -> - wxe_util:cast(5606, <>). + cast(5606, <>). %% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. programLocalParameter4dARB(Target,Index,X,Y,Z,W) -> - wxe_util:cast(5607, <>). + cast(5607, <>). %% @spec (Target::enum(),Index::integer(),Params::{float()}) -> ok %% @doc See external documentation. programLocalParameter4dvARB(Target,Index,{P1,P2,P3,P4}) -> - wxe_util:cast(5608, <>). + cast(5608, <>). %% @spec (Target::enum(),Index::integer(),X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. programLocalParameter4fARB(Target,Index,X,Y,Z,W) -> - wxe_util:cast(5609, <>). + cast(5609, <>). %% @spec (Target::enum(),Index::integer(),Params::{float()}) -> ok %% @doc See external documentation. programLocalParameter4fvARB(Target,Index,{P1,P2,P3,P4}) -> - wxe_util:cast(5610, <>). + cast(5610, <>). %% @spec (Target::enum(),Index::integer()) -> {float()} %% @doc See external documentation. getProgramEnvParameterdvARB(Target,Index) -> - wxe_util:call(5611, <>). + call(5611, <>). %% @spec (Target::enum(),Index::integer()) -> {float()} %% @doc See external documentation. getProgramEnvParameterfvARB(Target,Index) -> - wxe_util:call(5612, <>). + call(5612, <>). %% @spec (Target::enum(),Index::integer()) -> {float()} %% @doc See external documentation. getProgramLocalParameterdvARB(Target,Index) -> - wxe_util:call(5613, <>). + call(5613, <>). %% @spec (Target::enum(),Index::integer()) -> {float()} %% @doc See external documentation. getProgramLocalParameterfvARB(Target,Index) -> - wxe_util:call(5614, <>). + call(5614, <>). -%% @spec (Target::enum(),Pname::enum(),String::wx:wx_mem()) -> ok +%% @spec (Target::enum(),Pname::enum(),String::mem()) -> ok %% @doc See external documentation. getProgramStringARB(Target,Pname,String) -> - wxe_util:send_bin(String#wx_mem.bin), - wxe_util:call(5615, <>). + send_bin(String), + call(5615, <>). %% @spec (Obj::integer()) -> ok %% @doc See external documentation. deleteObjectARB(Obj) -> - wxe_util:cast(5616, <>). + cast(5616, <>). %% @spec (Pname::enum()) -> integer() %% @doc See external documentation. getHandleARB(Pname) -> - wxe_util:call(5617, <>). + call(5617, <>). %% @spec (ContainerObj::integer(),AttachedObj::integer()) -> ok %% @doc See external documentation. detachObjectARB(ContainerObj,AttachedObj) -> - wxe_util:cast(5618, <>). + cast(5618, <>). %% @spec (ShaderType::enum()) -> integer() %% @doc See external documentation. createShaderObjectARB(ShaderType) -> - wxe_util:call(5619, <>). + call(5619, <>). %% @spec (ShaderObj::integer(),String::[string()]) -> ok %% @doc See external documentation. shaderSourceARB(ShaderObj,String) -> StringTemp = list_to_binary([[Str|[0]] || Str <- String ]), - wxe_util:cast(5620, <>). + cast(5620, <>). %% @spec (ShaderObj::integer()) -> ok %% @doc See external documentation. compileShaderARB(ShaderObj) -> - wxe_util:cast(5621, <>). + cast(5621, <>). %% @spec () -> integer() %% @doc See external documentation. createProgramObjectARB() -> - wxe_util:call(5622, <<>>). + call(5622, <<>>). %% @spec (ContainerObj::integer(),Obj::integer()) -> ok %% @doc See external documentation. attachObjectARB(ContainerObj,Obj) -> - wxe_util:cast(5623, <>). + cast(5623, <>). %% @spec (ProgramObj::integer()) -> ok %% @doc See external documentation. linkProgramARB(ProgramObj) -> - wxe_util:cast(5624, <>). + cast(5624, <>). %% @spec (ProgramObj::integer()) -> ok %% @doc See external documentation. useProgramObjectARB(ProgramObj) -> - wxe_util:cast(5625, <>). + cast(5625, <>). %% @spec (ProgramObj::integer()) -> ok %% @doc See external documentation. validateProgramARB(ProgramObj) -> - wxe_util:cast(5626, <>). + cast(5626, <>). %% @spec (Obj::integer(),Pname::enum()) -> float() %% @doc See external documentation. getObjectParameterfvARB(Obj,Pname) -> - wxe_util:call(5627, <>). + call(5627, <>). %% @spec (Obj::integer(),Pname::enum()) -> integer() %% @doc See external documentation. getObjectParameterivARB(Obj,Pname) -> - wxe_util:call(5628, <>). + call(5628, <>). %% @spec (Obj::integer(),MaxLength::integer()) -> string() %% @doc See external documentation. getInfoLogARB(Obj,MaxLength) -> - wxe_util:call(5629, <>). + call(5629, <>). %% @spec (ContainerObj::integer(),MaxCount::integer()) -> [integer()] %% @doc See external documentation. getAttachedObjectsARB(ContainerObj,MaxCount) -> - wxe_util:call(5630, <>). + call(5630, <>). %% @spec (ProgramObj::integer(),Name::string()) -> integer() %% @doc See external documentation. getUniformLocationARB(ProgramObj,Name) -> - wxe_util:call(5631, <>). + call(5631, <>). %% @spec (ProgramObj::integer(),Index::integer(),MaxLength::integer()) -> {Size::integer(),Type::enum(),Name::string()} %% @doc See external documentation. getActiveUniformARB(ProgramObj,Index,MaxLength) -> - wxe_util:call(5632, <>). + call(5632, <>). %% @spec (ProgramObj::integer(),Location::integer()) -> {float()} %% @doc See external documentation. getUniformfvARB(ProgramObj,Location) -> - wxe_util:call(5633, <>). + call(5633, <>). %% @spec (ProgramObj::integer(),Location::integer()) -> {integer()} %% @doc See external documentation. getUniformivARB(ProgramObj,Location) -> - wxe_util:call(5634, <>). + call(5634, <>). %% @spec (Obj::integer(),MaxLength::integer()) -> string() %% @doc See external documentation. getShaderSourceARB(Obj,MaxLength) -> - wxe_util:call(5635, <>). + call(5635, <>). %% @spec (ProgramObj::integer(),Index::integer(),Name::string()) -> ok %% @doc See external documentation. bindAttribLocationARB(ProgramObj,Index,Name) -> - wxe_util:cast(5636, <>). + cast(5636, <>). %% @spec (ProgramObj::integer(),Index::integer(),MaxLength::integer()) -> {Size::integer(),Type::enum(),Name::string()} %% @doc See external documentation. getActiveAttribARB(ProgramObj,Index,MaxLength) -> - wxe_util:call(5637, <>). + call(5637, <>). %% @spec (ProgramObj::integer(),Name::string()) -> integer() %% @doc See external documentation. getAttribLocationARB(ProgramObj,Name) -> - wxe_util:call(5638, <>). + call(5638, <>). %% @spec (Renderbuffer::integer()) -> 0|1 %% @doc See external documentation. isRenderbuffer(Renderbuffer) -> - wxe_util:call(5639, <>). + call(5639, <>). %% @spec (Target::enum(),Renderbuffer::integer()) -> ok %% @doc See external documentation. bindRenderbuffer(Target,Renderbuffer) -> - wxe_util:cast(5640, <>). + cast(5640, <>). %% @spec (Renderbuffers::[integer()]) -> ok %% @doc See external documentation. deleteRenderbuffers(Renderbuffers) -> - wxe_util:cast(5641, <<(length(Renderbuffers)):?GLuint, + cast(5641, <<(length(Renderbuffers)):?GLuint, (<< <> || C <- Renderbuffers>>)/binary,0:(((1+length(Renderbuffers)) rem 2)*32)>>). %% @spec (N::integer()) -> [integer()] %% @doc See external documentation. genRenderbuffers(N) -> - wxe_util:call(5642, <>). + call(5642, <>). %% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer()) -> ok %% @doc See external documentation. renderbufferStorage(Target,Internalformat,Width,Height) -> - wxe_util:cast(5643, <>). + cast(5643, <>). %% @spec (Target::enum(),Pname::enum()) -> integer() %% @doc See external documentation. getRenderbufferParameteriv(Target,Pname) -> - wxe_util:call(5644, <>). + call(5644, <>). %% @spec (Framebuffer::integer()) -> 0|1 %% @doc See external documentation. isFramebuffer(Framebuffer) -> - wxe_util:call(5645, <>). + call(5645, <>). %% @spec (Target::enum(),Framebuffer::integer()) -> ok %% @doc See external documentation. bindFramebuffer(Target,Framebuffer) -> - wxe_util:cast(5646, <>). + cast(5646, <>). %% @spec (Framebuffers::[integer()]) -> ok %% @doc See external documentation. deleteFramebuffers(Framebuffers) -> - wxe_util:cast(5647, <<(length(Framebuffers)):?GLuint, + cast(5647, <<(length(Framebuffers)):?GLuint, (<< <> || C <- Framebuffers>>)/binary,0:(((1+length(Framebuffers)) rem 2)*32)>>). %% @spec (N::integer()) -> [integer()] %% @doc See external documentation. genFramebuffers(N) -> - wxe_util:call(5648, <>). + call(5648, <>). %% @spec (Target::enum()) -> enum() %% @doc See external documentation. checkFramebufferStatus(Target) -> - wxe_util:call(5649, <>). + call(5649, <>). %% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer()) -> ok %% @doc See external documentation. framebufferTexture1D(Target,Attachment,Textarget,Texture,Level) -> - wxe_util:cast(5650, <>). + cast(5650, <>). %% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer()) -> ok %% @doc See external documentation. framebufferTexture2D(Target,Attachment,Textarget,Texture,Level) -> - wxe_util:cast(5651, <>). + cast(5651, <>). %% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer(),Zoffset::integer()) -> ok %% @doc See external documentation. framebufferTexture3D(Target,Attachment,Textarget,Texture,Level,Zoffset) -> - wxe_util:cast(5652, <>). + cast(5652, <>). %% @spec (Target::enum(),Attachment::enum(),Renderbuffertarget::enum(),Renderbuffer::integer()) -> ok %% @doc See external documentation. framebufferRenderbuffer(Target,Attachment,Renderbuffertarget,Renderbuffer) -> - wxe_util:cast(5653, <>). + cast(5653, <>). %% @spec (Target::enum(),Attachment::enum(),Pname::enum()) -> integer() %% @doc See external documentation. getFramebufferAttachmentParameteriv(Target,Attachment,Pname) -> - wxe_util:call(5654, <>). + call(5654, <>). %% @spec (Target::enum()) -> ok %% @doc See external documentation. generateMipmap(Target) -> - wxe_util:cast(5655, <>). + cast(5655, <>). %% @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. blitFramebuffer(SrcX0,SrcY0,SrcX1,SrcY1,DstX0,DstY0,DstX1,DstY1,Mask,Filter) -> - wxe_util:cast(5656, <>). + cast(5656, <>). %% @spec (Target::enum(),Samples::integer(),Internalformat::enum(),Width::integer(),Height::integer()) -> ok %% @doc See external documentation. renderbufferStorageMultisample(Target,Samples,Internalformat,Width,Height) -> - wxe_util:cast(5657, <>). + cast(5657, <>). %% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer(),Layer::integer()) -> ok %% @doc See external documentation. framebufferTextureLayer(Target,Attachment,Texture,Level,Layer) -> - wxe_util:cast(5658, <>). + cast(5658, <>). %% @spec (Program::integer(),Pname::enum(),Value::integer()) -> ok %% @doc See external documentation. programParameteriARB(Program,Pname,Value) -> - wxe_util:cast(5659, <>). + cast(5659, <>). %% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer()) -> ok %% @doc See external documentation. framebufferTextureARB(Target,Attachment,Texture,Level) -> - wxe_util:cast(5660, <>). + cast(5660, <>). %% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer(),Face::enum()) -> ok %% @doc See external documentation. framebufferTextureFaceARB(Target,Attachment,Texture,Level,Face) -> - wxe_util:cast(5661, <>). + cast(5661, <>). %% @spec (Index::integer(),Divisor::integer()) -> ok %% @doc See external documentation. vertexAttribDivisorARB(Index,Divisor) -> - wxe_util:cast(5662, <>). + cast(5662, <>). %% @spec (Target::enum(),Offset::integer(),Length::integer()) -> ok %% @doc See external documentation. flushMappedBufferRange(Target,Offset,Length) -> - wxe_util:cast(5663, <>). + cast(5663, <>). %% @spec (Array::integer()) -> ok %% @doc See external documentation. bindVertexArray(Array) -> - wxe_util:cast(5664, <>). + cast(5664, <>). %% @spec (Arrays::[integer()]) -> ok %% @doc See external documentation. deleteVertexArrays(Arrays) -> - wxe_util:cast(5665, <<(length(Arrays)):?GLuint, + cast(5665, <<(length(Arrays)):?GLuint, (<< <> || C <- Arrays>>)/binary,0:(((1+length(Arrays)) rem 2)*32)>>). %% @spec (N::integer()) -> [integer()] %% @doc See external documentation. genVertexArrays(N) -> - wxe_util:call(5666, <>). + call(5666, <>). %% @spec (Array::integer()) -> 0|1 %% @doc See external documentation. isVertexArray(Array) -> - wxe_util:call(5667, <>). + call(5667, <>). %% @spec (Program::integer(),UniformNames::[string()]) -> [integer()] %% @doc See external documentation. getUniformIndices(Program,UniformNames) -> UniformNamesTemp = list_to_binary([[Str|[0]] || Str <- UniformNames ]), - wxe_util:call(5668, <>). + call(5668, <>). %% @spec (Program::integer(),UniformIndices::[integer()],Pname::enum()) -> [integer()] %% @doc See external documentation. getActiveUniformsiv(Program,UniformIndices,Pname) -> - wxe_util:call(5669, <> || C <- UniformIndices>>)/binary,0:(((length(UniformIndices)) rem 2)*32),Pname:?GLenum>>). %% @spec (Program::integer(),UniformIndex::integer(),BufSize::integer()) -> string() %% @doc See external documentation. getActiveUniformName(Program,UniformIndex,BufSize) -> - wxe_util:call(5670, <>). + call(5670, <>). %% @spec (Program::integer(),UniformBlockName::string()) -> integer() %% @doc See external documentation. getUniformBlockIndex(Program,UniformBlockName) -> - wxe_util:call(5671, <>). + call(5671, <>). -%% @spec (Program::integer(),UniformBlockIndex::integer(),Pname::enum(),Params::wx:wx_mem()) -> ok +%% @spec (Program::integer(),UniformBlockIndex::integer(),Pname::enum(),Params::mem()) -> ok %% @doc See external documentation. getActiveUniformBlockiv(Program,UniformBlockIndex,Pname,Params) -> - wxe_util:send_bin(Params#wx_mem.bin), - wxe_util:call(5672, <>). + send_bin(Params), + call(5672, <>). %% @spec (Program::integer(),UniformBlockIndex::integer(),BufSize::integer()) -> string() %% @doc See external documentation. getActiveUniformBlockName(Program,UniformBlockIndex,BufSize) -> - wxe_util:call(5673, <>). + call(5673, <>). %% @spec (Program::integer(),UniformBlockIndex::integer(),UniformBlockBinding::integer()) -> ok %% @doc See external documentation. uniformBlockBinding(Program,UniformBlockIndex,UniformBlockBinding) -> - wxe_util:cast(5674, <>). + cast(5674, <>). %% @spec (ReadTarget::enum(),WriteTarget::enum(),ReadOffset::integer(),WriteOffset::integer(),Size::integer()) -> ok %% @doc See external documentation. copyBufferSubData(ReadTarget,WriteTarget,ReadOffset,WriteOffset,Size) -> - wxe_util:cast(5675, <>). + cast(5675, <>). %% @spec () -> ok %% @doc See external documentation. resizeBuffersMESA() -> - wxe_util:cast(5676, <<>>). + cast(5676, <<>>). %% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. windowPos4dMESA(X,Y,Z,W) -> - wxe_util:cast(5677, <>). + cast(5677, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv windowPos4dMESA(X,Y,Z,W) @@ -3998,7 +4028,7 @@ windowPos4dvMESA({X,Y,Z,W}) -> windowPos4dMESA(X,Y,Z,W). %% @spec (X::float(),Y::float(),Z::float(),W::float()) -> ok %% @doc See external documentation. windowPos4fMESA(X,Y,Z,W) -> - wxe_util:cast(5678, <>). + cast(5678, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv windowPos4fMESA(X,Y,Z,W) @@ -4007,7 +4037,7 @@ windowPos4fvMESA({X,Y,Z,W}) -> windowPos4fMESA(X,Y,Z,W). %% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. windowPos4iMESA(X,Y,Z,W) -> - wxe_util:cast(5679, <>). + cast(5679, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv windowPos4iMESA(X,Y,Z,W) @@ -4016,7 +4046,7 @@ windowPos4ivMESA({X,Y,Z,W}) -> windowPos4iMESA(X,Y,Z,W). %% @spec (X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. windowPos4sMESA(X,Y,Z,W) -> - wxe_util:cast(5680, <>). + cast(5680, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv windowPos4sMESA(X,Y,Z,W) @@ -4025,10 +4055,10 @@ windowPos4svMESA({X,Y,Z,W}) -> windowPos4sMESA(X,Y,Z,W). %% @spec (Zmin::clamp(),Zmax::clamp()) -> ok %% @doc See external documentation. depthBoundsEXT(Zmin,Zmax) -> - wxe_util:cast(5681, <>). + cast(5681, <>). %% @spec (StencilTagBits::integer(),StencilClearTag::integer()) -> ok %% @doc See external documentation. stencilClearTagEXT(StencilTagBits,StencilClearTag) -> - wxe_util:cast(5682, <>). + cast(5682, <>). diff --git a/lib/wx/src/gen/glu.erl b/lib/wx/src/gen/glu.erl index d410c4663d..fc8bfbf8e6 100644 --- a/lib/wx/src/gen/glu.erl +++ b/lib/wx/src/gen/glu.erl @@ -25,14 +25,13 @@ %% %% Booleans are represented by integers 0 and 1. -%% @type wx_mem(). see wx.erl on memory allocation functions +%% @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). --include("wxe.hrl"). -define(GLenum,32/native-unsigned). -define(GLboolean,8/native-unsigned). -define(GLbitfield,32/native-unsigned). @@ -59,7 +58,7 @@ quadricDrawStyle/2,quadricNormals/2,quadricOrientation/2,quadricTexture/2, scaleImage/9,sphere/4,unProject/6,unProject4/9]). - +-import(gl, [call/2,cast/2,send_bin/1]). %% API %% @spec (Vec3, [Vec3]) -> {Triangles, VertexPos} @@ -73,7 +72,7 @@ %% vertex positions, it starts with the vertices in Vs and %% may contain newly created vertices in the end. tesselate({Nx,Ny,Nz}, Vs) -> - wxe_util:call(5000, <<(length(Vs)):32/native,0:32, + call(5000, <<(length(Vs)):32/native,0:32, Nx:?GLdouble,Ny:?GLdouble,Nz:?GLdouble, (<< <> || {Vx,Vy,Vz} <- Vs>>)/binary >>). @@ -81,151 +80,151 @@ tesselate({Nx,Ny,Nz}, Vs) -> %% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Format::enum(),Type::enum(),Level::integer(),Base::integer(),Max::integer(),Data::binary()) -> integer() %% @doc See external documentation. build1DMipmapLevels(Target,InternalFormat,Width,Format,Type,Level,Base,Max,Data) -> - wxe_util:send_bin(Data), - wxe_util:call(5010, <>). + send_bin(Data), + call(5010, <>). %% @spec (Target::enum(),InternalFormat::integer(),Width::integer(),Format::enum(),Type::enum(),Data::binary()) -> integer() %% @doc See external documentation. build1DMipmaps(Target,InternalFormat,Width,Format,Type,Data) -> - wxe_util:send_bin(Data), - wxe_util:call(5011, <>). + 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. build2DMipmapLevels(Target,InternalFormat,Width,Height,Format,Type,Level,Base,Max,Data) -> - wxe_util:send_bin(Data), - wxe_util:call(5012, <>). + 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. build2DMipmaps(Target,InternalFormat,Width,Height,Format,Type,Data) -> - wxe_util:send_bin(Data), - wxe_util:call(5013, <>). + 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. build3DMipmapLevels(Target,InternalFormat,Width,Height,Depth,Format,Type,Level,Base,Max,Data) -> - wxe_util:send_bin(Data), - wxe_util:call(5014, <>). + 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. build3DMipmaps(Target,InternalFormat,Width,Height,Depth,Format,Type,Data) -> - wxe_util:send_bin(Data), - wxe_util:call(5015, <>). + send_bin(Data), + call(5015, <>). %% @spec (ExtName::[integer()],ExtString::[integer()]) -> 0|1 %% @doc See external documentation. checkExtension(ExtName,ExtString) -> - wxe_util:call(5016, <<(length(ExtName)):?GLuint, + call(5016, <<(length(ExtName)):?GLuint, (<< <> || C <- ExtName>>)/binary,0:((8-((length(ExtName)+ 4) rem 8)) rem 8),(length(ExtString)):?GLuint, (<< <> || C <- ExtString>>)/binary,0:((8-((length(ExtString)+ 4) rem 8)) rem 8)>>). %% @spec (Quad::integer(),Base::float(),Top::float(),Height::float(),Slices::integer(),Stacks::integer()) -> ok %% @doc See external documentation. cylinder(Quad,Base,Top,Height,Slices,Stacks) -> - wxe_util:cast(5017, <>). + cast(5017, <>). %% @spec (Quad::integer()) -> ok %% @doc See external documentation. deleteQuadric(Quad) -> - wxe_util:cast(5018, <>). + cast(5018, <>). %% @spec (Quad::integer(),Inner::float(),Outer::float(),Slices::integer(),Loops::integer()) -> ok %% @doc See external documentation. disk(Quad,Inner,Outer,Slices,Loops) -> - wxe_util:cast(5019, <>). + cast(5019, <>). %% @spec (Error::enum()) -> string() %% @doc See external documentation. errorString(Error) -> - wxe_util:call(5020, <>). + call(5020, <>). %% @spec (Name::enum()) -> string() %% @doc See external documentation. getString(Name) -> - wxe_util:call(5021, <>). + 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. lookAt(EyeX,EyeY,EyeZ,CenterX,CenterY,CenterZ,UpX,UpY,UpZ) -> - wxe_util:cast(5022, <>). + cast(5022, <>). %% @spec () -> integer() %% @doc See external documentation. newQuadric() -> - wxe_util:call(5023, <<>>). + call(5023, <<>>). %% @spec (Left::float(),Right::float(),Bottom::float(),Top::float()) -> ok %% @doc See external documentation. ortho2D(Left,Right,Bottom,Top) -> - wxe_util:cast(5024, <>). + cast(5024, <>). %% @spec (Quad::integer(),Inner::float(),Outer::float(),Slices::integer(),Loops::integer(),Start::float(),Sweep::float()) -> ok %% @doc See external documentation. partialDisk(Quad,Inner,Outer,Slices,Loops,Start,Sweep) -> - wxe_util:cast(5025, <>). + cast(5025, <>). %% @spec (Fovy::float(),Aspect::float(),ZNear::float(),ZFar::float()) -> ok %% @doc See external documentation. perspective(Fovy,Aspect,ZNear,ZFar) -> - wxe_util:cast(5026, <>). + cast(5026, <>). %% @spec (X::float(),Y::float(),DelX::float(),DelY::float(),Viewport::{integer()}) -> ok %% @doc See external documentation. pickMatrix(X,Y,DelX,DelY,{V1,V2,V3,V4}) -> - wxe_util:cast(5027, <>). + cast(5027, <>). %% @spec (ObjX::float(),ObjY::float(),ObjZ::float(),Model::{float()},Proj::{float()},View::{integer()}) -> {integer(),WinX::float(),WinY::float(),WinZ::float()} %% @doc See external documentation. 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}) -> - wxe_util:call(5028, <>); + 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}) -> - wxe_util:call(5028, <>). + call(5028, <>). %% @spec (Quad::integer(),Draw::enum()) -> ok %% @doc See external documentation. quadricDrawStyle(Quad,Draw) -> - wxe_util:cast(5029, <>). + cast(5029, <>). %% @spec (Quad::integer(),Normal::enum()) -> ok %% @doc See external documentation. quadricNormals(Quad,Normal) -> - wxe_util:cast(5030, <>). + cast(5030, <>). %% @spec (Quad::integer(),Orientation::enum()) -> ok %% @doc See external documentation. quadricOrientation(Quad,Orientation) -> - wxe_util:cast(5031, <>). + cast(5031, <>). %% @spec (Quad::integer(),Texture::0|1) -> ok %% @doc See external documentation. quadricTexture(Quad,Texture) -> - wxe_util:cast(5032, <>). + cast(5032, <>). -%% @spec (Format::enum(),WIn::integer(),HIn::integer(),TypeIn::enum(),DataIn::binary(),WOut::integer(),HOut::integer(),TypeOut::enum(),DataOut::wx:wx_mem()) -> integer() +%% @spec (Format::enum(),WIn::integer(),HIn::integer(),TypeIn::enum(),DataIn::binary(),WOut::integer(),HOut::integer(),TypeOut::enum(),DataOut::mem()) -> integer() %% @doc See external documentation. scaleImage(Format,WIn,HIn,TypeIn,DataIn,WOut,HOut,TypeOut,DataOut) -> - wxe_util:send_bin(DataIn), - wxe_util:send_bin(DataOut#wx_mem.bin), - wxe_util:call(5033, <>). + send_bin(DataIn), + send_bin(DataOut), + call(5033, <>). %% @spec (Quad::integer(),Radius::float(),Slices::integer(),Stacks::integer()) -> ok %% @doc See external documentation. sphere(Quad,Radius,Slices,Stacks) -> - wxe_util:cast(5034, <>). + cast(5034, <>). %% @spec (WinX::float(),WinY::float(),WinZ::float(),Model::{float()},Proj::{float()},View::{integer()}) -> {integer(),ObjX::float(),ObjY::float(),ObjZ::float()} %% @doc See external documentation. 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}) -> - wxe_util:call(5035, <>); + 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}) -> - wxe_util:call(5035, <>). + call(5035, <>). %% @spec (WinX::float(),WinY::float(),WinZ::float(),ClipW::float(),Model::{float()},Proj::{float()},View::{integer()},NearVal::float(),FarVal::float()) -> {integer(),ObjX::float(),ObjY::float(),ObjZ::float(),ObjW::float()} %% @doc See external documentation. 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) -> - wxe_util:call(5036, <>); + 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) -> - wxe_util:call(5036, <>). + call(5036, <>). diff --git a/lib/wx/src/gen/wxGLCanvas.erl b/lib/wx/src/gen/wxGLCanvas.erl index 3e0d1bd9ae..ed5430dae1 100644 --- a/lib/wx/src/gen/wxGLCanvas.erl +++ b/lib/wx/src/gen/wxGLCanvas.erl @@ -105,6 +105,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options) ({palette, #wx_ref{type=PaletteT,ref=PaletteRef}}, Acc) -> ?CLASS(PaletteT,wxPalette),[<<7:32/?UI,PaletteRef:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_master:init_opengl(), wxe_util:construct(?wxGLCanvas_new_2, <>). @@ -130,6 +131,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=SharedT,ref=SharedRef}, Opt ({palette, #wx_ref{type=PaletteT,ref=PaletteRef}}, Acc) -> ?CLASS(PaletteT,wxPalette),[<<7:32/?UI,PaletteRef:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_master:init_opengl(), wxe_util:construct(SharedOP, <>). diff --git a/lib/wx/src/wx.erl b/lib/wx/src/wx.erl index 14abd0d817..9d76f3bc42 100644 --- a/lib/wx/src/wx.erl +++ b/lib/wx/src/wx.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% Copyright Ericsson AB 2008-2010. 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,7 +96,8 @@ new() -> %% @doc Starts a wx server. %% Option may be {debug, Level}, see debug/1. new(Options) when is_list(Options) -> - #wx_env{} = wxe_server:start(), + #wx_env{port=Port} = wxe_server:start(), + put(opengl_port, Port), Debug = proplists:get_value(debug, Options, 0), debug(Debug), null(). @@ -121,8 +122,9 @@ get_env() -> %% @spec (wx_env()) -> ok %% @doc Sets the process wx environment, allows this process to use %% another process wx environment. -set_env(#wx_env{sv=Pid} = Env) -> - put(?WXE_IDENTIFIER, Env), +set_env(#wx_env{sv=Pid, port=Port} = Env) -> + put(?WXE_IDENTIFIER, Env), + put(opengl_port, Port), %% wxe_util:cast(?REGISTER_PID, <<>>), wxe_server:register_me(Pid), ok. diff --git a/lib/wx/src/wxe.hrl b/lib/wx/src/wxe.hrl index bb70a03bfe..bd34b13385 100644 --- a/lib/wx/src/wxe.hrl +++ b/lib/wx/src/wxe.hrl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% Copyright Ericsson AB 2008-2010. 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 @@ -50,6 +50,8 @@ -define(WXE_CB_START, 8). %% Used for event-callback start -define(WXE_DEBUG_DRIVER, 9). %% Set debug %%-define(WXE_DEBUG_PING, 10). %% debug ping (when using debugger it's needed) --define(WXE_BIN_INCR, 5001). %% Binary refc incr --define(WXE_BIN_DECR, 5002). %% Binary refc decr +-define(WXE_BIN_INCR, 11). %% Binary refc incr +-define(WXE_BIN_DECR, 12). %% Binary refc decr +-define(WXE_INIT_OPENGL, 13). %% Binary refc decr + -include("gen/wxe_funcs.hrl"). diff --git a/lib/wx/src/wxe_master.erl b/lib/wx/src/wxe_master.erl index 5ab76a77cf..bd9511e94d 100644 --- a/lib/wx/src/wxe_master.erl +++ b/lib/wx/src/wxe_master.erl @@ -28,7 +28,7 @@ -behaviour(gen_server). %% API --export([start/0, init_port/0]). +-export([start/0, init_port/0, init_opengl/0]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, @@ -38,6 +38,7 @@ users, %% List of wx servers, needed ?? driver}). %% Driver name so wx_server can create it's own port +-include("wxe.hrl"). -include("gen/wxe_debug.hrl"). -include("gen/gl_debug.hrl"). @@ -74,6 +75,24 @@ init_port() -> receive wx_port_initiated -> ok end, {Port, CBport}. + +%%-------------------------------------------------------------------- +%% Function: start_link() -> {ok,Pid} | ignore | {error,Error} +%% Description: Starts the server +%%-------------------------------------------------------------------- +init_opengl() -> + PrivDir = priv_dir(), + DynLib0 = "erl_gl", + DynLib = case os:type() of + {win32,_} -> + DynLib0 ++ ".dll\0"; + _ -> + DynLib0 ++ ".so\0" + end, + GLLib = filename:join(PrivDir, DynLib), + + wxe_util:call(?WXE_INIT_OPENGL, list_to_binary(GLLib)). + %%==================================================================== %% gen_server callbacks %%==================================================================== -- cgit v1.2.3 From e52cf67a15f51d492cd4d2d3b78301d88ff8ca4b Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 7 Oct 2010 17:32:38 +0200 Subject: Better make dependecies for api generation --- lib/wx/api_gen/Makefile | 13 ++++++------- lib/wx/api_gen/gen_util.erl | 8 ++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/wx/api_gen/Makefile b/lib/wx/api_gen/Makefile index c6b65b60bc..756ec598ce 100644 --- a/lib/wx/api_gen/Makefile +++ b/lib/wx/api_gen/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2008-2009. All Rights Reserved. +# Copyright Ericsson AB 2008-2010. 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 @@ -39,14 +39,14 @@ TARGET_CDIR = ../c_src/gen C_TARGETS = wxe_funcs.cpp GL_C_TARGETS = gl_funcs.cpp -WX = $(TARGET_CDIR)/$(C_TARGETS) +WX = wx_code_generated -GL = $(TARGET_CDIR)/$(GL_C_TARGETS) +GL = gl_code_generated opt: $(WX) $(GL) $(WX): wxxml_generated $(COMPILER_T) wxapi.conf $(wildcard wx_extra/wx*.c_src) $(wildcard wx_extra/wx*.erl) - erl -noshell -run wx_gen code + erl -noshell -run wx_gen code && touch wx_code_generated wxxml_generated: wx_doxygen.conf wx_extra/bugs.h wx_extra/wxe_evth.h sed -e 's|@WXGTK_DIR@|$(WXGTK_DIR)|g' wx_doxygen.conf > wx_doxygen @@ -56,9 +56,8 @@ glxml_generated: gl_doxygen.conf sed -e 's|@GL_DIR@|$(GL_DIR)|g' gl_doxygen.conf > gl_doxygen doxygen gl_doxygen && touch glxml_generated - $(GL): glxml_generated $(GL_COMP_T) glapi.conf - erl -noshell -run gl_gen code + erl -noshell -run gl_gen code && touch gl_code_generated %.beam: %.erl wx_gen.hrl gl_gen.hrl $(ERLC) -W $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) $< -o$(EBIN) @@ -66,7 +65,7 @@ $(GL): glxml_generated $(GL_COMP_T) glapi.conf # TODO split cleans into separate targets? complete_clean: rm -f gl_doxygen wx_doxygen wx_xml/*.x* gl_xml/*.x* - rm -f glxml_generated wxxml_generated + rm -f *_generated $(MAKE) clean clean: rm -f *~ diff --git a/lib/wx/api_gen/gen_util.erl b/lib/wx/api_gen/gen_util.erl index 859317bdef..841e0c9594 100644 --- a/lib/wx/api_gen/gen_util.erl +++ b/lib/wx/api_gen/gen_util.erl @@ -58,10 +58,10 @@ close() -> [] -> ok = file:delete(File ++ ".temp"), %% So that make understands that we have made this - case os:getenv("CLEARCASE_ROOT") of - false -> os:cmd("touch " ++ File); - _ -> ignore - end, + %% case os:getenv("CLEARCASE_ROOT") of + %% false -> os:cmd("touch " ++ File); + %% _ -> ignore + %% end, ok; Diff -> case check_diff(Diff) of -- cgit v1.2.3 From ac433c8318566261a74ffe7fd0824fb99610bed3 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 8 Oct 2010 09:12:00 +0200 Subject: Add dialyser spec --- lib/wx/api_gen/gl_gen.erl | 2 +- lib/wx/api_gen/gl_gen_erl.erl | 85 ++-- lib/wx/src/gen/gl.erl | 991 ++++++++++++++++++++++++++++++++++++------ lib/wx/src/gen/gl_debug.hrl | 697 ----------------------------- lib/wx/src/gen/glu.erl | 37 +- lib/wx/src/wxe_master.erl | 2 - 6 files changed, 962 insertions(+), 852 deletions(-) delete mode 100644 lib/wx/src/gen/gl_debug.hrl diff --git a/lib/wx/api_gen/gl_gen.erl b/lib/wx/api_gen/gl_gen.erl index 42802c6de7..c76dfb75a0 100644 --- a/lib/wx/api_gen/gl_gen.erl +++ b/lib/wx/api_gen/gl_gen.erl @@ -67,7 +67,7 @@ gen_code() -> gl_gen_erl:gl_defines(GLDefines), gl_gen_erl:gl_api(GLFuncs), - gl_gen_erl:gen_debug(GLFuncs,GLUFuncs), + %%gl_gen_erl:gen_debug(GLFuncs,GLUFuncs), gl_gen_c:gen(GLFuncs,GLUFuncs), ok. diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl index 36a6ea2373..8e712b6739 100644 --- a/lib/wx/api_gen/gl_gen_erl.erl +++ b/lib/wx/api_gen/gl_gen_erl.erl @@ -99,7 +99,9 @@ gl_api(Fs) -> 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)]), @@ -159,6 +161,8 @@ glu_api(Fs) -> %%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)]), @@ -207,6 +211,17 @@ gen_funcs(F) -> erase(current_func), w(".~n~n",[]). +gen_types(Where) -> + case Where of + glu -> ignore; + gl -> + w("-type clamp() :: float().~n", []), + w("-type offset() :: non_neg_integer().~n", []) + end, + w("-type enum() :: non_neg_integer().~n", []), + w("-type mem() :: binary() | tuple().~n", []), + ok. + gen_export(F) -> try gen_export_1(F) catch E:R -> @@ -228,19 +243,27 @@ gen_export2(#func{name=Name,params=As0}) -> Args = lists:filter(fun(Arg) -> func_arg(Arg) =/= skip end, As0), erl_func_name(Name) ++ "/" ++ integer_to_list(length(Args)). - -gen_doc([#func{alt={vector,VecPos,Vec}}]) -> +gen_doc([#func{name=Name, alt={vector,VecPos,Vec}}]) -> #func{type=T,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("%% @spec (~s{~s}) -> ~s~n",[Args1,Args2,doc_return_types(T,As)]), - w("%% @equiv ~s(~s)~n",[erl_func_name(Vec), Args1++Args2]); + 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_return_types(T,As)]), + 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)]). + [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)]). + gen_func(#func{name=Name,alt={vector,VecPos,Vec}}) -> #func{params=As} = get(Vec), @@ -278,38 +301,47 @@ func_arg(#arg{in=In,where=W,name=Name,type=Type}) end; func_arg(_) -> skip. -doc_arg_types(Ps0) -> +doc_arg_types(Ps0, Type) -> Ps = [P || P=#arg{in=In, where=Where} <- Ps0,In =/= false, Where =/= c], - args(fun doc_arg_type/1, ",", Ps). + args(fun(Arg) -> doc_arg_type(Arg, Type) end, ",", Ps). -doc_return_types(T, Ps0) -> +doc_return_types(T, Ps0, Type) -> Ps = [P || P=#arg{in=In, where=Where} <- Ps0,In =/= true, Where =/= c], - 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 doc_arg_type/1,",",Ps) ++ "}"; -doc_return_types2(T, Ps) -> - "{" ++ doc_arg_type2(T) ++ "," ++ args(fun doc_arg_type/1,",",Ps) ++ "}". - -doc_arg_type(#arg{name=Name,type=T}) -> + 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) + 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(T=#type{single={tuple,_Sz}}) -> - "{" ++ doc_arg_type3(T) ++ "}"; +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}) -> "[" ++ doc_arg_type3(T) ++ "]"; doc_arg_type2(T=#type{single={list, Max}}) when is_integer(Max) -> @@ -320,14 +352,14 @@ doc_arg_type2(T=#type{base=string}) -> doc_arg_type3(T); doc_arg_type2(T=#type{single={list,_,_}}) -> "[" ++ doc_arg_type3(T) ++ "]"; -doc_arg_type2(T=#type{single={tuple_list,_TSz}}) -> - "[{" ++ doc_arg_type3(T) ++ "}]". +doc_arg_type2(T=#type{single={tuple_list,Sz}}) -> + "[{" ++ args(fun doc_arg_type3/1, ",", lists:duplicate(Sz,T)) ++ "}]". doc_arg_type3(#type{name="GLenum"}) -> "enum()"; doc_arg_type3(#type{name="GLclamp"++_}) -> "clamp()"; doc_arg_type3(#type{base=int}) -> "integer()"; doc_arg_type3(#type{base=float}) -> "float()"; -doc_arg_type3(#type{base=guard_int}) -> "offset()|binary()"; +doc_arg_type3(#type{base=guard_int}) -> "offset()|mem()"; doc_arg_type3(#type{base=string}) -> "string()"; doc_arg_type3(#type{base=bool}) -> "0|1"; doc_arg_type3(#type{base=binary}) -> "binary()"; @@ -624,6 +656,7 @@ gen_debug(GL, GLU) -> w("].~n~n", []), close(). + printd([F|R],Mod) when is_list(F) -> printd(F,Mod), printd(R,Mod); diff --git a/lib/wx/src/gen/gl.erl b/lib/wx/src/gen/gl.erl index e26fa02729..56cb2f1e23 100644 --- a/lib/wx/src/gen/gl.erl +++ b/lib/wx/src/gen/gl.erl @@ -50,6 +50,10 @@ -define(GLintptr,64/native-unsigned). -define(GLUquadric,64/native-unsigned). -define(GLhandleARB,64/native-unsigned). +-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, @@ -250,37 +254,44 @@ send_bin(Tuple) when is_tuple(Tuple) -> %% @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()|binary()) -> ok +%% @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) -> @@ -289,211 +300,256 @@ bitmap(Width,Height,Xorig,Yorig,Xmove,Ymove,Bitmap) -> %% @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. clearIndex(C) -> cast(5052, <>). %% @spec (S::integer()) -> ok %% @doc See external documentation. +-spec clearStencil(integer()) -> ok. clearStencil(S) -> cast(5053, <>). -%% @spec (Plane::enum(),Equation::{float()}) -> ok +%% @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, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3b(Red,Green,Blue) +-spec color3bv({integer(),integer(),integer()}) -> ok. color3bv({Red,Green,Blue}) -> color3b(Red,Green,Blue). %% @spec (Red::float(),Green::float(),Blue::float()) -> ok %% @doc See external documentation. +-spec color3d(float(),float(),float()) -> ok. color3d(Red,Green,Blue) -> cast(5056, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3d(Red,Green,Blue) +-spec color3dv({float(),float(),float()}) -> ok. color3dv({Red,Green,Blue}) -> color3d(Red,Green,Blue). %% @spec (Red::float(),Green::float(),Blue::float()) -> ok %% @doc See external documentation. +-spec color3f(float(),float(),float()) -> ok. color3f(Red,Green,Blue) -> cast(5057, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3f(Red,Green,Blue) +-spec color3fv({float(),float(),float()}) -> ok. color3fv({Red,Green,Blue}) -> color3f(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. +-spec color3i(integer(),integer(),integer()) -> ok. color3i(Red,Green,Blue) -> cast(5058, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3i(Red,Green,Blue) +-spec color3iv({integer(),integer(),integer()}) -> ok. color3iv({Red,Green,Blue}) -> color3i(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. +-spec color3s(integer(),integer(),integer()) -> ok. color3s(Red,Green,Blue) -> cast(5059, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3s(Red,Green,Blue) +-spec color3sv({integer(),integer(),integer()}) -> ok. color3sv({Red,Green,Blue}) -> color3s(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. +-spec color3ub(integer(),integer(),integer()) -> ok. color3ub(Red,Green,Blue) -> cast(5060, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3ub(Red,Green,Blue) +-spec color3ubv({integer(),integer(),integer()}) -> ok. color3ubv({Red,Green,Blue}) -> color3ub(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. +-spec color3ui(integer(),integer(),integer()) -> ok. color3ui(Red,Green,Blue) -> cast(5061, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3ui(Red,Green,Blue) +-spec color3uiv({integer(),integer(),integer()}) -> ok. color3uiv({Red,Green,Blue}) -> color3ui(Red,Green,Blue). %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. +-spec color3us(integer(),integer(),integer()) -> ok. color3us(Red,Green,Blue) -> cast(5062, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv color3us(Red,Green,Blue) +-spec color3usv({integer(),integer(),integer()}) -> ok. color3usv({Red,Green,Blue}) -> color3us(Red,Green,Blue). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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()|binary()) -> ok +%% @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) -> @@ -502,90 +558,107 @@ colorPointer(Size,Type,Stride,Pointer) -> %% @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, <>). %% @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, <>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. +-spec cullFace(enum()) -> ok. cullFace(Mode) -> cast(5080, <>). %% @spec (List::integer(),Range::integer()) -> ok %% @doc See external documentation. +-spec deleteLists(integer(),integer()) -> ok. deleteLists(List,Range) -> cast(5081, <>). %% @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)>>). %% @spec (Func::enum()) -> ok %% @doc See external documentation. +-spec depthFunc(enum()) -> ok. depthFunc(Func) -> cast(5083, <>). %% @spec (Flag::0|1) -> ok %% @doc See external documentation. +-spec depthMask(0|1) -> ok. depthMask(Flag) -> cast(5084, <>). %% @spec (ZNear::clamp(),ZFar::clamp()) -> ok %% @doc See external documentation. +-spec depthRange(clamp(),clamp()) -> ok. depthRange(ZNear,ZFar) -> cast(5085, <>). %% @spec (Cap::enum()) -> ok %% @doc See external documentation. +-spec disable(enum()) -> ok. disable(Cap) -> cast(5086, <>). %% @spec (Array::enum()) -> ok %% @doc See external documentation. +-spec disableClientState(enum()) -> ok. disableClientState(Array) -> cast(5087, <>). %% @spec (Mode::enum(),First::integer(),Count::integer()) -> ok %% @doc See external documentation. +-spec drawArrays(enum(),integer(),integer()) -> ok. drawArrays(Mode,First,Count) -> cast(5088, <>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. +-spec drawBuffer(enum()) -> ok. drawBuffer(Mode) -> cast(5089, <>). -%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|binary()) -> ok +%% @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, <>). -%% @spec (Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::offset()|binary()) -> ok +%% @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) -> @@ -594,11 +667,13 @@ drawPixels(Width,Height,Format,Type,Pixels) -> %% @spec (Flag::0|1) -> ok %% @doc See external documentation. +-spec edgeFlag(0|1) -> ok. edgeFlag(Flag) -> cast(5094, <>). -%% @spec (Stride::integer(),Pointer::offset()|binary()) -> ok +%% @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) -> @@ -607,301 +682,360 @@ edgeFlagPointer(Stride,Pointer) -> %% @spec ({Flag}) -> ok %% @equiv edgeFlag(Flag) +-spec edgeFlagv({0|1}) -> ok. edgeFlagv({Flag}) -> edgeFlag(Flag). %% @spec (Cap::enum()) -> ok %% @doc See external documentation. +-spec enable(enum()) -> ok. enable(Cap) -> cast(5097, <>). %% @spec (Array::enum()) -> ok %% @doc See external documentation. +-spec enableClientState(enum()) -> ok. enableClientState(Array) -> cast(5098, <>). %% @spec () -> ok %% @doc See external documentation. +-spec 'end'() -> ok. 'end'() -> cast(5099, <<>>). %% @spec () -> ok %% @doc See external documentation. +-spec endList() -> ok. endList() -> cast(5100, <<>>). %% @spec (U::float()) -> ok %% @doc See external documentation. +-spec evalCoord1d(float()) -> ok. evalCoord1d(U) -> cast(5101, <>). %% @spec ({U}) -> ok %% @equiv evalCoord1d(U) +-spec evalCoord1dv({float()}) -> ok. evalCoord1dv({U}) -> evalCoord1d(U). %% @spec (U::float()) -> ok %% @doc See external documentation. +-spec evalCoord1f(float()) -> ok. evalCoord1f(U) -> cast(5102, <>). %% @spec ({U}) -> ok %% @equiv evalCoord1f(U) +-spec evalCoord1fv({float()}) -> ok. evalCoord1fv({U}) -> evalCoord1f(U). %% @spec (U::float(),V::float()) -> ok %% @doc See external documentation. +-spec evalCoord2d(float(),float()) -> ok. evalCoord2d(U,V) -> cast(5103, <>). %% @spec ({U,V}) -> ok %% @equiv evalCoord2d(U,V) +-spec evalCoord2dv({float(),float()}) -> ok. evalCoord2dv({U,V}) -> evalCoord2d(U,V). %% @spec (U::float(),V::float()) -> ok %% @doc See external documentation. +-spec evalCoord2f(float(),float()) -> ok. evalCoord2f(U,V) -> cast(5104, <>). %% @spec ({U,V}) -> ok %% @equiv evalCoord2f(U,V) +-spec evalCoord2fv({float(),float()}) -> ok. evalCoord2fv({U,V}) -> evalCoord2f(U,V). %% @spec (Mode::enum(),I1::integer(),I2::integer()) -> ok %% @doc See external documentation. +-spec evalMesh1(enum(),integer(),integer()) -> ok. evalMesh1(Mode,I1,I2) -> cast(5105, <>). %% @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, <>). %% @spec (I::integer()) -> ok %% @doc See external documentation. +-spec evalPoint1(integer()) -> ok. evalPoint1(I) -> cast(5107, <>). %% @spec (I::integer(),J::integer()) -> ok %% @doc See external documentation. +-spec evalPoint2(integer(),integer()) -> ok. evalPoint2(I,J) -> cast(5108, <>). %% @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, <>). %% @spec () -> ok %% @doc See external documentation. +-spec finish() -> ok. finish() -> cast(5110, <<>>). %% @spec () -> ok %% @doc See external documentation. +-spec flush() -> ok. flush() -> cast(5111, <<>>). %% @spec (Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec fogf(enum(),float()) -> ok. fogf(Pname,Param) -> cast(5112, <>). %% @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)>>). %% @spec (Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. +-spec fogi(enum(),integer()) -> ok. fogi(Pname,Param) -> cast(5114, <>). %% @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)>>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. +-spec frontFace(enum()) -> ok. frontFace(Mode) -> cast(5116, <>). %% @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, <>). %% @spec (Range::integer()) -> integer() %% @doc See external documentation. +-spec genLists(integer()) -> integer(). genLists(Range) -> call(5118, <>). %% @spec (N::integer()) -> [integer()] %% @doc See external documentation. +-spec genTextures(integer()) -> [integer()]. genTextures(N) -> call(5119, <>). %% @spec (Pname::enum()) -> [0|1] %% @doc See external documentation. +-spec getBooleanv(enum()) -> [0|1]. getBooleanv(Pname) -> call(5120, <>). -%% @spec (Plane::enum()) -> {float()} +%% @spec (Plane::enum()) -> {float(),float(),float(),float()} %% @doc See external documentation. +-spec getClipPlane(enum()) -> {float(),float(),float(),float()}. getClipPlane(Plane) -> call(5121, <>). %% @spec (Pname::enum()) -> [float()] %% @doc See external documentation. +-spec getDoublev(enum()) -> [float()]. getDoublev(Pname) -> call(5122, <>). %% @spec () -> enum() %% @doc See external documentation. +-spec getError() -> enum(). getError() -> call(5123, <<>>). %% @spec (Pname::enum()) -> [float()] %% @doc See external documentation. +-spec getFloatv(enum()) -> [float()]. getFloatv(Pname) -> call(5124, <>). %% @spec (Pname::enum()) -> [integer()] %% @doc See external documentation. +-spec getIntegerv(enum()) -> [integer()]. getIntegerv(Pname) -> call(5125, <>). -%% @spec (Light::enum(),Pname::enum()) -> {float()} +%% @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, <>). -%% @spec (Light::enum(),Pname::enum()) -> {integer()} +%% @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, <>). %% @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, <>). %% @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, <>). %% @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, <>). -%% @spec (Face::enum(),Pname::enum()) -> {float()} +%% @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, <>). -%% @spec (Face::enum(),Pname::enum()) -> {integer()} +%% @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, <>). %% @spec (Map::enum(),Values::mem()) -> ok %% @doc See external documentation. +-spec getPixelMapfv(enum(),mem()) -> ok. getPixelMapfv(Map,Values) -> send_bin(Values), call(5133, <>). %% @spec (Map::enum(),Values::mem()) -> ok %% @doc See external documentation. +-spec getPixelMapuiv(enum(),mem()) -> ok. getPixelMapuiv(Map,Values) -> send_bin(Values), call(5134, <>). %% @spec (Map::enum(),Values::mem()) -> ok %% @doc See external documentation. +-spec getPixelMapusv(enum(),mem()) -> ok. getPixelMapusv(Map,Values) -> send_bin(Values), call(5135, <>). %% @spec () -> binary() %% @doc See external documentation. +-spec getPolygonStipple() -> binary(). getPolygonStipple() -> call(5136, <<>>). %% @spec (Name::enum()) -> string() %% @doc See external documentation. +-spec getString(enum()) -> string(). getString(Name) -> call(5137, <>). -%% @spec (Target::enum(),Pname::enum()) -> {float()} +%% @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, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer()} +%% @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, <>). -%% @spec (Coord::enum(),Pname::enum()) -> {float()} +%% @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, <>). -%% @spec (Coord::enum(),Pname::enum()) -> {float()} +%% @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, <>). -%% @spec (Coord::enum(),Pname::enum()) -> {integer()} +%% @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, <>). %% @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, <>). %% @spec (Target::enum(),Level::integer(),Pname::enum()) -> {float()} %% @doc See external documentation. +-spec getTexLevelParameterfv(enum(),integer(),enum()) -> {float()}. getTexLevelParameterfv(Target,Level,Pname) -> call(5144, <>). %% @spec (Target::enum(),Level::integer(),Pname::enum()) -> {integer()} %% @doc See external documentation. +-spec getTexLevelParameteriv(enum(),integer(),enum()) -> {integer()}. getTexLevelParameteriv(Target,Level,Pname) -> call(5145, <>). -%% @spec (Target::enum(),Pname::enum()) -> {float()} +%% @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, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer()} +%% @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, <>). %% @spec (Target::enum(),Mode::enum()) -> ok %% @doc See external documentation. +-spec hint(enum(),enum()) -> ok. hint(Target,Mode) -> cast(5148, <>). %% @spec (Mask::integer()) -> ok %% @doc See external documentation. +-spec indexMask(integer()) -> ok. indexMask(Mask) -> cast(5149, <>). -%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok +%% @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) -> @@ -910,56 +1044,68 @@ indexPointer(Type,Stride,Pointer) -> %% @spec (C::float()) -> ok %% @doc See external documentation. +-spec indexd(float()) -> ok. indexd(C) -> cast(5152, <>). %% @spec ({C}) -> ok %% @equiv indexd(C) +-spec indexdv({float()}) -> ok. indexdv({C}) -> indexd(C). %% @spec (C::float()) -> ok %% @doc See external documentation. +-spec indexf(float()) -> ok. indexf(C) -> cast(5153, <>). %% @spec ({C}) -> ok %% @equiv indexf(C) +-spec indexfv({float()}) -> ok. indexfv({C}) -> indexf(C). %% @spec (C::integer()) -> ok %% @doc See external documentation. +-spec indexi(integer()) -> ok. indexi(C) -> cast(5154, <>). %% @spec ({C}) -> ok %% @equiv indexi(C) +-spec indexiv({integer()}) -> ok. indexiv({C}) -> indexi(C). %% @spec (C::integer()) -> ok %% @doc See external documentation. +-spec indexs(integer()) -> ok. indexs(C) -> cast(5155, <>). %% @spec ({C}) -> ok %% @equiv indexs(C) +-spec indexsv({integer()}) -> ok. indexsv({C}) -> indexs(C). %% @spec (C::integer()) -> ok %% @doc See external documentation. +-spec indexub(integer()) -> ok. indexub(C) -> cast(5156, <>). %% @spec ({C}) -> ok %% @equiv indexub(C) +-spec indexubv({integer()}) -> ok. indexubv({C}) -> indexub(C). %% @spec () -> ok %% @doc See external documentation. +-spec initNames() -> ok. initNames() -> cast(5157, <<>>). -%% @spec (Format::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok +%% @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) -> @@ -968,92 +1114,109 @@ interleavedArrays(Format,Stride,Pointer) -> %% @spec (Cap::enum()) -> 0|1 %% @doc See external documentation. +-spec isEnabled(enum()) -> 0|1. isEnabled(Cap) -> call(5160, <>). %% @spec (List::integer()) -> 0|1 %% @doc See external documentation. +-spec isList(integer()) -> 0|1. isList(List) -> call(5161, <>). %% @spec (Texture::integer()) -> 0|1 %% @doc See external documentation. +-spec isTexture(integer()) -> 0|1. isTexture(Texture) -> call(5162, <>). %% @spec (Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec lightModelf(enum(),float()) -> ok. lightModelf(Pname,Param) -> cast(5163, <>). %% @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)>>). %% @spec (Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. +-spec lightModeli(enum(),integer()) -> ok. lightModeli(Pname,Param) -> cast(5165, <>). %% @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)>>). %% @spec (Light::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec lightf(enum(),enum(),float()) -> ok. lightf(Light,Pname,Param) -> cast(5167, <>). %% @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)>>). %% @spec (Light::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. +-spec lighti(enum(),enum(),integer()) -> ok. lighti(Light,Pname,Param) -> cast(5169, <>). %% @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)>>). %% @spec (Factor::integer(),Pattern::integer()) -> ok %% @doc See external documentation. +-spec lineStipple(integer(),integer()) -> ok. lineStipple(Factor,Pattern) -> cast(5171, <>). %% @spec (Width::float()) -> ok %% @doc See external documentation. +-spec lineWidth(float()) -> ok. lineWidth(Width) -> cast(5172, <>). %% @spec (Base::integer()) -> ok %% @doc See external documentation. +-spec listBase(integer()) -> ok. listBase(Base) -> cast(5173, <>). %% @spec () -> ok %% @doc See external documentation. +-spec loadIdentity() -> ok. loadIdentity() -> cast(5174, <<>>). -%% @spec (M::{float()}) -> ok +%% @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, <>). -%% @spec (M::{float()}) -> ok +%% @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}) -> @@ -1061,94 +1224,111 @@ loadMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> %% @spec (Name::integer()) -> ok %% @doc See external documentation. +-spec loadName(integer()) -> ok. loadName(Name) -> cast(5177, <>). %% @spec (Opcode::enum()) -> ok %% @doc See external documentation. +-spec logicOp(enum()) -> ok. logicOp(Opcode) -> cast(5178, <>). %% @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, <>). %% @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, <>). %% @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, <>). %% @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, <>). %% @spec (Un::integer(),U1::float(),U2::float()) -> ok %% @doc See external documentation. +-spec mapGrid1d(integer(),float(),float()) -> ok. mapGrid1d(Un,U1,U2) -> cast(5183, <>). %% @spec (Un::integer(),U1::float(),U2::float()) -> ok %% @doc See external documentation. +-spec mapGrid1f(integer(),float(),float()) -> ok. mapGrid1f(Un,U1,U2) -> cast(5184, <>). %% @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, <>). %% @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, <>). %% @spec (Face::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec materialf(enum(),enum(),float()) -> ok. materialf(Face,Pname,Param) -> cast(5187, <>). %% @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)>>). %% @spec (Face::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. +-spec materiali(enum(),enum(),integer()) -> ok. materiali(Face,Pname,Param) -> cast(5189, <>). %% @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)>>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. +-spec matrixMode(enum()) -> ok. matrixMode(Mode) -> cast(5191, <>). -%% @spec (M::{float()}) -> ok +%% @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, <>). -%% @spec (M::{float()}) -> ok +%% @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}) -> @@ -1156,56 +1336,68 @@ multMatrixf({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> %% @spec (List::integer(),Mode::enum()) -> ok %% @doc See external documentation. +-spec newList(integer(),enum()) -> ok. newList(List,Mode) -> cast(5194, <>). %% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok %% @doc See external documentation. +-spec normal3b(integer(),integer(),integer()) -> ok. normal3b(Nx,Ny,Nz) -> cast(5195, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3b(Nx,Ny,Nz) +-spec normal3bv({integer(),integer(),integer()}) -> ok. normal3bv({Nx,Ny,Nz}) -> normal3b(Nx,Ny,Nz). %% @spec (Nx::float(),Ny::float(),Nz::float()) -> ok %% @doc See external documentation. +-spec normal3d(float(),float(),float()) -> ok. normal3d(Nx,Ny,Nz) -> cast(5196, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3d(Nx,Ny,Nz) +-spec normal3dv({float(),float(),float()}) -> ok. normal3dv({Nx,Ny,Nz}) -> normal3d(Nx,Ny,Nz). %% @spec (Nx::float(),Ny::float(),Nz::float()) -> ok %% @doc See external documentation. +-spec normal3f(float(),float(),float()) -> ok. normal3f(Nx,Ny,Nz) -> cast(5197, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3f(Nx,Ny,Nz) +-spec normal3fv({float(),float(),float()}) -> ok. normal3fv({Nx,Ny,Nz}) -> normal3f(Nx,Ny,Nz). %% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok %% @doc See external documentation. +-spec normal3i(integer(),integer(),integer()) -> ok. normal3i(Nx,Ny,Nz) -> cast(5198, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3i(Nx,Ny,Nz) +-spec normal3iv({integer(),integer(),integer()}) -> ok. normal3iv({Nx,Ny,Nz}) -> normal3i(Nx,Ny,Nz). %% @spec (Nx::integer(),Ny::integer(),Nz::integer()) -> ok %% @doc See external documentation. +-spec normal3s(integer(),integer(),integer()) -> ok. normal3s(Nx,Ny,Nz) -> cast(5199, <>). %% @spec ({Nx,Ny,Nz}) -> ok %% @equiv normal3s(Nx,Ny,Nz) +-spec normal3sv({integer(),integer(),integer()}) -> ok. normal3sv({Nx,Ny,Nz}) -> normal3s(Nx,Ny,Nz). -%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok +%% @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) -> @@ -1214,100 +1406,119 @@ normalPointer(Type,Stride,Pointer) -> %% @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, <>). %% @spec (Token::float()) -> ok %% @doc See external documentation. +-spec passThrough(float()) -> ok. passThrough(Token) -> cast(5203, <>). %% @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, <>). %% @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, <>). %% @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, <>). %% @spec (Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec pixelStoref(enum(),float()) -> ok. pixelStoref(Pname,Param) -> cast(5207, <>). %% @spec (Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. +-spec pixelStorei(enum(),integer()) -> ok. pixelStorei(Pname,Param) -> cast(5208, <>). %% @spec (Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec pixelTransferf(enum(),float()) -> ok. pixelTransferf(Pname,Param) -> cast(5209, <>). %% @spec (Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. +-spec pixelTransferi(enum(),integer()) -> ok. pixelTransferi(Pname,Param) -> cast(5210, <>). %% @spec (Xfactor::float(),Yfactor::float()) -> ok %% @doc See external documentation. +-spec pixelZoom(float(),float()) -> ok. pixelZoom(Xfactor,Yfactor) -> cast(5211, <>). %% @spec (Size::float()) -> ok %% @doc See external documentation. +-spec pointSize(float()) -> ok. pointSize(Size) -> cast(5212, <>). %% @spec (Face::enum(),Mode::enum()) -> ok %% @doc See external documentation. +-spec polygonMode(enum(),enum()) -> ok. polygonMode(Face,Mode) -> cast(5213, <>). %% @spec (Factor::float(),Units::float()) -> ok %% @doc See external documentation. +-spec polygonOffset(float(),float()) -> ok. polygonOffset(Factor,Units) -> cast(5214, <>). %% @spec (Mask::binary()) -> ok %% @doc See external documentation. +-spec polygonStipple(binary()) -> ok. polygonStipple(Mask) -> send_bin(Mask), cast(5215, <<>>). %% @spec () -> ok %% @doc See external documentation. +-spec popAttrib() -> ok. popAttrib() -> cast(5216, <<>>). %% @spec () -> ok %% @doc See external documentation. +-spec popClientAttrib() -> ok. popClientAttrib() -> cast(5217, <<>>). %% @spec () -> ok %% @doc See external documentation. +-spec popMatrix() -> ok. popMatrix() -> cast(5218, <<>>). %% @spec () -> ok %% @doc See external documentation. +-spec popName() -> ok. popName() -> cast(5219, <<>>). %% @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, @@ -1315,385 +1526,467 @@ prioritizeTextures(Textures,Priorities) -> %% @spec (Mask::integer()) -> ok %% @doc See external documentation. +-spec pushAttrib(integer()) -> ok. pushAttrib(Mask) -> cast(5221, <>). %% @spec (Mask::integer()) -> ok %% @doc See external documentation. +-spec pushClientAttrib(integer()) -> ok. pushClientAttrib(Mask) -> cast(5222, <>). %% @spec () -> ok %% @doc See external documentation. +-spec pushMatrix() -> ok. pushMatrix() -> cast(5223, <<>>). %% @spec (Name::integer()) -> ok %% @doc See external documentation. +-spec pushName(integer()) -> ok. pushName(Name) -> cast(5224, <>). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. +-spec rasterPos2d(float(),float()) -> ok. rasterPos2d(X,Y) -> cast(5225, <>). %% @spec ({X,Y}) -> ok %% @equiv rasterPos2d(X,Y) +-spec rasterPos2dv({float(),float()}) -> ok. rasterPos2dv({X,Y}) -> rasterPos2d(X,Y). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. +-spec rasterPos2f(float(),float()) -> ok. rasterPos2f(X,Y) -> cast(5226, <>). %% @spec ({X,Y}) -> ok %% @equiv rasterPos2f(X,Y) +-spec rasterPos2fv({float(),float()}) -> ok. rasterPos2fv({X,Y}) -> rasterPos2f(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. +-spec rasterPos2i(integer(),integer()) -> ok. rasterPos2i(X,Y) -> cast(5227, <>). %% @spec ({X,Y}) -> ok %% @equiv rasterPos2i(X,Y) +-spec rasterPos2iv({integer(),integer()}) -> ok. rasterPos2iv({X,Y}) -> rasterPos2i(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. +-spec rasterPos2s(integer(),integer()) -> ok. rasterPos2s(X,Y) -> cast(5228, <>). %% @spec ({X,Y}) -> ok %% @equiv rasterPos2s(X,Y) +-spec rasterPos2sv({integer(),integer()}) -> ok. rasterPos2sv({X,Y}) -> rasterPos2s(X,Y). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. +-spec rasterPos3d(float(),float(),float()) -> ok. rasterPos3d(X,Y,Z) -> cast(5229, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv rasterPos3d(X,Y,Z) +-spec rasterPos3dv({float(),float(),float()}) -> ok. rasterPos3dv({X,Y,Z}) -> rasterPos3d(X,Y,Z). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. +-spec rasterPos3f(float(),float(),float()) -> ok. rasterPos3f(X,Y,Z) -> cast(5230, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv rasterPos3f(X,Y,Z) +-spec rasterPos3fv({float(),float(),float()}) -> ok. rasterPos3fv({X,Y,Z}) -> rasterPos3f(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. +-spec rasterPos3i(integer(),integer(),integer()) -> ok. rasterPos3i(X,Y,Z) -> cast(5231, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv rasterPos3i(X,Y,Z) +-spec rasterPos3iv({integer(),integer(),integer()}) -> ok. rasterPos3iv({X,Y,Z}) -> rasterPos3i(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. +-spec rasterPos3s(integer(),integer(),integer()) -> ok. rasterPos3s(X,Y,Z) -> cast(5232, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv rasterPos3s(X,Y,Z) +-spec rasterPos3sv({integer(),integer(),integer()}) -> ok. rasterPos3sv({X,Y,Z}) -> rasterPos3s(X,Y,Z). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. +-spec readBuffer(enum()) -> ok. readBuffer(Mode) -> cast(5237, <>). %% @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, <>). %% @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, <>). -%% @spec (V1::{float()},V2::{float()}) -> ok +%% @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, <>). %% @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, <>). -%% @spec (V1::{float()},V2::{float()}) -> ok +%% @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, <>). %% @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, <>). -%% @spec (V1::{integer()},V2::{integer()}) -> ok +%% @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, <>). %% @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, <>). -%% @spec (V1::{integer()},V2::{integer()}) -> ok +%% @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, <>). %% @spec (Mode::enum()) -> integer() %% @doc See external documentation. +-spec renderMode(enum()) -> integer(). renderMode(Mode) -> call(5247, <>). %% @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, <>). %% @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, <>). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. +-spec scaled(float(),float(),float()) -> ok. scaled(X,Y,Z) -> cast(5250, <>). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. +-spec scalef(float(),float(),float()) -> ok. scalef(X,Y,Z) -> cast(5251, <>). %% @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, <>). %% @spec (Size::integer(),Buffer::mem()) -> ok %% @doc See external documentation. +-spec selectBuffer(integer(),mem()) -> ok. selectBuffer(Size,Buffer) -> send_bin(Buffer), call(5253, <>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. +-spec shadeModel(enum()) -> ok. shadeModel(Mode) -> cast(5254, <>). %% @spec (Func::enum(),Ref::integer(),Mask::integer()) -> ok %% @doc See external documentation. +-spec stencilFunc(enum(),integer(),integer()) -> ok. stencilFunc(Func,Ref,Mask) -> cast(5255, <>). %% @spec (Mask::integer()) -> ok %% @doc See external documentation. +-spec stencilMask(integer()) -> ok. stencilMask(Mask) -> cast(5256, <>). %% @spec (Fail::enum(),Zfail::enum(),Zpass::enum()) -> ok %% @doc See external documentation. +-spec stencilOp(enum(),enum(),enum()) -> ok. 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, <>). %% @spec ({S}) -> ok %% @equiv texCoord1i(S) +-spec texCoord1iv({integer()}) -> ok. texCoord1iv({S}) -> texCoord1i(S). %% @spec (S::integer()) -> ok %% @doc See external documentation. +-spec texCoord1s(integer()) -> ok. texCoord1s(S) -> cast(5261, <>). %% @spec ({S}) -> ok %% @equiv texCoord1s(S) +-spec texCoord1sv({integer()}) -> ok. texCoord1sv({S}) -> texCoord1s(S). %% @spec (S::float(),T::float()) -> ok %% @doc See external documentation. +-spec texCoord2d(float(),float()) -> ok. texCoord2d(S,T) -> cast(5262, <>). %% @spec ({S,T}) -> ok %% @equiv texCoord2d(S,T) +-spec texCoord2dv({float(),float()}) -> ok. texCoord2dv({S,T}) -> texCoord2d(S,T). %% @spec (S::float(),T::float()) -> ok %% @doc See external documentation. +-spec texCoord2f(float(),float()) -> ok. texCoord2f(S,T) -> cast(5263, <>). %% @spec ({S,T}) -> ok %% @equiv texCoord2f(S,T) +-spec texCoord2fv({float(),float()}) -> ok. texCoord2fv({S,T}) -> texCoord2f(S,T). %% @spec (S::integer(),T::integer()) -> ok %% @doc See external documentation. +-spec texCoord2i(integer(),integer()) -> ok. texCoord2i(S,T) -> cast(5264, <>). %% @spec ({S,T}) -> ok %% @equiv texCoord2i(S,T) +-spec texCoord2iv({integer(),integer()}) -> ok. texCoord2iv({S,T}) -> texCoord2i(S,T). %% @spec (S::integer(),T::integer()) -> ok %% @doc See external documentation. +-spec texCoord2s(integer(),integer()) -> ok. texCoord2s(S,T) -> cast(5265, <>). %% @spec ({S,T}) -> ok %% @equiv texCoord2s(S,T) +-spec texCoord2sv({integer(),integer()}) -> ok. texCoord2sv({S,T}) -> texCoord2s(S,T). %% @spec (S::float(),T::float(),R::float()) -> ok %% @doc See external documentation. +-spec texCoord3d(float(),float(),float()) -> ok. texCoord3d(S,T,R) -> cast(5266, <>). %% @spec ({S,T,R}) -> ok %% @equiv texCoord3d(S,T,R) +-spec texCoord3dv({float(),float(),float()}) -> ok. texCoord3dv({S,T,R}) -> texCoord3d(S,T,R). %% @spec (S::float(),T::float(),R::float()) -> ok %% @doc See external documentation. +-spec texCoord3f(float(),float(),float()) -> ok. texCoord3f(S,T,R) -> cast(5267, <>). %% @spec ({S,T,R}) -> ok %% @equiv texCoord3f(S,T,R) +-spec texCoord3fv({float(),float(),float()}) -> ok. texCoord3fv({S,T,R}) -> texCoord3f(S,T,R). %% @spec (S::integer(),T::integer(),R::integer()) -> ok %% @doc See external documentation. +-spec texCoord3i(integer(),integer(),integer()) -> ok. texCoord3i(S,T,R) -> cast(5268, <>). %% @spec ({S,T,R}) -> ok %% @equiv texCoord3i(S,T,R) +-spec texCoord3iv({integer(),integer(),integer()}) -> ok. texCoord3iv({S,T,R}) -> texCoord3i(S,T,R). %% @spec (S::integer(),T::integer(),R::integer()) -> ok %% @doc See external documentation. +-spec texCoord3s(integer(),integer(),integer()) -> ok. texCoord3s(S,T,R) -> cast(5269, <>). %% @spec ({S,T,R}) -> ok %% @equiv texCoord3s(S,T,R) +-spec texCoord3sv({integer(),integer(),integer()}) -> ok. texCoord3sv({S,T,R}) -> texCoord3s(S,T,R). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). -%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok +%% @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) -> @@ -1702,69 +1995,81 @@ texCoordPointer(Size,Type,Stride,Pointer) -> %% @spec (Target::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec texEnvf(enum(),enum(),float()) -> ok. texEnvf(Target,Pname,Param) -> cast(5276, <>). %% @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)>>). %% @spec (Target::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. +-spec texEnvi(enum(),enum(),integer()) -> ok. texEnvi(Target,Pname,Param) -> cast(5278, <>). %% @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)>>). %% @spec (Coord::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec texGend(enum(),enum(),float()) -> ok. texGend(Coord,Pname,Param) -> cast(5280, <>). %% @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>>). %% @spec (Coord::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec texGenf(enum(),enum(),float()) -> ok. texGenf(Coord,Pname,Param) -> cast(5282, <>). %% @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)>>). %% @spec (Coord::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. +-spec texGeni(enum(),enum(),integer()) -> ok. texGeni(Coord,Pname,Param) -> cast(5284, <>). %% @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)>>). -%% @spec (Target::enum(),Level::integer(),Internalformat::integer(),Width::integer(),Border::integer(),Format::enum(),Type::enum(),Pixels::offset()|binary()) -> ok +%% @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()|binary()) -> ok +%% @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) -> @@ -1773,36 +2078,42 @@ texImage2D(Target,Level,Internalformat,Width,Height,Border,Format,Type,Pixels) - %% @spec (Target::enum(),Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec texParameterf(enum(),enum(),float()) -> ok. texParameterf(Target,Pname,Param) -> cast(5290, <>). %% @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)>>). %% @spec (Target::enum(),Pname::enum(),Param::integer()) -> ok %% @doc See external documentation. +-spec texParameteri(enum(),enum(),integer()) -> ok. texParameteri(Target,Pname,Param) -> cast(5292, <>). %% @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)>>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Width::integer(),Format::enum(),Type::enum(),Pixels::offset()|binary()) -> ok +%% @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, <>). -%% @spec (Target::enum(),Level::integer(),Xoffset::integer(),Yoffset::integer(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Pixels::offset()|binary()) -> ok +%% @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) -> @@ -1811,124 +2122,151 @@ texSubImage2D(Target,Level,Xoffset,Yoffset,Width,Height,Format,Type,Pixels) -> %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. +-spec translated(float(),float(),float()) -> ok. translated(X,Y,Z) -> cast(5298, <>). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. +-spec translatef(float(),float(),float()) -> ok. translatef(X,Y,Z) -> cast(5299, <>). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. +-spec vertex2d(float(),float()) -> ok. vertex2d(X,Y) -> cast(5300, <>). %% @spec ({X,Y}) -> ok %% @equiv vertex2d(X,Y) +-spec vertex2dv({float(),float()}) -> ok. vertex2dv({X,Y}) -> vertex2d(X,Y). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. +-spec vertex2f(float(),float()) -> ok. vertex2f(X,Y) -> cast(5301, <>). %% @spec ({X,Y}) -> ok %% @equiv vertex2f(X,Y) +-spec vertex2fv({float(),float()}) -> ok. vertex2fv({X,Y}) -> vertex2f(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. +-spec vertex2i(integer(),integer()) -> ok. vertex2i(X,Y) -> cast(5302, <>). %% @spec ({X,Y}) -> ok %% @equiv vertex2i(X,Y) +-spec vertex2iv({integer(),integer()}) -> ok. vertex2iv({X,Y}) -> vertex2i(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. +-spec vertex2s(integer(),integer()) -> ok. vertex2s(X,Y) -> cast(5303, <>). %% @spec ({X,Y}) -> ok %% @equiv vertex2s(X,Y) +-spec vertex2sv({integer(),integer()}) -> ok. vertex2sv({X,Y}) -> vertex2s(X,Y). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. +-spec vertex3d(float(),float(),float()) -> ok. vertex3d(X,Y,Z) -> cast(5304, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv vertex3d(X,Y,Z) +-spec vertex3dv({float(),float(),float()}) -> ok. vertex3dv({X,Y,Z}) -> vertex3d(X,Y,Z). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. +-spec vertex3f(float(),float(),float()) -> ok. vertex3f(X,Y,Z) -> cast(5305, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv vertex3f(X,Y,Z) +-spec vertex3fv({float(),float(),float()}) -> ok. vertex3fv({X,Y,Z}) -> vertex3f(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. +-spec vertex3i(integer(),integer(),integer()) -> ok. vertex3i(X,Y,Z) -> cast(5306, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv vertex3i(X,Y,Z) +-spec vertex3iv({integer(),integer(),integer()}) -> ok. vertex3iv({X,Y,Z}) -> vertex3i(X,Y,Z). %% @spec (X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. +-spec vertex3s(integer(),integer(),integer()) -> ok. vertex3s(X,Y,Z) -> cast(5307, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv vertex3s(X,Y,Z) +-spec vertex3sv({integer(),integer(),integer()}) -> ok. vertex3sv({X,Y,Z}) -> vertex3s(X,Y,Z). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). %% @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, <>). %% @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). -%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok +%% @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) -> @@ -1937,37 +2275,43 @@ vertexPointer(Size,Type,Stride,Pointer) -> %% @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, <>). %% @spec (Red::clamp(),Green::clamp(),Blue::clamp(),Alpha::clamp()) -> ok %% @doc See external documentation. +-spec blendColor(clamp(),clamp(),clamp(),clamp()) -> ok. blendColor(Red,Green,Blue,Alpha) -> cast(5315, <>). %% @spec (Mode::enum()) -> ok %% @doc See external documentation. +-spec blendEquation(enum()) -> ok. blendEquation(Mode) -> cast(5316, <>). -%% @spec (Mode::enum(),Start::integer(),End::integer(),Count::integer(),Type::enum(),Indices::offset()|binary()) -> ok +%% @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. 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()|binary()) -> ok +%% @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) -> send_bin(Pixels), 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()|binary()) -> ok +%% @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. 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) -> @@ -1976,50 +2320,59 @@ texSubImage3D(Target,Level,Xoffset,Yoffset,Zoffset,Width,Height,Depth,Format,Typ %% @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. 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()|binary()) -> ok +%% @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. 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()}) -> ok +%% @spec (Target::enum(),Pname::enum(),Params::{float(),float(),float(),float()}) -> ok %% @doc See external documentation. +-spec colorTableParameterfv(enum(),enum(),{float(),float(),float(),float()}) -> ok. colorTableParameterfv(Target,Pname,{P1,P2,P3,P4}) -> cast(5326, <>). -%% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok +%% @spec (Target::enum(),Pname::enum(),Params::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec colorTableParameteriv(enum(),enum(),{integer(),integer(),integer(),integer()}) -> ok. 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. 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. getColorTable(Target,Format,Type,Table) -> send_bin(Table), call(5329, <>). -%% @spec (Target::enum(),Pname::enum()) -> {float()} +%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()} %% @doc See external documentation. +-spec getColorTableParameterfv(enum(),enum()) -> {float(),float(),float(),float()}. getColorTableParameterfv(Target,Pname) -> call(5330, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer()} +%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} %% @doc See external documentation. +-spec getColorTableParameteriv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. getColorTableParameteriv(Target,Pname) -> call(5331, <>). -%% @spec (Target::enum(),Start::integer(),Count::integer(),Format::enum(),Type::enum(),Data::offset()|binary()) -> ok +%% @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. colorSubTable(Target,Start,Count,Format,Type,Data) when is_integer(Data) -> cast(5332, <>); colorSubTable(Target,Start,Count,Format,Type,Data) -> @@ -2028,19 +2381,22 @@ colorSubTable(Target,Start,Count,Format,Type,Data) -> %% @spec (Target::enum(),Start::integer(),X::integer(),Y::integer(),Width::integer()) -> ok %% @doc See external documentation. +-spec copyColorSubTable(enum(),integer(),integer(),integer(),integer()) -> ok. copyColorSubTable(Target,Start,X,Y,Width) -> cast(5334, <>). -%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Format::enum(),Type::enum(),Image::offset()|binary()) -> ok +%% @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. 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()|binary()) -> ok +%% @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. convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) when is_integer(Image) -> cast(5337, <>); convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) -> @@ -2049,52 +2405,62 @@ convolutionFilter2D(Target,Internalformat,Width,Height,Format,Type,Image) -> %% @spec (Target::enum(),Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. +-spec convolutionParameterf(enum(),enum(),{float()}) -> ok. 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. 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. 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. 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. 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. 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. getConvolutionFilter(Target,Format,Type,Image) -> send_bin(Image), call(5343, <>). -%% @spec (Target::enum(),Pname::enum()) -> {float()} +%% @spec (Target::enum(),Pname::enum()) -> {float(),float(),float(),float()} %% @doc See external documentation. +-spec getConvolutionParameterfv(enum(),enum()) -> {float(),float(),float(),float()}. getConvolutionParameterfv(Target,Pname) -> call(5344, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer()} +%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} %% @doc See external documentation. +-spec getConvolutionParameteriv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. getConvolutionParameteriv(Target,Pname) -> call(5345, <>). -%% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer(),Format::enum(),Type::enum(),Row::offset()|binary(),Column::offset()|binary()) -> ok +%% @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. 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) -> @@ -2104,108 +2470,126 @@ separableFilter2D(Target,Internalformat,Width,Height,Format,Type,Row,Column) -> %% @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. 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()}. getHistogramParameterfv(Target,Pname) -> call(5349, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. +-spec getHistogramParameteriv(enum(),enum()) -> {integer()}. 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) -> send_bin(Values), call(5351, <>). %% @spec (Target::enum(),Pname::enum()) -> {float()} %% @doc See external documentation. +-spec getMinmaxParameterfv(enum(),enum()) -> {float()}. getMinmaxParameterfv(Target,Pname) -> call(5352, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer()} %% @doc See external documentation. +-spec getMinmaxParameteriv(enum(),enum()) -> {integer()}. 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. 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. minmax(Target,Internalformat,Sink) -> cast(5355, <>). %% @spec (Target::enum()) -> ok %% @doc See external documentation. +-spec resetHistogram(enum()) -> ok. resetHistogram(Target) -> cast(5356, <>). %% @spec (Target::enum()) -> ok %% @doc See external documentation. +-spec resetMinmax(enum()) -> ok. resetMinmax(Target) -> cast(5357, <>). %% @spec (Texture::enum()) -> ok %% @doc See external documentation. +-spec activeTexture(enum()) -> ok. activeTexture(Texture) -> cast(5358, <>). %% @spec (Value::clamp(),Invert::0|1) -> ok %% @doc See external documentation. +-spec sampleCoverage(clamp(),0|1) -> ok. sampleCoverage(Value,Invert) -> cast(5359, <>). -%% @spec (Target::enum(),Level::integer(),Internalformat::enum(),Width::integer(),Height::integer(),Depth::integer(),Border::integer(),ImageSize::integer(),Data::offset()|binary()) -> ok +%% @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. 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()|binary()) -> ok +%% @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. 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()|binary()) -> ok +%% @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. 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()|binary()) -> ok +%% @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. 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()|binary()) -> ok +%% @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. 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()|binary()) -> ok +%% @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. compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) when is_integer(Data) -> cast(5370, <>); compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) -> @@ -2214,182 +2598,220 @@ compressedTexSubImage1D(Target,Level,Xoffset,Width,Format,ImageSize,Data) -> %% @spec (Target::enum(),Level::integer(),Img::mem()) -> ok %% @doc See external documentation. +-spec getCompressedTexImage(enum(),integer(),mem()) -> ok. getCompressedTexImage(Target,Level,Img) -> send_bin(Img), call(5372, <>). %% @spec (Texture::enum()) -> ok %% @doc See external documentation. +-spec clientActiveTexture(enum()) -> ok. clientActiveTexture(Texture) -> cast(5373, <>). %% @spec (Target::enum(),S::float()) -> ok %% @doc See external documentation. +-spec multiTexCoord1d(enum(),float()) -> ok. multiTexCoord1d(Target,S) -> cast(5374, <>). %% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1d(Target,S) +-spec multiTexCoord1dv(enum(),{float()}) -> ok. multiTexCoord1dv(Target,{S}) -> multiTexCoord1d(Target,S). %% @spec (Target::enum(),S::float()) -> ok %% @doc See external documentation. +-spec multiTexCoord1f(enum(),float()) -> ok. multiTexCoord1f(Target,S) -> cast(5375, <>). %% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1f(Target,S) +-spec multiTexCoord1fv(enum(),{float()}) -> ok. multiTexCoord1fv(Target,{S}) -> multiTexCoord1f(Target,S). %% @spec (Target::enum(),S::integer()) -> ok %% @doc See external documentation. +-spec multiTexCoord1i(enum(),integer()) -> ok. multiTexCoord1i(Target,S) -> cast(5376, <>). %% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1i(Target,S) +-spec multiTexCoord1iv(enum(),{integer()}) -> ok. multiTexCoord1iv(Target,{S}) -> multiTexCoord1i(Target,S). %% @spec (Target::enum(),S::integer()) -> ok %% @doc See external documentation. +-spec multiTexCoord1s(enum(),integer()) -> ok. multiTexCoord1s(Target,S) -> cast(5377, <>). %% @spec (Target,{S}) -> ok %% @equiv multiTexCoord1s(Target,S) +-spec multiTexCoord1sv(enum(),{integer()}) -> ok. multiTexCoord1sv(Target,{S}) -> multiTexCoord1s(Target,S). %% @spec (Target::enum(),S::float(),T::float()) -> ok %% @doc See external documentation. +-spec multiTexCoord2d(enum(),float(),float()) -> ok. multiTexCoord2d(Target,S,T) -> cast(5378, <>). %% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2d(Target,S,T) +-spec multiTexCoord2dv(enum(),{float(),float()}) -> ok. 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. multiTexCoord2f(Target,S,T) -> cast(5379, <>). %% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2f(Target,S,T) +-spec multiTexCoord2fv(enum(),{float(),float()}) -> ok. 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. multiTexCoord2i(Target,S,T) -> cast(5380, <>). %% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2i(Target,S,T) +-spec multiTexCoord2iv(enum(),{integer(),integer()}) -> ok. 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. multiTexCoord2s(Target,S,T) -> cast(5381, <>). %% @spec (Target,{S,T}) -> ok %% @equiv multiTexCoord2s(Target,S,T) +-spec multiTexCoord2sv(enum(),{integer(),integer()}) -> ok. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. multiTexCoord4sv(Target,{S,T,R,Q}) -> multiTexCoord4s(Target,S,T,R,Q). -%% @spec (M::{float()}) -> ok +%% @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. 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()}) -> ok +%% @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. 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()}) -> ok +%% @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. 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()}) -> ok +%% @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. 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}) -> @@ -2397,11 +2819,13 @@ multTransposeMatrixd({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> %% @spec (SfactorRGB::enum(),DfactorRGB::enum(),SfactorAlpha::enum(),DfactorAlpha::enum()) -> ok %% @doc See external documentation. +-spec blendFuncSeparate(enum(),enum(),enum(),enum()) -> ok. 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. multiDrawArrays(Mode,First,Count) -> cast(5395, <> || C <- First>>)/binary,0:(((length(First)) rem 2)*32),(length(Count)):?GLuint, @@ -2409,46 +2833,55 @@ multiDrawArrays(Mode,First,Count) -> %% @spec (Pname::enum(),Param::float()) -> ok %% @doc See external documentation. +-spec pointParameterf(enum(),float()) -> ok. pointParameterf(Pname,Param) -> cast(5396, <>). %% @spec (Pname::enum(),Params::{float()}) -> ok %% @doc See external documentation. +-spec pointParameterfv(enum(),{float()}) -> ok. 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. pointParameteri(Pname,Param) -> cast(5398, <>). %% @spec (Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. +-spec pointParameteriv(enum(),{integer()}) -> ok. 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. fogCoordf(Coord) -> cast(5400, <>). %% @spec ({Coord}) -> ok %% @equiv fogCoordf(Coord) +-spec fogCoordfv({float()}) -> ok. fogCoordfv({Coord}) -> fogCoordf(Coord). %% @spec (Coord::float()) -> ok %% @doc See external documentation. +-spec fogCoordd(float()) -> ok. fogCoordd(Coord) -> cast(5401, <>). %% @spec ({Coord}) -> ok %% @equiv fogCoordd(Coord) +-spec fogCoorddv({float()}) -> ok. fogCoorddv({Coord}) -> fogCoordd(Coord). -%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok +%% @spec (Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok %% @doc See external documentation. +-spec fogCoordPointer(enum(),integer(),offset()|mem()) -> ok. fogCoordPointer(Type,Stride,Pointer) when is_integer(Pointer) -> cast(5402, <>); fogCoordPointer(Type,Stride,Pointer) -> @@ -2457,78 +2890,95 @@ fogCoordPointer(Type,Stride,Pointer) -> %% @spec (Red::integer(),Green::integer(),Blue::integer()) -> ok %% @doc See external documentation. +-spec secondaryColor3b(integer(),integer(),integer()) -> ok. secondaryColor3b(Red,Green,Blue) -> cast(5404, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3b(Red,Green,Blue) +-spec secondaryColor3bv({integer(),integer(),integer()}) -> ok. 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. secondaryColor3d(Red,Green,Blue) -> cast(5405, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3d(Red,Green,Blue) +-spec secondaryColor3dv({float(),float(),float()}) -> ok. 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. secondaryColor3f(Red,Green,Blue) -> cast(5406, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3f(Red,Green,Blue) +-spec secondaryColor3fv({float(),float(),float()}) -> ok. 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. secondaryColor3i(Red,Green,Blue) -> cast(5407, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3i(Red,Green,Blue) +-spec secondaryColor3iv({integer(),integer(),integer()}) -> ok. 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. secondaryColor3s(Red,Green,Blue) -> cast(5408, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3s(Red,Green,Blue) +-spec secondaryColor3sv({integer(),integer(),integer()}) -> ok. 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. secondaryColor3ub(Red,Green,Blue) -> cast(5409, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3ub(Red,Green,Blue) +-spec secondaryColor3ubv({integer(),integer(),integer()}) -> ok. 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. secondaryColor3ui(Red,Green,Blue) -> cast(5410, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3ui(Red,Green,Blue) +-spec secondaryColor3uiv({integer(),integer(),integer()}) -> ok. 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. secondaryColor3us(Red,Green,Blue) -> cast(5411, <>). %% @spec ({Red,Green,Blue}) -> ok %% @equiv secondaryColor3us(Red,Green,Blue) +-spec secondaryColor3usv({integer(),integer(),integer()}) -> ok. secondaryColor3usv({Red,Green,Blue}) -> secondaryColor3us(Red,Green,Blue). -%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok +%% @spec (Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|mem()) -> ok %% @doc See external documentation. +-spec secondaryColorPointer(integer(),enum(),integer(),offset()|mem()) -> ok. secondaryColorPointer(Size,Type,Stride,Pointer) when is_integer(Pointer) -> cast(5412, <>); secondaryColorPointer(Size,Type,Stride,Pointer) -> @@ -2537,148 +2987,178 @@ secondaryColorPointer(Size,Type,Stride,Pointer) -> %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. +-spec windowPos2d(float(),float()) -> ok. windowPos2d(X,Y) -> cast(5414, <>). %% @spec ({X,Y}) -> ok %% @equiv windowPos2d(X,Y) +-spec windowPos2dv({float(),float()}) -> ok. windowPos2dv({X,Y}) -> windowPos2d(X,Y). %% @spec (X::float(),Y::float()) -> ok %% @doc See external documentation. +-spec windowPos2f(float(),float()) -> ok. windowPos2f(X,Y) -> cast(5415, <>). %% @spec ({X,Y}) -> ok %% @equiv windowPos2f(X,Y) +-spec windowPos2fv({float(),float()}) -> ok. windowPos2fv({X,Y}) -> windowPos2f(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. +-spec windowPos2i(integer(),integer()) -> ok. windowPos2i(X,Y) -> cast(5416, <>). %% @spec ({X,Y}) -> ok %% @equiv windowPos2i(X,Y) +-spec windowPos2iv({integer(),integer()}) -> ok. windowPos2iv({X,Y}) -> windowPos2i(X,Y). %% @spec (X::integer(),Y::integer()) -> ok %% @doc See external documentation. +-spec windowPos2s(integer(),integer()) -> ok. windowPos2s(X,Y) -> cast(5417, <>). %% @spec ({X,Y}) -> ok %% @equiv windowPos2s(X,Y) +-spec windowPos2sv({integer(),integer()}) -> ok. windowPos2sv({X,Y}) -> windowPos2s(X,Y). %% @spec (X::float(),Y::float(),Z::float()) -> ok %% @doc See external documentation. +-spec windowPos3d(float(),float(),float()) -> ok. windowPos3d(X,Y,Z) -> cast(5418, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3d(X,Y,Z) +-spec windowPos3dv({float(),float(),float()}) -> ok. 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. windowPos3f(X,Y,Z) -> cast(5419, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3f(X,Y,Z) +-spec windowPos3fv({float(),float(),float()}) -> ok. 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. windowPos3i(X,Y,Z) -> cast(5420, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3i(X,Y,Z) +-spec windowPos3iv({integer(),integer(),integer()}) -> ok. 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. windowPos3s(X,Y,Z) -> cast(5421, <>). %% @spec ({X,Y,Z}) -> ok %% @equiv windowPos3s(X,Y,Z) +-spec windowPos3sv({integer(),integer(),integer()}) -> ok. windowPos3sv({X,Y,Z}) -> windowPos3s(X,Y,Z). %% @spec (N::integer()) -> [integer()] %% @doc See external documentation. +-spec genQueries(integer()) -> [integer()]. genQueries(N) -> call(5422, <>). %% @spec (Ids::[integer()]) -> ok %% @doc See external documentation. +-spec deleteQueries([integer()]) -> ok. 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. isQuery(Id) -> call(5424, <>). %% @spec (Target::enum(),Id::integer()) -> ok %% @doc See external documentation. +-spec beginQuery(enum(),integer()) -> ok. beginQuery(Target,Id) -> cast(5425, <>). %% @spec (Target::enum()) -> ok %% @doc See external documentation. +-spec endQuery(enum()) -> ok. endQuery(Target) -> cast(5426, <>). %% @spec (Target::enum(),Pname::enum()) -> integer() %% @doc See external documentation. +-spec getQueryiv(enum(),enum()) -> integer(). getQueryiv(Target,Pname) -> call(5427, <>). %% @spec (Id::integer(),Pname::enum()) -> integer() %% @doc See external documentation. +-spec getQueryObjectiv(integer(),enum()) -> integer(). getQueryObjectiv(Id,Pname) -> call(5428, <>). %% @spec (Id::integer(),Pname::enum()) -> integer() %% @doc See external documentation. +-spec getQueryObjectuiv(integer(),enum()) -> integer(). getQueryObjectuiv(Id,Pname) -> call(5429, <>). %% @spec (Target::enum(),Buffer::integer()) -> ok %% @doc See external documentation. +-spec bindBuffer(enum(),integer()) -> ok. bindBuffer(Target,Buffer) -> cast(5430, <>). %% @spec (Buffers::[integer()]) -> ok %% @doc See external documentation. +-spec deleteBuffers([integer()]) -> ok. 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()]. genBuffers(N) -> call(5432, <>). %% @spec (Buffer::integer()) -> 0|1 %% @doc See external documentation. +-spec isBuffer(integer()) -> 0|1. isBuffer(Buffer) -> call(5433, <>). -%% @spec (Target::enum(),Size::integer(),Data::offset()|binary(),Usage::enum()) -> ok +%% @spec (Target::enum(),Size::integer(),Data::offset()|mem(),Usage::enum()) -> ok %% @doc See external documentation. +-spec bufferData(enum(),integer(),offset()|mem(),enum()) -> ok. 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()|binary()) -> ok +%% @spec (Target::enum(),Offset::integer(),Size::integer(),Data::offset()|mem()) -> ok %% @doc See external documentation. +-spec bufferSubData(enum(),integer(),integer(),offset()|mem()) -> ok. bufferSubData(Target,Offset,Size,Data) when is_integer(Data) -> cast(5436, <>); bufferSubData(Target,Offset,Size,Data) -> @@ -2687,816 +3167,976 @@ bufferSubData(Target,Offset,Size,Data) -> %% @spec (Target::enum(),Offset::integer(),Size::integer(),Data::mem()) -> ok %% @doc See external documentation. +-spec getBufferSubData(enum(),integer(),integer(),mem()) -> ok. 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(). getBufferParameteriv(Target,Pname) -> call(5439, <>). %% @spec (ModeRGB::enum(),ModeAlpha::enum()) -> ok %% @doc See external documentation. +-spec blendEquationSeparate(enum(),enum()) -> ok. blendEquationSeparate(ModeRGB,ModeAlpha) -> cast(5440, <>). %% @spec (Bufs::[enum()]) -> ok %% @doc See external documentation. +-spec drawBuffers([enum()]) -> ok. 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. stencilOpSeparate(Face,Sfail,Dpfail,Dppass) -> cast(5442, <>). %% @spec (Frontfunc::enum(),Backfunc::enum(),Ref::integer(),Mask::integer()) -> ok %% @doc See external documentation. +-spec stencilFuncSeparate(enum(),enum(),integer(),integer()) -> ok. stencilFuncSeparate(Frontfunc,Backfunc,Ref,Mask) -> cast(5443, <>). %% @spec (Face::enum(),Mask::integer()) -> ok %% @doc See external documentation. +-spec stencilMaskSeparate(enum(),integer()) -> ok. stencilMaskSeparate(Face,Mask) -> cast(5444, <>). %% @spec (Program::integer(),Shader::integer()) -> ok %% @doc See external documentation. +-spec attachShader(integer(),integer()) -> ok. attachShader(Program,Shader) -> cast(5445, <>). %% @spec (Program::integer(),Index::integer(),Name::string()) -> ok %% @doc See external documentation. +-spec bindAttribLocation(integer(),integer(),string()) -> ok. bindAttribLocation(Program,Index,Name) -> cast(5446, <>). %% @spec (Shader::integer()) -> ok %% @doc See external documentation. +-spec compileShader(integer()) -> ok. compileShader(Shader) -> cast(5447, <>). %% @spec () -> integer() %% @doc See external documentation. +-spec createProgram() -> integer(). createProgram() -> call(5448, <<>>). %% @spec (Type::enum()) -> integer() %% @doc See external documentation. +-spec createShader(enum()) -> integer(). createShader(Type) -> call(5449, <>). %% @spec (Program::integer()) -> ok %% @doc See external documentation. +-spec deleteProgram(integer()) -> ok. deleteProgram(Program) -> cast(5450, <>). %% @spec (Shader::integer()) -> ok %% @doc See external documentation. +-spec deleteShader(integer()) -> ok. deleteShader(Shader) -> cast(5451, <>). %% @spec (Program::integer(),Shader::integer()) -> ok %% @doc See external documentation. +-spec detachShader(integer(),integer()) -> ok. detachShader(Program,Shader) -> cast(5452, <>). %% @spec (Index::integer()) -> ok %% @doc See external documentation. +-spec disableVertexAttribArray(integer()) -> ok. disableVertexAttribArray(Index) -> cast(5453, <>). %% @spec (Index::integer()) -> ok %% @doc See external documentation. +-spec enableVertexAttribArray(integer()) -> ok. 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()}. 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()}. getActiveUniform(Program,Index,BufSize) -> call(5456, <>). %% @spec (Program::integer(),MaxCount::integer()) -> [integer()] %% @doc See external documentation. +-spec getAttachedShaders(integer(),integer()) -> [integer()]. getAttachedShaders(Program,MaxCount) -> call(5457, <>). %% @spec (Program::integer(),Name::string()) -> integer() %% @doc See external documentation. +-spec getAttribLocation(integer(),string()) -> integer(). getAttribLocation(Program,Name) -> call(5458, <>). %% @spec (Program::integer(),Pname::enum()) -> integer() %% @doc See external documentation. +-spec getProgramiv(integer(),enum()) -> integer(). getProgramiv(Program,Pname) -> call(5459, <>). %% @spec (Program::integer(),BufSize::integer()) -> string() %% @doc See external documentation. +-spec getProgramInfoLog(integer(),integer()) -> string(). getProgramInfoLog(Program,BufSize) -> call(5460, <>). %% @spec (Shader::integer(),Pname::enum()) -> integer() %% @doc See external documentation. +-spec getShaderiv(integer(),enum()) -> integer(). getShaderiv(Shader,Pname) -> call(5461, <>). %% @spec (Shader::integer(),BufSize::integer()) -> string() %% @doc See external documentation. +-spec getShaderInfoLog(integer(),integer()) -> string(). getShaderInfoLog(Shader,BufSize) -> call(5462, <>). %% @spec (Shader::integer(),BufSize::integer()) -> string() %% @doc See external documentation. +-spec getShaderSource(integer(),integer()) -> string(). getShaderSource(Shader,BufSize) -> call(5463, <>). %% @spec (Program::integer(),Name::string()) -> integer() %% @doc See external documentation. +-spec getUniformLocation(integer(),string()) -> integer(). getUniformLocation(Program,Name) -> call(5464, <>). -%% @spec (Program::integer(),Location::integer()) -> {float()} +%% @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()}. getUniformfv(Program,Location) -> call(5465, <>). -%% @spec (Program::integer(),Location::integer()) -> {integer()} +%% @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()}. getUniformiv(Program,Location) -> call(5466, <>). -%% @spec (Index::integer(),Pname::enum()) -> {float()} +%% @spec (Index::integer(),Pname::enum()) -> {float(),float(),float(),float()} %% @doc See external documentation. +-spec getVertexAttribdv(integer(),enum()) -> {float(),float(),float(),float()}. getVertexAttribdv(Index,Pname) -> call(5467, <>). -%% @spec (Index::integer(),Pname::enum()) -> {float()} +%% @spec (Index::integer(),Pname::enum()) -> {float(),float(),float(),float()} %% @doc See external documentation. +-spec getVertexAttribfv(integer(),enum()) -> {float(),float(),float(),float()}. getVertexAttribfv(Index,Pname) -> call(5468, <>). -%% @spec (Index::integer(),Pname::enum()) -> {integer()} +%% @spec (Index::integer(),Pname::enum()) -> {integer(),integer(),integer(),integer()} %% @doc See external documentation. +-spec getVertexAttribiv(integer(),enum()) -> {integer(),integer(),integer(),integer()}. getVertexAttribiv(Index,Pname) -> call(5469, <>). %% @spec (Program::integer()) -> 0|1 %% @doc See external documentation. +-spec isProgram(integer()) -> 0|1. isProgram(Program) -> call(5470, <>). %% @spec (Shader::integer()) -> 0|1 %% @doc See external documentation. +-spec isShader(integer()) -> 0|1. isShader(Shader) -> call(5471, <>). %% @spec (Program::integer()) -> ok %% @doc See external documentation. +-spec linkProgram(integer()) -> ok. linkProgram(Program) -> cast(5472, <>). %% @spec (Shader::integer(),String::[string()]) -> ok %% @doc See external documentation. +-spec shaderSource(integer(),[string()]) -> ok. 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. useProgram(Program) -> cast(5474, <>). %% @spec (Location::integer(),V0::float()) -> ok %% @doc See external documentation. +-spec uniform1f(integer(),float()) -> ok. uniform1f(Location,V0) -> cast(5475, <>). %% @spec (Location::integer(),V0::float(),V1::float()) -> ok %% @doc See external documentation. +-spec uniform2f(integer(),float(),float()) -> ok. 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. 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. uniform4f(Location,V0,V1,V2,V3) -> cast(5478, <>). %% @spec (Location::integer(),V0::integer()) -> ok %% @doc See external documentation. +-spec uniform1i(integer(),integer()) -> ok. uniform1i(Location,V0) -> cast(5479, <>). %% @spec (Location::integer(),V0::integer(),V1::integer()) -> ok %% @doc See external documentation. +-spec uniform2i(integer(),integer(),integer()) -> ok. 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. 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. uniform4i(Location,V0,V1,V2,V3) -> cast(5482, <>). %% @spec (Location::integer(),Value::[float()]) -> ok %% @doc See external documentation. +-spec uniform1fv(integer(),[float()]) -> ok. uniform1fv(Location,Value) -> cast(5483, <> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>). -%% @spec (Location::integer(),Value::[{float()}]) -> ok +%% @spec (Location::integer(),Value::[{float(),float()}]) -> ok %% @doc See external documentation. +-spec uniform2fv(integer(),[{float(),float()}]) -> ok. uniform2fv(Location,Value) -> cast(5484, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{float()}]) -> ok +%% @spec (Location::integer(),Value::[{float(),float(),float()}]) -> ok %% @doc See external documentation. +-spec uniform3fv(integer(),[{float(),float(),float()}]) -> ok. uniform3fv(Location,Value) -> cast(5485, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{float()}]) -> ok +%% @spec (Location::integer(),Value::[{float(),float(),float(),float()}]) -> ok %% @doc See external documentation. +-spec uniform4fv(integer(),[{float(),float(),float(),float()}]) -> ok. 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. uniform1iv(Location,Value) -> cast(5487, <> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>). -%% @spec (Location::integer(),Value::[{integer()}]) -> ok +%% @spec (Location::integer(),Value::[{integer(),integer()}]) -> ok %% @doc See external documentation. +-spec uniform2iv(integer(),[{integer(),integer()}]) -> ok. uniform2iv(Location,Value) -> cast(5488, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{integer()}]) -> ok +%% @spec (Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok %% @doc See external documentation. +-spec uniform3iv(integer(),[{integer(),integer(),integer()}]) -> ok. uniform3iv(Location,Value) -> cast(5489, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{integer()}]) -> ok +%% @spec (Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok %% @doc See external documentation. +-spec uniform4iv(integer(),[{integer(),integer(),integer(),integer()}]) -> ok. uniform4iv(Location,Value) -> cast(5490, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok +%% @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. uniformMatrix2fv(Location,Transpose,Value) -> cast(5491, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok +%% @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. 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()}]) -> ok +%% @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. 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. validateProgram(Program) -> cast(5494, <>). %% @spec (Index::integer(),X::float()) -> ok %% @doc See external documentation. +-spec vertexAttrib1d(integer(),float()) -> ok. vertexAttrib1d(Index,X) -> cast(5495, <>). %% @spec (Index,{X}) -> ok %% @equiv vertexAttrib1d(Index,X) +-spec vertexAttrib1dv(integer(),{float()}) -> ok. vertexAttrib1dv(Index,{X}) -> vertexAttrib1d(Index,X). %% @spec (Index::integer(),X::float()) -> ok %% @doc See external documentation. +-spec vertexAttrib1f(integer(),float()) -> ok. vertexAttrib1f(Index,X) -> cast(5496, <>). %% @spec (Index,{X}) -> ok %% @equiv vertexAttrib1f(Index,X) +-spec vertexAttrib1fv(integer(),{float()}) -> ok. vertexAttrib1fv(Index,{X}) -> vertexAttrib1f(Index,X). %% @spec (Index::integer(),X::integer()) -> ok %% @doc See external documentation. +-spec vertexAttrib1s(integer(),integer()) -> ok. vertexAttrib1s(Index,X) -> cast(5497, <>). %% @spec (Index,{X}) -> ok %% @equiv vertexAttrib1s(Index,X) +-spec vertexAttrib1sv(integer(),{integer()}) -> ok. vertexAttrib1sv(Index,{X}) -> vertexAttrib1s(Index,X). %% @spec (Index::integer(),X::float(),Y::float()) -> ok %% @doc See external documentation. +-spec vertexAttrib2d(integer(),float(),float()) -> ok. vertexAttrib2d(Index,X,Y) -> cast(5498, <>). %% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttrib2d(Index,X,Y) +-spec vertexAttrib2dv(integer(),{float(),float()}) -> ok. 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. vertexAttrib2f(Index,X,Y) -> cast(5499, <>). %% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttrib2f(Index,X,Y) +-spec vertexAttrib2fv(integer(),{float(),float()}) -> ok. 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. vertexAttrib2s(Index,X,Y) -> cast(5500, <>). %% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttrib2s(Index,X,Y) +-spec vertexAttrib2sv(integer(),{integer(),integer()}) -> ok. 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. 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. 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. 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. 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. 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. vertexAttrib3sv(Index,{X,Y,Z}) -> vertexAttrib3s(Index,X,Y,Z). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4Nbv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttrib4Nbv(Index,{V1,V2,V3,V4}) -> cast(5504, <>). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4Niv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttrib4Niv(Index,{V1,V2,V3,V4}) -> cast(5505, <>). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4Nsv(integer(),{integer(),integer(),integer(),integer()}) -> ok. 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. 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. vertexAttrib4Nubv(Index,{X,Y,Z,W}) -> vertexAttrib4Nub(Index,X,Y,Z,W). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4Nuiv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttrib4Nuiv(Index,{V1,V2,V3,V4}) -> cast(5508, <>). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4Nusv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttrib4Nusv(Index,{V1,V2,V3,V4}) -> cast(5509, <>). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4bv(integer(),{integer(),integer(),integer(),integer()}) -> ok. 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. 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. 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. 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. vertexAttrib4fv(Index,{X,Y,Z,W}) -> vertexAttrib4f(Index,X,Y,Z,W). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4iv(integer(),{integer(),integer(),integer(),integer()}) -> ok. 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. 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. vertexAttrib4sv(Index,{X,Y,Z,W}) -> vertexAttrib4s(Index,X,Y,Z,W). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4ubv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttrib4ubv(Index,{V1,V2,V3,V4}) -> cast(5515, <>). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4uiv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttrib4uiv(Index,{V1,V2,V3,V4}) -> cast(5516, <>). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttrib4usv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttrib4usv(Index,{V1,V2,V3,V4}) -> cast(5517, <>). -%% @spec (Index::integer(),Size::integer(),Type::enum(),Normalized::0|1,Stride::integer(),Pointer::offset()|binary()) -> ok +%% @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. 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()}]) -> ok +%% @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. uniformMatrix2x3fv(Location,Transpose,Value) -> cast(5520, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok +%% @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. uniformMatrix3x2fv(Location,Transpose,Value) -> cast(5521, <> || {V1,V2,V3,V4,V5,V6} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok +%% @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. uniformMatrix2x4fv(Location,Transpose,Value) -> cast(5522, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok +%% @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. uniformMatrix4x2fv(Location,Transpose,Value) -> cast(5523, <> || {V1,V2,V3,V4,V5,V6,V7,V8} <- Value>>)/binary>>). -%% @spec (Location::integer(),Transpose::0|1,Value::[{float()}]) -> ok +%% @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. 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()}]) -> ok +%% @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. 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. 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]. getBooleani_v(Target,Index) -> call(5527, <>). %% @spec (Target::enum(),Index::integer()) -> [integer()] %% @doc See external documentation. +-spec getIntegeri_v(enum(),integer()) -> [integer()]. getIntegeri_v(Target,Index) -> call(5528, <>). %% @spec (Target::enum(),Index::integer()) -> ok %% @doc See external documentation. +-spec enablei(enum(),integer()) -> ok. enablei(Target,Index) -> cast(5529, <>). %% @spec (Target::enum(),Index::integer()) -> ok %% @doc See external documentation. +-spec disablei(enum(),integer()) -> ok. disablei(Target,Index) -> cast(5530, <>). %% @spec (Target::enum(),Index::integer()) -> 0|1 %% @doc See external documentation. +-spec isEnabledi(enum(),integer()) -> 0|1. isEnabledi(Target,Index) -> call(5531, <>). %% @spec (PrimitiveMode::enum()) -> ok %% @doc See external documentation. +-spec beginTransformFeedback(enum()) -> ok. beginTransformFeedback(PrimitiveMode) -> cast(5532, <>). %% @spec () -> ok %% @doc See external documentation. +-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. 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. bindBufferBase(Target,Index,Buffer) -> cast(5535, <>). %% @spec (Program::integer(),Varyings::[string()],BufferMode::enum()) -> ok %% @doc See external documentation. +-spec transformFeedbackVaryings(integer(),[string()],enum()) -> ok. 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()}. getTransformFeedbackVarying(Program,Index,BufSize) -> call(5537, <>). %% @spec (Target::enum(),Clamp::enum()) -> ok %% @doc See external documentation. +-spec clampColor(enum(),enum()) -> ok. clampColor(Target,Clamp) -> cast(5538, <>). %% @spec (Id::integer(),Mode::enum()) -> ok %% @doc See external documentation. +-spec beginConditionalRender(integer(),enum()) -> ok. beginConditionalRender(Id,Mode) -> cast(5539, <>). %% @spec () -> ok %% @doc See external documentation. +-spec endConditionalRender() -> ok. endConditionalRender() -> cast(5540, <<>>). -%% @spec (Index::integer(),Size::integer(),Type::enum(),Stride::integer(),Pointer::offset()|binary()) -> ok +%% @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. 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()} +%% @spec (Index::integer(),Pname::enum()) -> {integer(),integer(),integer(),integer()} %% @doc See external documentation. +-spec getVertexAttribIiv(integer(),enum()) -> {integer(),integer(),integer(),integer()}. getVertexAttribIiv(Index,Pname) -> call(5543, <>). -%% @spec (Index::integer(),Pname::enum()) -> {integer()} +%% @spec (Index::integer(),Pname::enum()) -> {integer(),integer(),integer(),integer()} %% @doc See external documentation. +-spec getVertexAttribIuiv(integer(),enum()) -> {integer(),integer(),integer(),integer()}. getVertexAttribIuiv(Index,Pname) -> call(5544, <>). -%% @spec (Program::integer(),Location::integer()) -> {integer()} +%% @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()}. getUniformuiv(Program,Location) -> call(5545, <>). %% @spec (Program::integer(),Color::integer(),Name::string()) -> ok %% @doc See external documentation. +-spec bindFragDataLocation(integer(),integer(),string()) -> ok. bindFragDataLocation(Program,Color,Name) -> cast(5546, <>). %% @spec (Program::integer(),Name::string()) -> integer() %% @doc See external documentation. +-spec getFragDataLocation(integer(),string()) -> integer(). getFragDataLocation(Program,Name) -> call(5547, <>). %% @spec (Location::integer(),V0::integer()) -> ok %% @doc See external documentation. +-spec uniform1ui(integer(),integer()) -> ok. uniform1ui(Location,V0) -> cast(5548, <>). %% @spec (Location::integer(),V0::integer(),V1::integer()) -> ok %% @doc See external documentation. +-spec uniform2ui(integer(),integer(),integer()) -> ok. uniform2ui(Location,V0,V1) -> cast(5549, <>). %% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok %% @doc See external documentation. +-spec uniform3ui(integer(),integer(),integer(),integer()) -> ok. uniform3ui(Location,V0,V1,V2) -> cast(5550, <>). %% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer(),V3::integer()) -> ok %% @doc See external documentation. +-spec uniform4ui(integer(),integer(),integer(),integer(),integer()) -> ok. uniform4ui(Location,V0,V1,V2,V3) -> cast(5551, <>). %% @spec (Location::integer(),Value::[integer()]) -> ok %% @doc See external documentation. +-spec uniform1uiv(integer(),[integer()]) -> ok. uniform1uiv(Location,Value) -> cast(5552, <> || C <- Value>>)/binary,0:(((length(Value)) rem 2)*32)>>). -%% @spec (Location::integer(),Value::[{integer()}]) -> ok +%% @spec (Location::integer(),Value::[{integer(),integer()}]) -> ok %% @doc See external documentation. +-spec uniform2uiv(integer(),[{integer(),integer()}]) -> ok. uniform2uiv(Location,Value) -> cast(5553, <> || {V1,V2} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{integer()}]) -> ok +%% @spec (Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok %% @doc See external documentation. +-spec uniform3uiv(integer(),[{integer(),integer(),integer()}]) -> ok. uniform3uiv(Location,Value) -> cast(5554, <> || {V1,V2,V3} <- Value>>)/binary>>). -%% @spec (Location::integer(),Value::[{integer()}]) -> ok +%% @spec (Location::integer(),Value::[{integer(),integer(),integer(),integer()}]) -> ok %% @doc See external documentation. +-spec uniform4uiv(integer(),[{integer(),integer(),integer(),integer()}]) -> ok. uniform4uiv(Location,Value) -> cast(5555, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). %% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. +-spec texParameterIiv(enum(),enum(),{integer()}) -> ok. texParameterIiv(Target,Pname,Params) -> cast(5556, <> ||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. texParameterIuiv(Target,Pname,Params) -> cast(5557, <> ||C <- tuple_to_list(Params)>>)/binary,0:(((1+size(Params)) rem 2)*32)>>). -%% @spec (Target::enum(),Pname::enum()) -> {integer()} +%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} %% @doc See external documentation. +-spec getTexParameterIiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. getTexParameterIiv(Target,Pname) -> call(5558, <>). -%% @spec (Target::enum(),Pname::enum()) -> {integer()} +%% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} %% @doc See external documentation. +-spec getTexParameterIuiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. getTexParameterIuiv(Target,Pname) -> call(5559, <>). %% @spec (Buffer::enum(),Drawbuffer::integer(),Value::{integer()}) -> ok %% @doc See external documentation. +-spec clearBufferiv(enum(),integer(),{integer()}) -> ok. clearBufferiv(Buffer,Drawbuffer,Value) -> cast(5560, <> ||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. clearBufferuiv(Buffer,Drawbuffer,Value) -> cast(5561, <> ||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. clearBufferfv(Buffer,Drawbuffer,Value) -> cast(5562, <> ||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. clearBufferfi(Buffer,Drawbuffer,Depth,Stencil) -> cast(5563, <>). %% @spec (Name::enum(),Index::integer()) -> string() %% @doc See external documentation. +-spec getStringi(enum(),integer()) -> string(). getStringi(Name,Index) -> call(5564, <>). %% @spec (Index::integer(),X::integer()) -> ok %% @doc See external documentation. +-spec vertexAttribI1i(integer(),integer()) -> ok. vertexAttribI1i(Index,X) -> cast(5565, <>). %% @spec (Index::integer(),X::integer(),Y::integer()) -> ok %% @doc See external documentation. +-spec vertexAttribI2i(integer(),integer(),integer()) -> ok. vertexAttribI2i(Index,X,Y) -> cast(5566, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. +-spec vertexAttribI3i(integer(),integer(),integer(),integer()) -> ok. vertexAttribI3i(Index,X,Y,Z) -> cast(5567, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. +-spec vertexAttribI4i(integer(),integer(),integer(),integer(),integer()) -> ok. vertexAttribI4i(Index,X,Y,Z,W) -> cast(5568, <>). %% @spec (Index::integer(),X::integer()) -> ok %% @doc See external documentation. +-spec vertexAttribI1ui(integer(),integer()) -> ok. vertexAttribI1ui(Index,X) -> cast(5569, <>). %% @spec (Index::integer(),X::integer(),Y::integer()) -> ok %% @doc See external documentation. +-spec vertexAttribI2ui(integer(),integer(),integer()) -> ok. vertexAttribI2ui(Index,X,Y) -> cast(5570, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok %% @doc See external documentation. +-spec vertexAttribI3ui(integer(),integer(),integer(),integer()) -> ok. vertexAttribI3ui(Index,X,Y,Z) -> cast(5571, <>). %% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok %% @doc See external documentation. +-spec vertexAttribI4ui(integer(),integer(),integer(),integer(),integer()) -> ok. vertexAttribI4ui(Index,X,Y,Z,W) -> cast(5572, <>). %% @spec (Index,{X}) -> ok %% @equiv vertexAttribI1i(Index,X) +-spec vertexAttribI1iv(integer(),{integer()}) -> ok. vertexAttribI1iv(Index,{X}) -> vertexAttribI1i(Index,X). %% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttribI2i(Index,X,Y) +-spec vertexAttribI2iv(integer(),{integer(),integer()}) -> ok. 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. 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. 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. vertexAttribI1uiv(Index,{X}) -> vertexAttribI1ui(Index,X). %% @spec (Index,{X,Y}) -> ok %% @equiv vertexAttribI2ui(Index,X,Y) +-spec vertexAttribI2uiv(integer(),{integer(),integer()}) -> ok. 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. 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. vertexAttribI4uiv(Index,{X,Y,Z,W}) -> vertexAttribI4ui(Index,X,Y,Z,W). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttribI4bv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttribI4bv(Index,{V1,V2,V3,V4}) -> cast(5573, <>). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttribI4sv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttribI4sv(Index,{V1,V2,V3,V4}) -> cast(5574, <>). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttribI4ubv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttribI4ubv(Index,{V1,V2,V3,V4}) -> cast(5575, <>). -%% @spec (Index::integer(),V::{integer()}) -> ok +%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok %% @doc See external documentation. +-spec vertexAttribI4usv(integer(),{integer(),integer(),integer(),integer()}) -> ok. vertexAttribI4usv(Index,{V1,V2,V3,V4}) -> cast(5576, <>). %% @spec (Mode::enum(),First::integer(),Count::integer(),Primcount::integer()) -> ok %% @doc See external documentation. +-spec drawArraysInstanced(enum(),integer(),integer(),integer()) -> ok. drawArraysInstanced(Mode,First,Count,Primcount) -> cast(5577, <>). -%% @spec (Mode::enum(),Count::integer(),Type::enum(),Indices::offset()|binary(),Primcount::integer()) -> ok +%% @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. drawElementsInstanced(Mode,Count,Type,Indices,Primcount) when is_integer(Indices) -> cast(5578, <>); drawElementsInstanced(Mode,Count,Type,Indices,Primcount) -> @@ -3505,37 +4145,43 @@ drawElementsInstanced(Mode,Count,Type,Indices,Primcount) -> %% @spec (Target::enum(),Internalformat::enum(),Buffer::integer()) -> ok %% @doc See external documentation. +-spec texBuffer(enum(),enum(),integer()) -> ok. texBuffer(Target,Internalformat,Buffer) -> cast(5580, <>). %% @spec (Index::integer()) -> ok %% @doc See external documentation. +-spec primitiveRestartIndex(integer()) -> ok. primitiveRestartIndex(Index) -> cast(5581, <>). -%% @spec (M::{float()}) -> ok +%% @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. loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5582, <>); loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5582, <>). -%% @spec (M::{float()}) -> ok +%% @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. loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5583, <>); loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5583, <>). -%% @spec (M::{float()}) -> ok +%% @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. multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5584, <>); multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> cast(5584, <>). -%% @spec (M::{float()}) -> ok +%% @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. multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> cast(5585, <>); multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> @@ -3543,522 +4189,623 @@ multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. +-spec weightbvARB([integer()]) -> ok. weightbvARB(Weights) -> cast(5586, <<(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. weightsvARB(Weights) -> cast(5587, <<(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. weightivARB(Weights) -> cast(5588, <<(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. weightfvARB(Weights) -> cast(5589, <<(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. weightdvARB(Weights) -> cast(5590, <<(length(Weights)):?GLuint,0:32, (<< <> || C <- Weights>>)/binary>>). %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. +-spec weightubvARB([integer()]) -> ok. weightubvARB(Weights) -> cast(5591, <<(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. weightusvARB(Weights) -> cast(5592, <<(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. weightuivARB(Weights) -> cast(5593, <<(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. vertexBlendARB(Count) -> cast(5594, <>). %% @spec (Index::integer()) -> ok %% @doc See external documentation. +-spec currentPaletteMatrixARB(integer()) -> ok. currentPaletteMatrixARB(Index) -> cast(5595, <>). %% @spec (Indices::[integer()]) -> ok %% @doc See external documentation. +-spec matrixIndexubvARB([integer()]) -> ok. matrixIndexubvARB(Indices) -> cast(5596, <<(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. matrixIndexusvARB(Indices) -> cast(5597, <<(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. matrixIndexuivARB(Indices) -> cast(5598, <<(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. programStringARB(Target,Format,String) -> cast(5599, <>). %% @spec (Target::enum(),Program::integer()) -> ok %% @doc See external documentation. +-spec bindProgramARB(enum(),integer()) -> ok. bindProgramARB(Target,Program) -> cast(5600, <>). %% @spec (Programs::[integer()]) -> ok %% @doc See external documentation. +-spec deleteProgramsARB([integer()]) -> ok. deleteProgramsARB(Programs) -> cast(5601, <<(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()]. genProgramsARB(N) -> call(5602, <>). %% @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. programEnvParameter4dARB(Target,Index,X,Y,Z,W) -> cast(5603, <>). -%% @spec (Target::enum(),Index::integer(),Params::{float()}) -> ok +%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok %% @doc See external documentation. +-spec programEnvParameter4dvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok. programEnvParameter4dvARB(Target,Index,{P1,P2,P3,P4}) -> cast(5604, <>). %% @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. programEnvParameter4fARB(Target,Index,X,Y,Z,W) -> cast(5605, <>). -%% @spec (Target::enum(),Index::integer(),Params::{float()}) -> ok +%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok %% @doc See external documentation. +-spec programEnvParameter4fvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok. programEnvParameter4fvARB(Target,Index,{P1,P2,P3,P4}) -> cast(5606, <>). %% @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. programLocalParameter4dARB(Target,Index,X,Y,Z,W) -> cast(5607, <>). -%% @spec (Target::enum(),Index::integer(),Params::{float()}) -> ok +%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok %% @doc See external documentation. +-spec programLocalParameter4dvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok. programLocalParameter4dvARB(Target,Index,{P1,P2,P3,P4}) -> cast(5608, <>). %% @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. programLocalParameter4fARB(Target,Index,X,Y,Z,W) -> cast(5609, <>). -%% @spec (Target::enum(),Index::integer(),Params::{float()}) -> ok +%% @spec (Target::enum(),Index::integer(),Params::{float(),float(),float(),float()}) -> ok %% @doc See external documentation. +-spec programLocalParameter4fvARB(enum(),integer(),{float(),float(),float(),float()}) -> ok. programLocalParameter4fvARB(Target,Index,{P1,P2,P3,P4}) -> cast(5610, <>). -%% @spec (Target::enum(),Index::integer()) -> {float()} +%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} %% @doc See external documentation. +-spec getProgramEnvParameterdvARB(enum(),integer()) -> {float(),float(),float(),float()}. getProgramEnvParameterdvARB(Target,Index) -> call(5611, <>). -%% @spec (Target::enum(),Index::integer()) -> {float()} +%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} %% @doc See external documentation. +-spec getProgramEnvParameterfvARB(enum(),integer()) -> {float(),float(),float(),float()}. getProgramEnvParameterfvARB(Target,Index) -> call(5612, <>). -%% @spec (Target::enum(),Index::integer()) -> {float()} +%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} %% @doc See external documentation. +-spec getProgramLocalParameterdvARB(enum(),integer()) -> {float(),float(),float(),float()}. getProgramLocalParameterdvARB(Target,Index) -> call(5613, <>). -%% @spec (Target::enum(),Index::integer()) -> {float()} +%% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} %% @doc See external documentation. +-spec getProgramLocalParameterfvARB(enum(),integer()) -> {float(),float(),float(),float()}. getProgramLocalParameterfvARB(Target,Index) -> call(5614, <>). %% @spec (Target::enum(),Pname::enum(),String::mem()) -> ok %% @doc See external documentation. +-spec getProgramStringARB(enum(),enum(),mem()) -> ok. getProgramStringARB(Target,Pname,String) -> send_bin(String), call(5615, <>). %% @spec (Obj::integer()) -> ok %% @doc See external documentation. +-spec deleteObjectARB(integer()) -> ok. deleteObjectARB(Obj) -> cast(5616, <>). %% @spec (Pname::enum()) -> integer() %% @doc See external documentation. +-spec getHandleARB(enum()) -> integer(). getHandleARB(Pname) -> call(5617, <>). %% @spec (ContainerObj::integer(),AttachedObj::integer()) -> ok %% @doc See external documentation. +-spec detachObjectARB(integer(),integer()) -> ok. detachObjectARB(ContainerObj,AttachedObj) -> cast(5618, <>). %% @spec (ShaderType::enum()) -> integer() %% @doc See external documentation. +-spec createShaderObjectARB(enum()) -> integer(). createShaderObjectARB(ShaderType) -> call(5619, <>). %% @spec (ShaderObj::integer(),String::[string()]) -> ok %% @doc See external documentation. +-spec shaderSourceARB(integer(),[string()]) -> ok. shaderSourceARB(ShaderObj,String) -> StringTemp = list_to_binary([[Str|[0]] || Str <- String ]), cast(5620, <>). %% @spec (ShaderObj::integer()) -> ok %% @doc See external documentation. +-spec compileShaderARB(integer()) -> ok. compileShaderARB(ShaderObj) -> cast(5621, <>). %% @spec () -> integer() %% @doc See external documentation. +-spec createProgramObjectARB() -> integer(). createProgramObjectARB() -> call(5622, <<>>). %% @spec (ContainerObj::integer(),Obj::integer()) -> ok %% @doc See external documentation. +-spec attachObjectARB(integer(),integer()) -> ok. attachObjectARB(ContainerObj,Obj) -> cast(5623, <>). %% @spec (ProgramObj::integer()) -> ok %% @doc See external documentation. +-spec linkProgramARB(integer()) -> ok. linkProgramARB(ProgramObj) -> cast(5624, <>). %% @spec (ProgramObj::integer()) -> ok %% @doc See external documentation. +-spec useProgramObjectARB(integer()) -> ok. useProgramObjectARB(ProgramObj) -> cast(5625, <>). %% @spec (ProgramObj::integer()) -> ok %% @doc See external documentation. +-spec validateProgramARB(integer()) -> ok. validateProgramARB(ProgramObj) -> cast(5626, <>). %% @spec (Obj::integer(),Pname::enum()) -> float() %% @doc See external documentation. +-spec getObjectParameterfvARB(integer(),enum()) -> float(). getObjectParameterfvARB(Obj,Pname) -> call(5627, <>). %% @spec (Obj::integer(),Pname::enum()) -> integer() %% @doc See external documentation. +-spec getObjectParameterivARB(integer(),enum()) -> integer(). getObjectParameterivARB(Obj,Pname) -> call(5628, <>). %% @spec (Obj::integer(),MaxLength::integer()) -> string() %% @doc See external documentation. +-spec getInfoLogARB(integer(),integer()) -> string(). getInfoLogARB(Obj,MaxLength) -> call(5629, <>). %% @spec (ContainerObj::integer(),MaxCount::integer()) -> [integer()] %% @doc See external documentation. +-spec getAttachedObjectsARB(integer(),integer()) -> [integer()]. getAttachedObjectsARB(ContainerObj,MaxCount) -> call(5630, <>). %% @spec (ProgramObj::integer(),Name::string()) -> integer() %% @doc See external documentation. +-spec getUniformLocationARB(integer(),string()) -> integer(). getUniformLocationARB(ProgramObj,Name) -> call(5631, <>). %% @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()}. getActiveUniformARB(ProgramObj,Index,MaxLength) -> call(5632, <>). -%% @spec (ProgramObj::integer(),Location::integer()) -> {float()} +%% @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()}. getUniformfvARB(ProgramObj,Location) -> call(5633, <>). -%% @spec (ProgramObj::integer(),Location::integer()) -> {integer()} +%% @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()}. getUniformivARB(ProgramObj,Location) -> call(5634, <>). %% @spec (Obj::integer(),MaxLength::integer()) -> string() %% @doc See external documentation. +-spec getShaderSourceARB(integer(),integer()) -> string(). getShaderSourceARB(Obj,MaxLength) -> call(5635, <>). %% @spec (ProgramObj::integer(),Index::integer(),Name::string()) -> ok %% @doc See external documentation. +-spec bindAttribLocationARB(integer(),integer(),string()) -> ok. bindAttribLocationARB(ProgramObj,Index,Name) -> cast(5636, <>). %% @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()}. getActiveAttribARB(ProgramObj,Index,MaxLength) -> call(5637, <>). %% @spec (ProgramObj::integer(),Name::string()) -> integer() %% @doc See external documentation. +-spec getAttribLocationARB(integer(),string()) -> integer(). getAttribLocationARB(ProgramObj,Name) -> call(5638, <>). %% @spec (Renderbuffer::integer()) -> 0|1 %% @doc See external documentation. +-spec isRenderbuffer(integer()) -> 0|1. isRenderbuffer(Renderbuffer) -> call(5639, <>). %% @spec (Target::enum(),Renderbuffer::integer()) -> ok %% @doc See external documentation. +-spec bindRenderbuffer(enum(),integer()) -> ok. bindRenderbuffer(Target,Renderbuffer) -> cast(5640, <>). %% @spec (Renderbuffers::[integer()]) -> ok %% @doc See external documentation. +-spec deleteRenderbuffers([integer()]) -> ok. deleteRenderbuffers(Renderbuffers) -> cast(5641, <<(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()]. genRenderbuffers(N) -> call(5642, <>). %% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer()) -> ok %% @doc See external documentation. +-spec renderbufferStorage(enum(),enum(),integer(),integer()) -> ok. renderbufferStorage(Target,Internalformat,Width,Height) -> cast(5643, <>). %% @spec (Target::enum(),Pname::enum()) -> integer() %% @doc See external documentation. +-spec getRenderbufferParameteriv(enum(),enum()) -> integer(). getRenderbufferParameteriv(Target,Pname) -> call(5644, <>). %% @spec (Framebuffer::integer()) -> 0|1 %% @doc See external documentation. +-spec isFramebuffer(integer()) -> 0|1. isFramebuffer(Framebuffer) -> call(5645, <>). %% @spec (Target::enum(),Framebuffer::integer()) -> ok %% @doc See external documentation. +-spec bindFramebuffer(enum(),integer()) -> ok. bindFramebuffer(Target,Framebuffer) -> cast(5646, <>). %% @spec (Framebuffers::[integer()]) -> ok %% @doc See external documentation. +-spec deleteFramebuffers([integer()]) -> ok. deleteFramebuffers(Framebuffers) -> cast(5647, <<(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()]. genFramebuffers(N) -> call(5648, <>). %% @spec (Target::enum()) -> enum() %% @doc See external documentation. +-spec checkFramebufferStatus(enum()) -> enum(). checkFramebufferStatus(Target) -> call(5649, <>). %% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer()) -> ok %% @doc See external documentation. +-spec framebufferTexture1D(enum(),enum(),enum(),integer(),integer()) -> ok. framebufferTexture1D(Target,Attachment,Textarget,Texture,Level) -> cast(5650, <>). %% @spec (Target::enum(),Attachment::enum(),Textarget::enum(),Texture::integer(),Level::integer()) -> ok %% @doc See external documentation. +-spec framebufferTexture2D(enum(),enum(),enum(),integer(),integer()) -> ok. framebufferTexture2D(Target,Attachment,Textarget,Texture,Level) -> cast(5651, <>). %% @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. framebufferTexture3D(Target,Attachment,Textarget,Texture,Level,Zoffset) -> cast(5652, <>). %% @spec (Target::enum(),Attachment::enum(),Renderbuffertarget::enum(),Renderbuffer::integer()) -> ok %% @doc See external documentation. +-spec framebufferRenderbuffer(enum(),enum(),enum(),integer()) -> ok. framebufferRenderbuffer(Target,Attachment,Renderbuffertarget,Renderbuffer) -> cast(5653, <>). %% @spec (Target::enum(),Attachment::enum(),Pname::enum()) -> integer() %% @doc See external documentation. +-spec getFramebufferAttachmentParameteriv(enum(),enum(),enum()) -> integer(). getFramebufferAttachmentParameteriv(Target,Attachment,Pname) -> call(5654, <>). %% @spec (Target::enum()) -> ok %% @doc See external documentation. +-spec generateMipmap(enum()) -> ok. generateMipmap(Target) -> cast(5655, <>). %% @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. blitFramebuffer(SrcX0,SrcY0,SrcX1,SrcY1,DstX0,DstY0,DstX1,DstY1,Mask,Filter) -> cast(5656, <>). %% @spec (Target::enum(),Samples::integer(),Internalformat::enum(),Width::integer(),Height::integer()) -> ok %% @doc See external documentation. +-spec renderbufferStorageMultisample(enum(),integer(),enum(),integer(),integer()) -> ok. renderbufferStorageMultisample(Target,Samples,Internalformat,Width,Height) -> cast(5657, <>). %% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer(),Layer::integer()) -> ok %% @doc See external documentation. +-spec framebufferTextureLayer(enum(),enum(),integer(),integer(),integer()) -> ok. framebufferTextureLayer(Target,Attachment,Texture,Level,Layer) -> cast(5658, <>). %% @spec (Program::integer(),Pname::enum(),Value::integer()) -> ok %% @doc See external documentation. +-spec programParameteriARB(integer(),enum(),integer()) -> ok. programParameteriARB(Program,Pname,Value) -> cast(5659, <>). %% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer()) -> ok %% @doc See external documentation. +-spec framebufferTextureARB(enum(),enum(),integer(),integer()) -> ok. framebufferTextureARB(Target,Attachment,Texture,Level) -> cast(5660, <>). %% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer(),Face::enum()) -> ok %% @doc See external documentation. +-spec framebufferTextureFaceARB(enum(),enum(),integer(),integer(),enum()) -> ok. framebufferTextureFaceARB(Target,Attachment,Texture,Level,Face) -> cast(5661, <>). %% @spec (Index::integer(),Divisor::integer()) -> ok %% @doc See external documentation. +-spec vertexAttribDivisorARB(integer(),integer()) -> ok. vertexAttribDivisorARB(Index,Divisor) -> cast(5662, <>). %% @spec (Target::enum(),Offset::integer(),Length::integer()) -> ok %% @doc See external documentation. +-spec flushMappedBufferRange(enum(),integer(),integer()) -> ok. flushMappedBufferRange(Target,Offset,Length) -> cast(5663, <>). %% @spec (Array::integer()) -> ok %% @doc See external documentation. +-spec bindVertexArray(integer()) -> ok. bindVertexArray(Array) -> cast(5664, <>). %% @spec (Arrays::[integer()]) -> ok %% @doc See external documentation. +-spec deleteVertexArrays([integer()]) -> ok. deleteVertexArrays(Arrays) -> cast(5665, <<(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()]. genVertexArrays(N) -> call(5666, <>). %% @spec (Array::integer()) -> 0|1 %% @doc See external documentation. +-spec isVertexArray(integer()) -> 0|1. isVertexArray(Array) -> call(5667, <>). %% @spec (Program::integer(),UniformNames::[string()]) -> [integer()] %% @doc See external documentation. +-spec getUniformIndices(integer(),[string()]) -> [integer()]. getUniformIndices(Program,UniformNames) -> UniformNamesTemp = list_to_binary([[Str|[0]] || Str <- UniformNames ]), call(5668, <>). %% @spec (Program::integer(),UniformIndices::[integer()],Pname::enum()) -> [integer()] %% @doc See external documentation. +-spec getActiveUniformsiv(integer(),[integer()],enum()) -> [integer()]. getActiveUniformsiv(Program,UniformIndices,Pname) -> call(5669, <> || 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(). getActiveUniformName(Program,UniformIndex,BufSize) -> call(5670, <>). %% @spec (Program::integer(),UniformBlockName::string()) -> integer() %% @doc See external documentation. +-spec getUniformBlockIndex(integer(),string()) -> integer(). getUniformBlockIndex(Program,UniformBlockName) -> call(5671, <>). %% @spec (Program::integer(),UniformBlockIndex::integer(),Pname::enum(),Params::mem()) -> ok %% @doc See external documentation. +-spec getActiveUniformBlockiv(integer(),integer(),enum(),mem()) -> ok. getActiveUniformBlockiv(Program,UniformBlockIndex,Pname,Params) -> send_bin(Params), call(5672, <>). %% @spec (Program::integer(),UniformBlockIndex::integer(),BufSize::integer()) -> string() %% @doc See external documentation. +-spec getActiveUniformBlockName(integer(),integer(),integer()) -> string(). getActiveUniformBlockName(Program,UniformBlockIndex,BufSize) -> call(5673, <>). %% @spec (Program::integer(),UniformBlockIndex::integer(),UniformBlockBinding::integer()) -> ok %% @doc See external documentation. +-spec uniformBlockBinding(integer(),integer(),integer()) -> ok. uniformBlockBinding(Program,UniformBlockIndex,UniformBlockBinding) -> cast(5674, <>). %% @spec (ReadTarget::enum(),WriteTarget::enum(),ReadOffset::integer(),WriteOffset::integer(),Size::integer()) -> ok %% @doc See external documentation. +-spec copyBufferSubData(enum(),enum(),integer(),integer(),integer()) -> ok. copyBufferSubData(ReadTarget,WriteTarget,ReadOffset,WriteOffset,Size) -> cast(5675, <>). %% @spec () -> ok %% @doc See external documentation. +-spec resizeBuffersMESA() -> ok. resizeBuffersMESA() -> cast(5676, <<>>). %% @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(5677, <>). %% @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(5678, <>). %% @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(5679, <>). %% @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(5680, <>). %% @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. depthBoundsEXT(Zmin,Zmax) -> cast(5681, <>). %% @spec (StencilTagBits::integer(),StencilClearTag::integer()) -> ok %% @doc See external documentation. +-spec stencilClearTagEXT(integer(),integer()) -> ok. stencilClearTagEXT(StencilTagBits,StencilClearTag) -> cast(5682, <>). diff --git a/lib/wx/src/gen/gl_debug.hrl b/lib/wx/src/gen/gl_debug.hrl deleted file mode 100644 index 0b8086f24e..0000000000 --- a/lib/wx/src/gen/gl_debug.hrl +++ /dev/null @@ -1,697 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2008-2010. 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% -%% This file is generated DO NOT EDIT - -gldebug_table() -> -[ - {5037, {gl, accum, 0}}, - {5038, {gl, alphaFunc, 0}}, - {5039, {gl, areTexturesResident, 0}}, - {5040, {gl, arrayElement, 0}}, - {5041, {gl, 'begin', 0}}, - {5042, {gl, bindTexture, 0}}, - {5043, {gl, bitmap, 0}}, - {5044, {gl, bitmap, 0}}, - {5045, {gl, blendFunc, 0}}, - {5046, {gl, callList, 0}}, - {5047, {gl, callLists, 0}}, - {5048, {gl, clear, 0}}, - {5049, {gl, clearAccum, 0}}, - {5050, {gl, clearColor, 0}}, - {5051, {gl, clearDepth, 0}}, - {5052, {gl, clearIndex, 0}}, - {5053, {gl, clearStencil, 0}}, - {5054, {gl, clipPlane, 0}}, - {5055, {gl, color3b, 0}}, - {5056, {gl, color3d, 0}}, - {5057, {gl, color3f, 0}}, - {5058, {gl, color3i, 0}}, - {5059, {gl, color3s, 0}}, - {5060, {gl, color3ub, 0}}, - {5061, {gl, color3ui, 0}}, - {5062, {gl, color3us, 0}}, - {5063, {gl, color4b, 0}}, - {5064, {gl, color4d, 0}}, - {5065, {gl, color4f, 0}}, - {5066, {gl, color4i, 0}}, - {5067, {gl, color4s, 0}}, - {5068, {gl, color4ub, 0}}, - {5069, {gl, color4ui, 0}}, - {5070, {gl, color4us, 0}}, - {5071, {gl, colorMask, 0}}, - {5072, {gl, colorMaterial, 0}}, - {5073, {gl, colorPointer, 0}}, - {5074, {gl, colorPointer, 0}}, - {5075, {gl, copyPixels, 0}}, - {5076, {gl, copyTexImage1D, 0}}, - {5077, {gl, copyTexImage2D, 0}}, - {5078, {gl, copyTexSubImage1D, 0}}, - {5079, {gl, copyTexSubImage2D, 0}}, - {5080, {gl, cullFace, 0}}, - {5081, {gl, deleteLists, 0}}, - {5082, {gl, deleteTextures, 0}}, - {5083, {gl, depthFunc, 0}}, - {5084, {gl, depthMask, 0}}, - {5085, {gl, depthRange, 0}}, - {5086, {gl, disable, 0}}, - {5087, {gl, disableClientState, 0}}, - {5088, {gl, drawArrays, 0}}, - {5089, {gl, drawBuffer, 0}}, - {5090, {gl, drawElements, 0}}, - {5091, {gl, drawElements, 0}}, - {5092, {gl, drawPixels, 0}}, - {5093, {gl, drawPixels, 0}}, - {5094, {gl, edgeFlag, 0}}, - {5095, {gl, edgeFlagPointer, 0}}, - {5096, {gl, edgeFlagPointer, 0}}, - {5097, {gl, enable, 0}}, - {5098, {gl, enableClientState, 0}}, - {5099, {gl, 'end', 0}}, - {5100, {gl, endList, 0}}, - {5101, {gl, evalCoord1d, 0}}, - {5102, {gl, evalCoord1f, 0}}, - {5103, {gl, evalCoord2d, 0}}, - {5104, {gl, evalCoord2f, 0}}, - {5105, {gl, evalMesh1, 0}}, - {5106, {gl, evalMesh2, 0}}, - {5107, {gl, evalPoint1, 0}}, - {5108, {gl, evalPoint2, 0}}, - {5109, {gl, feedbackBuffer, 0}}, - {5110, {gl, finish, 0}}, - {5111, {gl, flush, 0}}, - {5112, {gl, fogf, 0}}, - {5113, {gl, fogfv, 0}}, - {5114, {gl, fogi, 0}}, - {5115, {gl, fogiv, 0}}, - {5116, {gl, frontFace, 0}}, - {5117, {gl, frustum, 0}}, - {5118, {gl, genLists, 0}}, - {5119, {gl, genTextures, 0}}, - {5120, {gl, getBooleanv, 0}}, - {5121, {gl, getClipPlane, 0}}, - {5122, {gl, getDoublev, 0}}, - {5123, {gl, getError, 0}}, - {5124, {gl, getFloatv, 0}}, - {5125, {gl, getIntegerv, 0}}, - {5126, {gl, getLightfv, 0}}, - {5127, {gl, getLightiv, 0}}, - {5128, {gl, getMapdv, 0}}, - {5129, {gl, getMapfv, 0}}, - {5130, {gl, getMapiv, 0}}, - {5131, {gl, getMaterialfv, 0}}, - {5132, {gl, getMaterialiv, 0}}, - {5133, {gl, getPixelMapfv, 0}}, - {5134, {gl, getPixelMapuiv, 0}}, - {5135, {gl, getPixelMapusv, 0}}, - {5136, {gl, getPolygonStipple, 0}}, - {5137, {gl, getString, 0}}, - {5138, {gl, getTexEnvfv, 0}}, - {5139, {gl, getTexEnviv, 0}}, - {5140, {gl, getTexGendv, 0}}, - {5141, {gl, getTexGenfv, 0}}, - {5142, {gl, getTexGeniv, 0}}, - {5143, {gl, getTexImage, 0}}, - {5144, {gl, getTexLevelParameterfv, 0}}, - {5145, {gl, getTexLevelParameteriv, 0}}, - {5146, {gl, getTexParameterfv, 0}}, - {5147, {gl, getTexParameteriv, 0}}, - {5148, {gl, hint, 0}}, - {5149, {gl, indexMask, 0}}, - {5150, {gl, indexPointer, 0}}, - {5151, {gl, indexPointer, 0}}, - {5152, {gl, indexd, 0}}, - {5153, {gl, indexf, 0}}, - {5154, {gl, indexi, 0}}, - {5155, {gl, indexs, 0}}, - {5156, {gl, indexub, 0}}, - {5157, {gl, initNames, 0}}, - {5158, {gl, interleavedArrays, 0}}, - {5159, {gl, interleavedArrays, 0}}, - {5160, {gl, isEnabled, 0}}, - {5161, {gl, isList, 0}}, - {5162, {gl, isTexture, 0}}, - {5163, {gl, lightModelf, 0}}, - {5164, {gl, lightModelfv, 0}}, - {5165, {gl, lightModeli, 0}}, - {5166, {gl, lightModeliv, 0}}, - {5167, {gl, lightf, 0}}, - {5168, {gl, lightfv, 0}}, - {5169, {gl, lighti, 0}}, - {5170, {gl, lightiv, 0}}, - {5171, {gl, lineStipple, 0}}, - {5172, {gl, lineWidth, 0}}, - {5173, {gl, listBase, 0}}, - {5174, {gl, loadIdentity, 0}}, - {5175, {gl, loadMatrixd, 0}}, - {5176, {gl, loadMatrixf, 0}}, - {5177, {gl, loadName, 0}}, - {5178, {gl, logicOp, 0}}, - {5179, {gl, map1d, 0}}, - {5180, {gl, map1f, 0}}, - {5181, {gl, map2d, 0}}, - {5182, {gl, map2f, 0}}, - {5183, {gl, mapGrid1d, 0}}, - {5184, {gl, mapGrid1f, 0}}, - {5185, {gl, mapGrid2d, 0}}, - {5186, {gl, mapGrid2f, 0}}, - {5187, {gl, materialf, 0}}, - {5188, {gl, materialfv, 0}}, - {5189, {gl, materiali, 0}}, - {5190, {gl, materialiv, 0}}, - {5191, {gl, matrixMode, 0}}, - {5192, {gl, multMatrixd, 0}}, - {5193, {gl, multMatrixf, 0}}, - {5194, {gl, newList, 0}}, - {5195, {gl, normal3b, 0}}, - {5196, {gl, normal3d, 0}}, - {5197, {gl, normal3f, 0}}, - {5198, {gl, normal3i, 0}}, - {5199, {gl, normal3s, 0}}, - {5200, {gl, normalPointer, 0}}, - {5201, {gl, normalPointer, 0}}, - {5202, {gl, ortho, 0}}, - {5203, {gl, passThrough, 0}}, - {5204, {gl, pixelMapfv, 0}}, - {5205, {gl, pixelMapuiv, 0}}, - {5206, {gl, pixelMapusv, 0}}, - {5207, {gl, pixelStoref, 0}}, - {5208, {gl, pixelStorei, 0}}, - {5209, {gl, pixelTransferf, 0}}, - {5210, {gl, pixelTransferi, 0}}, - {5211, {gl, pixelZoom, 0}}, - {5212, {gl, pointSize, 0}}, - {5213, {gl, polygonMode, 0}}, - {5214, {gl, polygonOffset, 0}}, - {5215, {gl, polygonStipple, 0}}, - {5216, {gl, popAttrib, 0}}, - {5217, {gl, popClientAttrib, 0}}, - {5218, {gl, popMatrix, 0}}, - {5219, {gl, popName, 0}}, - {5220, {gl, prioritizeTextures, 0}}, - {5221, {gl, pushAttrib, 0}}, - {5222, {gl, pushClientAttrib, 0}}, - {5223, {gl, pushMatrix, 0}}, - {5224, {gl, pushName, 0}}, - {5225, {gl, rasterPos2d, 0}}, - {5226, {gl, rasterPos2f, 0}}, - {5227, {gl, rasterPos2i, 0}}, - {5228, {gl, rasterPos2s, 0}}, - {5229, {gl, rasterPos3d, 0}}, - {5230, {gl, rasterPos3f, 0}}, - {5231, {gl, rasterPos3i, 0}}, - {5232, {gl, rasterPos3s, 0}}, - {5233, {gl, rasterPos4d, 0}}, - {5234, {gl, rasterPos4f, 0}}, - {5235, {gl, rasterPos4i, 0}}, - {5236, {gl, rasterPos4s, 0}}, - {5237, {gl, readBuffer, 0}}, - {5238, {gl, readPixels, 0}}, - {5239, {gl, rectd, 0}}, - {5240, {gl, rectdv, 0}}, - {5241, {gl, rectf, 0}}, - {5242, {gl, rectfv, 0}}, - {5243, {gl, recti, 0}}, - {5244, {gl, rectiv, 0}}, - {5245, {gl, rects, 0}}, - {5246, {gl, rectsv, 0}}, - {5247, {gl, renderMode, 0}}, - {5248, {gl, rotated, 0}}, - {5249, {gl, rotatef, 0}}, - {5250, {gl, scaled, 0}}, - {5251, {gl, scalef, 0}}, - {5252, {gl, scissor, 0}}, - {5253, {gl, selectBuffer, 0}}, - {5254, {gl, shadeModel, 0}}, - {5255, {gl, stencilFunc, 0}}, - {5256, {gl, stencilMask, 0}}, - {5257, {gl, stencilOp, 0}}, - {5258, {gl, texCoord1d, 0}}, - {5259, {gl, texCoord1f, 0}}, - {5260, {gl, texCoord1i, 0}}, - {5261, {gl, texCoord1s, 0}}, - {5262, {gl, texCoord2d, 0}}, - {5263, {gl, texCoord2f, 0}}, - {5264, {gl, texCoord2i, 0}}, - {5265, {gl, texCoord2s, 0}}, - {5266, {gl, texCoord3d, 0}}, - {5267, {gl, texCoord3f, 0}}, - {5268, {gl, texCoord3i, 0}}, - {5269, {gl, texCoord3s, 0}}, - {5270, {gl, texCoord4d, 0}}, - {5271, {gl, texCoord4f, 0}}, - {5272, {gl, texCoord4i, 0}}, - {5273, {gl, texCoord4s, 0}}, - {5274, {gl, texCoordPointer, 0}}, - {5275, {gl, texCoordPointer, 0}}, - {5276, {gl, texEnvf, 0}}, - {5277, {gl, texEnvfv, 0}}, - {5278, {gl, texEnvi, 0}}, - {5279, {gl, texEnviv, 0}}, - {5280, {gl, texGend, 0}}, - {5281, {gl, texGendv, 0}}, - {5282, {gl, texGenf, 0}}, - {5283, {gl, texGenfv, 0}}, - {5284, {gl, texGeni, 0}}, - {5285, {gl, texGeniv, 0}}, - {5286, {gl, texImage1D, 0}}, - {5287, {gl, texImage1D, 0}}, - {5288, {gl, texImage2D, 0}}, - {5289, {gl, texImage2D, 0}}, - {5290, {gl, texParameterf, 0}}, - {5291, {gl, texParameterfv, 0}}, - {5292, {gl, texParameteri, 0}}, - {5293, {gl, texParameteriv, 0}}, - {5294, {gl, texSubImage1D, 0}}, - {5295, {gl, texSubImage1D, 0}}, - {5296, {gl, texSubImage2D, 0}}, - {5297, {gl, texSubImage2D, 0}}, - {5298, {gl, translated, 0}}, - {5299, {gl, translatef, 0}}, - {5300, {gl, vertex2d, 0}}, - {5301, {gl, vertex2f, 0}}, - {5302, {gl, vertex2i, 0}}, - {5303, {gl, vertex2s, 0}}, - {5304, {gl, vertex3d, 0}}, - {5305, {gl, vertex3f, 0}}, - {5306, {gl, vertex3i, 0}}, - {5307, {gl, vertex3s, 0}}, - {5308, {gl, vertex4d, 0}}, - {5309, {gl, vertex4f, 0}}, - {5310, {gl, vertex4i, 0}}, - {5311, {gl, vertex4s, 0}}, - {5312, {gl, vertexPointer, 0}}, - {5313, {gl, vertexPointer, 0}}, - {5314, {gl, viewport, 0}}, - {5315, {gl, blendColor, 0}}, - {5316, {gl, blendEquation, 0}}, - {5317, {gl, drawRangeElements, 0}}, - {5318, {gl, drawRangeElements, 0}}, - {5319, {gl, texImage3D, 0}}, - {5320, {gl, texImage3D, 0}}, - {5321, {gl, texSubImage3D, 0}}, - {5322, {gl, texSubImage3D, 0}}, - {5323, {gl, copyTexSubImage3D, 0}}, - {5324, {gl, colorTable, 0}}, - {5325, {gl, colorTable, 0}}, - {5326, {gl, colorTableParameterfv, 0}}, - {5327, {gl, colorTableParameteriv, 0}}, - {5328, {gl, copyColorTable, 0}}, - {5329, {gl, getColorTable, 0}}, - {5330, {gl, getColorTableParameterfv, 0}}, - {5331, {gl, getColorTableParameteriv, 0}}, - {5332, {gl, colorSubTable, 0}}, - {5333, {gl, colorSubTable, 0}}, - {5334, {gl, copyColorSubTable, 0}}, - {5335, {gl, convolutionFilter1D, 0}}, - {5336, {gl, convolutionFilter1D, 0}}, - {5337, {gl, convolutionFilter2D, 0}}, - {5338, {gl, convolutionFilter2D, 0}}, - {5339, {gl, convolutionParameterf, 0}}, - {5340, {gl, convolutionParameteri, 0}}, - {5341, {gl, copyConvolutionFilter1D, 0}}, - {5342, {gl, copyConvolutionFilter2D, 0}}, - {5343, {gl, getConvolutionFilter, 0}}, - {5344, {gl, getConvolutionParameterfv, 0}}, - {5345, {gl, getConvolutionParameteriv, 0}}, - {5346, {gl, separableFilter2D, 0}}, - {5347, {gl, separableFilter2D, 0}}, - {5348, {gl, getHistogram, 0}}, - {5349, {gl, getHistogramParameterfv, 0}}, - {5350, {gl, getHistogramParameteriv, 0}}, - {5351, {gl, getMinmax, 0}}, - {5352, {gl, getMinmaxParameterfv, 0}}, - {5353, {gl, getMinmaxParameteriv, 0}}, - {5354, {gl, histogram, 0}}, - {5355, {gl, minmax, 0}}, - {5356, {gl, resetHistogram, 0}}, - {5357, {gl, resetMinmax, 0}}, - {5358, {gl, activeTexture, 0}}, - {5359, {gl, sampleCoverage, 0}}, - {5360, {gl, compressedTexImage3D, 0}}, - {5361, {gl, compressedTexImage3D, 0}}, - {5362, {gl, compressedTexImage2D, 0}}, - {5363, {gl, compressedTexImage2D, 0}}, - {5364, {gl, compressedTexImage1D, 0}}, - {5365, {gl, compressedTexImage1D, 0}}, - {5366, {gl, compressedTexSubImage3D, 0}}, - {5367, {gl, compressedTexSubImage3D, 0}}, - {5368, {gl, compressedTexSubImage2D, 0}}, - {5369, {gl, compressedTexSubImage2D, 0}}, - {5370, {gl, compressedTexSubImage1D, 0}}, - {5371, {gl, compressedTexSubImage1D, 0}}, - {5372, {gl, getCompressedTexImage, 0}}, - {5373, {gl, clientActiveTexture, 0}}, - {5374, {gl, multiTexCoord1d, 0}}, - {5375, {gl, multiTexCoord1f, 0}}, - {5376, {gl, multiTexCoord1i, 0}}, - {5377, {gl, multiTexCoord1s, 0}}, - {5378, {gl, multiTexCoord2d, 0}}, - {5379, {gl, multiTexCoord2f, 0}}, - {5380, {gl, multiTexCoord2i, 0}}, - {5381, {gl, multiTexCoord2s, 0}}, - {5382, {gl, multiTexCoord3d, 0}}, - {5383, {gl, multiTexCoord3f, 0}}, - {5384, {gl, multiTexCoord3i, 0}}, - {5385, {gl, multiTexCoord3s, 0}}, - {5386, {gl, multiTexCoord4d, 0}}, - {5387, {gl, multiTexCoord4f, 0}}, - {5388, {gl, multiTexCoord4i, 0}}, - {5389, {gl, multiTexCoord4s, 0}}, - {5390, {gl, loadTransposeMatrixf, 0}}, - {5391, {gl, loadTransposeMatrixd, 0}}, - {5392, {gl, multTransposeMatrixf, 0}}, - {5393, {gl, multTransposeMatrixd, 0}}, - {5394, {gl, blendFuncSeparate, 0}}, - {5395, {gl, multiDrawArrays, 0}}, - {5396, {gl, pointParameterf, 0}}, - {5397, {gl, pointParameterfv, 0}}, - {5398, {gl, pointParameteri, 0}}, - {5399, {gl, pointParameteriv, 0}}, - {5400, {gl, fogCoordf, 0}}, - {5401, {gl, fogCoordd, 0}}, - {5402, {gl, fogCoordPointer, 0}}, - {5403, {gl, fogCoordPointer, 0}}, - {5404, {gl, secondaryColor3b, 0}}, - {5405, {gl, secondaryColor3d, 0}}, - {5406, {gl, secondaryColor3f, 0}}, - {5407, {gl, secondaryColor3i, 0}}, - {5408, {gl, secondaryColor3s, 0}}, - {5409, {gl, secondaryColor3ub, 0}}, - {5410, {gl, secondaryColor3ui, 0}}, - {5411, {gl, secondaryColor3us, 0}}, - {5412, {gl, secondaryColorPointer, 0}}, - {5413, {gl, secondaryColorPointer, 0}}, - {5414, {gl, windowPos2d, 0}}, - {5415, {gl, windowPos2f, 0}}, - {5416, {gl, windowPos2i, 0}}, - {5417, {gl, windowPos2s, 0}}, - {5418, {gl, windowPos3d, 0}}, - {5419, {gl, windowPos3f, 0}}, - {5420, {gl, windowPos3i, 0}}, - {5421, {gl, windowPos3s, 0}}, - {5422, {gl, genQueries, 0}}, - {5423, {gl, deleteQueries, 0}}, - {5424, {gl, isQuery, 0}}, - {5425, {gl, beginQuery, 0}}, - {5426, {gl, endQuery, 0}}, - {5427, {gl, getQueryiv, 0}}, - {5428, {gl, getQueryObjectiv, 0}}, - {5429, {gl, getQueryObjectuiv, 0}}, - {5430, {gl, bindBuffer, 0}}, - {5431, {gl, deleteBuffers, 0}}, - {5432, {gl, genBuffers, 0}}, - {5433, {gl, isBuffer, 0}}, - {5434, {gl, bufferData, 0}}, - {5435, {gl, bufferData, 0}}, - {5436, {gl, bufferSubData, 0}}, - {5437, {gl, bufferSubData, 0}}, - {5438, {gl, getBufferSubData, 0}}, - {5439, {gl, getBufferParameteriv, 0}}, - {5440, {gl, blendEquationSeparate, 0}}, - {5441, {gl, drawBuffers, 0}}, - {5442, {gl, stencilOpSeparate, 0}}, - {5443, {gl, stencilFuncSeparate, 0}}, - {5444, {gl, stencilMaskSeparate, 0}}, - {5445, {gl, attachShader, 0}}, - {5446, {gl, bindAttribLocation, 0}}, - {5447, {gl, compileShader, 0}}, - {5448, {gl, createProgram, 0}}, - {5449, {gl, createShader, 0}}, - {5450, {gl, deleteProgram, 0}}, - {5451, {gl, deleteShader, 0}}, - {5452, {gl, detachShader, 0}}, - {5453, {gl, disableVertexAttribArray, 0}}, - {5454, {gl, enableVertexAttribArray, 0}}, - {5455, {gl, getActiveAttrib, 0}}, - {5456, {gl, getActiveUniform, 0}}, - {5457, {gl, getAttachedShaders, 0}}, - {5458, {gl, getAttribLocation, 0}}, - {5459, {gl, getProgramiv, 0}}, - {5460, {gl, getProgramInfoLog, 0}}, - {5461, {gl, getShaderiv, 0}}, - {5462, {gl, getShaderInfoLog, 0}}, - {5463, {gl, getShaderSource, 0}}, - {5464, {gl, getUniformLocation, 0}}, - {5465, {gl, getUniformfv, 0}}, - {5466, {gl, getUniformiv, 0}}, - {5467, {gl, getVertexAttribdv, 0}}, - {5468, {gl, getVertexAttribfv, 0}}, - {5469, {gl, getVertexAttribiv, 0}}, - {5470, {gl, isProgram, 0}}, - {5471, {gl, isShader, 0}}, - {5472, {gl, linkProgram, 0}}, - {5473, {gl, shaderSource, 0}}, - {5474, {gl, useProgram, 0}}, - {5475, {gl, uniform1f, 0}}, - {5476, {gl, uniform2f, 0}}, - {5477, {gl, uniform3f, 0}}, - {5478, {gl, uniform4f, 0}}, - {5479, {gl, uniform1i, 0}}, - {5480, {gl, uniform2i, 0}}, - {5481, {gl, uniform3i, 0}}, - {5482, {gl, uniform4i, 0}}, - {5483, {gl, uniform1fv, 0}}, - {5484, {gl, uniform2fv, 0}}, - {5485, {gl, uniform3fv, 0}}, - {5486, {gl, uniform4fv, 0}}, - {5487, {gl, uniform1iv, 0}}, - {5488, {gl, uniform2iv, 0}}, - {5489, {gl, uniform3iv, 0}}, - {5490, {gl, uniform4iv, 0}}, - {5491, {gl, uniformMatrix2fv, 0}}, - {5492, {gl, uniformMatrix3fv, 0}}, - {5493, {gl, uniformMatrix4fv, 0}}, - {5494, {gl, validateProgram, 0}}, - {5495, {gl, vertexAttrib1d, 0}}, - {5496, {gl, vertexAttrib1f, 0}}, - {5497, {gl, vertexAttrib1s, 0}}, - {5498, {gl, vertexAttrib2d, 0}}, - {5499, {gl, vertexAttrib2f, 0}}, - {5500, {gl, vertexAttrib2s, 0}}, - {5501, {gl, vertexAttrib3d, 0}}, - {5502, {gl, vertexAttrib3f, 0}}, - {5503, {gl, vertexAttrib3s, 0}}, - {5504, {gl, vertexAttrib4Nbv, 0}}, - {5505, {gl, vertexAttrib4Niv, 0}}, - {5506, {gl, vertexAttrib4Nsv, 0}}, - {5507, {gl, vertexAttrib4Nub, 0}}, - {5508, {gl, vertexAttrib4Nuiv, 0}}, - {5509, {gl, vertexAttrib4Nusv, 0}}, - {5510, {gl, vertexAttrib4bv, 0}}, - {5511, {gl, vertexAttrib4d, 0}}, - {5512, {gl, vertexAttrib4f, 0}}, - {5513, {gl, vertexAttrib4iv, 0}}, - {5514, {gl, vertexAttrib4s, 0}}, - {5515, {gl, vertexAttrib4ubv, 0}}, - {5516, {gl, vertexAttrib4uiv, 0}}, - {5517, {gl, vertexAttrib4usv, 0}}, - {5518, {gl, vertexAttribPointer, 0}}, - {5519, {gl, vertexAttribPointer, 0}}, - {5520, {gl, uniformMatrix2x3fv, 0}}, - {5521, {gl, uniformMatrix3x2fv, 0}}, - {5522, {gl, uniformMatrix2x4fv, 0}}, - {5523, {gl, uniformMatrix4x2fv, 0}}, - {5524, {gl, uniformMatrix3x4fv, 0}}, - {5525, {gl, uniformMatrix4x3fv, 0}}, - {5526, {gl, colorMaski, 0}}, - {5527, {gl, getBooleani_v, 0}}, - {5528, {gl, getIntegeri_v, 0}}, - {5529, {gl, enablei, 0}}, - {5530, {gl, disablei, 0}}, - {5531, {gl, isEnabledi, 0}}, - {5532, {gl, beginTransformFeedback, 0}}, - {5533, {gl, endTransformFeedback, 0}}, - {5534, {gl, bindBufferRange, 0}}, - {5535, {gl, bindBufferBase, 0}}, - {5536, {gl, transformFeedbackVaryings, 0}}, - {5537, {gl, getTransformFeedbackVarying, 0}}, - {5538, {gl, clampColor, 0}}, - {5539, {gl, beginConditionalRender, 0}}, - {5540, {gl, endConditionalRender, 0}}, - {5541, {gl, vertexAttribIPointer, 0}}, - {5542, {gl, vertexAttribIPointer, 0}}, - {5543, {gl, getVertexAttribIiv, 0}}, - {5544, {gl, getVertexAttribIuiv, 0}}, - {5545, {gl, getUniformuiv, 0}}, - {5546, {gl, bindFragDataLocation, 0}}, - {5547, {gl, getFragDataLocation, 0}}, - {5548, {gl, uniform1ui, 0}}, - {5549, {gl, uniform2ui, 0}}, - {5550, {gl, uniform3ui, 0}}, - {5551, {gl, uniform4ui, 0}}, - {5552, {gl, uniform1uiv, 0}}, - {5553, {gl, uniform2uiv, 0}}, - {5554, {gl, uniform3uiv, 0}}, - {5555, {gl, uniform4uiv, 0}}, - {5556, {gl, texParameterIiv, 0}}, - {5557, {gl, texParameterIuiv, 0}}, - {5558, {gl, getTexParameterIiv, 0}}, - {5559, {gl, getTexParameterIuiv, 0}}, - {5560, {gl, clearBufferiv, 0}}, - {5561, {gl, clearBufferuiv, 0}}, - {5562, {gl, clearBufferfv, 0}}, - {5563, {gl, clearBufferfi, 0}}, - {5564, {gl, getStringi, 0}}, - {5565, {gl, vertexAttribI1i, 0}}, - {5566, {gl, vertexAttribI2i, 0}}, - {5567, {gl, vertexAttribI3i, 0}}, - {5568, {gl, vertexAttribI4i, 0}}, - {5569, {gl, vertexAttribI1ui, 0}}, - {5570, {gl, vertexAttribI2ui, 0}}, - {5571, {gl, vertexAttribI3ui, 0}}, - {5572, {gl, vertexAttribI4ui, 0}}, - {5573, {gl, vertexAttribI4bv, 0}}, - {5574, {gl, vertexAttribI4sv, 0}}, - {5575, {gl, vertexAttribI4ubv, 0}}, - {5576, {gl, vertexAttribI4usv, 0}}, - {5577, {gl, drawArraysInstanced, 0}}, - {5578, {gl, drawElementsInstanced, 0}}, - {5579, {gl, drawElementsInstanced, 0}}, - {5580, {gl, texBuffer, 0}}, - {5581, {gl, primitiveRestartIndex, 0}}, - {5582, {gl, loadTransposeMatrixfARB, 0}}, - {5583, {gl, loadTransposeMatrixdARB, 0}}, - {5584, {gl, multTransposeMatrixfARB, 0}}, - {5585, {gl, multTransposeMatrixdARB, 0}}, - {5586, {gl, weightbvARB, 0}}, - {5587, {gl, weightsvARB, 0}}, - {5588, {gl, weightivARB, 0}}, - {5589, {gl, weightfvARB, 0}}, - {5590, {gl, weightdvARB, 0}}, - {5591, {gl, weightubvARB, 0}}, - {5592, {gl, weightusvARB, 0}}, - {5593, {gl, weightuivARB, 0}}, - {5594, {gl, vertexBlendARB, 0}}, - {5595, {gl, currentPaletteMatrixARB, 0}}, - {5596, {gl, matrixIndexubvARB, 0}}, - {5597, {gl, matrixIndexusvARB, 0}}, - {5598, {gl, matrixIndexuivARB, 0}}, - {5599, {gl, programStringARB, 0}}, - {5600, {gl, bindProgramARB, 0}}, - {5601, {gl, deleteProgramsARB, 0}}, - {5602, {gl, genProgramsARB, 0}}, - {5603, {gl, programEnvParameter4dARB, 0}}, - {5604, {gl, programEnvParameter4dvARB, 0}}, - {5605, {gl, programEnvParameter4fARB, 0}}, - {5606, {gl, programEnvParameter4fvARB, 0}}, - {5607, {gl, programLocalParameter4dARB, 0}}, - {5608, {gl, programLocalParameter4dvARB, 0}}, - {5609, {gl, programLocalParameter4fARB, 0}}, - {5610, {gl, programLocalParameter4fvARB, 0}}, - {5611, {gl, getProgramEnvParameterdvARB, 0}}, - {5612, {gl, getProgramEnvParameterfvARB, 0}}, - {5613, {gl, getProgramLocalParameterdvARB, 0}}, - {5614, {gl, getProgramLocalParameterfvARB, 0}}, - {5615, {gl, getProgramStringARB, 0}}, - {5616, {gl, deleteObjectARB, 0}}, - {5617, {gl, getHandleARB, 0}}, - {5618, {gl, detachObjectARB, 0}}, - {5619, {gl, createShaderObjectARB, 0}}, - {5620, {gl, shaderSourceARB, 0}}, - {5621, {gl, compileShaderARB, 0}}, - {5622, {gl, createProgramObjectARB, 0}}, - {5623, {gl, attachObjectARB, 0}}, - {5624, {gl, linkProgramARB, 0}}, - {5625, {gl, useProgramObjectARB, 0}}, - {5626, {gl, validateProgramARB, 0}}, - {5627, {gl, getObjectParameterfvARB, 0}}, - {5628, {gl, getObjectParameterivARB, 0}}, - {5629, {gl, getInfoLogARB, 0}}, - {5630, {gl, getAttachedObjectsARB, 0}}, - {5631, {gl, getUniformLocationARB, 0}}, - {5632, {gl, getActiveUniformARB, 0}}, - {5633, {gl, getUniformfvARB, 0}}, - {5634, {gl, getUniformivARB, 0}}, - {5635, {gl, getShaderSourceARB, 0}}, - {5636, {gl, bindAttribLocationARB, 0}}, - {5637, {gl, getActiveAttribARB, 0}}, - {5638, {gl, getAttribLocationARB, 0}}, - {5639, {gl, isRenderbuffer, 0}}, - {5640, {gl, bindRenderbuffer, 0}}, - {5641, {gl, deleteRenderbuffers, 0}}, - {5642, {gl, genRenderbuffers, 0}}, - {5643, {gl, renderbufferStorage, 0}}, - {5644, {gl, getRenderbufferParameteriv, 0}}, - {5645, {gl, isFramebuffer, 0}}, - {5646, {gl, bindFramebuffer, 0}}, - {5647, {gl, deleteFramebuffers, 0}}, - {5648, {gl, genFramebuffers, 0}}, - {5649, {gl, checkFramebufferStatus, 0}}, - {5650, {gl, framebufferTexture1D, 0}}, - {5651, {gl, framebufferTexture2D, 0}}, - {5652, {gl, framebufferTexture3D, 0}}, - {5653, {gl, framebufferRenderbuffer, 0}}, - {5654, {gl, getFramebufferAttachmentParameteriv, 0}}, - {5655, {gl, generateMipmap, 0}}, - {5656, {gl, blitFramebuffer, 0}}, - {5657, {gl, renderbufferStorageMultisample, 0}}, - {5658, {gl, framebufferTextureLayer, 0}}, - {5659, {gl, programParameteriARB, 0}}, - {5660, {gl, framebufferTextureARB, 0}}, - {5661, {gl, framebufferTextureFaceARB, 0}}, - {5662, {gl, vertexAttribDivisorARB, 0}}, - {5663, {gl, flushMappedBufferRange, 0}}, - {5664, {gl, bindVertexArray, 0}}, - {5665, {gl, deleteVertexArrays, 0}}, - {5666, {gl, genVertexArrays, 0}}, - {5667, {gl, isVertexArray, 0}}, - {5668, {gl, getUniformIndices, 0}}, - {5669, {gl, getActiveUniformsiv, 0}}, - {5670, {gl, getActiveUniformName, 0}}, - {5671, {gl, getUniformBlockIndex, 0}}, - {5672, {gl, getActiveUniformBlockiv, 0}}, - {5673, {gl, getActiveUniformBlockName, 0}}, - {5674, {gl, uniformBlockBinding, 0}}, - {5675, {gl, copyBufferSubData, 0}}, - {5676, {gl, resizeBuffersMESA, 0}}, - {5677, {gl, windowPos4dMESA, 0}}, - {5678, {gl, windowPos4fMESA, 0}}, - {5679, {gl, windowPos4iMESA, 0}}, - {5680, {gl, windowPos4sMESA, 0}}, - {5681, {gl, depthBoundsEXT, 0}}, - {5682, {gl, stencilClearTagEXT, 0}}, - {5010, {glu, build1DMipmapLevels, 0}}, - {5011, {glu, build1DMipmaps, 0}}, - {5012, {glu, build2DMipmapLevels, 0}}, - {5013, {glu, build2DMipmaps, 0}}, - {5014, {glu, build3DMipmapLevels, 0}}, - {5015, {glu, build3DMipmaps, 0}}, - {5016, {glu, checkExtension, 0}}, - {5017, {glu, cylinder, 0}}, - {5018, {glu, deleteQuadric, 0}}, - {5019, {glu, disk, 0}}, - {5020, {glu, errorString, 0}}, - {5021, {glu, getString, 0}}, - {5022, {glu, lookAt, 0}}, - {5023, {glu, newQuadric, 0}}, - {5024, {glu, ortho2D, 0}}, - {5025, {glu, partialDisk, 0}}, - {5026, {glu, perspective, 0}}, - {5027, {glu, pickMatrix, 0}}, - {5028, {glu, project, 0}}, - {5029, {glu, quadricDrawStyle, 0}}, - {5030, {glu, quadricNormals, 0}}, - {5031, {glu, quadricOrientation, 0}}, - {5032, {glu, quadricTexture, 0}}, - {5033, {glu, scaleImage, 0}}, - {5034, {glu, sphere, 0}}, - {5035, {glu, unProject, 0}}, - {5036, {glu, unProject4, 0}}, - {-1, {mod, func, -1}} -]. - diff --git a/lib/wx/src/gen/glu.erl b/lib/wx/src/gen/glu.erl index fc8bfbf8e6..300b411fd2 100644 --- a/lib/wx/src/gen/glu.erl +++ b/lib/wx/src/gen/glu.erl @@ -50,6 +50,8 @@ -define(GLintptr,64/native-unsigned). -define(GLUquadric,64/native-unsigned). -define(GLhandleARB,64/native-unsigned). +-type enum() :: non_neg_integer(). +-type mem() :: binary() | tuple(). -export([tesselate/2,build1DMipmapLevels/9,build1DMipmaps/6,build2DMipmapLevels/10, build2DMipmaps/7,build3DMipmapLevels/11,build3DMipmaps/8,checkExtension/2, @@ -79,42 +81,49 @@ tesselate({Nx,Ny,Nz}, Vs) -> %% @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(). 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(). 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(). 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(). 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(). 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(). build3DMipmaps(Target,InternalFormat,Width,Height,Depth,Format,Type,Data) -> send_bin(Data), call(5015, <>). %% @spec (ExtName::[integer()],ExtString::[integer()]) -> 0|1 %% @doc See external documentation. +-spec checkExtension([integer()],[integer()]) -> 0|1. checkExtension(ExtName,ExtString) -> call(5016, <<(length(ExtName)):?GLuint, (<< <> || C <- ExtName>>)/binary,0:((8-((length(ExtName)+ 4) rem 8)) rem 8),(length(ExtString)):?GLuint, @@ -122,61 +131,73 @@ checkExtension(ExtName,ExtString) -> %% @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. cylinder(Quad,Base,Top,Height,Slices,Stacks) -> cast(5017, <>). %% @spec (Quad::integer()) -> ok %% @doc See external documentation. +-spec deleteQuadric(integer()) -> ok. 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. disk(Quad,Inner,Outer,Slices,Loops) -> cast(5019, <>). %% @spec (Error::enum()) -> string() %% @doc See external documentation. +-spec errorString(enum()) -> string(). errorString(Error) -> call(5020, <>). %% @spec (Name::enum()) -> string() %% @doc See external documentation. +-spec getString(enum()) -> string(). 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. lookAt(EyeX,EyeY,EyeZ,CenterX,CenterY,CenterZ,UpX,UpY,UpZ) -> cast(5022, <>). %% @spec () -> integer() %% @doc 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. 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. 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. perspective(Fovy,Aspect,ZNear,ZFar) -> cast(5026, <>). -%% @spec (X::float(),Y::float(),DelX::float(),DelY::float(),Viewport::{integer()}) -> ok +%% @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. pickMatrix(X,Y,DelX,DelY,{V1,V2,V3,V4}) -> cast(5027, <>). -%% @spec (ObjX::float(),ObjY::float(),ObjZ::float(),Model::{float()},Proj::{float()},View::{integer()}) -> {integer(),WinX::float(),WinY::float(),WinZ::float()} +%% @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()}. 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}) -> @@ -184,26 +205,31 @@ project(ObjX,ObjY,ObjZ,{M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12},{P1,P2,P3,P4,P5, %% @spec (Quad::integer(),Draw::enum()) -> ok %% @doc See external documentation. +-spec quadricDrawStyle(integer(),enum()) -> ok. quadricDrawStyle(Quad,Draw) -> cast(5029, <>). %% @spec (Quad::integer(),Normal::enum()) -> ok %% @doc See external documentation. +-spec quadricNormals(integer(),enum()) -> ok. quadricNormals(Quad,Normal) -> cast(5030, <>). %% @spec (Quad::integer(),Orientation::enum()) -> ok %% @doc See external documentation. +-spec quadricOrientation(integer(),enum()) -> ok. quadricOrientation(Quad,Orientation) -> cast(5031, <>). %% @spec (Quad::integer(),Texture::0|1) -> ok %% @doc See external documentation. +-spec quadricTexture(integer(),0|1) -> ok. 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(). scaleImage(Format,WIn,HIn,TypeIn,DataIn,WOut,HOut,TypeOut,DataOut) -> send_bin(DataIn), send_bin(DataOut), @@ -211,18 +237,21 @@ scaleImage(Format,WIn,HIn,TypeIn,DataIn,WOut,HOut,TypeOut,DataOut) -> %% @spec (Quad::integer(),Radius::float(),Slices::integer(),Stacks::integer()) -> ok %% @doc See external documentation. +-spec sphere(integer(),float(),integer(),integer()) -> ok. sphere(Quad,Radius,Slices,Stacks) -> cast(5034, <>). -%% @spec (WinX::float(),WinY::float(),WinZ::float(),Model::{float()},Proj::{float()},View::{integer()}) -> {integer(),ObjX::float(),ObjY::float(),ObjZ::float()} +%% @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()}. 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()},Proj::{float()},View::{integer()},NearVal::float(),FarVal::float()) -> {integer(),ObjX::float(),ObjY::float(),ObjZ::float(),ObjW::float()} +%% @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()}. 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) -> diff --git a/lib/wx/src/wxe_master.erl b/lib/wx/src/wxe_master.erl index bd9511e94d..8751a259ce 100644 --- a/lib/wx/src/wxe_master.erl +++ b/lib/wx/src/wxe_master.erl @@ -40,7 +40,6 @@ -include("wxe.hrl"). -include("gen/wxe_debug.hrl"). --include("gen/gl_debug.hrl"). -define(DRIVER, "wxe_driver"). @@ -146,7 +145,6 @@ init([]) -> wx_debug_info = ets:new(wx_debug_info, [named_table]), wx_non_consts = ets:new(wx_non_consts, [named_table]), true = ets:insert(wx_debug_info, wxdebug_table()), - true = ets:insert(wx_debug_info, gldebug_table()), spawn_link(fun() -> debug_ping(Port) end), receive {wx_consts, List} -> -- cgit v1.2.3 From 8577598667bff43f503f3cae87934c3e9918d135 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Mon, 11 Oct 2010 11:00:38 +0200 Subject: Windows and Mac build issues --- lib/wx/api_gen/gl_gen_c.erl | 8 +- lib/wx/api_gen/gl_gen_erl.erl | 4 +- lib/wx/api_gen/wxapi.conf | 2 +- lib/wx/c_src/Makefile.in | 6 +- lib/wx/c_src/egl_impl.cpp | 92 +++++---- lib/wx/c_src/egl_impl.h | 37 ++-- lib/wx/c_src/gen/gl_funcs.cpp | 399 ++++++++++++++-------------------------- lib/wx/c_src/wxe_gl.cpp | 87 ++++++--- lib/wx/configure.in | 8 +- lib/wx/src/Makefile | 1 - lib/wx/src/gen/gl.erl | 4 +- lib/wx/src/gen/wxGLCanvas.erl | 4 +- lib/wx/src/wxe_master.erl | 117 +----------- lib/wx/src/wxe_util.erl | 124 ++++++++++++- lib/wx/test/wx_opengl_SUITE.erl | 4 +- 15 files changed, 410 insertions(+), 487 deletions(-) diff --git a/lib/wx/api_gen/gl_gen_c.erl b/lib/wx/api_gen/gl_gen_c.erl index 99dd2e58ea..2fe3226978 100644 --- a/lib/wx/api_gen/gl_gen_c.erl +++ b/lib/wx/api_gen/gl_gen_c.erl @@ -304,7 +304,7 @@ build_return_vals(Type,As) -> true -> w(" int AP = 0; ErlDrvTermData rt[6];~n",[]), w(" rt[AP++]=ERL_DRV_ATOM;" - " rt[AP++]=driver_mk_atom((char *) \"_wxe_result_\");~n",[]), + " rt[AP++]=driver_mk_atom((char *) \"_egl_result_\");~n",[]), w(" rt[AP++]=ERL_DRV_ATOM;" " rt[AP++]=driver_mk_atom((char *) \"ok\");~n",[]), w(" rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;~n",[]), @@ -324,7 +324,7 @@ build_return_vals(Type,As) -> "driver_alloc(sizeof(ErlDrvTermData)*(~s));~n", [Sz]), Sz end, - w(" rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) \"_wxe_result_\");~n",[]), + w(" rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) \"_egl_result_\");~n",[]), FreeList = build_ret_types(Type,As), case Cnt of 1 -> ok; @@ -332,8 +332,8 @@ build_return_vals(Type,As) -> w(" rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = ~p;~n",[Cnt]) end, w(" rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;~n",[]), - w(" if (AP != ~s ) fprintf(stderr, \"%d: ERROR AP mismatch %d %d\\r\\n\",__LINE__,AP,~s);~n", - [CSize,CSize]), + %%w(" if (AP != ~s ) fprintf(stderr, \"%d: ERROR AP mismatch %d %d\\r\\n\",__LINE__,AP,~s);~n", + %% [CSize,CSize]), w(" driver_send_term(port,caller,rt,AP);~n",[]), case Vars of none -> ignore; diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl index 8e712b6739..1dbec5d229 100644 --- a/lib/wx/api_gen/gl_gen_erl.erl +++ b/lib/wx/api_gen/gl_gen_erl.erl @@ -122,8 +122,8 @@ gl_api(Fs) -> w("rec() ->~n", []), w(" receive ~n", []), w(" {'_egl_result_', Res} -> Res;~n", []), - w(" {'_egl_error_', Res} -> error({error,Res})~n", []), - w(" end.~n", []), + w(" {'_egl_error_', Op, Res} -> error({error,Res,Op})~n", []), + w(" end. ~n", []), w("~n", []), w("%% @hidden~n", []), w("send_bin(Bin) when is_binary(Bin) ->~n", []), diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf index 14f5f7e267..63b136e075 100644 --- a/lib/wx/api_gen/wxapi.conf +++ b/lib/wx/api_gen/wxapi.conf @@ -1147,7 +1147,7 @@ {class, wxGLCanvas, wxWindow, [{skip, [{'SetCurrent', 2}]}], %% NA MAC [{'wxGLCanvas', [{"attribList", [in, {single,array}]}, - {pre_hook, {erl, "wxe_master:init_opengl(),"}}]}, + {pre_hook, {erl, "{ok, _} = wxe_master:init_opengl(),"}}]}, 'GetContext', {'SetCurrent', [{post_hook,{c, "if(This->GetContext()) setActiveGL(Ecmd.caller,This)"}}]}, %%{'SetColour', [{"colour", [in, {single,array}]}]}, diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in index 9c85549a5c..4713b5ae69 100644 --- a/lib/wx/c_src/Makefile.in +++ b/lib/wx/c_src/Makefile.in @@ -76,7 +76,7 @@ endif WX_OBJECTS = $(GENERAL_O) $(GENERATED_O) $(RC_FILE) -OBJECTS = $(WX_OBJECTS) $(OPENGL_O) +OBJECTS = $(WX_OBJECTS) $(GL_OBJECTS) TARGET_APIS = wxe_driver erl_gl TARGET_DIR = ../priv/$(SYS_TYPE) @@ -113,7 +113,7 @@ CXX_FLAGS = @CXXFLAGS@ WX_LIBS = $(OPT_WX_LIBS) endif -CL_LIBS = -lGL -lGLU +GL_LIBS = @GL_LIBS@ CC_O = $(CC) -c $(CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS) CPP_O = $(CPP) -c $(CXX_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS) @@ -170,7 +170,7 @@ $(TARGET_DIR)/wxe_driver$(SO_EXT): $(WX_OBJECTS) $(TARGET_DIR)/erl_gl$(SO_EXT): $(GL_OBJECTS) mkdir -p $(TARGET_DIR) - $(CC) $(LDFLAGS) $(GL_OBJECTS) $(CL_LIBS) -o $@ + $(CC) $(LDFLAGS) $(GL_OBJECTS) $(GL_LIBS) -o $@ # ---------------------------------------------------- diff --git a/lib/wx/c_src/egl_impl.cpp b/lib/wx/c_src/egl_impl.cpp index 9240bc49f0..87724f97dc 100644 --- a/lib/wx/c_src/egl_impl.cpp +++ b/lib/wx/c_src/egl_impl.cpp @@ -20,6 +20,10 @@ #include #include +#ifdef _WIN32 +#include +#endif + #include "egl_impl.h" #define WX_DEF_EXTS @@ -27,7 +31,7 @@ #include "gen/gl_finit.h" #include "gen/glu_finit.h" -void init_tess(); +void init_tess(); void exit_tess(); int load_gl_functions(); @@ -38,17 +42,49 @@ int load_gl_functions(); int egl_initiated = 0; #ifdef _WIN32 +#define RTLD_LAZY 0 +#define OPENGL_LIB L"opengl32.dll" +#define OPENGLU_LIB L"glu32.dll" +typedef HMODULE DL_LIB_P; +typedef WCHAR DL_CHAR; void * dlsym(HMODULE Lib, const char *func) { void * funcp; - if((funcp = (void *) GetProcAddress(Lib, func))) + if((funcp = (void *) GetProcAddress(Lib, func))) return funcp; else return (void *) wglGetProcAddress(func); } + +HMODULE dlopen(const WCHAR *DLL, int unused) { + return LoadLibrary(DLL); +} + +void dlclose(HMODULE Lib) { + FreeLibrary(Lib); +} + +#else +typedef void * DL_LIB_P; +typedef char DL_CHAR; +# ifdef _MACOSX +# define OPENGL_LIB "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" +# define OPENGLU_LIB "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib" +# else +# define OPENGL_LIB "libGL.so" +# define OPENGLU_LIB "libGLU.so" +# endif #endif +extern "C" { +DRIVER_INIT(EGL_DRIVER) { + return NULL; +} +} -int egl_init_opengl() +int egl_init_opengl(void *erlCallbacks) { +#ifdef _WIN32 + driver_init((TWinDynDriverCallbacks *) erlCallbacks); +#endif if(egl_initiated == 0) { if(load_gl_functions()) { init_tess(); @@ -59,17 +95,9 @@ int egl_init_opengl() } int load_gl_functions() { -#ifdef _MACOSX - char * DLName = "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"; - void * LIBhandle = dlopen(DLName, RTLD_LAZY); -#elif defined(_WIN32) - WCHAR * DLName = wxT("opengl32.dll"); - HMODULE LIBhandle = LoadLibrary(DLName); -#else - char * DLName = (char *) "libGL.so"; - void * LIBhandle = dlopen(DLName, RTLD_LAZY); -#endif - // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName); + DL_CHAR * DLName = OPENGL_LIB; + DL_LIB_P LIBhandle = dlopen(DLName, RTLD_LAZY); + //fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName); void * func = NULL; int i; @@ -93,35 +121,15 @@ int load_gl_functions() { } } } -#ifdef _WIN32 - FreeLibrary(LIBhandle); -#else dlclose(LIBhandle); -#endif // fprintf(stderr, "OPENGL library is loaded\r\n"); } else { -// wxString msg; -// msg.Printf(wxT("Could NOT load OpenGL library: ")); -// #ifdef _WIN32 -// msg += DLName; -// #else -// msg += wxString::FromAscii((char *)DLName); -// #endif -// send_msg("error", &msg); fprintf(stderr, "Could NOT load OpenGL library: %s\r\n", DLName); }; -#ifdef _MACOSX - DLName = "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib"; + DLName = OPENGLU_LIB; LIBhandle = dlopen(DLName, RTLD_LAZY); -#elif defined(_WIN32) - DLName = wxT("glu32.dll"); - LIBhandle = LoadLibrary(DLName); -#else - DLName = (char *) "libGLU.so"; - LIBhandle = dlopen(DLName, RTLD_LAZY); -#endif - // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName); + // fprintf(stderr, "Loading GLU: %s\r\n", (const char*)DLName); func = NULL; if(LIBhandle) { @@ -142,21 +150,9 @@ int load_gl_functions() { } } } -#ifdef _WIN32 - FreeLibrary(LIBhandle); -#else dlclose(LIBhandle); -#endif // fprintf(stderr, "GLU library is loaded\r\n"); } else { -// wxString msg; -// msg.Printf(wxT("Could NOT load OpenGL GLU library: ")); -// #ifdef _WIN32 -// msg += DLName; -// #else -// msg += wxString::FromAscii((char *)DLName); -// #endif -// send_msg("error", &msg); fprintf(stderr, "Could NOT load OpenGL GLU library: %s\r\n", DLName); }; diff --git a/lib/wx/c_src/egl_impl.h b/lib/wx/c_src/egl_impl.h index 60be2c41d2..5909ebd96e 100644 --- a/lib/wx/c_src/egl_impl.h +++ b/lib/wx/c_src/egl_impl.h @@ -25,11 +25,20 @@ # include #endif -#ifndef __WXMAC__ -# include -# include /* Header File For The OpenGL Library */ -#else -# include /* Header File For The OpenGL Library */ +#ifdef _WIN32 +#include +#include +#include +#elif defined(HAVE_GL_GL_H) +#include +# include +#elif defined(HAVE_OPENGL_GL_H) +#include +#include +#endif + +#ifndef APIENTRY +#define APIENTRY #endif #ifndef CALLBACK @@ -51,18 +60,6 @@ # define GLUfuncptr GLvoid (*)() #endif -#ifdef WIN32 -#include -#include -#elif defined(HAVE_GL_GL_H) -#include -#elif defined(HAVE_OPENGL_GL_H) -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif - /* Some new GL types (eliminates the need for glext.h) */ #ifndef HAVE_GLINTPTR @@ -131,10 +128,10 @@ typedef uint64_t GLuint64EXT; /* External Api */ #ifdef _WIN32 -__declspec(dllexport) int egl_init_opengl(); -__declspec(dllexport) void egl_dispatch(int, char *, ErlDrvPort, ErlDrvTermData, char **); +extern "C" __declspec(dllexport) int egl_init_opengl(void *); +extern "C" __declspec(dllexport) void egl_dispatch(int, char *, ErlDrvPort, ErlDrvTermData, char **); #else -extern "C" int egl_init_opengl(); +extern "C" int egl_init_opengl(void *); extern "C" void egl_dispatch(int, char *, ErlDrvPort, ErlDrvTermData, char **); #endif diff --git a/lib/wx/c_src/gen/gl_funcs.cpp b/lib/wx/c_src/gen/gl_funcs.cpp index 3bda818366..de73ccf555 100644 --- a/lib/wx/c_src/gen/gl_funcs.cpp +++ b/lib/wx/c_src/gen/gl_funcs.cpp @@ -43,10 +43,9 @@ case 5010: { // gluBuild1DMipmapLevels void *data = (void *) bins[0]; GLint result = wegluBuild1DMipmapLevels(*target,*internalFormat,*width,*format,*type,*level,*base,*max,data); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5011: { // gluBuild1DMipmaps @@ -58,10 +57,9 @@ case 5011: { // gluBuild1DMipmaps void *data = (void *) bins[0]; GLint result = wegluBuild1DMipmaps(*target,*internalFormat,*width,*format,*type,data); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5012: { // gluBuild2DMipmapLevels @@ -77,10 +75,9 @@ case 5012: { // gluBuild2DMipmapLevels void *data = (void *) bins[0]; GLint result = wegluBuild2DMipmapLevels(*target,*internalFormat,*width,*height,*format,*type,*level,*base,*max,data); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5013: { // gluBuild2DMipmaps @@ -93,10 +90,9 @@ case 5013: { // gluBuild2DMipmaps void *data = (void *) bins[0]; GLint result = wegluBuild2DMipmaps(*target,*internalFormat,*width,*height,*format,*type,data); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5014: { // gluBuild3DMipmapLevels @@ -113,10 +109,9 @@ case 5014: { // gluBuild3DMipmapLevels void *data = (void *) bins[0]; GLint result = wegluBuild3DMipmapLevels(*target,*internalFormat,*width,*height,*depth,*format,*type,*level,*base,*max,data); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5015: { // gluBuild3DMipmaps @@ -130,10 +125,9 @@ case 5015: { // gluBuild3DMipmaps void *data = (void *) bins[0]; GLint result = wegluBuild3DMipmaps(*target,*internalFormat,*width,*height,*depth,*format,*type,data); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5016: { // gluCheckExtension @@ -143,10 +137,9 @@ case 5016: { // gluCheckExtension GLubyte * extString = (GLubyte *) bp; bp += (8-((*extStringLen*1+4)%8))%8; GLboolean result = wegluCheckExtension(extName,extString); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5017: { // gluCylinder @@ -174,20 +167,18 @@ case 5020: { // gluErrorString GLenum *error = (GLenum *) bp; bp += 4; const GLubyte * result = wegluErrorString(*error); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); }; break; case 5021: { // gluGetString GLenum *name = (GLenum *) bp; bp += 4; const GLubyte * result = wegluGetString(*name); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); }; break; case 5022: { // gluLookAt @@ -205,10 +196,9 @@ case 5022: { // gluLookAt case 5023: { // gluNewQuadric GLUquadric * result = wegluNewQuadric(); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5024: { // gluOrtho2D @@ -255,14 +245,13 @@ case 5028: { // gluProject GLdouble winZ[1] = {0.0}; GLint result = wegluProject(*objX,*objY,*objZ,model,proj,view,winX,winY,winZ); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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_FLOAT; rt[AP++] = (ErlDrvTermData) winX; rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) winY; rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) winZ; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5029: { // gluQuadricDrawStyle @@ -297,10 +286,9 @@ case 5033: { // gluScaleImage GLvoid *dataOut = (GLvoid *) bins[1]; GLint result = wegluScaleImage(*format,*wIn,*hIn,*typeIn,dataIn,*wOut,*hOut,*typeOut,dataOut); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5034: { // gluSphere @@ -322,14 +310,13 @@ case 5035: { // gluUnProject GLdouble objZ[1] = {0.0}; GLint result = wegluUnProject(*winX,*winY,*winZ,model,proj,view,objX,objY,objZ); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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_FLOAT; rt[AP++] = (ErlDrvTermData) objX; rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) objY; rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) objZ; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5036: { // gluUnProject4 @@ -348,7 +335,7 @@ case 5036: { // gluUnProject4 GLdouble objW[1] = {0.0}; GLint result = wegluUnProject4(*winX,*winY,*winZ,*clipW,model,proj,view,*nearVal,*farVal,objX,objY,objZ,objW); int AP = 0; ErlDrvTermData rt[16]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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_FLOAT; rt[AP++] = (ErlDrvTermData) objX; rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) objY; @@ -356,7 +343,6 @@ case 5036: { // gluUnProject4 rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) objW; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 5; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 16 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,16); driver_send_term(port,caller,rt,AP); }; break; case 5037: { // glAccum @@ -377,14 +363,13 @@ case 5039: { // glAreTexturesResident 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 *) "_wxe_result_"); + 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; - if (AP != 11 + (*texturesLen)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,11 + (*texturesLen)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(residences); @@ -759,7 +744,7 @@ case 5109: { // glFeedbackBuffer 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 *) "_wxe_result_"); + 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); @@ -809,10 +794,9 @@ case 5118: { // 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 *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5119: { // glGenTextures @@ -822,12 +806,11 @@ case 5119: { // glGenTextures 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 *) "_wxe_result_"); + 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; - if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(textures); @@ -837,7 +820,7 @@ case 5120: { // glGetBooleanv GLboolean params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; weglGetBooleanv(*pname,params); int AP = 0; ErlDrvTermData rt[39]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLboolean *paramsTmp = params; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; @@ -857,7 +840,6 @@ case 5120: { // glGetBooleanv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); driver_send_term(port,caller,rt,AP); }; break; case 5121: { // glGetClipPlane @@ -865,7 +847,7 @@ case 5121: { // glGetClipPlane 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 *) "_wxe_result_"); + 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++; @@ -873,7 +855,6 @@ case 5121: { // glGetClipPlane 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5122: { // glGetDoublev @@ -881,7 +862,7 @@ case 5122: { // glGetDoublev 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); int AP = 0; ErlDrvTermData rt[39]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -901,16 +882,14 @@ case 5122: { // glGetDoublev rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); 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 *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5124: { // glGetFloatv @@ -918,7 +897,7 @@ case 5124: { // glGetFloatv 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); int AP = 0; ErlDrvTermData rt[39]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLdouble paramsConv[16], *paramsTmp = paramsConv; for(int i=0; i < 16; i++) paramsConv[i] = (GLdouble) params[i]; rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; @@ -939,7 +918,6 @@ case 5124: { // glGetFloatv rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); driver_send_term(port,caller,rt,AP); }; break; case 5125: { // glGetIntegerv @@ -947,7 +925,7 @@ case 5125: { // glGetIntegerv GLint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; weglGetIntegerv(*pname,params); int AP = 0; ErlDrvTermData rt[39]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -967,7 +945,6 @@ case 5125: { // glGetIntegerv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); driver_send_term(port,caller,rt,AP); }; break; case 5126: { // glGetLightfv @@ -976,7 +953,7 @@ case 5126: { // glGetLightfv 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 *) "_wxe_result_"); + 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++; @@ -985,7 +962,6 @@ case 5126: { // glGetLightfv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5127: { // glGetLightiv @@ -994,7 +970,7 @@ case 5127: { // glGetLightiv 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 *) "_wxe_result_"); + 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++; @@ -1002,7 +978,6 @@ case 5127: { // glGetLightiv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5128: { // glGetMapdv @@ -1011,7 +986,7 @@ case 5128: { // glGetMapdv 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 *) "_wxe_result_"); + 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); @@ -1022,7 +997,7 @@ case 5129: { // glGetMapfv 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 *) "_wxe_result_"); + 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); @@ -1033,7 +1008,7 @@ case 5130: { // glGetMapiv 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 *) "_wxe_result_"); + 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); @@ -1044,7 +1019,7 @@ case 5131: { // glGetMaterialfv 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 *) "_wxe_result_"); + 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++; @@ -1053,7 +1028,6 @@ case 5131: { // glGetMaterialfv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5132: { // glGetMaterialiv @@ -1062,7 +1036,7 @@ case 5132: { // glGetMaterialiv 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 *) "_wxe_result_"); + 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++; @@ -1070,7 +1044,6 @@ case 5132: { // glGetMaterialiv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5133: { // glGetPixelMapfv @@ -1078,7 +1051,7 @@ case 5133: { // glGetPixelMapfv 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 *) "_wxe_result_"); + 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); @@ -1088,7 +1061,7 @@ case 5134: { // glGetPixelMapuiv 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 *) "_wxe_result_"); + 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); @@ -1098,7 +1071,7 @@ case 5135: { // glGetPixelMapusv 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 *) "_wxe_result_"); + 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); @@ -1107,12 +1080,11 @@ case 5136: { // glGetPolygonStipple GLubyte mask[128]; weglGetPolygonStipple(mask); int AP = 0; ErlDrvTermData rt[8]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); ErlDrvBinary * BinCopy = driver_alloc_binary(128); memcpy(BinCopy->orig_bytes, mask, 128); rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) BinCopy; rt[AP++] = 128; rt[AP++] = 0; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); driver_send_term(port,caller,rt,AP); driver_free_binary(BinCopy); }; break; @@ -1120,10 +1092,9 @@ 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 *) "_wxe_result_"); + 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; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); }; break; case 5138: { // glGetTexEnvfv @@ -1132,7 +1103,7 @@ case 5138: { // glGetTexEnvfv 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 *) "_wxe_result_"); + 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++; @@ -1141,7 +1112,6 @@ case 5138: { // glGetTexEnvfv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5139: { // glGetTexEnviv @@ -1150,7 +1120,7 @@ case 5139: { // glGetTexEnviv 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 *) "_wxe_result_"); + 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++; @@ -1158,7 +1128,6 @@ case 5139: { // glGetTexEnviv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5140: { // glGetTexGendv @@ -1167,7 +1136,7 @@ case 5140: { // glGetTexGendv 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 *) "_wxe_result_"); + 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++; @@ -1175,7 +1144,6 @@ case 5140: { // glGetTexGendv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5141: { // glGetTexGenfv @@ -1184,7 +1152,7 @@ case 5141: { // glGetTexGenfv 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 *) "_wxe_result_"); + 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++; @@ -1193,7 +1161,6 @@ case 5141: { // glGetTexGenfv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5142: { // glGetTexGeniv @@ -1202,7 +1169,7 @@ case 5142: { // glGetTexGeniv 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 *) "_wxe_result_"); + 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++; @@ -1210,7 +1177,6 @@ case 5142: { // glGetTexGeniv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5143: { // glGetTexImage @@ -1221,7 +1187,7 @@ case 5143: { // glGetTexImage 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 *) "_wxe_result_"); + 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); @@ -1233,13 +1199,12 @@ case 5144: { // glGetTexLevelParameterfv 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 *) "_wxe_result_"); + 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; - if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); driver_send_term(port,caller,rt,AP); }; break; case 5145: { // glGetTexLevelParameteriv @@ -1249,12 +1214,11 @@ case 5145: { // glGetTexLevelParameteriv 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 *) "_wxe_result_"); + 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; - if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); driver_send_term(port,caller,rt,AP); }; break; case 5146: { // glGetTexParameterfv @@ -1263,7 +1227,7 @@ case 5146: { // glGetTexParameterfv 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 *) "_wxe_result_"); + 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++; @@ -1272,7 +1236,6 @@ case 5146: { // glGetTexParameterfv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5147: { // glGetTexParameteriv @@ -1281,7 +1244,7 @@ case 5147: { // glGetTexParameteriv 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 *) "_wxe_result_"); + 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++; @@ -1289,7 +1252,6 @@ case 5147: { // glGetTexParameteriv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5148: { // glHint @@ -1352,30 +1314,27 @@ 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 *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; 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 *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; 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 *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5163: { // glLightModelf @@ -1782,7 +1741,7 @@ case 5238: { // glReadPixels 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 *) "_wxe_result_"); + 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); @@ -1839,10 +1798,9 @@ case 5247: { // 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 *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5248: { // glRotated @@ -1883,7 +1841,7 @@ case 5253: { // glSelectBuffer 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 *) "_wxe_result_"); + 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); @@ -2388,7 +2346,7 @@ case 5329: { // glGetColorTable GLvoid *table = (GLvoid *) bins[0]; weglGetColorTable(*target,*format,*type,table); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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); @@ -2399,7 +2357,7 @@ case 5330: { // glGetColorTableParameterfv GLfloat params[4] = {0.0,0.0,0.0,0.0}; weglGetColorTableParameterfv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -2408,7 +2366,6 @@ case 5330: { // glGetColorTableParameterfv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5331: { // glGetColorTableParameteriv @@ -2417,7 +2374,7 @@ case 5331: { // glGetColorTableParameteriv GLint params[4] = {0,0,0,0}; weglGetColorTableParameteriv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -2425,7 +2382,6 @@ case 5331: { // glGetColorTableParameteriv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5332: { // glColorSubTable @@ -2530,7 +2486,7 @@ case 5343: { // glGetConvolutionFilter GLvoid *image = (GLvoid *) bins[0]; weglGetConvolutionFilter(*target,*format,*type,image); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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); @@ -2541,7 +2497,7 @@ case 5344: { // glGetConvolutionParameterfv GLfloat params[4] = {0.0,0.0,0.0,0.0}; weglGetConvolutionParameterfv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -2550,7 +2506,6 @@ case 5344: { // glGetConvolutionParameterfv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5345: { // glGetConvolutionParameteriv @@ -2559,7 +2514,7 @@ case 5345: { // glGetConvolutionParameteriv GLint params[4] = {0,0,0,0}; weglGetConvolutionParameteriv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -2567,7 +2522,6 @@ case 5345: { // glGetConvolutionParameteriv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5346: { // glSeparableFilter2D @@ -2601,7 +2555,7 @@ case 5348: { // glGetHistogram GLvoid *values = (GLvoid *) bins[0]; weglGetHistogram(*target,*reset,*format,*type,values); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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); @@ -2612,13 +2566,12 @@ case 5349: { // glGetHistogramParameterfv GLfloat params[1] = {0.0}; weglGetHistogramParameterfv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[8]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); driver_send_term(port,caller,rt,AP); }; break; case 5350: { // glGetHistogramParameteriv @@ -2627,12 +2580,11 @@ case 5350: { // glGetHistogramParameteriv GLint params[1] = {0}; weglGetHistogramParameteriv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[8]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); driver_send_term(port,caller,rt,AP); }; break; case 5351: { // glGetMinmax @@ -2644,7 +2596,7 @@ case 5351: { // glGetMinmax GLvoid *values = (GLvoid *) bins[0]; weglGetMinmax(*target,*reset,*format,*type,values); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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); @@ -2655,13 +2607,12 @@ case 5352: { // glGetMinmaxParameterfv GLfloat params[1] = {0.0}; weglGetMinmaxParameterfv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[8]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); driver_send_term(port,caller,rt,AP); }; break; case 5353: { // glGetMinmaxParameteriv @@ -2670,12 +2621,11 @@ case 5353: { // glGetMinmaxParameteriv GLint params[1] = {0}; weglGetMinmaxParameteriv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[8]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 8 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,8); driver_send_term(port,caller,rt,AP); }; break; case 5354: { // glHistogram @@ -2852,7 +2802,7 @@ case 5372: { // glGetCompressedTexImage GLvoid *img = (GLvoid *) bins[0]; weglGetCompressedTexImage(*target,*level,img); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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); @@ -3103,12 +3053,11 @@ case 5422: { // glGenQueries weglGenQueries(*n,ids); 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 *) "_wxe_result_"); + 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) ids[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(ids); @@ -3122,10 +3071,9 @@ case 5424: { // glIsQuery GLuint *id = (GLuint *) bp; bp += 4; GLboolean result = weglIsQuery(*id); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5425: { // glBeginQuery @@ -3143,10 +3091,9 @@ case 5427: { // glGetQueryiv GLint params[1] = {0}; weglGetQueryiv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5428: { // glGetQueryObjectiv @@ -3155,10 +3102,9 @@ case 5428: { // glGetQueryObjectiv GLint params[1] = {0}; weglGetQueryObjectiv(*id,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5429: { // glGetQueryObjectuiv @@ -3167,10 +3113,9 @@ case 5429: { // glGetQueryObjectuiv GLuint params[1] = {0}; weglGetQueryObjectuiv(*id,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5430: { // glBindBuffer @@ -3190,12 +3135,11 @@ case 5432: { // glGenBuffers weglGenBuffers(*n,buffers); 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 *) "_wxe_result_"); + 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) buffers[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(buffers); @@ -3204,10 +3148,9 @@ case 5433: { // glIsBuffer GLuint *buffer = (GLuint *) bp; bp += 4; GLboolean result = weglIsBuffer(*buffer); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5434: { // glBufferData @@ -3250,7 +3193,7 @@ case 5438: { // glGetBufferSubData GLvoid *data = (GLvoid *) bins[0]; weglGetBufferSubData(*target,offset,size,data); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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); @@ -3261,10 +3204,9 @@ case 5439: { // glGetBufferParameteriv GLint params[1] = {0}; weglGetBufferParameteriv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5440: { // glBlendEquationSeparate @@ -3315,20 +3257,18 @@ case 5447: { // glCompileShader case 5448: { // glCreateProgram GLuint result = weglCreateProgram(); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5449: { // glCreateShader GLenum *type = (GLenum *) bp; bp += 4; GLuint result = weglCreateShader(*type); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5450: { // glDeleteProgram @@ -3363,13 +3303,12 @@ case 5455: { // glGetActiveAttrib name = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); weglGetActiveAttrib(*program,*index,*bufSize,length,size,type,name); int AP = 0; ErlDrvTermData rt[13]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *size; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *type; rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) name; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); driver_send_term(port,caller,rt,AP); driver_free(name); }; break; @@ -3384,13 +3323,12 @@ case 5456: { // glGetActiveUniform name = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); weglGetActiveUniform(*program,*index,*bufSize,length,size,type,name); int AP = 0; ErlDrvTermData rt[13]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *size; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *type; rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) name; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); driver_send_term(port,caller,rt,AP); driver_free(name); }; break; @@ -3403,12 +3341,11 @@ case 5457: { // glGetAttachedShaders weglGetAttachedShaders(*program,*maxCount,count,obj); int AP = 0; ErlDrvTermData *rt; rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*count)*2)); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); for(int i=0; i < *count; i++) { rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) obj[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*count)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*count)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*count)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(obj); @@ -3419,10 +3356,9 @@ case 5458: { // glGetAttribLocation int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); GLint result = weglGetAttribLocation(*program,name); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5459: { // glGetProgramiv @@ -3431,10 +3367,9 @@ case 5459: { // glGetProgramiv GLint params[1] = {0}; weglGetProgramiv(*program,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5460: { // glGetProgramInfoLog @@ -3445,10 +3380,9 @@ case 5460: { // glGetProgramInfoLog infoLog = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); weglGetProgramInfoLog(*program,*bufSize,length,infoLog); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) infoLog; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); driver_free(infoLog); }; break; @@ -3458,10 +3392,9 @@ case 5461: { // glGetShaderiv GLint params[1] = {0}; weglGetShaderiv(*shader,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5462: { // glGetShaderInfoLog @@ -3472,10 +3405,9 @@ case 5462: { // glGetShaderInfoLog infoLog = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); weglGetShaderInfoLog(*shader,*bufSize,length,infoLog); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) infoLog; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); driver_free(infoLog); }; break; @@ -3487,10 +3419,9 @@ case 5463: { // glGetShaderSource source = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); weglGetShaderSource(*shader,*bufSize,length,source); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) source; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); driver_free(source); }; break; @@ -3500,10 +3431,9 @@ case 5464: { // glGetUniformLocation int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); GLint result = weglGetUniformLocation(*program,name); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5465: { // glGetUniformfv @@ -3512,7 +3442,7 @@ case 5465: { // glGetUniformfv 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}; weglGetUniformfv(*program,*location,params); int AP = 0; ErlDrvTermData rt[38]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLdouble paramsConv[16], *paramsTmp = paramsConv; for(int i=0; i < 16; i++) paramsConv[i] = (GLdouble) params[i]; rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; @@ -3533,7 +3463,6 @@ case 5465: { // glGetUniformfv rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); driver_send_term(port,caller,rt,AP); }; break; case 5466: { // glGetUniformiv @@ -3542,7 +3471,7 @@ case 5466: { // glGetUniformiv GLint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; weglGetUniformiv(*program,*location,params); int AP = 0; ErlDrvTermData rt[38]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -3562,7 +3491,6 @@ case 5466: { // glGetUniformiv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); driver_send_term(port,caller,rt,AP); }; break; case 5467: { // glGetVertexAttribdv @@ -3571,7 +3499,7 @@ case 5467: { // glGetVertexAttribdv GLdouble params[4] = {0.0,0.0,0.0,0.0}; weglGetVertexAttribdv(*index,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -3579,7 +3507,6 @@ case 5467: { // glGetVertexAttribdv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5468: { // glGetVertexAttribfv @@ -3588,7 +3515,7 @@ case 5468: { // glGetVertexAttribfv GLfloat params[4] = {0.0,0.0,0.0,0.0}; weglGetVertexAttribfv(*index,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -3597,7 +3524,6 @@ case 5468: { // glGetVertexAttribfv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5469: { // glGetVertexAttribiv @@ -3606,7 +3532,7 @@ case 5469: { // glGetVertexAttribiv GLint params[4] = {0,0,0,0}; weglGetVertexAttribiv(*index,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -3614,27 +3540,24 @@ case 5469: { // glGetVertexAttribiv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5470: { // glIsProgram GLuint *program = (GLuint *) bp; bp += 4; GLboolean result = weglIsProgram(*program); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5471: { // glIsShader GLuint *shader = (GLuint *) bp; bp += 4; GLboolean result = weglIsShader(*shader); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5472: { // glLinkProgram @@ -3986,7 +3909,7 @@ case 5527: { // glGetBooleani_v GLboolean data[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; weglGetBooleani_v(*target,*index,data); int AP = 0; ErlDrvTermData rt[39]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLboolean *dataTmp = data; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; @@ -4006,7 +3929,6 @@ case 5527: { // glGetBooleani_v rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); driver_send_term(port,caller,rt,AP); }; break; case 5528: { // glGetIntegeri_v @@ -4015,7 +3937,7 @@ case 5528: { // glGetIntegeri_v GLint data[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; weglGetIntegeri_v(*target,*index,data); int AP = 0; ErlDrvTermData rt[39]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLint *dataTmp = data; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; @@ -4035,7 +3957,6 @@ case 5528: { // glGetIntegeri_v rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 39 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,39); driver_send_term(port,caller,rt,AP); }; break; case 5529: { // glEnablei @@ -4053,10 +3974,9 @@ case 5531: { // glIsEnabledi GLuint *index = (GLuint *) bp; bp += 4; GLboolean result = weglIsEnabledi(*target,*index); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5532: { // glBeginTransformFeedback @@ -4105,13 +4025,12 @@ case 5537: { // glGetTransformFeedbackVarying name = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); weglGetTransformFeedbackVarying(*program,*index,*bufSize,length,size,type,name); int AP = 0; ErlDrvTermData rt[13]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *size; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *type; rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) name; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); driver_send_term(port,caller,rt,AP); driver_free(name); }; break; @@ -4150,7 +4069,7 @@ case 5543: { // glGetVertexAttribIiv GLint params[4] = {0,0,0,0}; weglGetVertexAttribIiv(*index,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -4158,7 +4077,6 @@ case 5543: { // glGetVertexAttribIiv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5544: { // glGetVertexAttribIuiv @@ -4167,7 +4085,7 @@ case 5544: { // glGetVertexAttribIuiv GLuint params[4] = {0,0,0,0}; weglGetVertexAttribIuiv(*index,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLuint *paramsTmp = params; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; @@ -4175,7 +4093,6 @@ case 5544: { // glGetVertexAttribIuiv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5545: { // glGetUniformuiv @@ -4184,7 +4101,7 @@ case 5545: { // glGetUniformuiv GLuint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; weglGetUniformuiv(*program,*location,params); int AP = 0; ErlDrvTermData rt[38]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLuint *paramsTmp = params; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; @@ -4204,7 +4121,6 @@ case 5545: { // glGetUniformuiv rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); driver_send_term(port,caller,rt,AP); }; break; case 5546: { // glBindFragDataLocation @@ -4220,10 +4136,9 @@ case 5547: { // glGetFragDataLocation int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); GLint result = weglGetFragDataLocation(*program,name); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5548: { // glUniform1ui @@ -4296,7 +4211,7 @@ case 5558: { // glGetTexParameterIiv GLint params[4] = {0,0,0,0}; weglGetTexParameterIiv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -4304,7 +4219,6 @@ case 5558: { // glGetTexParameterIiv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5559: { // glGetTexParameterIuiv @@ -4313,7 +4227,7 @@ case 5559: { // glGetTexParameterIuiv GLuint params[4] = {0,0,0,0}; weglGetTexParameterIuiv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLuint *paramsTmp = params; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; @@ -4321,7 +4235,6 @@ case 5559: { // glGetTexParameterIuiv 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5560: { // glClearBufferiv @@ -4357,10 +4270,9 @@ case 5564: { // glGetStringi GLuint *index = (GLuint *) bp; bp += 4; const GLubyte * result = weglGetStringi(*name,*index); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); }; break; case 5565: { // glVertexAttribI1iv @@ -4559,12 +4471,11 @@ case 5602: { // glGenProgramsARB weglGenProgramsARB(*n,programs); 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 *) "_wxe_result_"); + 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) programs[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(programs); @@ -4635,7 +4546,7 @@ case 5611: { // glGetProgramEnvParameterdvARB GLdouble params[4] = {0.0,0.0,0.0,0.0}; weglGetProgramEnvParameterdvARB(*target,*index,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -4643,7 +4554,6 @@ case 5611: { // glGetProgramEnvParameterdvARB 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5612: { // glGetProgramEnvParameterfvARB @@ -4652,7 +4562,7 @@ case 5612: { // glGetProgramEnvParameterfvARB GLfloat params[4] = {0.0,0.0,0.0,0.0}; weglGetProgramEnvParameterfvARB(*target,*index,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -4661,7 +4571,6 @@ case 5612: { // glGetProgramEnvParameterfvARB 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5613: { // glGetProgramLocalParameterdvARB @@ -4670,7 +4579,7 @@ case 5613: { // glGetProgramLocalParameterdvARB GLdouble params[4] = {0.0,0.0,0.0,0.0}; weglGetProgramLocalParameterdvARB(*target,*index,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -4678,7 +4587,6 @@ case 5613: { // glGetProgramLocalParameterdvARB 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5614: { // glGetProgramLocalParameterfvARB @@ -4687,7 +4595,7 @@ case 5614: { // glGetProgramLocalParameterfvARB GLfloat params[4] = {0.0,0.0,0.0,0.0}; weglGetProgramLocalParameterfvARB(*target,*index,params); int AP = 0; ErlDrvTermData rt[14]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -4696,7 +4604,6 @@ case 5614: { // glGetProgramLocalParameterfvARB 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; - if (AP != 14 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,14); driver_send_term(port,caller,rt,AP); }; break; case 5615: { // glGetProgramStringARB @@ -4705,7 +4612,7 @@ case 5615: { // glGetProgramStringARB GLvoid *string = (GLvoid *) bins[0]; weglGetProgramStringARB(*target,*pname,string); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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); @@ -4718,10 +4625,9 @@ case 5617: { // glGetHandleARB GLenum *pname = (GLenum *) bp; bp += 4; GLhandleARB result = weglGetHandleARB(*pname); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5618: { // glDetachObjectARB @@ -4733,10 +4639,9 @@ case 5619: { // glCreateShaderObjectARB GLenum *shaderType = (GLenum *) bp; bp += 4; GLhandleARB result = weglCreateShaderObjectARB(*shaderType); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5620: { // glShaderSourceARB @@ -4758,10 +4663,9 @@ case 5621: { // glCompileShaderARB case 5622: { // glCreateProgramObjectARB GLhandleARB result = weglCreateProgramObjectARB(); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5623: { // glAttachObjectARB @@ -4787,11 +4691,10 @@ case 5627: { // glGetObjectParameterfvARB GLfloat params[1] = {0.0}; weglGetObjectParameterfvARB(obj,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLdouble paramsConv = (double) *params; rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) ¶msConv; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5628: { // glGetObjectParameterivARB @@ -4800,10 +4703,9 @@ case 5628: { // glGetObjectParameterivARB GLint params[1] = {0}; weglGetObjectParameterivARB(obj,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5629: { // glGetInfoLogARB @@ -4814,10 +4716,9 @@ case 5629: { // glGetInfoLogARB infoLog = (GLchar *) driver_alloc(sizeof(GLchar) * *maxLength); weglGetInfoLogARB(obj,*maxLength,length,infoLog); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) infoLog; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); driver_free(infoLog); }; break; @@ -4830,12 +4731,11 @@ case 5630: { // glGetAttachedObjectsARB weglGetAttachedObjectsARB(containerObj,*maxCount,count,obj); int AP = 0; ErlDrvTermData *rt; rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*count)*2)); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); for(int i=0; i < *count; i++) { rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) obj[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*count)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*count)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*count)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(obj); @@ -4846,10 +4746,9 @@ case 5631: { // glGetUniformLocationARB int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); GLint result = weglGetUniformLocationARB(programObj,name); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5632: { // glGetActiveUniformARB @@ -4863,13 +4762,12 @@ case 5632: { // glGetActiveUniformARB name = (GLchar *) driver_alloc(sizeof(GLchar) * *maxLength); weglGetActiveUniformARB(programObj,*index,*maxLength,length,size,type,name); int AP = 0; ErlDrvTermData rt[13]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *size; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *type; rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) name; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); driver_send_term(port,caller,rt,AP); driver_free(name); }; break; @@ -4879,7 +4777,7 @@ case 5633: { // glGetUniformfvARB 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}; weglGetUniformfvARB(programObj,*location,params); int AP = 0; ErlDrvTermData rt[38]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); GLdouble paramsConv[16], *paramsTmp = paramsConv; for(int i=0; i < 16; i++) paramsConv[i] = (GLdouble) params[i]; rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; @@ -4900,7 +4798,6 @@ case 5633: { // glGetUniformfvARB rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); driver_send_term(port,caller,rt,AP); }; break; case 5634: { // glGetUniformivARB @@ -4909,7 +4806,7 @@ case 5634: { // glGetUniformivARB GLint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; weglGetUniformivARB(programObj,*location,params); int AP = 0; ErlDrvTermData rt[38]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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++; @@ -4929,7 +4826,6 @@ case 5634: { // glGetUniformivARB rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 38 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,38); driver_send_term(port,caller,rt,AP); }; break; case 5635: { // glGetShaderSourceARB @@ -4940,10 +4836,9 @@ case 5635: { // glGetShaderSourceARB source = (GLchar *) driver_alloc(sizeof(GLchar) * *maxLength); weglGetShaderSourceARB(obj,*maxLength,length,source); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) source; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); driver_free(source); }; break; @@ -4965,13 +4860,12 @@ case 5637: { // glGetActiveAttribARB name = (GLchar *) driver_alloc(sizeof(GLchar) * *maxLength); weglGetActiveAttribARB(programObj,*index,*maxLength,length,size,type,name); int AP = 0; ErlDrvTermData rt[13]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *size; rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *type; rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) name; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 13 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,13); driver_send_term(port,caller,rt,AP); driver_free(name); }; break; @@ -4981,20 +4875,18 @@ case 5638: { // glGetAttribLocationARB int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); GLint result = weglGetAttribLocationARB(programObj,name); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5639: { // glIsRenderbuffer GLuint *renderbuffer = (GLuint *) bp; bp += 4; GLboolean result = weglIsRenderbuffer(*renderbuffer); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5640: { // glBindRenderbuffer @@ -5014,12 +4906,11 @@ case 5642: { // glGenRenderbuffers weglGenRenderbuffers(*n,renderbuffers); 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 *) "_wxe_result_"); + 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) renderbuffers[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(renderbuffers); @@ -5037,20 +4928,18 @@ case 5644: { // glGetRenderbufferParameteriv GLint params[1] = {0}; weglGetRenderbufferParameteriv(*target,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5645: { // glIsFramebuffer GLuint *framebuffer = (GLuint *) bp; bp += 4; GLboolean result = weglIsFramebuffer(*framebuffer); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5646: { // glBindFramebuffer @@ -5070,12 +4959,11 @@ case 5648: { // glGenFramebuffers weglGenFramebuffers(*n,framebuffers); 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 *) "_wxe_result_"); + 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) framebuffers[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(framebuffers); @@ -5084,10 +4972,9 @@ case 5649: { // glCheckFramebufferStatus GLenum *target = (GLenum *) bp; bp += 4; GLenum result = weglCheckFramebufferStatus(*target); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5650: { // glFramebufferTexture1D @@ -5129,10 +5016,9 @@ case 5654: { // glGetFramebufferAttachmentParameteriv GLint params[1] = {0}; weglGetFramebufferAttachmentParameteriv(*target,*attachment,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5655: { // glGenerateMipmap @@ -5217,12 +5103,11 @@ case 5666: { // glGenVertexArrays weglGenVertexArrays(*n,arrays); 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 *) "_wxe_result_"); + 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) arrays[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*n)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*n)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(arrays); @@ -5231,10 +5116,9 @@ case 5667: { // glIsVertexArray GLuint *array = (GLuint *) bp; bp += 4; GLboolean result = weglIsVertexArray(*array); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5668: { // glGetUniformIndices @@ -5251,12 +5135,11 @@ case 5668: { // glGetUniformIndices weglGetUniformIndices(*program,*uniformNamesLen,(const GLchar **) uniformNames,uniformIndices); int AP = 0; ErlDrvTermData *rt; rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*uniformNamesLen)*2)); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); for(int i=0; i < *uniformNamesLen; i++) { rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) uniformIndices[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*uniformNamesLen)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*uniformNamesLen)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*uniformNamesLen)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(uniformIndices); @@ -5272,12 +5155,11 @@ case 5669: { // glGetActiveUniformsiv weglGetActiveUniformsiv(*program,*uniformIndicesLen,uniformIndices,*pname,params); int AP = 0; ErlDrvTermData *rt; rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*uniformIndicesLen)*2)); - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); for(int i=0; i < *uniformIndicesLen; i++) { rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) params[i];} rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*uniformIndicesLen)+1; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 + (*uniformIndicesLen)*2 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7 + (*uniformIndicesLen)*2); driver_send_term(port,caller,rt,AP); driver_free(rt); driver_free(params); @@ -5291,10 +5173,9 @@ case 5670: { // glGetActiveUniformName uniformName = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); weglGetActiveUniformName(*program,*uniformIndex,*bufSize,length,uniformName); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) uniformName; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); driver_free(uniformName); }; break; @@ -5304,10 +5185,9 @@ case 5671: { // glGetUniformBlockIndex int uniformBlockNameLen = strlen((char *)uniformBlockName); bp += uniformBlockNameLen+1+((8-((1+uniformBlockNameLen+4)%8))%8); GLuint result = weglGetUniformBlockIndex(*program,uniformBlockName); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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; - if (AP != 6 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,6); driver_send_term(port,caller,rt,AP); }; break; case 5672: { // glGetActiveUniformBlockiv @@ -5317,7 +5197,7 @@ case 5672: { // glGetActiveUniformBlockiv GLint *params = (GLint *) bins[0]; weglGetActiveUniformBlockiv(*program,*uniformBlockIndex,*pname,params); int AP = 0; ErlDrvTermData rt[6]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + 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); @@ -5331,10 +5211,9 @@ case 5673: { // glGetActiveUniformBlockName uniformBlockName = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); weglGetActiveUniformBlockName(*program,*uniformBlockIndex,*bufSize,length,uniformBlockName); int AP = 0; ErlDrvTermData rt[7]; - rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_wxe_result_"); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) uniformBlockName; rt[AP++] = *length; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; - if (AP != 7 ) fprintf(stderr, "%d: ERROR AP mismatch %d %d\r\n",__LINE__,AP,7); driver_send_term(port,caller,rt,AP); driver_free(uniformBlockName); }; break; diff --git a/lib/wx/c_src/wxe_gl.cpp b/lib/wx/c_src/wxe_gl.cpp index eb4462047f..f1fc848de9 100644 --- a/lib/wx/c_src/wxe_gl.cpp +++ b/lib/wx/c_src/wxe_gl.cpp @@ -19,12 +19,14 @@ #include #include +#ifndef _WIN32 #include +#else +#include +#endif #include "wxe_impl.h" #include "wxe_return.h" -#define WX_DEF_EXTS - /* **************************************************************************** * Opengl context management * * ****************************************************************************/ @@ -37,39 +39,72 @@ typedef void (*WXE_GL_DISPATCH) (int, char *, ErlDrvPort, ErlDrvTermData, char * WXE_GL_DISPATCH wxe_gl_dispatch; #ifdef _WIN32 +#define RTLD_LAZY 0 +typedef HMODULE DL_LIB_P; void * dlsym(HMODULE Lib, const char *func) { - funcp = (void *) GetProcAddress(Lib, func); - return funcp; + void * funcp; + if((funcp = (void *) GetProcAddress(Lib, func))) + return funcp; + else + return (void *) wglGetProcAddress(func); } -#endif -void wxe_initOpenGL(wxeReturn rt, char *bp) { - void * LIBhandle; - int (*init_opengl) (); +HMODULE dlopen(const char *path, int unused) { + WCHAR * DLL; + int len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0); + DLL = (WCHAR *) malloc(len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, path, -1, DLL, len); + HMODULE lib = LoadLibrary(DLL); + free(DLL); + return lib; +} +void dlclose(HMODULE Lib) { + FreeLibrary(Lib); +} +#else +typedef void * DL_LIB_P; +#endif + +void wxe_initOpenGL(wxeReturn rt, char *bp) { + DL_LIB_P LIBhandle; + int (*init_opengl)(void *); +#ifdef _WIN32 + void * erlCallbacks = &WinDynDriverCallbacks; +#else + void * erlCallbacks = NULL; +#endif + if(erl_gl_initiated == FALSE) { if((LIBhandle = dlopen(bp, RTLD_LAZY))) { *(void **) (&init_opengl) = dlsym(LIBhandle, "egl_init_opengl"); wxe_gl_dispatch = (WXE_GL_DISPATCH) dlsym(LIBhandle, "egl_dispatch"); if(init_opengl && wxe_gl_dispatch) { - (*init_opengl)(); + (*init_opengl)(erlCallbacks); rt.addAtom((char *) "ok"); - rt.add(wxString::FromAscii("initiated")); - rt.addTupleCount(2); - erl_gl_initiated = TRUE; - } else { - wxString msg; - msg.Printf(wxT("In library: ")); - msg += wxString::FromAscii(bp); - msg += wxT(" functions: "); - if(!init_opengl) - msg += wxT("egl_init_opengl "); - if(!wxe_gl_dispatch) - msg += wxT("egl_dispatch "); - rt.addAtom((char *) "error"); - rt.add(msg); - rt.addTupleCount(2); - } + rt.add(wxString::FromAscii("initiated")); + rt.addTupleCount(2); + erl_gl_initiated = TRUE; + } else { + wxString msg; + msg.Printf(wxT("In library: ")); + msg += wxString::FromAscii(bp); + msg += wxT(" functions: "); + if(!init_opengl) + msg += wxT("egl_init_opengl "); + if(!wxe_gl_dispatch) + msg += wxT("egl_dispatch "); + rt.addAtom((char *) "error"); + rt.add(msg); + rt.addTupleCount(2); + } + } else { + wxString msg; + msg.Printf(wxT("Could not load dll: ")); + msg += wxString::FromAscii(bp); + rt.addAtom((char *) "error"); + rt.add(msg); + rt.addTupleCount(2); } } else { rt.addAtom((char *) "ok"); @@ -102,7 +137,7 @@ void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins[]){ if(current) { gl_active = caller; current->SetCurrent();} else { ErlDrvTermData rt[] = // Error msg - {ERL_DRV_ATOM, driver_mk_atom((char *) "_wxe_error_"), + {ERL_DRV_ATOM, driver_mk_atom((char *) "_egl_error_"), ERL_DRV_INT, op, ERL_DRV_ATOM, driver_mk_atom((char *) "no_gl_context"), ERL_DRV_TUPLE,3}; diff --git a/lib/wx/configure.in b/lib/wx/configure.in index 8f8c5ee123..a2e5ff0bf7 100755 --- a/lib/wx/configure.in +++ b/lib/wx/configure.in @@ -162,19 +162,25 @@ esac case $host_os in darwin*) CFLAGS="-no-cpp-precomp $CFLAGS" - LDFLAGS="-bundle -flat_namespace -undefined warning -fPIC -framework OpenGL $LDFLAGS" + LDFLAGS="-bundle -flat_namespace -undefined warning -fPIC $LDFLAGS" + GL_LIBS="-framework OpenGL" ;; win32) LDFLAGS="-dll $LDFLAGS" + GL_LIBS="-lglu32 -lOpengl32" ;; mingw32) LDFLAGS="-shared -fPIC $LDFLAGS" + GL_LIBS="-lglu32 -lOpengl32" ;; *) LDFLAGS="-shared -fPIC $LDFLAGS" + GL_LIBS="-lGL -lGLU" ;; esac +AC_SUBST(GL_LIBS) + dnl ---------------------------------------------------------------------- dnl Include CPPFLAGS in CFLAGS dnl ---------------------------------------------------------------------- diff --git a/lib/wx/src/Makefile b/lib/wx/src/Makefile index a9fd468959..3cc668375f 100644 --- a/lib/wx/src/Makefile +++ b/lib/wx/src/Makefile @@ -47,7 +47,6 @@ GEN_FILES = $(wildcard gen/wx*.erl) \ GEN_MODS = $(GEN_FILES:gen/%.erl= %,\n ) GEN_HRL = \ - $(EGEN)/gl_debug.hrl \ $(EGEN)/wxe_debug.hrl \ $(EGEN)/wxe_funcs.hrl diff --git a/lib/wx/src/gen/gl.erl b/lib/wx/src/gen/gl.erl index 56cb2f1e23..bf56067da1 100644 --- a/lib/wx/src/gen/gl.erl +++ b/lib/wx/src/gen/gl.erl @@ -235,8 +235,8 @@ cast(Op, Args) -> rec() -> receive {'_egl_result_', Res} -> Res; - {'_egl_error_', Res} -> error({error,Res}) - end. + {'_egl_error_', Op, Res} -> error({error,Res,Op}) + end. %% @hidden send_bin(Bin) when is_binary(Bin) -> diff --git a/lib/wx/src/gen/wxGLCanvas.erl b/lib/wx/src/gen/wxGLCanvas.erl index ed5430dae1..e5d7bec4ca 100644 --- a/lib/wx/src/gen/wxGLCanvas.erl +++ b/lib/wx/src/gen/wxGLCanvas.erl @@ -105,7 +105,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options) ({palette, #wx_ref{type=PaletteT,ref=PaletteRef}}, Acc) -> ?CLASS(PaletteT,wxPalette),[<<7:32/?UI,PaletteRef:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), - wxe_master:init_opengl(), + {ok, _} = wxe_master:init_opengl(), wxe_util:construct(?wxGLCanvas_new_2, <>). @@ -131,7 +131,7 @@ new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=SharedT,ref=SharedRef}, Opt ({palette, #wx_ref{type=PaletteT,ref=PaletteRef}}, Acc) -> ?CLASS(PaletteT,wxPalette),[<<7:32/?UI,PaletteRef:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), - wxe_master:init_opengl(), + {ok, _} = wxe_master:init_opengl(), wxe_util:construct(SharedOP, <>). diff --git a/lib/wx/src/wxe_master.erl b/lib/wx/src/wxe_master.erl index 8751a259ce..d8592c133b 100644 --- a/lib/wx/src/wxe_master.erl +++ b/lib/wx/src/wxe_master.erl @@ -76,21 +76,11 @@ init_port() -> %%-------------------------------------------------------------------- -%% Function: start_link() -> {ok,Pid} | ignore | {error,Error} -%% Description: Starts the server +%% Initlizes the opengl library %%-------------------------------------------------------------------- init_opengl() -> - PrivDir = priv_dir(), - DynLib0 = "erl_gl", - DynLib = case os:type() of - {win32,_} -> - DynLib0 ++ ".dll\0"; - _ -> - DynLib0 ++ ".so\0" - end, - GLLib = filename:join(PrivDir, DynLib), - - wxe_util:call(?WXE_INIT_OPENGL, list_to_binary(GLLib)). + GLLib = wxe_util:wxgl_dl(), + wxe_util:call(?WXE_INIT_OPENGL, <<(list_to_binary(GLLib))/binary, 0:8>>). %%==================================================================== %% gen_server callbacks @@ -105,7 +95,7 @@ init_opengl() -> %%-------------------------------------------------------------------- init([]) -> DriverName = ?DRIVER, - PrivDir = priv_dir(), + PrivDir = wxe_util:priv_dir(?DRIVER), erlang:group_leader(whereis(init), self()), case catch erlang:system_info(smp_support) of true -> ok; @@ -222,108 +212,9 @@ code_change(_OldVsn, State, _Extra) -> %%%%%%%%%%%% INTERNAL %%%%%%%%%%%%%%%%%%%%%%%% -%% If you want anything done, do it yourself. - -priv_dir() -> - Type = erlang:system_info(system_architecture), - {file, Path} = code:is_loaded(?MODULE), - Priv = case filelib:is_regular(Path) of - true -> - Beam = filename:join(["ebin/",atom_to_list(?MODULE) ++ ".beam"]), - filename:join(strip(Path, Beam), "priv"); - false -> - code:priv_dir(wx) - end, - try - {ok, Dirs0} = file:list_dir(Priv), - Dirs1 = split_dirs(Dirs0), - Dirs = lists:reverse(lists:sort(Dirs1)), - - Best = best_dir(hd(split_dirs([Type])),Dirs, Priv), - filename:join(Priv, Best) - catch _:_ -> - error_logger:format("WX ERROR: Could not find suitable \'~s\' for ~s in: ~s~n", - [?DRIVER, Type, Priv]), - erlang:error({load_driver, "No driver found"}) - end. - -best_dir(Dir, Dirs0, Priv) -> - Dirs = [{D,D} || D <- Dirs0], - best_dir(Dir, Dirs, [], Priv). - -best_dir(Pre, [{[],_}|R], Acc, Priv) -> %% Empty skip'em - best_dir(Pre, R, Acc, Priv); -best_dir(Pre, [{Pre,Dir}|R], Acc, Priv) -> - Real = dir_app(lists:reverse(Dir)), - case file:list_dir(filename:join(Priv,Real)) of - {ok, Fs} -> - case lists:any(fun(File) -> filename:rootname(File) =:= ?DRIVER end, Fs) of - true -> Real; %% Found dir and it contains a driver - false -> best_dir(Pre, R, Acc, Priv) - end; - _ -> - best_dir(Pre, R, Acc, Priv) - end; -best_dir(Pre, [{[_|F],Dir}|R], Acc, Priv) -> - best_dir(Pre, R, [{F,Dir}|Acc], Priv); -best_dir(_Pre, [], [],_) -> throw(no_dir); %% Nothing found -best_dir([_|Pre], [], Acc, Priv) -> - best_dir(Pre, lists:reverse(Acc), [], Priv); -best_dir([], _, _,_) -> throw(no_dir). %% Nothing found - -split_dirs(Dirs0) -> - ToInt = fun(Str) -> - try - list_to_integer(Str) - catch _:_ -> Str - end - end, - Split = fun(Dir) -> - Toks = tokens(Dir,".-"), - lists:reverse([ToInt(Str) || Str <- Toks]) - end, - lists:map(Split,Dirs0). - -dir_app([]) -> []; -dir_app([Dir]) -> Dir; -dir_app(Dir) -> - dir_app2(Dir). -dir_app2([Int]) when is_integer(Int) -> - integer_to_list(Int); -dir_app2([Str]) when is_list(Str) -> - Str; -dir_app2([Head|Rest]) when is_integer(Head) -> - integer_to_list(Head) ++ dir_app2(Rest); -dir_app2([Head|Rest]) when is_list(Head) -> - Head ++ dir_app2(Rest). - -strip(Src, Src) -> - []; -strip([H|R], Src) -> - [H| strip(R, Src)]. - - debug_ping(Port) -> timer:sleep(1*333), _R = (catch erlang:port_call(Port, 0, [])), %% io:format("Erlang ping ~p ~n", [_R]), debug_ping(Port). -tokens(S,Seps) -> - tokens1(S, Seps, []). - -tokens1([C|S], Seps, Toks) -> - case lists:member(C, Seps) of - true -> tokens1(S, Seps, [[C]|Toks]); - false -> tokens2(S, Seps, Toks, [C]) - end; -tokens1([], _Seps, Toks) -> - lists:reverse(Toks). - -tokens2([C|S], Seps, Toks, Cs) -> - case lists:member(C, Seps) of - true -> tokens1(S, Seps, [[C], lists:reverse(Cs) |Toks]); - false -> tokens2(S, Seps, Toks, [C|Cs]) - end; -tokens2([], _Seps, Toks, Cs) -> - lists:reverse([lists:reverse(Cs)|Toks]). diff --git a/lib/wx/src/wxe_util.erl b/lib/wx/src/wxe_util.erl index a2fb4641c9..78068fe1b0 100644 --- a/lib/wx/src/wxe_util.erl +++ b/lib/wx/src/wxe_util.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% Copyright Ericsson AB 2008-2010. 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 @@ -32,8 +32,9 @@ get_const/1,colour_bin/1,datetime_bin/1, to_bool/1,from_bool/1]). --include("wxe.hrl"). +-export([wxgl_dl/0, priv_dir/1]). +-include("wxe.hrl"). to_bool(0) -> false; to_bool(_) -> true. @@ -199,3 +200,122 @@ check_previous() -> erlang:error({Error, MF}) after 0 -> ok end. + + +%% If you want anything done, do it yourself. + +wxgl_dl() -> + DynLib0 = "erl_gl", + PrivDir = priv_dir(DynLib0), + DynLib = case os:type() of + {win32,_} -> + DynLib0 ++ ".dll"; + _ -> + DynLib0 ++ ".so" + end, + GLLib = filename:join(PrivDir, DynLib), + case file:read_file_info(GLLib) of + {ok, _} -> + GLLib; + {error,_} -> + error({enoent, GLLib}) + end. + + +priv_dir(Driver) -> + Type = erlang:system_info(system_architecture), + {file, Path} = code:is_loaded(?MODULE), + Priv = case filelib:is_regular(Path) of + true -> + Beam = filename:join(["ebin/",atom_to_list(?MODULE) ++ ".beam"]), + filename:join(strip(Path, Beam), "priv"); + false -> + code:priv_dir(wx) + end, + try + {ok, Dirs0} = file:list_dir(Priv), + Dirs1 = split_dirs(Dirs0), + Dirs = lists:reverse(lists:sort(Dirs1)), + + Best = best_dir(hd(split_dirs([Type])),Dirs, Driver, Priv), + filename:join(Priv, Best) + catch _:_ -> + error_logger:format("ERROR: Could not find suitable \'~s\' for ~s in: ~s~n", + [Driver, Type, Priv]), + erlang:error({load_driver, "No driver found"}) + end. + +best_dir(Dir, Dirs0, Driver, Priv) -> + Dirs = [{D,D} || D <- Dirs0], + best_dir(Dir, Dirs, [], Driver, Priv). + +best_dir(Pre, [{[],_}|R], Acc, Driver, Priv) -> %% Empty skip'em + best_dir(Pre, R, Acc, Driver, Priv); +best_dir(Pre, [{Pre,Dir}|R], Acc, Driver, Priv) -> + Real = dir_app(lists:reverse(Dir)), + case file:list_dir(filename:join(Priv,Real)) of + {ok, Fs} -> + case lists:any(fun(File) -> filename:rootname(File) =:= Driver end, Fs) of + true -> Real; %% Found dir and it contains a driver + false -> best_dir(Pre, R, Acc, Driver, Priv) + end; + _ -> + best_dir(Pre, R, Acc, Driver, Priv) + end; +best_dir(Pre, [{[_|F],Dir}|R], Acc, Driver, Priv) -> + best_dir(Pre, R, [{F,Dir}|Acc], Driver, Priv); +best_dir(_Pre, [], [], _,_) -> throw(no_dir); %% Nothing found +best_dir([_|Pre], [], Acc, Driver, Priv) -> + best_dir(Pre, lists:reverse(Acc), [], Driver, Priv); +best_dir([], _, _,_,_) -> throw(no_dir). %% Nothing found + +split_dirs(Dirs0) -> + ToInt = fun(Str) -> + try + list_to_integer(Str) + catch _:_ -> Str + end + end, + Split = fun(Dir) -> + Toks = tokens(Dir,".-"), + lists:reverse([ToInt(Str) || Str <- Toks]) + end, + lists:map(Split,Dirs0). + +dir_app([]) -> []; +dir_app([Dir]) -> Dir; +dir_app(Dir) -> + dir_app2(Dir). +dir_app2([Int]) when is_integer(Int) -> + integer_to_list(Int); +dir_app2([Str]) when is_list(Str) -> + Str; +dir_app2([Head|Rest]) when is_integer(Head) -> + integer_to_list(Head) ++ dir_app2(Rest); +dir_app2([Head|Rest]) when is_list(Head) -> + Head ++ dir_app2(Rest). + +strip(Src, Src) -> + []; +strip([H|R], Src) -> + [H| strip(R, Src)]. + +tokens(S,Seps) -> + tokens1(S, Seps, []). + +tokens1([C|S], Seps, Toks) -> + case lists:member(C, Seps) of + true -> tokens1(S, Seps, [[C]|Toks]); + false -> tokens2(S, Seps, Toks, [C]) + end; +tokens1([], _Seps, Toks) -> + lists:reverse(Toks). + +tokens2([C|S], Seps, Toks, Cs) -> + case lists:member(C, Seps) of + true -> tokens1(S, Seps, [[C], lists:reverse(Cs) |Toks]); + false -> tokens2(S, Seps, Toks, [C|Cs]) + end; +tokens2([], _Seps, Toks, Cs) -> + lists:reverse([lists:reverse(Cs)|Toks]). + diff --git a/lib/wx/test/wx_opengl_SUITE.erl b/lib/wx/test/wx_opengl_SUITE.erl index ce4651bcb1..9d12711dd7 100644 --- a/lib/wx/test/wx_opengl_SUITE.erl +++ b/lib/wx/test/wx_opengl_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% Copyright Ericsson AB 2008-2010. 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 @@ -91,7 +91,7 @@ canvas(Config) -> ?m(true, wxWindow:show(Frame)), ?m(false, wx:is_null(wxGLCanvas:getContext(Canvas))), - ?m({'EXIT', {{no_gl_context,_},_}}, gl:getString(?GL_VENDOR)), + ?m({'EXIT', {{error, no_gl_context,_},_}}, gl:getString(?GL_VENDOR)), ?m(ok, wxGLCanvas:setCurrent(Canvas)), io:format("Vendor: ~s~n", [gl:getString(?GL_VENDOR)]), -- cgit v1.2.3 From 029429cae951a9896d544eb7693fd130e4abc979 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Tue, 19 Oct 2010 10:34:08 +0200 Subject: Remove ostype sub dirs below wx/priv This was intended for distributing several binaries in one package, in standalone version, it has no need when included in otp. --- .gitignore | 4 +- lib/wx/c_src/Makefile.in | 8 ++-- lib/wx/src/wxe_util.erl | 105 +++++++---------------------------------------- 3 files changed, 22 insertions(+), 95 deletions(-) diff --git a/.gitignore b/.gitignore index 6034a21f87..559d6b8898 100644 --- a/.gitignore +++ b/.gitignore @@ -286,10 +286,12 @@ a.out.dSYM/ /lib/wx/api_gen/wx_xml/* /lib/wx/api_gen/gl_xml/* /lib/wx/api_gen/??_doxygen -/lib/wx/api_gen/??xml_generated +/lib/wx/api_gen/*_generated /lib/wx/wx-*.ez /lib/wx/CONF_INFO /lib/wx/doc/src/wx*.xml +/lib/wx/priv/wxe_driver.* +/lib/wx/priv/erl_gl.* # xmerl diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in index 4713b5ae69..69418f62ef 100644 --- a/lib/wx/c_src/Makefile.in +++ b/lib/wx/c_src/Makefile.in @@ -79,7 +79,7 @@ WX_OBJECTS = $(GENERAL_O) $(GENERATED_O) $(RC_FILE) OBJECTS = $(WX_OBJECTS) $(GL_OBJECTS) TARGET_APIS = wxe_driver erl_gl -TARGET_DIR = ../priv/$(SYS_TYPE) +TARGET_DIR = ../priv # -O2 -funroll-loops -ffast-math -fomit-frame-pointer @@ -179,11 +179,11 @@ $(TARGET_DIR)/erl_gl$(SO_EXT): $(GL_OBJECTS) ifeq ($(INSIDE_ERLSRC),true) include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt - $(INSTALL_DIR) $(RELSYSDIR)/priv/$(SYS_TYPE) + $(INSTALL_DIR) $(RELSYSDIR)/priv $(INSTALL_DATA) ../priv/erlang-logo32.png $(RELSYSDIR)/priv/ $(INSTALL_DATA) ../priv/erlang-logo64.png $(RELSYSDIR)/priv/ - $(INSTALL_PROGRAM) $(TARGET_DIR)/wxe_driver$(SO_EXT) $(RELSYSDIR)/priv/$(SYS_TYPE) - $(INSTALL_PROGRAM) $(TARGET_DIR)/erl_gl$(SO_EXT) $(RELSYSDIR)/priv/$(SYS_TYPE) + $(INSTALL_PROGRAM) $(TARGET_DIR)/wxe_driver$(SO_EXT) $(RELSYSDIR)/priv/ + $(INSTALL_PROGRAM) $(TARGET_DIR)/erl_gl$(SO_EXT) $(RELSYSDIR)/priv/ release_docs_spec: diff --git a/lib/wx/src/wxe_util.erl b/lib/wx/src/wxe_util.erl index 78068fe1b0..02bca62486 100644 --- a/lib/wx/src/wxe_util.erl +++ b/lib/wx/src/wxe_util.erl @@ -201,8 +201,7 @@ check_previous() -> after 0 -> ok end. - -%% If you want anything done, do it yourself. +%% Get gl dynamic library wxgl_dl() -> DynLib0 = "erl_gl", @@ -213,17 +212,9 @@ wxgl_dl() -> _ -> DynLib0 ++ ".so" end, - GLLib = filename:join(PrivDir, DynLib), - case file:read_file_info(GLLib) of - {ok, _} -> - GLLib; - {error,_} -> - error({enoent, GLLib}) - end. + filename:join(PrivDir, DynLib). - -priv_dir(Driver) -> - Type = erlang:system_info(system_architecture), +priv_dir(Driver0) -> {file, Path} = code:is_loaded(?MODULE), Priv = case filelib:is_regular(Path) of true -> @@ -232,90 +223,24 @@ priv_dir(Driver) -> false -> code:priv_dir(wx) end, - try - {ok, Dirs0} = file:list_dir(Priv), - Dirs1 = split_dirs(Dirs0), - Dirs = lists:reverse(lists:sort(Dirs1)), + Driver = case os:type() of + {win32,_} -> + Driver0 ++ ".dll"; + _ -> + Driver0 ++ ".so" + end, - Best = best_dir(hd(split_dirs([Type])),Dirs, Driver, Priv), - filename:join(Priv, Best) - catch _:_ -> - error_logger:format("ERROR: Could not find suitable \'~s\' for ~s in: ~s~n", - [Driver, Type, Priv]), + case file:read_file_info(filename:join(Priv, Driver)) of + {ok, _} -> + Priv; + {error, _} -> + error_logger:format("ERROR: Could not find \'~s\' in: ~s~n", + [Driver, Priv]), erlang:error({load_driver, "No driver found"}) end. -best_dir(Dir, Dirs0, Driver, Priv) -> - Dirs = [{D,D} || D <- Dirs0], - best_dir(Dir, Dirs, [], Driver, Priv). - -best_dir(Pre, [{[],_}|R], Acc, Driver, Priv) -> %% Empty skip'em - best_dir(Pre, R, Acc, Driver, Priv); -best_dir(Pre, [{Pre,Dir}|R], Acc, Driver, Priv) -> - Real = dir_app(lists:reverse(Dir)), - case file:list_dir(filename:join(Priv,Real)) of - {ok, Fs} -> - case lists:any(fun(File) -> filename:rootname(File) =:= Driver end, Fs) of - true -> Real; %% Found dir and it contains a driver - false -> best_dir(Pre, R, Acc, Driver, Priv) - end; - _ -> - best_dir(Pre, R, Acc, Driver, Priv) - end; -best_dir(Pre, [{[_|F],Dir}|R], Acc, Driver, Priv) -> - best_dir(Pre, R, [{F,Dir}|Acc], Driver, Priv); -best_dir(_Pre, [], [], _,_) -> throw(no_dir); %% Nothing found -best_dir([_|Pre], [], Acc, Driver, Priv) -> - best_dir(Pre, lists:reverse(Acc), [], Driver, Priv); -best_dir([], _, _,_,_) -> throw(no_dir). %% Nothing found - -split_dirs(Dirs0) -> - ToInt = fun(Str) -> - try - list_to_integer(Str) - catch _:_ -> Str - end - end, - Split = fun(Dir) -> - Toks = tokens(Dir,".-"), - lists:reverse([ToInt(Str) || Str <- Toks]) - end, - lists:map(Split,Dirs0). - -dir_app([]) -> []; -dir_app([Dir]) -> Dir; -dir_app(Dir) -> - dir_app2(Dir). -dir_app2([Int]) when is_integer(Int) -> - integer_to_list(Int); -dir_app2([Str]) when is_list(Str) -> - Str; -dir_app2([Head|Rest]) when is_integer(Head) -> - integer_to_list(Head) ++ dir_app2(Rest); -dir_app2([Head|Rest]) when is_list(Head) -> - Head ++ dir_app2(Rest). - strip(Src, Src) -> []; strip([H|R], Src) -> [H| strip(R, Src)]. -tokens(S,Seps) -> - tokens1(S, Seps, []). - -tokens1([C|S], Seps, Toks) -> - case lists:member(C, Seps) of - true -> tokens1(S, Seps, [[C]|Toks]); - false -> tokens2(S, Seps, Toks, [C]) - end; -tokens1([], _Seps, Toks) -> - lists:reverse(Toks). - -tokens2([C|S], Seps, Toks, Cs) -> - case lists:member(C, Seps) of - true -> tokens1(S, Seps, [[C], lists:reverse(Cs) |Toks]); - false -> tokens2(S, Seps, Toks, [C|Cs]) - end; -tokens2([], _Seps, Toks, Cs) -> - lists:reverse([lists:reverse(Cs)|Toks]). - -- cgit v1.2.3 From 2e605129613ba88427de27520a19456903d40cca Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 22 Oct 2010 15:45:28 +0200 Subject: Update to OpenGL 4.1 --- lib/wx/api_gen/gl_gen.erl | 24 +- lib/wx/api_gen/gl_gen_c.erl | 116 ++- lib/wx/api_gen/gl_gen_erl.erl | 12 +- lib/wx/api_gen/glapi.conf | 203 +++- lib/wx/c_src/egl_impl.h | 10 +- lib/wx/c_src/gen/gl_fdefs.h | 412 +++++++- lib/wx/c_src/gen/gl_finit.h | 207 +++- lib/wx/c_src/gen/gl_funcs.cpp | 2137 ++++++++++++++++++++++++++++++++++++----- lib/wx/c_src/wxe_gl.cpp | 9 +- lib/wx/include/gl.hrl | 578 ++++++++++- lib/wx/src/gen/gl.erl | 1761 +++++++++++++++++++++++++++------ lib/wx/src/gen/glu.erl | 11 +- 12 files changed, 4854 insertions(+), 626 deletions(-) diff --git a/lib/wx/api_gen/gl_gen.erl b/lib/wx/api_gen/gl_gen.erl index c76dfb75a0..374e0bd12b 100644 --- a/lib/wx/api_gen/gl_gen.erl +++ b/lib/wx/api_gen/gl_gen.erl @@ -206,10 +206,10 @@ parse_define([], D, _Opts) -> parse_func(Xml, Opts) -> {Func,_} = foldl(fun(X,Acc) -> parse_func(X,Acc,Opts) end, {#func{},1}, Xml), + put(current_func, Func#func.name), #func{params=Args0,type=Type0} = Func, Args = filter(fun(#arg{type=void}) -> false; (_) -> true end, Args0), - #arg{type=Type} = - patch_param(Func#func.name,#arg{name="result",type=Type0},Opts), + #arg{type=Type} = patch_param(Func#func.name,#arg{name="result",type=Type0},Opts), Func#func{params=reverse(Args), type=Type}. parse_func(#xmlElement{name=type, content=C}, {F,AC}, Os) -> @@ -220,6 +220,7 @@ parse_func(#xmlElement{name=name, content=[#xmlText{value=C}]},{F,AC},Os) -> put(current_func, Func), {F#func{name=name(Func,Os)},AC}; parse_func(#xmlElement{name=param, content=C},{F,AC},Os) -> + put(current_func, F#func.name), Parse = fun(Con, Ac) -> parse_param(Con, Ac, Os) end, Param0 = foldl(Parse, #arg{}, drop_empty(C)), Param = fix_param_name(Param0, F, AC), @@ -314,11 +315,17 @@ handle_arg_opt(both, P) -> P#arg{in=both}; handle_arg_opt(binary, P=#arg{type=T}) -> P#arg{type=T#type{size=undefined,base=binary}}; handle_arg_opt({binary,Sz}, P=#arg{type=T}) -> - P#arg{type=T#type{size=Sz,base=binary}}; + P#arg{type=T#type{size={Sz, Sz},base=binary}}; +handle_arg_opt({binary,Max, Sz}, P=#arg{type=T}) -> + P#arg{type=T#type{size={Max, Sz},base=binary}}; handle_arg_opt({type,Type}, P=#arg{type=T}) -> P#arg{type=T#type{name=Type}}; handle_arg_opt({single,Opt},P=#arg{type=T}) -> P#arg{type=T#type{single=Opt}}; +handle_arg_opt({base,{Opt, Sz}}, P=#arg{type=T}) -> P#arg{type=T#type{base=Opt, size=Sz}}; handle_arg_opt({base,Opt}, P=#arg{type=T}) -> P#arg{type=T#type{base=Opt}}; -handle_arg_opt({c_only,Opt},P) -> P#arg{where=c, alt=Opt}. +handle_arg_opt({c_only,Opt},P) -> P#arg{where=c, alt=Opt}; +handle_arg_opt(string, P=#arg{type=T}) -> P#arg{type=T#type{base=string}}; +handle_arg_opt({string,Max,Sz}, P=#arg{type=T}) -> + P#arg{type=T#type{base=string, size={Max,Sz}}}. parse_type([], _Os) -> void; parse_type(C, Os) -> @@ -367,6 +374,8 @@ parse_type2([N="GLbitfield"|R],T,Opts) -> parse_type2(R,T#type{name=N, size=4, base=int},Opts); parse_type2([N="GLvoid"|R],T,Opts) -> parse_type2(R,T#type{name=N, base=idx_binary},Opts); +parse_type2([N="GLsync"|R],T,Opts) -> + parse_type2(R,T#type{name=N, base=int, size=8},Opts); parse_type2([N="GLbyte"|R],T,Opts) -> parse_type2(R,T#type{name=N, size=1, base=int},Opts); @@ -378,6 +387,11 @@ parse_type2([N="GLushort"|R],T,Opts) -> parse_type2(R,T#type{name=N, size=2, base=int},Opts); parse_type2([N="GLint"|R],T,Opts) -> parse_type2(R,T#type{name=N, size=4, base=int},Opts); +parse_type2([N="GLint64"|R],T,Opts) -> + parse_type2(R,T#type{name=N, size=8, base=int},Opts); +parse_type2([N="GLuint64"|R],T,Opts) -> + parse_type2(R,T#type{name=N, size=8, base=int},Opts); + parse_type2([N="GLuint"|R],T,Opts) -> parse_type2(R,T#type{name=N, size=4, base=int},Opts); parse_type2([N="GLsizei"|R],T,Opts) -> @@ -548,8 +562,10 @@ setup_idx_binary(Name,Ext,_Opts) -> %% Ok warn if single is undefined lists:foreach(fun(#arg{type=#type{base=memory}}) -> ok; + (#arg{type=#type{base=string}}) -> ok; (#arg{type=#type{base=idx_binary}}) -> ok; (#arg{type=#type{name="GLUquadric"}}) -> ok; + (#arg{type=#type{base=binary, size=Sz}}) when Sz =/= undefined -> ok; (A=#arg{type=#type{single=undefined}}) -> ?warning("~p Unknown size of~n ~p~n", [get(current_func),A]), diff --git a/lib/wx/api_gen/gl_gen_c.erl b/lib/wx/api_gen/gl_gen_c.erl index 2fe3226978..230b853c2b 100644 --- a/lib/wx/api_gen/gl_gen_c.erl +++ b/lib/wx/api_gen/gl_gen_c.erl @@ -51,7 +51,8 @@ gen(GLFuncs, GLUFuncs) -> w("#include \"gl_fdefs.h\"~n", []), w("~nint gl_error_op;~n", []), - w("void egl_dispatch(int op, char *bp, ErlDrvPort port, ErlDrvTermData caller, char *bins[]){~n", + w("void egl_dispatch(int op, char *bp, ErlDrvPort port, " + "ErlDrvTermData caller, char *bins[], int bins_sz[]){~n", []), w(" gl_error_op = op;~n", []), @@ -109,25 +110,53 @@ declare_var(A=#arg{name=N,in=false,type=#type{name=T,base=B,single={tuple,Sz}}}) true = is_number(Sz), %% Assert w(" ~s ~s[~p] = {~s};~n", [T,N,Sz,args(fun zero/1,",",lists:duplicate(Sz,B))]), A; -declare_var(A=#arg{name=N,in=false,type=#type{name=T,base=B,single={list,Sz}}}) when is_number(Sz) -> +declare_var(A=#arg{name=N,in=false,type=#type{name=T,base=B,single={list,Sz}}}) + when is_number(Sz) -> w(" ~s ~s[~p] = {~s};~n", [T,N,Sz,args(fun zero/1,",",lists:duplicate(Sz,B))]), A; +declare_var(A=#arg{name=N,in=false,type=#type{name=T,base=string,size={Max,_}, single=Single}}) -> + case is_integer(Max) of + true -> + w(" ~s ~s[~p];~n", [T,N,Max]); + false -> + %% w(" ~s ~s[*~s];~n", [T,N,Max]), + w(" ~s *~s;~n", [T,N]), + w(" ~s = (~s *) driver_alloc(sizeof(~s) * *~s);~n", [N,T,T,Max]), + store_free(N) + %% case Single of + %% {list, _, _} -> + %% w(" ~s *~s_p = ~s;~n", [T,N,N]); + %% _ -> ok + %% end + end, + A; +declare_var(A=#arg{name=N,in=false,type=#type{base=binary,size={MaxSz, _}}}) -> + MaxSz == undefined andalso error({assert, A}), + case is_integer(MaxSz) of + true -> + w(" ErlDrvBinary *~s = driver_alloc_binary(~p);~n", [N,MaxSz]); + false -> + w(" ErlDrvBinary *~s = driver_alloc_binary(*~s);~n", [N,MaxSz]) + end, + A; declare_var(A=#arg{name=N,in=false,type=#type{name=T,single={list,ASz,_USz},mod=[]}}) -> true = is_list(ASz), %% Assert w(" ~s *~s;~n", [T,N]), w(" ~s = (~s *) driver_alloc(sizeof(~s) * *~s);~n", [N,T,T,ASz]), store_free(N), - A; -declare_var(A=#arg{name=N,in=false,type=#type{name=T,base=binary,size=Sz}}) -> - true = is_number(Sz), %% Assert - w(" ~s ~s[~p];~n", [T,N,Sz]), + %% w(" ~s ~s[*~s];~n", [T,N,ASz]), A; declare_var(A=#arg{in=false, type=#type{name="GLUquadric",by_val=false,single=true}}) -> A; +declare_var(A=#arg{in=false, type=#type{base=string,by_val=false,single=true}}) -> + A; declare_var(A=#arg{name=N,in=false, type=#type{name=T,base=B,by_val=false,single=true}}) -> w(" ~s ~s[1] = {~s};~n", [T,N,zero(B)]), A; +declare_var(A=#arg{where=c, type=#type{name=T}, alt={size,Var}}) -> + w(" ~s ~s_size = bins_sz[~p];~n", [T, Var, get(bin_count)]), + A; declare_var(A=#arg{where=_}) -> A. @@ -205,7 +234,7 @@ decode_arg(P=#arg{name=Name,type=#type{name=Type,base=guard_int}},A0) -> {P, A}; decode_arg(P=#arg{name=Name,type=#type{name=Type,base=string,single=true}},A0) -> w(" ~s *~s = (~s *) bp;~n", [Type,Name,Type]), - w(" int ~sLen = strlen((char *)~s); bp += ~sLen+1+((8-((1+~sLen+~p)%8))%8);~n", + w(" int ~sLen[1] = {strlen((char *)~s)}; bp += ~sLen[0]+1+((8-((1+~sLen[0]+~p)%8))%8);~n", [Name,Name,Name,Name,A0]), {P, 0}; decode_arg(P=#arg{name=Name, @@ -274,6 +303,8 @@ result_type(#type{name=T, ref=undefined}) -> T; result_type(#type{name=T, ref={pointer,1}, mod=Mods}) -> mod(Mods) ++ T ++ " * ". +call_arg(#arg{alt={size,Alt},type=#type{}}) -> + Alt ++ "_size"; call_arg(#arg{alt={length,Alt},type=#type{}}) -> "*" ++ Alt ++ "Len"; call_arg(#arg{alt={constant,Alt},type=#type{}}) -> @@ -284,6 +315,8 @@ call_arg(#arg{name=Name,type=#type{single={list, _}}}) -> Name; call_arg(#arg{name=Name,type=#type{size=8,base=int,ref=undefined}}) -> Name; +call_arg(#arg{name=Name,in=false,type=#type{name=T, base=binary}}) -> + "(" ++ T ++ "*) " ++ Name ++ "->orig_bytes"; call_arg(#arg{name=Name,type=#type{ref=undefined}}) -> "*" ++ Name; call_arg(#arg{name=Name,type=#type{base=guard_int}}) -> @@ -313,17 +346,17 @@ build_return_vals(Type,As) -> end; {Val,Vars,Cnt} -> ExtraTuple = if Cnt > 1 -> 2; true -> 0 end, - CSize = if Vars =:= none -> - Sz = integer_to_list(Val+4+ExtraTuple), - w(" int AP = 0; ErlDrvTermData rt[~s];~n",[Sz]), - Sz; - true -> - Sz = integer_to_list(Val+4+ExtraTuple) ++ " + " ++ Vars, - w(" int AP = 0; ErlDrvTermData *rt;~n",[]), - w(" rt = (ErlDrvTermData *) " - "driver_alloc(sizeof(ErlDrvTermData)*(~s));~n", [Sz]), - Sz - end, + if Vars =:= none -> + Sz = integer_to_list(Val+4+ExtraTuple), + w(" int AP = 0; ErlDrvTermData rt[~s];~n",[Sz]), + Sz; + true -> + Sz = integer_to_list(Val+4+ExtraTuple) ++ " + " ++ Vars, + w(" int AP = 0; ErlDrvTermData *rt;~n",[]), + w(" rt = (ErlDrvTermData *) " + "driver_alloc(sizeof(ErlDrvTermData)*(~s));~n", [Sz]), + Sz + end, w(" rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) \"_egl_result_\");~n",[]), FreeList = build_ret_types(Type,As), case Cnt of @@ -357,7 +390,7 @@ calc_sizes(Type,As) -> {Val, none} -> {Sz+Val, Vars, Cnt+1}; {Val, Var} when Vars =:= none -> {Sz+Val, Var,Cnt+1}; - {Val, Var} when Vars =:= none -> + {Val, Var} -> {Sz+Val, Var ++ " + " ++ Vars,Cnt+1} end; (_,Acc) -> Acc @@ -365,13 +398,16 @@ calc_sizes(Type,As) -> foldl(Calc, TSz, As). return_size(_N,void) -> {0, none}; -return_size(_N,#type{base=binary}) -> {4, none}; -return_size(_N,#type{single=true}) -> {2,none}; return_size(_N,#type{single={tuple,Sz}}) -> {Sz*2+2, none}; -return_size(_N,#type{name="GLubyte",single={list,null}}) ->{3, none}; return_size(_N,#type{single={list,Sz}}) -> {Sz*2+3, none}; -return_size(_N,#type{base=string,single={list,_,_}}) -> {3, none}; -return_size(_N,#type{single={list,_,Sz}}) -> {3, "(*" ++Sz++")*2"}. +return_size(_N,#type{base=string,single=true}) -> {3, none}; +return_size(_N,#type{base=string,single=undefined}) -> {3, none}; +return_size(_N,#type{base=string,single={list,_,"result"}}) -> {3, "result*3"}; +return_size(_N,#type{base=string,single={list,_,Sz}}) -> {3, "(*" ++Sz++")*3"}; +return_size(_N,#type{single={list,_,"result"}}) -> {3, "result*2"}; +return_size(_N,#type{single={list,_,Sz}}) -> {3, "(*" ++Sz++")*2"}; +return_size(_N,#type{base=binary}) -> {4, none}; +return_size(_N,#type{single=true}) -> {2, none}. build_ret_types(void,Ps) -> @@ -430,17 +466,27 @@ build_ret(Name,_Q,#type{name=T,base=_,single={tuple,Sz}}) -> [w(" rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *~s++;~n", [Temp]) || _ <- lists:seq(1,Sz)], w(" rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = ~p;~n",[Sz]); -build_ret(Name,_Q,#type{name="GLubyte",single={list,null}}) -> +build_ret(Name,_Q,#type{base=string,size=1,single=true}) -> w(" rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) ~s;" " rt[AP++] = strlen((char *) ~s);\n", [Name, Name]); -build_ret(Name,_Q,#type{base=string,single={list,_,Sz}}) -> +build_ret(Name,_Q,#type{base=string, size={_Max,Sz}, single=S}) + when S == true; S == undefined -> w(" rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) ~s;" " rt[AP++] = *~s;\n", [Name, Sz]); +build_ret(Name,_Q,#type{name=_T,base=string,size={_, SSz}, single={list,_,Sz}}) -> + P = if Sz == "result" -> ["(int) "]; true -> "*" end, + w(" for(int i=0; i < ~s~s; i++) {\n", [P,Sz]), + w(" rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) ~s;" + " rt[AP++] = ~s[i]-1;\n", [Name, SSz]), + w(" ~s += ~s[i]; }~n", [Name, SSz]), + w(" rt[AP++] = ERL_DRV_NIL;", []), + w(" rt[AP++] = ERL_DRV_LIST; rt[AP++] = (~s~s)+1;~n",[P,Sz]); build_ret(Name,_Q,#type{name=_T,base=B,single={list,_,Sz}}) when B =/= float -> - w(" for(int i=0; i < *~s; i++) {\n", [Sz]), + P = if Sz == "result" -> ["(int) "]; true -> "*" end, + w(" for(int i=0; i < ~s~s; i++) {\n", [P,Sz]), w(" rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) ~s[i];}~n", [Name]), w(" rt[AP++] = ERL_DRV_NIL;", []), - w(" rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*~s)+1;~n",[Sz]); + w(" rt[AP++] = ERL_DRV_LIST; rt[AP++] = (~s~s)+1;~n",[P,Sz]); build_ret(Name,_Q,#type{name=_T,size=FSz,base=float,single={list,Sz}}) -> Temp = Name ++ "Tmp", case FSz of @@ -461,12 +507,14 @@ build_ret(Name,_Q,#type{name=T,base=_,single={list,Sz}}) -> || _ <- lists:seq(1,Sz)], w(" rt[AP++] = ERL_DRV_NIL;", []), w(" rt[AP++] = ERL_DRV_LIST; rt[AP++] = ~p+1;~n",[Sz]); -build_ret(Name,_Q,#type{name="GLubyte",base=binary,size=Sz}) -> - w(" ErlDrvBinary * BinCopy = driver_alloc_binary(~p);~n", [Sz]), - w(" memcpy(BinCopy->orig_bytes, ~s, ~p);~n", [Name,Sz]), - w(" rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) BinCopy;", []), - w(" rt[AP++] = ~p; rt[AP++] = 0;~n", [Sz]), - "driver_free_binary(BinCopy);"; +build_ret(Name,_Q,#type{base=binary,size={_,Sz}}) -> + w(" rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) ~s;", [Name]), + if is_integer(Sz) -> + w(" rt[AP++] = ~p; rt[AP++] = 0;~n", [Sz]); + is_list(Sz) -> + w(" rt[AP++] = *~s; rt[AP++] = 0;~n", [Sz]) + end, + "driver_free_binary(" ++ Name ++ ");"; build_ret(Name,_Q,T=#type{}) -> io:format("{~p, {~p, {single,{tuple,X}}}}.~n", [get(current_func),Name]), io:format(" ~p~n",[T]). diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl index 1dbec5d229..f292c8723e 100644 --- a/lib/wx/api_gen/gl_gen_erl.erl +++ b/lib/wx/api_gen/gl_gen_erl.erl @@ -78,7 +78,11 @@ types() -> {"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 + {"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"} ]. gl_api(Fs) -> @@ -344,12 +348,8 @@ 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}) -> "[" ++ doc_arg_type3(T) ++ "]"; -doc_arg_type2(T=#type{single={list, Max}}) when is_integer(Max) -> +doc_arg_type2(T=#type{single={list, _Max}}) -> "[" ++ doc_arg_type3(T) ++ "]"; -doc_arg_type2(_T=#type{single={list,null}}) -> - "string()"; -doc_arg_type2(T=#type{base=string}) -> - doc_arg_type3(T); doc_arg_type2(T=#type{single={list,_,_}}) -> "[" ++ doc_arg_type3(T) ++ "]"; doc_arg_type2(T=#type{single={tuple_list,Sz}}) -> diff --git a/lib/wx/api_gen/glapi.conf b/lib/wx/api_gen/glapi.conf index f9ed7a1065..525ccf8b68 100644 --- a/lib/wx/api_gen/glapi.conf +++ b/lib/wx/api_gen/glapi.conf @@ -29,8 +29,35 @@ "glMatrixIndexPointerARB", "glPixelTransformParameter", %% OpengGL 3.0 - %"glGetTransformFeedbackVarying", %% Jobbiga - %"glTransformFeedbackVaryings", + + %% ARB + "glCreateSyncFromCLeventARB", % _cl_context _cl_event ?? + "glDebugMessageCallbackARB", + + "glGetn", %* + "glReadnPixels", %* + + "glVertexP2", %* + "glVertexP3", %* + "glVertexP4", %* + "glTexCoordP1", %* + "glTexCoordP2", %* + "glTexCoordP3", %* + "glTexCoordP4", %* + "glMultiTexCoordP1", %* + "glMultiTexCoordP2", %* + "glMultiTexCoordP3", %* + "glMultiTexCoordP4", %* + "glNormalP3", %* + "glColorP3", %* + "glColorP4", %* + "glSecondaryColorP3", %* + "glVertexAttribP1", %* + "glVertexAttribP2", %* + "glVertexAttribP3", %* + "glVertexAttribP4", %* + + "glGetActiveSubroutineUniformiv", %% Bad API don't know what to allocate needs to ask %% EXT %% By default skip these extensions @@ -136,11 +163,12 @@ {"glRect", [{"v1", {single,{tuple,2}}},{"v2", {single,{tuple,2}}}]}. -{"glGetString", {"result", {single,{list,null}}}}. +{"glGetString", {"result", string}}. {"glGetBooleanv", {"params", {single,{list,16}}}}. {"glGetDoublev", {"params", {single,{list,16}}}}. {"glGetFloatv", {"params", {single,{list,16}}}}. {"glGetIntegerv", {"params", {single,{list,16}}}}. +{"glGetInteger64v", {"params", {single,{list,16}}}}. {"glFeedbackBuffer", {"buffer", [{base,memory}, in]}}. {"glSelectBuffer", {"buffer", [{base,memory}, in]}}. @@ -174,24 +202,24 @@ {"glGetActiveAttribARB", [{"length",[skip,{single, true}]}, {"size", {single, true}}, {"type", {single, true}}, - {"name", {single, {list,"maxLength","length"}}} + {"name", {string,"maxLength","length"}} ]}. {"glGetActiveAttrib", [{"length",[skip,{single, true}]}, {"size", {single, true}}, {"type", {single, true}}, - {"name", {single, {list,"bufSize","length"}}} + {"name", {string,"bufSize","length"}} ]}. {"glGetActiveUniformARB", [{"length",[skip,{single, true}]}, {"size", {single, true}}, {"type", {single, true}}, - {"name", {single, {list,"maxLength","length"}}} + {"name", {string,"maxLength","length"}} ]}. {"glGetActiveUniform", [{"length",[skip,{single, true}]}, {"size", {single, true}}, {"type", {single, true}}, - {"name", {single, {list,"bufSize","length"}}} + {"name", {string,"bufSize","length"}} ]}. {"glGetAttachedShaders", [{"count", [skip,{single,true}]}, @@ -201,18 +229,18 @@ {"glGetProgramiv", {"params", {single,true}}}. {"glGetProgramInfoLog", [{"length", [skip,{single,true}]}, - {"infoLog", {single, {list,"bufSize","length"}}} + {"infoLog", {string,"bufSize","length"}} ]}. {"glGetShaderiv", {"params", {single,true}}}. {"glGetShaderInfoLog", [{"length", [skip,{single,true}]}, - {"infoLog", {single, {list,"bufSize","length"}}} + {"infoLog", {string,"bufSize","length"}} ]}. {"glGetShaderSourceARB", [{"length", [skip,{single,true}]}, - {"source", {single, {list,"maxLength","length"}}} + {"source", {string,"maxLength","length"}} ]}. {"glGetShaderSource", [{"length", [skip,{single,true}]}, - {"source", {single, {list,"bufSize","length"}}} + {"source", {string,"bufSize","length"}} ]}. @@ -239,7 +267,7 @@ {"glMatrixIndex", [{"size",{c_only,{length,"indices"}}}, {"indices", {single,list}}]}. -{"glProgramStringARB", [{"len",{c_only,{constant,"stringLen"}}}, +{"glProgramStringARB", [{"len",{c_only,{length,"string"}}}, {"string",[{base,string},{single,true}]}]}. {"glGetProgramStringARB", {"string", [in,{base,memory}]}}. {"glGenProgramsARB", {"programs", {single,{list,"n","n"}}}}. @@ -250,7 +278,7 @@ {"glGetProgramLocalParameter", {"params", {single,{tuple,4}}}}. {"glGetObjectParameter", {"params", {single,true}}}. {"glGetInfoLogARB", [{"length", [skip,{single,true}]}, - {"infoLog", {single, {list,"maxLength","length"}}} + {"infoLog", {string,"maxLength","length"}} ]}. {"glGetAttachedObjectsARB", [{"count", [skip,{single,true}]}, {"obj", {single, {list,"maxCount","count"}}} @@ -280,9 +308,10 @@ {"objW",[{single,true},out]}]}. {"gluBuild", {"data", [binary]}}. {"gluScaleImage", [{"dataIn", [in, binary]}, {"dataOut", [in, {base, memory}]}]}. -{"gluCheckExtension", [{"extName", {single, list}}, {"extString", {single, list}}]}. -{"gluErrorString", {"result", {single, {list,null}}}}. -{"gluGetString", {"result", {single, {list,null}}}}. +{"gluCheckExtension", [{"extName", string}, + {"extString", string}]}. +{"gluErrorString", {"result", string}}. +{"gluGetString", {"result", string}}. {"gluDeleteQuadric", {"quad", in}}. {"gluQuadric", {"quad", in}}. @@ -291,15 +320,21 @@ {"gluDisk", {"quad", in}}. {"gluCylinder", {"quad", in}}. -%% OpenGL 3.0 +%% OpenGL 3.0 and later {"glGetBooleani_v", {"data", {single,{list,16}}}}. {"glGetIntegeri_v", {"data", {single,{list,16}}}}. +{"glGetFloati_v", {"data", {single,{list,16}}}}. +{"glGetDoublei_v", {"data", {single,{list,16}}}}. +{"glGetInteger64i_v", {"data", {single,{list,16}}}}. + +{"glGetBufferParameteriv", {"params", {single,{list,16}}}}. +{"glGetBufferParameteri64v", {"params", {single,{list,16}}}}. {"glTransformFeedbackVaryings", [{"count", {c_only,{length,"varyings"}}}, {"varyings", [{base,string}, {single,list}]}]}. -{"glGetTransformFeedbackVarying", [{"size", {single, true}},{"type", {single, true}}, +{"glGetTransformFeedbackVarying", [{"size", {single, true}},{"type", {single, true}}, {"length", [skip, {single, true}]}, - {"name", {single, {list,"bufSize","length"}}}]}. + {"name", {string,"bufSize","length"}}]}. {"glGenRenderbuffers", {"renderbuffers", {single,{list,"n","n"}}}}. @@ -327,7 +362,133 @@ {"params", [out, {single, {list, "uniformIndicesLen", "uniformIndicesLen"}}]}]}. {"glGetActiveUniformName", [{"length",[skip,{single, true}]}, - {"uniformName", {single, {list,"bufSize","length"}}}]}. + {"uniformName", {string,"bufSize","length"}}]}. {"glGetActiveUniformBlockName", [{"length",[skip,{single, true}]}, - {"uniformBlockName", {single, {list,"bufSize","length"}}}]}. + {"uniformBlockName", {string,"bufSize","length"}}]}. {"glGetActiveUniformBlockiv", {"params", [in, {base,memory}]}}. + + +{"glGetSynciv", [{"values", {single, {list, "bufSize","length"}}}, + {"length", [skip,{single, true}]}]}. + +{"glGetMultisamplefv", {"val", [out, {single, {tuple,2}}]}}. + + +{"glNamedStringARB", [{"stringlen", {c_only, {length, "string"}}}, + {"namelen", {c_only, {length, "name"}}}]}. +{"glDeleteNamedStringARB", [{"namelen", {c_only, {length, "name"}}}]}. +{"glIsNamedStringARB", [{"namelen", {c_only, {length, "name"}}}]}. +{"glGetNamedStringARB",[{"namelen", {c_only, {length, "name"}}}, + {"stringlen",[skip,{single, true}]}, + {"string", {string,"bufSize","stringlen"}}]}. +{"glGetNamedStringivARB",[{"namelen", {c_only, {length, "name"}}}, + {"params", [out, {single, true}]}]}. +{"glCompileShaderIncludeARB", [{"length", {c_only,{constant,"NULL"}}}, + {"count", {c_only,{length,"path"}}}, + {"path", {single,list}}]}. + + +{"glGenSamplers", {"samplers", {single, {list,"count","count"}}}}. +{"glDeleteSamplers", [{"count", {c_only, {length, "samplers"}}}, + {"samplers", {single, list}}]}. +{"glGetSamplerParameter", {"params", {single, {list, 4}}}}. +{"glSamplerParameterI", {"param", {single, list}}}. +{"glSamplerParameterfv", {"param", {single, list}}}. +{"glSamplerParameteriv", {"param", {single, list}}}. + +%{"glGetActiveSubroutineUniformiv", {"values", }}. +{"glGetActiveSubroutineUniformName", [{"length",[skip,{single, true}]}, + {"name", {string,"bufsize","length"}}]}. +{"glGetActiveSubroutineName", [{"length",[skip,{single, true}]}, + {"name", {string,"bufsize","length"}}]}. +{"glGetProgramStageiv", {"values", {single, true}}}. +{"glUniformSubroutinesuiv", [{"count",{c_only,{length,"indices"}}},{"indices", {single, list}}]}. + +{"glGenTransformFeedbacks", {"ids", {single, {list,"n","n"}}}}. +{"glDeleteTransformFeedbacks", [{"n", {c_only, {length, "ids"}}}, + {"ids", {single, list}}]}. + +{"glPatchParameterfv", {"values", {single, list}}}. + + +{"glGetQueryIndexediv", {"params", {single, true} }}. +{"glShaderBinary", [{"count", {c_only, {length, "shaders"}}}, + {"length", {c_only, {size, "binary"}}}, + {"shaders", {single, list}}, + {"binary", binary} + ]}. +{"glGetShaderPrecisionFormat", [{"range", {single, {tuple, 2}}}, + {"precision", {single, true}}]}. + +{"glGetProgramBinary", [{"length",[skip,{single, true}]}, + {"binary", [out, {binary, "bufSize", "length"}]}, + {"binaryFormat", {single, true}}]}. +{"glProgramBinary", [{"binary", binary}, {"length", {c_only, {size, "binary"}}}]}. + +{"glGenProgramPipelines", {"pipelines", {single, {list,"n","n"}}}}. +{"glDeleteProgramPipelines", [{"n", {c_only, {length, "pipelines"}}}, + {"pipelines", {single, list}}]}. + +{"glCreateShaderProgramv", [{"count", {c_only, {length, "strings"}}}, + {"strings", {single, list}}]}. +{"glGetProgramPipelineInfoLog", [{"length", [skip,{single, true}]}, + {"infoLog", {string,"bufSize","length"}}]}. +{"glGetProgramPipelineiv", {"params", {single, true}}}. + + +%% {"glCreateSyncFromCLeventARB", {"context", }}. + +{"glDebugMessageControlARB", [{"count", {c_only, {length, "ids"}}}, + {"ids", {single, list}}]}. +{"glDebugMessageInsertARB", {"length", {c_only, {length, "buf"}}}}. +{"glGetDebugMessageLogARB", [{"sources", {single, {list, "count", "result"}}}, + {"types", {single, {list, "count", "result"}}}, + {"ids", {single, {list, "count", "result"}}}, + {"severities", {single, {list, "count", "result"}}}, + {"lengths", [{c_only, undefined}, {single, {list, "count", "result"}}]}, + {"messageLog", [{string, "bufsize", "lengths"}, + {single, {list, "bufsize", "result"}}]}]}. + + +{"glUniformMatrix2dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,4}}]}]}. +{"glUniformMatrix3dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,9}}]}]}. +{"glUniformMatrix4dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,16}}]}]}. +{"glUniformMatrix2x3dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,6}}]}]}. +{"glUniformMatrix3x2dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,6}}]}]}. +{"glUniformMatrix2x4dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,8}}]}]}. +{"glUniformMatrix4x2dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,8}}]}]}. +{"glUniformMatrix3x4dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,12}}]}]}. +{"glUniformMatrix4x3dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,12}}]}]}. + +{"glProgramUniform1", [{"count",{c_only,{length,"value"}}}, {"value", [{single,list}]}]}. +{"glProgramUniform2", [{"count",{c_only,{length,"value"}}}, {"value", [{single,{tuple_list,2}}]}]}. +{"glProgramUniform3", [{"count",{c_only,{length,"value"}}}, {"value", [{single,{tuple_list,3}}]}]}. +{"glProgramUniform4", [{"count",{c_only,{length,"value"}}}, {"value", [{single,{tuple_list,4}}]}]}. + +{"glProgramUniformMatrix2fv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,4}}]}]}. +{"glProgramUniformMatrix2dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,4}}]}]}. +{"glProgramUniformMatrix3dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,9}}]}]}. +{"glProgramUniformMatrix3fv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,9}}]}]}. +{"glProgramUniformMatrix4dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,16}}]}]}. +{"glProgramUniformMatrix4fv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,16}}]}]}. +{"glProgramUniformMatrix2x3fv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,6}}]}]}. +{"glProgramUniformMatrix3x2fv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,6}}]}]}. +{"glProgramUniformMatrix2x4fv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,8}}]}]}. +{"glProgramUniformMatrix4x2fv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,8}}]}]}. +{"glProgramUniformMatrix3x4fv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,12}}]}]}. +{"glProgramUniformMatrix4x3fv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,12}}]}]}. + +{"glProgramUniformMatrix2x3dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,6}}]}]}. +{"glProgramUniformMatrix3x2dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,6}}]}]}. +{"glProgramUniformMatrix2x4dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,8}}]}]}. +{"glProgramUniformMatrix4x2dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,8}}]}]}. +{"glProgramUniformMatrix3x4dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,12}}]}]}. +{"glProgramUniformMatrix4x3dv", [{"count",{c_only,{length,"value"}}},{"value", [{single,{tuple_list,12}}]}]}. + +{"glViewportArrayv", [{"count",{c_only,{length,"v"}}}, {"v", [{single,{tuple_list,4}}]}]}. +{"glViewportIndexedfv", {"v", {single,{tuple,4}}}}. +{"glScissorArrayv", [{"count",{c_only,{length,"v"}}}, {"v", [{single,{tuple_list,4}}]}]}. +{"glScissorIndexedv", {"v", {single,{tuple,4}}}}. +{"glDepthRangeArrayv", [{"count",{c_only,{length,"v"}}}, {"v", [{single,{tuple_list,2}}]}]}. + + diff --git a/lib/wx/c_src/egl_impl.h b/lib/wx/c_src/egl_impl.h index 5909ebd96e..e93e4caefd 100644 --- a/lib/wx/c_src/egl_impl.h +++ b/lib/wx/c_src/egl_impl.h @@ -125,14 +125,20 @@ typedef int64_t GLint64EXT; typedef uint64_t GLuint64EXT; #endif +#ifndef GL_ARB_sync +typedef int64_t GLint64; +typedef uint64_t GLuint64; +typedef struct __GLsync *GLsync; +#endif + /* External Api */ #ifdef _WIN32 extern "C" __declspec(dllexport) int egl_init_opengl(void *); -extern "C" __declspec(dllexport) void egl_dispatch(int, char *, ErlDrvPort, ErlDrvTermData, char **); +extern "C" __declspec(dllexport) void egl_dispatch(int, char *, ErlDrvPort, ErlDrvTermData, char **, int *); #else extern "C" int egl_init_opengl(void *); -extern "C" void egl_dispatch(int, char *, ErlDrvPort, ErlDrvTermData, char **); +extern "C" void egl_dispatch(int, char *, ErlDrvPort, ErlDrvTermData, char **, int *); #endif /* internal */ diff --git a/lib/wx/c_src/gen/gl_fdefs.h b/lib/wx/c_src/gen/gl_fdefs.h index 2096f7a413..c0fc338aa8 100644 --- a/lib/wx/c_src/gen/gl_fdefs.h +++ b/lib/wx/c_src/gen/gl_fdefs.h @@ -684,7 +684,7 @@ typedef void (APIENTRY * WXEGLMULTTRANSPOSEMATRIXD)(const GLdouble *); WXE_EXTERN WXEGLMULTTRANSPOSEMATRIXD weglMultTransposeMatrixd; typedef void (APIENTRY * WXEGLBLENDFUNCSEPARATE)(GLenum,GLenum,GLenum,GLenum); WXE_EXTERN WXEGLBLENDFUNCSEPARATE weglBlendFuncSeparate; -typedef void (APIENTRY * WXEGLMULTIDRAWARRAYS)(GLenum,GLint *,GLsizei *,GLsizei); +typedef void (APIENTRY * WXEGLMULTIDRAWARRAYS)(GLenum,const GLint *,const GLsizei *,GLsizei); WXE_EXTERN WXEGLMULTIDRAWARRAYS weglMultiDrawArrays; typedef void (APIENTRY * WXEGLPOINTPARAMETERF)(GLenum,GLfloat); WXE_EXTERN WXEGLPOINTPARAMETERF weglPointParameterf; @@ -972,6 +972,30 @@ typedef void (APIENTRY * WXEGLGETVERTEXATTRIBIIV)(GLuint,GLenum,GLint *); WXE_EXTERN WXEGLGETVERTEXATTRIBIIV weglGetVertexAttribIiv; typedef void (APIENTRY * WXEGLGETVERTEXATTRIBIUIV)(GLuint,GLenum,GLuint *); WXE_EXTERN WXEGLGETVERTEXATTRIBIUIV weglGetVertexAttribIuiv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI1IV)(GLuint,const GLint *); +WXE_EXTERN WXEGLVERTEXATTRIBI1IV weglVertexAttribI1iv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI2IV)(GLuint,const GLint *); +WXE_EXTERN WXEGLVERTEXATTRIBI2IV weglVertexAttribI2iv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI3IV)(GLuint,const GLint *); +WXE_EXTERN WXEGLVERTEXATTRIBI3IV weglVertexAttribI3iv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI4IV)(GLuint,const GLint *); +WXE_EXTERN WXEGLVERTEXATTRIBI4IV weglVertexAttribI4iv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI1UIV)(GLuint,const GLuint *); +WXE_EXTERN WXEGLVERTEXATTRIBI1UIV weglVertexAttribI1uiv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI2UIV)(GLuint,const GLuint *); +WXE_EXTERN WXEGLVERTEXATTRIBI2UIV weglVertexAttribI2uiv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI3UIV)(GLuint,const GLuint *); +WXE_EXTERN WXEGLVERTEXATTRIBI3UIV weglVertexAttribI3uiv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI4UIV)(GLuint,const GLuint *); +WXE_EXTERN WXEGLVERTEXATTRIBI4UIV weglVertexAttribI4uiv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI4BV)(GLuint,const GLbyte *); +WXE_EXTERN WXEGLVERTEXATTRIBI4BV weglVertexAttribI4bv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI4SV)(GLuint,const GLshort *); +WXE_EXTERN WXEGLVERTEXATTRIBI4SV weglVertexAttribI4sv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI4UBV)(GLuint,const GLubyte *); +WXE_EXTERN WXEGLVERTEXATTRIBI4UBV weglVertexAttribI4ubv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBI4USV)(GLuint,const GLushort *); +WXE_EXTERN WXEGLVERTEXATTRIBI4USV weglVertexAttribI4usv; typedef void (APIENTRY * WXEGLGETUNIFORMUIV)(GLuint,GLint,GLuint *); WXE_EXTERN WXEGLGETUNIFORMUIV weglGetUniformuiv; typedef void (APIENTRY * WXEGLBINDFRAGDATALOCATION)(GLuint,GLuint,const GLchar *); @@ -1012,30 +1036,6 @@ typedef void (APIENTRY * WXEGLCLEARBUFFERFI)(GLenum,GLint,GLfloat,GLint); WXE_EXTERN WXEGLCLEARBUFFERFI weglClearBufferfi; typedef const GLubyte * (APIENTRY * WXEGLGETSTRINGI)(GLenum,GLuint); WXE_EXTERN WXEGLGETSTRINGI weglGetStringi; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI1IV)(GLuint,const GLint *); -WXE_EXTERN WXEGLVERTEXATTRIBI1IV weglVertexAttribI1iv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI2IV)(GLuint,const GLint *); -WXE_EXTERN WXEGLVERTEXATTRIBI2IV weglVertexAttribI2iv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI3IV)(GLuint,const GLint *); -WXE_EXTERN WXEGLVERTEXATTRIBI3IV weglVertexAttribI3iv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI4IV)(GLuint,const GLint *); -WXE_EXTERN WXEGLVERTEXATTRIBI4IV weglVertexAttribI4iv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI1UIV)(GLuint,const GLuint *); -WXE_EXTERN WXEGLVERTEXATTRIBI1UIV weglVertexAttribI1uiv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI2UIV)(GLuint,const GLuint *); -WXE_EXTERN WXEGLVERTEXATTRIBI2UIV weglVertexAttribI2uiv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI3UIV)(GLuint,const GLuint *); -WXE_EXTERN WXEGLVERTEXATTRIBI3UIV weglVertexAttribI3uiv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI4UIV)(GLuint,const GLuint *); -WXE_EXTERN WXEGLVERTEXATTRIBI4UIV weglVertexAttribI4uiv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI4BV)(GLuint,const GLbyte *); -WXE_EXTERN WXEGLVERTEXATTRIBI4BV weglVertexAttribI4bv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI4SV)(GLuint,const GLshort *); -WXE_EXTERN WXEGLVERTEXATTRIBI4SV weglVertexAttribI4sv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI4UBV)(GLuint,const GLubyte *); -WXE_EXTERN WXEGLVERTEXATTRIBI4UBV weglVertexAttribI4ubv; -typedef void (APIENTRY * WXEGLVERTEXATTRIBI4USV)(GLuint,const GLushort *); -WXE_EXTERN WXEGLVERTEXATTRIBI4USV weglVertexAttribI4usv; typedef void (APIENTRY * WXEGLDRAWARRAYSINSTANCED)(GLenum,GLint,GLsizei,GLsizei); WXE_EXTERN WXEGLDRAWARRAYSINSTANCED weglDrawArraysInstanced; typedef void (APIENTRY * WXEGLDRAWELEMENTSINSTANCED)(GLenum,GLsizei,GLenum,const GLvoid *,GLsizei); @@ -1044,6 +1044,24 @@ typedef void (APIENTRY * WXEGLTEXBUFFER)(GLenum,GLenum,GLuint); WXE_EXTERN WXEGLTEXBUFFER weglTexBuffer; typedef void (APIENTRY * WXEGLPRIMITIVERESTARTINDEX)(GLuint); WXE_EXTERN WXEGLPRIMITIVERESTARTINDEX weglPrimitiveRestartIndex; +typedef void (APIENTRY * WXEGLGETINTEGER64I_V)(GLenum,GLuint,GLint64 *); +WXE_EXTERN WXEGLGETINTEGER64I_V weglGetInteger64i_v; +typedef void (APIENTRY * WXEGLGETBUFFERPARAMETERI64V)(GLenum,GLenum,GLint64 *); +WXE_EXTERN WXEGLGETBUFFERPARAMETERI64V weglGetBufferParameteri64v; +typedef void (APIENTRY * WXEGLFRAMEBUFFERTEXTURE)(GLenum,GLenum,GLuint,GLint); +WXE_EXTERN WXEGLFRAMEBUFFERTEXTURE weglFramebufferTexture; +typedef void (APIENTRY * WXEGLVERTEXATTRIBDIVISOR)(GLuint,GLuint); +WXE_EXTERN WXEGLVERTEXATTRIBDIVISOR weglVertexAttribDivisor; +typedef void (APIENTRY * WXEGLMINSAMPLESHADING)(GLclampf); +WXE_EXTERN WXEGLMINSAMPLESHADING weglMinSampleShading; +typedef void (APIENTRY * WXEGLBLENDEQUATIONI)(GLuint,GLenum); +WXE_EXTERN WXEGLBLENDEQUATIONI weglBlendEquationi; +typedef void (APIENTRY * WXEGLBLENDEQUATIONSEPARATEI)(GLuint,GLenum,GLenum); +WXE_EXTERN WXEGLBLENDEQUATIONSEPARATEI weglBlendEquationSeparatei; +typedef void (APIENTRY * WXEGLBLENDFUNCI)(GLuint,GLenum,GLenum); +WXE_EXTERN WXEGLBLENDFUNCI weglBlendFunci; +typedef void (APIENTRY * WXEGLBLENDFUNCSEPARATEI)(GLuint,GLenum,GLenum,GLenum,GLenum); +WXE_EXTERN WXEGLBLENDFUNCSEPARATEI weglBlendFuncSeparatei; typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXFARB)(const GLfloat *); WXE_EXTERN WXEGLLOADTRANSPOSEMATRIXFARB weglLoadTransposeMatrixfARB; typedef void (APIENTRY * WXEGLLOADTRANSPOSEMATRIXDARB)(const GLdouble *); @@ -1112,6 +1130,8 @@ typedef void (APIENTRY * WXEGLGETPROGRAMLOCALPARAMETERFVARB)(GLenum,GLuint,GLflo WXE_EXTERN WXEGLGETPROGRAMLOCALPARAMETERFVARB weglGetProgramLocalParameterfvARB; typedef void (APIENTRY * WXEGLGETPROGRAMSTRINGARB)(GLenum,GLenum,GLvoid *); WXE_EXTERN WXEGLGETPROGRAMSTRINGARB weglGetProgramStringARB; +typedef void (APIENTRY * WXEGLGETBUFFERPARAMETERIVARB)(GLenum,GLenum,GLint *); +WXE_EXTERN WXEGLGETBUFFERPARAMETERIVARB weglGetBufferParameterivARB; typedef void (APIENTRY * WXEGLDELETEOBJECTARB)(GLhandleARB); WXE_EXTERN WXEGLDELETEOBJECTARB weglDeleteObjectARB; typedef GLhandleARB (APIENTRY * WXEGLGETHANDLEARB)(GLenum); @@ -1198,14 +1218,8 @@ typedef void (APIENTRY * WXEGLRENDERBUFFERSTORAGEMULTISAMPLE)(GLenum,GLsizei,GLe WXE_EXTERN WXEGLRENDERBUFFERSTORAGEMULTISAMPLE weglRenderbufferStorageMultisample; typedef void (APIENTRY * WXEGLFRAMEBUFFERTEXTURELAYER)(GLenum,GLenum,GLuint,GLint,GLint); WXE_EXTERN WXEGLFRAMEBUFFERTEXTURELAYER weglFramebufferTextureLayer; -typedef void (APIENTRY * WXEGLPROGRAMPARAMETERIARB)(GLuint,GLenum,GLint); -WXE_EXTERN WXEGLPROGRAMPARAMETERIARB weglProgramParameteriARB; -typedef void (APIENTRY * WXEGLFRAMEBUFFERTEXTUREARB)(GLenum,GLenum,GLuint,GLint); -WXE_EXTERN WXEGLFRAMEBUFFERTEXTUREARB weglFramebufferTextureARB; typedef void (APIENTRY * WXEGLFRAMEBUFFERTEXTUREFACEARB)(GLenum,GLenum,GLuint,GLint,GLenum); WXE_EXTERN WXEGLFRAMEBUFFERTEXTUREFACEARB weglFramebufferTextureFaceARB; -typedef void (APIENTRY * WXEGLVERTEXATTRIBDIVISORARB)(GLuint,GLuint); -WXE_EXTERN WXEGLVERTEXATTRIBDIVISORARB weglVertexAttribDivisorARB; typedef void (APIENTRY * WXEGLFLUSHMAPPEDBUFFERRANGE)(GLenum,GLintptr,GLsizeiptr); WXE_EXTERN WXEGLFLUSHMAPPEDBUFFERRANGE weglFlushMappedBufferRange; typedef void (APIENTRY * WXEGLBINDVERTEXARRAY)(GLuint); @@ -1232,6 +1246,342 @@ typedef void (APIENTRY * WXEGLUNIFORMBLOCKBINDING)(GLuint,GLuint,GLuint); WXE_EXTERN WXEGLUNIFORMBLOCKBINDING weglUniformBlockBinding; typedef void (APIENTRY * WXEGLCOPYBUFFERSUBDATA)(GLenum,GLenum,GLintptr,GLintptr,GLsizeiptr); WXE_EXTERN WXEGLCOPYBUFFERSUBDATA weglCopyBufferSubData; +typedef void (APIENTRY * WXEGLDRAWELEMENTSBASEVERTEX)(GLenum,GLsizei,GLenum,const GLvoid *,GLint); +WXE_EXTERN WXEGLDRAWELEMENTSBASEVERTEX weglDrawElementsBaseVertex; +typedef void (APIENTRY * WXEGLDRAWRANGEELEMENTSBASEVERTEX)(GLenum,GLuint,GLuint,GLsizei,GLenum,const GLvoid *,GLint); +WXE_EXTERN WXEGLDRAWRANGEELEMENTSBASEVERTEX weglDrawRangeElementsBaseVertex; +typedef void (APIENTRY * WXEGLDRAWELEMENTSINSTANCEDBASEVERTEX)(GLenum,GLsizei,GLenum,const GLvoid *,GLsizei,GLint); +WXE_EXTERN WXEGLDRAWELEMENTSINSTANCEDBASEVERTEX weglDrawElementsInstancedBaseVertex; +typedef void (APIENTRY * WXEGLPROVOKINGVERTEX)(GLenum); +WXE_EXTERN WXEGLPROVOKINGVERTEX weglProvokingVertex; +typedef GLsync (APIENTRY * WXEGLFENCESYNC)(GLenum,GLbitfield); +WXE_EXTERN WXEGLFENCESYNC weglFenceSync; +typedef GLboolean (APIENTRY * WXEGLISSYNC)(GLsync); +WXE_EXTERN WXEGLISSYNC weglIsSync; +typedef void (APIENTRY * WXEGLDELETESYNC)(GLsync); +WXE_EXTERN WXEGLDELETESYNC weglDeleteSync; +typedef GLenum (APIENTRY * WXEGLCLIENTWAITSYNC)(GLsync,GLbitfield,GLuint64); +WXE_EXTERN WXEGLCLIENTWAITSYNC weglClientWaitSync; +typedef void (APIENTRY * WXEGLWAITSYNC)(GLsync,GLbitfield,GLuint64); +WXE_EXTERN WXEGLWAITSYNC weglWaitSync; +typedef void (APIENTRY * WXEGLGETINTEGER64V)(GLenum,GLint64 *); +WXE_EXTERN WXEGLGETINTEGER64V weglGetInteger64v; +typedef void (APIENTRY * WXEGLGETSYNCIV)(GLsync,GLenum,GLsizei,GLsizei *,GLint *); +WXE_EXTERN WXEGLGETSYNCIV weglGetSynciv; +typedef void (APIENTRY * WXEGLTEXIMAGE2DMULTISAMPLE)(GLenum,GLsizei,GLint,GLsizei,GLsizei,GLboolean); +WXE_EXTERN WXEGLTEXIMAGE2DMULTISAMPLE weglTexImage2DMultisample; +typedef void (APIENTRY * WXEGLTEXIMAGE3DMULTISAMPLE)(GLenum,GLsizei,GLint,GLsizei,GLsizei,GLsizei,GLboolean); +WXE_EXTERN WXEGLTEXIMAGE3DMULTISAMPLE weglTexImage3DMultisample; +typedef void (APIENTRY * WXEGLGETMULTISAMPLEFV)(GLenum,GLuint,GLfloat *); +WXE_EXTERN WXEGLGETMULTISAMPLEFV weglGetMultisamplefv; +typedef void (APIENTRY * WXEGLSAMPLEMASKI)(GLuint,GLbitfield); +WXE_EXTERN WXEGLSAMPLEMASKI weglSampleMaski; +typedef void (APIENTRY * WXEGLNAMEDSTRINGARB)(GLenum,GLint,const GLchar *,GLint,const GLchar *); +WXE_EXTERN WXEGLNAMEDSTRINGARB weglNamedStringARB; +typedef void (APIENTRY * WXEGLDELETENAMEDSTRINGARB)(GLint,const GLchar *); +WXE_EXTERN WXEGLDELETENAMEDSTRINGARB weglDeleteNamedStringARB; +typedef void (APIENTRY * WXEGLCOMPILESHADERINCLUDEARB)(GLuint,GLsizei,const GLchar **,const GLint *); +WXE_EXTERN WXEGLCOMPILESHADERINCLUDEARB weglCompileShaderIncludeARB; +typedef GLboolean (APIENTRY * WXEGLISNAMEDSTRINGARB)(GLint,const GLchar *); +WXE_EXTERN WXEGLISNAMEDSTRINGARB weglIsNamedStringARB; +typedef void (APIENTRY * WXEGLGETNAMEDSTRINGARB)(GLint,const GLchar *,GLsizei,GLint *,GLchar *); +WXE_EXTERN WXEGLGETNAMEDSTRINGARB weglGetNamedStringARB; +typedef void (APIENTRY * WXEGLGETNAMEDSTRINGIVARB)(GLint,const GLchar *,GLenum,GLint *); +WXE_EXTERN WXEGLGETNAMEDSTRINGIVARB weglGetNamedStringivARB; +typedef void (APIENTRY * WXEGLBINDFRAGDATALOCATIONINDEXED)(GLuint,GLuint,GLuint,const GLchar *); +WXE_EXTERN WXEGLBINDFRAGDATALOCATIONINDEXED weglBindFragDataLocationIndexed; +typedef GLint (APIENTRY * WXEGLGETFRAGDATAINDEX)(GLuint,const GLchar *); +WXE_EXTERN WXEGLGETFRAGDATAINDEX weglGetFragDataIndex; +typedef void (APIENTRY * WXEGLGENSAMPLERS)(GLsizei,GLuint *); +WXE_EXTERN WXEGLGENSAMPLERS weglGenSamplers; +typedef void (APIENTRY * WXEGLDELETESAMPLERS)(GLsizei,const GLuint *); +WXE_EXTERN WXEGLDELETESAMPLERS weglDeleteSamplers; +typedef GLboolean (APIENTRY * WXEGLISSAMPLER)(GLuint); +WXE_EXTERN WXEGLISSAMPLER weglIsSampler; +typedef void (APIENTRY * WXEGLBINDSAMPLER)(GLuint,GLuint); +WXE_EXTERN WXEGLBINDSAMPLER weglBindSampler; +typedef void (APIENTRY * WXEGLSAMPLERPARAMETERI)(GLuint,GLenum,GLint); +WXE_EXTERN WXEGLSAMPLERPARAMETERI weglSamplerParameteri; +typedef void (APIENTRY * WXEGLSAMPLERPARAMETERIV)(GLuint,GLenum,const GLint *); +WXE_EXTERN WXEGLSAMPLERPARAMETERIV weglSamplerParameteriv; +typedef void (APIENTRY * WXEGLSAMPLERPARAMETERF)(GLuint,GLenum,GLfloat); +WXE_EXTERN WXEGLSAMPLERPARAMETERF weglSamplerParameterf; +typedef void (APIENTRY * WXEGLSAMPLERPARAMETERFV)(GLuint,GLenum,const GLfloat *); +WXE_EXTERN WXEGLSAMPLERPARAMETERFV weglSamplerParameterfv; +typedef void (APIENTRY * WXEGLSAMPLERPARAMETERIIV)(GLuint,GLenum,const GLint *); +WXE_EXTERN WXEGLSAMPLERPARAMETERIIV weglSamplerParameterIiv; +typedef void (APIENTRY * WXEGLSAMPLERPARAMETERIUIV)(GLuint,GLenum,const GLuint *); +WXE_EXTERN WXEGLSAMPLERPARAMETERIUIV weglSamplerParameterIuiv; +typedef void (APIENTRY * WXEGLGETSAMPLERPARAMETERIV)(GLuint,GLenum,GLint *); +WXE_EXTERN WXEGLGETSAMPLERPARAMETERIV weglGetSamplerParameteriv; +typedef void (APIENTRY * WXEGLGETSAMPLERPARAMETERIIV)(GLuint,GLenum,GLint *); +WXE_EXTERN WXEGLGETSAMPLERPARAMETERIIV weglGetSamplerParameterIiv; +typedef void (APIENTRY * WXEGLGETSAMPLERPARAMETERFV)(GLuint,GLenum,GLfloat *); +WXE_EXTERN WXEGLGETSAMPLERPARAMETERFV weglGetSamplerParameterfv; +typedef void (APIENTRY * WXEGLGETSAMPLERPARAMETERIUIV)(GLuint,GLenum,GLuint *); +WXE_EXTERN WXEGLGETSAMPLERPARAMETERIUIV weglGetSamplerParameterIuiv; +typedef void (APIENTRY * WXEGLQUERYCOUNTER)(GLuint,GLenum); +WXE_EXTERN WXEGLQUERYCOUNTER weglQueryCounter; +typedef void (APIENTRY * WXEGLGETQUERYOBJECTI64V)(GLuint,GLenum,GLint64 *); +WXE_EXTERN WXEGLGETQUERYOBJECTI64V weglGetQueryObjecti64v; +typedef void (APIENTRY * WXEGLGETQUERYOBJECTUI64V)(GLuint,GLenum,GLuint64 *); +WXE_EXTERN WXEGLGETQUERYOBJECTUI64V weglGetQueryObjectui64v; +typedef void (APIENTRY * WXEGLDRAWARRAYSINDIRECT)(GLenum,const GLvoid *); +WXE_EXTERN WXEGLDRAWARRAYSINDIRECT weglDrawArraysIndirect; +typedef void (APIENTRY * WXEGLDRAWELEMENTSINDIRECT)(GLenum,GLenum,const GLvoid *); +WXE_EXTERN WXEGLDRAWELEMENTSINDIRECT weglDrawElementsIndirect; +typedef void (APIENTRY * WXEGLUNIFORM1D)(GLint,GLdouble); +WXE_EXTERN WXEGLUNIFORM1D weglUniform1d; +typedef void (APIENTRY * WXEGLUNIFORM2D)(GLint,GLdouble,GLdouble); +WXE_EXTERN WXEGLUNIFORM2D weglUniform2d; +typedef void (APIENTRY * WXEGLUNIFORM3D)(GLint,GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLUNIFORM3D weglUniform3d; +typedef void (APIENTRY * WXEGLUNIFORM4D)(GLint,GLdouble,GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLUNIFORM4D weglUniform4d; +typedef void (APIENTRY * WXEGLUNIFORM1DV)(GLint,GLsizei,const GLdouble *); +WXE_EXTERN WXEGLUNIFORM1DV weglUniform1dv; +typedef void (APIENTRY * WXEGLUNIFORM2DV)(GLint,GLsizei,const GLdouble *); +WXE_EXTERN WXEGLUNIFORM2DV weglUniform2dv; +typedef void (APIENTRY * WXEGLUNIFORM3DV)(GLint,GLsizei,const GLdouble *); +WXE_EXTERN WXEGLUNIFORM3DV weglUniform3dv; +typedef void (APIENTRY * WXEGLUNIFORM4DV)(GLint,GLsizei,const GLdouble *); +WXE_EXTERN WXEGLUNIFORM4DV weglUniform4dv; +typedef void (APIENTRY * WXEGLUNIFORMMATRIX2DV)(GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLUNIFORMMATRIX2DV weglUniformMatrix2dv; +typedef void (APIENTRY * WXEGLUNIFORMMATRIX3DV)(GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLUNIFORMMATRIX3DV weglUniformMatrix3dv; +typedef void (APIENTRY * WXEGLUNIFORMMATRIX4DV)(GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLUNIFORMMATRIX4DV weglUniformMatrix4dv; +typedef void (APIENTRY * WXEGLUNIFORMMATRIX2X3DV)(GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLUNIFORMMATRIX2X3DV weglUniformMatrix2x3dv; +typedef void (APIENTRY * WXEGLUNIFORMMATRIX2X4DV)(GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLUNIFORMMATRIX2X4DV weglUniformMatrix2x4dv; +typedef void (APIENTRY * WXEGLUNIFORMMATRIX3X2DV)(GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLUNIFORMMATRIX3X2DV weglUniformMatrix3x2dv; +typedef void (APIENTRY * WXEGLUNIFORMMATRIX3X4DV)(GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLUNIFORMMATRIX3X4DV weglUniformMatrix3x4dv; +typedef void (APIENTRY * WXEGLUNIFORMMATRIX4X2DV)(GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLUNIFORMMATRIX4X2DV weglUniformMatrix4x2dv; +typedef void (APIENTRY * WXEGLUNIFORMMATRIX4X3DV)(GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLUNIFORMMATRIX4X3DV weglUniformMatrix4x3dv; +typedef void (APIENTRY * WXEGLGETUNIFORMDV)(GLuint,GLint,GLdouble *); +WXE_EXTERN WXEGLGETUNIFORMDV weglGetUniformdv; +typedef GLint (APIENTRY * WXEGLGETSUBROUTINEUNIFORMLOCATION)(GLuint,GLenum,const GLchar *); +WXE_EXTERN WXEGLGETSUBROUTINEUNIFORMLOCATION weglGetSubroutineUniformLocation; +typedef GLuint (APIENTRY * WXEGLGETSUBROUTINEINDEX)(GLuint,GLenum,const GLchar *); +WXE_EXTERN WXEGLGETSUBROUTINEINDEX weglGetSubroutineIndex; +typedef void (APIENTRY * WXEGLGETACTIVESUBROUTINEUNIFORMNAME)(GLuint,GLenum,GLuint,GLsizei,GLsizei *,GLchar *); +WXE_EXTERN WXEGLGETACTIVESUBROUTINEUNIFORMNAME weglGetActiveSubroutineUniformName; +typedef void (APIENTRY * WXEGLGETACTIVESUBROUTINENAME)(GLuint,GLenum,GLuint,GLsizei,GLsizei *,GLchar *); +WXE_EXTERN WXEGLGETACTIVESUBROUTINENAME weglGetActiveSubroutineName; +typedef void (APIENTRY * WXEGLUNIFORMSUBROUTINESUIV)(GLenum,GLsizei,const GLuint *); +WXE_EXTERN WXEGLUNIFORMSUBROUTINESUIV weglUniformSubroutinesuiv; +typedef void (APIENTRY * WXEGLGETUNIFORMSUBROUTINEUIV)(GLenum,GLint,GLuint *); +WXE_EXTERN WXEGLGETUNIFORMSUBROUTINEUIV weglGetUniformSubroutineuiv; +typedef void (APIENTRY * WXEGLGETPROGRAMSTAGEIV)(GLuint,GLenum,GLenum,GLint *); +WXE_EXTERN WXEGLGETPROGRAMSTAGEIV weglGetProgramStageiv; +typedef void (APIENTRY * WXEGLPATCHPARAMETERI)(GLenum,GLint); +WXE_EXTERN WXEGLPATCHPARAMETERI weglPatchParameteri; +typedef void (APIENTRY * WXEGLPATCHPARAMETERFV)(GLenum,const GLfloat *); +WXE_EXTERN WXEGLPATCHPARAMETERFV weglPatchParameterfv; +typedef void (APIENTRY * WXEGLBINDTRANSFORMFEEDBACK)(GLenum,GLuint); +WXE_EXTERN WXEGLBINDTRANSFORMFEEDBACK weglBindTransformFeedback; +typedef void (APIENTRY * WXEGLDELETETRANSFORMFEEDBACKS)(GLsizei,const GLuint *); +WXE_EXTERN WXEGLDELETETRANSFORMFEEDBACKS weglDeleteTransformFeedbacks; +typedef void (APIENTRY * WXEGLGENTRANSFORMFEEDBACKS)(GLsizei,GLuint *); +WXE_EXTERN WXEGLGENTRANSFORMFEEDBACKS weglGenTransformFeedbacks; +typedef GLboolean (APIENTRY * WXEGLISTRANSFORMFEEDBACK)(GLuint); +WXE_EXTERN WXEGLISTRANSFORMFEEDBACK weglIsTransformFeedback; +typedef void (APIENTRY * WXEGLPAUSETRANSFORMFEEDBACK)(); +WXE_EXTERN WXEGLPAUSETRANSFORMFEEDBACK weglPauseTransformFeedback; +typedef void (APIENTRY * WXEGLRESUMETRANSFORMFEEDBACK)(); +WXE_EXTERN WXEGLRESUMETRANSFORMFEEDBACK weglResumeTransformFeedback; +typedef void (APIENTRY * WXEGLDRAWTRANSFORMFEEDBACK)(GLenum,GLuint); +WXE_EXTERN WXEGLDRAWTRANSFORMFEEDBACK weglDrawTransformFeedback; +typedef void (APIENTRY * WXEGLDRAWTRANSFORMFEEDBACKSTREAM)(GLenum,GLuint,GLuint); +WXE_EXTERN WXEGLDRAWTRANSFORMFEEDBACKSTREAM weglDrawTransformFeedbackStream; +typedef void (APIENTRY * WXEGLBEGINQUERYINDEXED)(GLenum,GLuint,GLuint); +WXE_EXTERN WXEGLBEGINQUERYINDEXED weglBeginQueryIndexed; +typedef void (APIENTRY * WXEGLENDQUERYINDEXED)(GLenum,GLuint); +WXE_EXTERN WXEGLENDQUERYINDEXED weglEndQueryIndexed; +typedef void (APIENTRY * WXEGLGETQUERYINDEXEDIV)(GLenum,GLuint,GLenum,GLint *); +WXE_EXTERN WXEGLGETQUERYINDEXEDIV weglGetQueryIndexediv; +typedef void (APIENTRY * WXEGLRELEASESHADERCOMPILER)(); +WXE_EXTERN WXEGLRELEASESHADERCOMPILER weglReleaseShaderCompiler; +typedef void (APIENTRY * WXEGLSHADERBINARY)(GLsizei,const GLuint *,GLenum,const GLvoid *,GLsizei); +WXE_EXTERN WXEGLSHADERBINARY weglShaderBinary; +typedef void (APIENTRY * WXEGLGETSHADERPRECISIONFORMAT)(GLenum,GLenum,GLint *,GLint *); +WXE_EXTERN WXEGLGETSHADERPRECISIONFORMAT weglGetShaderPrecisionFormat; +typedef void (APIENTRY * WXEGLDEPTHRANGEF)(GLclampf,GLclampf); +WXE_EXTERN WXEGLDEPTHRANGEF weglDepthRangef; +typedef void (APIENTRY * WXEGLCLEARDEPTHF)(GLclampf); +WXE_EXTERN WXEGLCLEARDEPTHF weglClearDepthf; +typedef void (APIENTRY * WXEGLGETPROGRAMBINARY)(GLuint,GLsizei,GLsizei *,GLenum *,GLvoid *); +WXE_EXTERN WXEGLGETPROGRAMBINARY weglGetProgramBinary; +typedef void (APIENTRY * WXEGLPROGRAMBINARY)(GLuint,GLenum,const GLvoid *,GLsizei); +WXE_EXTERN WXEGLPROGRAMBINARY weglProgramBinary; +typedef void (APIENTRY * WXEGLPROGRAMPARAMETERI)(GLuint,GLenum,GLint); +WXE_EXTERN WXEGLPROGRAMPARAMETERI weglProgramParameteri; +typedef void (APIENTRY * WXEGLUSEPROGRAMSTAGES)(GLuint,GLbitfield,GLuint); +WXE_EXTERN WXEGLUSEPROGRAMSTAGES weglUseProgramStages; +typedef void (APIENTRY * WXEGLACTIVESHADERPROGRAM)(GLuint,GLuint); +WXE_EXTERN WXEGLACTIVESHADERPROGRAM weglActiveShaderProgram; +typedef GLuint (APIENTRY * WXEGLCREATESHADERPROGRAMV)(GLenum,GLsizei,const GLchar **); +WXE_EXTERN WXEGLCREATESHADERPROGRAMV weglCreateShaderProgramv; +typedef void (APIENTRY * WXEGLBINDPROGRAMPIPELINE)(GLuint); +WXE_EXTERN WXEGLBINDPROGRAMPIPELINE weglBindProgramPipeline; +typedef void (APIENTRY * WXEGLDELETEPROGRAMPIPELINES)(GLsizei,const GLuint *); +WXE_EXTERN WXEGLDELETEPROGRAMPIPELINES weglDeleteProgramPipelines; +typedef void (APIENTRY * WXEGLGENPROGRAMPIPELINES)(GLsizei,GLuint *); +WXE_EXTERN WXEGLGENPROGRAMPIPELINES weglGenProgramPipelines; +typedef GLboolean (APIENTRY * WXEGLISPROGRAMPIPELINE)(GLuint); +WXE_EXTERN WXEGLISPROGRAMPIPELINE weglIsProgramPipeline; +typedef void (APIENTRY * WXEGLGETPROGRAMPIPELINEIV)(GLuint,GLenum,GLint *); +WXE_EXTERN WXEGLGETPROGRAMPIPELINEIV weglGetProgramPipelineiv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM1I)(GLuint,GLint,GLint); +WXE_EXTERN WXEGLPROGRAMUNIFORM1I weglProgramUniform1i; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM1IV)(GLuint,GLint,GLsizei,const GLint *); +WXE_EXTERN WXEGLPROGRAMUNIFORM1IV weglProgramUniform1iv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM1F)(GLuint,GLint,GLfloat); +WXE_EXTERN WXEGLPROGRAMUNIFORM1F weglProgramUniform1f; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM1FV)(GLuint,GLint,GLsizei,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORM1FV weglProgramUniform1fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM1D)(GLuint,GLint,GLdouble); +WXE_EXTERN WXEGLPROGRAMUNIFORM1D weglProgramUniform1d; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM1DV)(GLuint,GLint,GLsizei,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORM1DV weglProgramUniform1dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM1UI)(GLuint,GLint,GLuint); +WXE_EXTERN WXEGLPROGRAMUNIFORM1UI weglProgramUniform1ui; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM1UIV)(GLuint,GLint,GLsizei,const GLuint *); +WXE_EXTERN WXEGLPROGRAMUNIFORM1UIV weglProgramUniform1uiv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM2I)(GLuint,GLint,GLint,GLint); +WXE_EXTERN WXEGLPROGRAMUNIFORM2I weglProgramUniform2i; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM2IV)(GLuint,GLint,GLsizei,const GLint *); +WXE_EXTERN WXEGLPROGRAMUNIFORM2IV weglProgramUniform2iv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM2F)(GLuint,GLint,GLfloat,GLfloat); +WXE_EXTERN WXEGLPROGRAMUNIFORM2F weglProgramUniform2f; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM2FV)(GLuint,GLint,GLsizei,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORM2FV weglProgramUniform2fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM2D)(GLuint,GLint,GLdouble,GLdouble); +WXE_EXTERN WXEGLPROGRAMUNIFORM2D weglProgramUniform2d; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM2DV)(GLuint,GLint,GLsizei,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORM2DV weglProgramUniform2dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM2UI)(GLuint,GLint,GLuint,GLuint); +WXE_EXTERN WXEGLPROGRAMUNIFORM2UI weglProgramUniform2ui; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM2UIV)(GLuint,GLint,GLsizei,const GLuint *); +WXE_EXTERN WXEGLPROGRAMUNIFORM2UIV weglProgramUniform2uiv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM3I)(GLuint,GLint,GLint,GLint,GLint); +WXE_EXTERN WXEGLPROGRAMUNIFORM3I weglProgramUniform3i; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM3IV)(GLuint,GLint,GLsizei,const GLint *); +WXE_EXTERN WXEGLPROGRAMUNIFORM3IV weglProgramUniform3iv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM3F)(GLuint,GLint,GLfloat,GLfloat,GLfloat); +WXE_EXTERN WXEGLPROGRAMUNIFORM3F weglProgramUniform3f; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM3FV)(GLuint,GLint,GLsizei,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORM3FV weglProgramUniform3fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM3D)(GLuint,GLint,GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLPROGRAMUNIFORM3D weglProgramUniform3d; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM3DV)(GLuint,GLint,GLsizei,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORM3DV weglProgramUniform3dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM3UI)(GLuint,GLint,GLuint,GLuint,GLuint); +WXE_EXTERN WXEGLPROGRAMUNIFORM3UI weglProgramUniform3ui; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM3UIV)(GLuint,GLint,GLsizei,const GLuint *); +WXE_EXTERN WXEGLPROGRAMUNIFORM3UIV weglProgramUniform3uiv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM4I)(GLuint,GLint,GLint,GLint,GLint,GLint); +WXE_EXTERN WXEGLPROGRAMUNIFORM4I weglProgramUniform4i; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM4IV)(GLuint,GLint,GLsizei,const GLint *); +WXE_EXTERN WXEGLPROGRAMUNIFORM4IV weglProgramUniform4iv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM4F)(GLuint,GLint,GLfloat,GLfloat,GLfloat,GLfloat); +WXE_EXTERN WXEGLPROGRAMUNIFORM4F weglProgramUniform4f; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM4FV)(GLuint,GLint,GLsizei,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORM4FV weglProgramUniform4fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM4D)(GLuint,GLint,GLdouble,GLdouble,GLdouble,GLdouble); +WXE_EXTERN WXEGLPROGRAMUNIFORM4D weglProgramUniform4d; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM4DV)(GLuint,GLint,GLsizei,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORM4DV weglProgramUniform4dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM4UI)(GLuint,GLint,GLuint,GLuint,GLuint,GLuint); +WXE_EXTERN WXEGLPROGRAMUNIFORM4UI weglProgramUniform4ui; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORM4UIV)(GLuint,GLint,GLsizei,const GLuint *); +WXE_EXTERN WXEGLPROGRAMUNIFORM4UIV weglProgramUniform4uiv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX2FV)(GLuint,GLint,GLsizei,GLboolean,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX2FV weglProgramUniformMatrix2fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX3FV)(GLuint,GLint,GLsizei,GLboolean,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX3FV weglProgramUniformMatrix3fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX4FV)(GLuint,GLint,GLsizei,GLboolean,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX4FV weglProgramUniformMatrix4fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX2DV)(GLuint,GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX2DV weglProgramUniformMatrix2dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX3DV)(GLuint,GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX3DV weglProgramUniformMatrix3dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX4DV)(GLuint,GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX4DV weglProgramUniformMatrix4dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX2X3FV)(GLuint,GLint,GLsizei,GLboolean,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX2X3FV weglProgramUniformMatrix2x3fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX3X2FV)(GLuint,GLint,GLsizei,GLboolean,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX3X2FV weglProgramUniformMatrix3x2fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX2X4FV)(GLuint,GLint,GLsizei,GLboolean,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX2X4FV weglProgramUniformMatrix2x4fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX4X2FV)(GLuint,GLint,GLsizei,GLboolean,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX4X2FV weglProgramUniformMatrix4x2fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX3X4FV)(GLuint,GLint,GLsizei,GLboolean,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX3X4FV weglProgramUniformMatrix3x4fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX4X3FV)(GLuint,GLint,GLsizei,GLboolean,const GLfloat *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX4X3FV weglProgramUniformMatrix4x3fv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX2X3DV)(GLuint,GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX2X3DV weglProgramUniformMatrix2x3dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX3X2DV)(GLuint,GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX3X2DV weglProgramUniformMatrix3x2dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX2X4DV)(GLuint,GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX2X4DV weglProgramUniformMatrix2x4dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX4X2DV)(GLuint,GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX4X2DV weglProgramUniformMatrix4x2dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX3X4DV)(GLuint,GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX3X4DV weglProgramUniformMatrix3x4dv; +typedef void (APIENTRY * WXEGLPROGRAMUNIFORMMATRIX4X3DV)(GLuint,GLint,GLsizei,GLboolean,const GLdouble *); +WXE_EXTERN WXEGLPROGRAMUNIFORMMATRIX4X3DV weglProgramUniformMatrix4x3dv; +typedef void (APIENTRY * WXEGLVALIDATEPROGRAMPIPELINE)(GLuint); +WXE_EXTERN WXEGLVALIDATEPROGRAMPIPELINE weglValidateProgramPipeline; +typedef void (APIENTRY * WXEGLGETPROGRAMPIPELINEINFOLOG)(GLuint,GLsizei,GLsizei *,GLchar *); +WXE_EXTERN WXEGLGETPROGRAMPIPELINEINFOLOG weglGetProgramPipelineInfoLog; +typedef void (APIENTRY * WXEGLVERTEXATTRIBL1DV)(GLuint,const GLdouble *); +WXE_EXTERN WXEGLVERTEXATTRIBL1DV weglVertexAttribL1dv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBL2DV)(GLuint,const GLdouble *); +WXE_EXTERN WXEGLVERTEXATTRIBL2DV weglVertexAttribL2dv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBL3DV)(GLuint,const GLdouble *); +WXE_EXTERN WXEGLVERTEXATTRIBL3DV weglVertexAttribL3dv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBL4DV)(GLuint,const GLdouble *); +WXE_EXTERN WXEGLVERTEXATTRIBL4DV weglVertexAttribL4dv; +typedef void (APIENTRY * WXEGLVERTEXATTRIBLPOINTER)(GLuint,GLint,GLenum,GLsizei,const GLvoid *); +WXE_EXTERN WXEGLVERTEXATTRIBLPOINTER weglVertexAttribLPointer; +typedef void (APIENTRY * WXEGLGETVERTEXATTRIBLDV)(GLuint,GLenum,GLdouble *); +WXE_EXTERN WXEGLGETVERTEXATTRIBLDV weglGetVertexAttribLdv; +typedef void (APIENTRY * WXEGLVIEWPORTARRAYV)(GLuint,GLsizei,const GLfloat *); +WXE_EXTERN WXEGLVIEWPORTARRAYV weglViewportArrayv; +typedef void (APIENTRY * WXEGLVIEWPORTINDEXEDF)(GLuint,GLfloat,GLfloat,GLfloat,GLfloat); +WXE_EXTERN WXEGLVIEWPORTINDEXEDF weglViewportIndexedf; +typedef void (APIENTRY * WXEGLVIEWPORTINDEXEDFV)(GLuint,const GLfloat *); +WXE_EXTERN WXEGLVIEWPORTINDEXEDFV weglViewportIndexedfv; +typedef void (APIENTRY * WXEGLSCISSORARRAYV)(GLuint,GLsizei,const GLint *); +WXE_EXTERN WXEGLSCISSORARRAYV weglScissorArrayv; +typedef void (APIENTRY * WXEGLSCISSORINDEXED)(GLuint,GLint,GLint,GLsizei,GLsizei); +WXE_EXTERN WXEGLSCISSORINDEXED weglScissorIndexed; +typedef void (APIENTRY * WXEGLSCISSORINDEXEDV)(GLuint,const GLint *); +WXE_EXTERN WXEGLSCISSORINDEXEDV weglScissorIndexedv; +typedef void (APIENTRY * WXEGLDEPTHRANGEARRAYV)(GLuint,GLsizei,const GLclampd *); +WXE_EXTERN WXEGLDEPTHRANGEARRAYV weglDepthRangeArrayv; +typedef void (APIENTRY * WXEGLDEPTHRANGEINDEXED)(GLuint,GLclampd,GLclampd); +WXE_EXTERN WXEGLDEPTHRANGEINDEXED weglDepthRangeIndexed; +typedef void (APIENTRY * WXEGLGETFLOATI_V)(GLenum,GLuint,GLfloat *); +WXE_EXTERN WXEGLGETFLOATI_V weglGetFloati_v; +typedef void (APIENTRY * WXEGLGETDOUBLEI_V)(GLenum,GLuint,GLdouble *); +WXE_EXTERN WXEGLGETDOUBLEI_V weglGetDoublei_v; +typedef void (APIENTRY * WXEGLDEBUGMESSAGECONTROLARB)(GLenum,GLenum,GLenum,GLsizei,const GLuint *,GLboolean); +WXE_EXTERN WXEGLDEBUGMESSAGECONTROLARB weglDebugMessageControlARB; +typedef void (APIENTRY * WXEGLDEBUGMESSAGEINSERTARB)(GLenum,GLenum,GLuint,GLenum,GLsizei,const GLchar *); +WXE_EXTERN WXEGLDEBUGMESSAGEINSERTARB weglDebugMessageInsertARB; +typedef GLuint (APIENTRY * WXEGLGETDEBUGMESSAGELOGARB)(GLuint,GLsizei,GLenum *,GLenum *,GLuint *,GLenum *,GLsizei *,GLchar *); +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 *); diff --git a/lib/wx/c_src/gen/gl_finit.h b/lib/wx/c_src/gen/gl_finit.h index ef29f05c4d..3d707f4c18 100644 --- a/lib/wx/c_src/gen/gl_finit.h +++ b/lib/wx/c_src/gen/gl_finit.h @@ -394,7 +394,7 @@ static struct { {"glBufferData", "glBufferDataARB", &weglBufferData}, {"glBufferSubData", "glBufferSubDataARB", &weglBufferSubData}, {"glGetBufferSubData", "glGetBufferSubDataARB", &weglGetBufferSubData}, - {"glGetBufferParameteriv", "glGetBufferParameterivARB", &weglGetBufferParameteriv}, + {"glGetBufferParameteriv", NULL, &weglGetBufferParameteriv}, {"glBlendEquationSeparate", "glBlendEquationSeparateEXT", &weglBlendEquationSeparate}, {"glDrawBuffers", "glDrawBuffersARB", &weglDrawBuffers}, {"glStencilOpSeparate", "glStencilOpSeparateATI", &weglStencilOpSeparate}, @@ -498,6 +498,18 @@ static struct { {"glVertexAttribIPointer", NULL, &weglVertexAttribIPointer}, {"glGetVertexAttribIiv", NULL, &weglGetVertexAttribIiv}, {"glGetVertexAttribIuiv", NULL, &weglGetVertexAttribIuiv}, + {"glVertexAttribI1iv", NULL, &weglVertexAttribI1iv}, + {"glVertexAttribI2iv", NULL, &weglVertexAttribI2iv}, + {"glVertexAttribI3iv", NULL, &weglVertexAttribI3iv}, + {"glVertexAttribI4iv", NULL, &weglVertexAttribI4iv}, + {"glVertexAttribI1uiv", NULL, &weglVertexAttribI1uiv}, + {"glVertexAttribI2uiv", NULL, &weglVertexAttribI2uiv}, + {"glVertexAttribI3uiv", NULL, &weglVertexAttribI3uiv}, + {"glVertexAttribI4uiv", NULL, &weglVertexAttribI4uiv}, + {"glVertexAttribI4bv", NULL, &weglVertexAttribI4bv}, + {"glVertexAttribI4sv", NULL, &weglVertexAttribI4sv}, + {"glVertexAttribI4ubv", NULL, &weglVertexAttribI4ubv}, + {"glVertexAttribI4usv", NULL, &weglVertexAttribI4usv}, {"glGetUniformuiv", NULL, &weglGetUniformuiv}, {"glBindFragDataLocation", NULL, &weglBindFragDataLocation}, {"glGetFragDataLocation", NULL, &weglGetFragDataLocation}, @@ -518,22 +530,19 @@ static struct { {"glClearBufferfv", NULL, &weglClearBufferfv}, {"glClearBufferfi", NULL, &weglClearBufferfi}, {"glGetStringi", NULL, &weglGetStringi}, - {"glVertexAttribI1iv", NULL, &weglVertexAttribI1iv}, - {"glVertexAttribI2iv", NULL, &weglVertexAttribI2iv}, - {"glVertexAttribI3iv", NULL, &weglVertexAttribI3iv}, - {"glVertexAttribI4iv", NULL, &weglVertexAttribI4iv}, - {"glVertexAttribI1uiv", NULL, &weglVertexAttribI1uiv}, - {"glVertexAttribI2uiv", NULL, &weglVertexAttribI2uiv}, - {"glVertexAttribI3uiv", NULL, &weglVertexAttribI3uiv}, - {"glVertexAttribI4uiv", NULL, &weglVertexAttribI4uiv}, - {"glVertexAttribI4bv", NULL, &weglVertexAttribI4bv}, - {"glVertexAttribI4sv", NULL, &weglVertexAttribI4sv}, - {"glVertexAttribI4ubv", NULL, &weglVertexAttribI4ubv}, - {"glVertexAttribI4usv", NULL, &weglVertexAttribI4usv}, {"glDrawArraysInstanced", "glDrawArraysInstancedARB", &weglDrawArraysInstanced}, {"glDrawElementsInstanced", "glDrawElementsInstancedARB", &weglDrawElementsInstanced}, {"glTexBuffer", "glTexBufferARB", &weglTexBuffer}, {"glPrimitiveRestartIndex", NULL, &weglPrimitiveRestartIndex}, + {"glGetInteger64i_v", NULL, &weglGetInteger64i_v}, + {"glGetBufferParameteri64v", NULL, &weglGetBufferParameteri64v}, + {"glFramebufferTexture", "glFramebufferTextureARB", &weglFramebufferTexture}, + {"glVertexAttribDivisor", "glVertexAttribDivisorARB", &weglVertexAttribDivisor}, + {"glMinSampleShading", "glMinSampleShadingARB", &weglMinSampleShading}, + {"glBlendEquationi", "glBlendEquationiARB", &weglBlendEquationi}, + {"glBlendEquationSeparatei", "glBlendEquationSeparateiARB", &weglBlendEquationSeparatei}, + {"glBlendFunci", "glBlendFunciARB", &weglBlendFunci}, + {"glBlendFuncSeparatei", "glBlendFuncSeparateiARB", &weglBlendFuncSeparatei}, {"glLoadTransposeMatrixfARB", NULL, &weglLoadTransposeMatrixfARB}, {"glLoadTransposeMatrixdARB", NULL, &weglLoadTransposeMatrixdARB}, {"glMultTransposeMatrixfARB", NULL, &weglMultTransposeMatrixfARB}, @@ -568,6 +577,7 @@ static struct { {"glGetProgramLocalParameterdvARB", NULL, &weglGetProgramLocalParameterdvARB}, {"glGetProgramLocalParameterfvARB", NULL, &weglGetProgramLocalParameterfvARB}, {"glGetProgramStringARB", NULL, &weglGetProgramStringARB}, + {"glGetBufferParameterivARB", NULL, &weglGetBufferParameterivARB}, {"glDeleteObjectARB", NULL, &weglDeleteObjectARB}, {"glGetHandleARB", NULL, &weglGetHandleARB}, {"glDetachObjectARB", NULL, &weglDetachObjectARB}, @@ -611,10 +621,7 @@ static struct { {"glBlitFramebuffer", "glBlitFramebufferEXT", &weglBlitFramebuffer}, {"glRenderbufferStorageMultisample", "glRenderbufferStorageMultisampleEXT", &weglRenderbufferStorageMultisample}, {"glFramebufferTextureLayer", "glFramebufferTextureLayerARB", &weglFramebufferTextureLayer}, - {"glProgramParameteriARB", NULL, &weglProgramParameteriARB}, - {"glFramebufferTextureARB", NULL, &weglFramebufferTextureARB}, {"glFramebufferTextureFaceARB", NULL, &weglFramebufferTextureFaceARB}, - {"glVertexAttribDivisorARB", NULL, &weglVertexAttribDivisorARB}, {"glFlushMappedBufferRange", NULL, &weglFlushMappedBufferRange}, {"glBindVertexArray", NULL, &weglBindVertexArray}, {"glDeleteVertexArrays", NULL, &weglDeleteVertexArrays}, @@ -628,6 +635,174 @@ static struct { {"glGetActiveUniformBlockName", NULL, &weglGetActiveUniformBlockName}, {"glUniformBlockBinding", NULL, &weglUniformBlockBinding}, {"glCopyBufferSubData", NULL, &weglCopyBufferSubData}, + {"glDrawElementsBaseVertex", NULL, &weglDrawElementsBaseVertex}, + {"glDrawRangeElementsBaseVertex", NULL, &weglDrawRangeElementsBaseVertex}, + {"glDrawElementsInstancedBaseVertex", NULL, &weglDrawElementsInstancedBaseVertex}, + {"glProvokingVertex", NULL, &weglProvokingVertex}, + {"glFenceSync", NULL, &weglFenceSync}, + {"glIsSync", NULL, &weglIsSync}, + {"glDeleteSync", NULL, &weglDeleteSync}, + {"glClientWaitSync", NULL, &weglClientWaitSync}, + {"glWaitSync", NULL, &weglWaitSync}, + {"glGetInteger64v", NULL, &weglGetInteger64v}, + {"glGetSynciv", NULL, &weglGetSynciv}, + {"glTexImage2DMultisample", NULL, &weglTexImage2DMultisample}, + {"glTexImage3DMultisample", NULL, &weglTexImage3DMultisample}, + {"glGetMultisamplefv", NULL, &weglGetMultisamplefv}, + {"glSampleMaski", NULL, &weglSampleMaski}, + {"glNamedStringARB", NULL, &weglNamedStringARB}, + {"glDeleteNamedStringARB", NULL, &weglDeleteNamedStringARB}, + {"glCompileShaderIncludeARB", NULL, &weglCompileShaderIncludeARB}, + {"glIsNamedStringARB", NULL, &weglIsNamedStringARB}, + {"glGetNamedStringARB", NULL, &weglGetNamedStringARB}, + {"glGetNamedStringivARB", NULL, &weglGetNamedStringivARB}, + {"glBindFragDataLocationIndexed", NULL, &weglBindFragDataLocationIndexed}, + {"glGetFragDataIndex", NULL, &weglGetFragDataIndex}, + {"glGenSamplers", NULL, &weglGenSamplers}, + {"glDeleteSamplers", NULL, &weglDeleteSamplers}, + {"glIsSampler", NULL, &weglIsSampler}, + {"glBindSampler", NULL, &weglBindSampler}, + {"glSamplerParameteri", NULL, &weglSamplerParameteri}, + {"glSamplerParameteriv", NULL, &weglSamplerParameteriv}, + {"glSamplerParameterf", NULL, &weglSamplerParameterf}, + {"glSamplerParameterfv", NULL, &weglSamplerParameterfv}, + {"glSamplerParameterIiv", NULL, &weglSamplerParameterIiv}, + {"glSamplerParameterIuiv", NULL, &weglSamplerParameterIuiv}, + {"glGetSamplerParameteriv", NULL, &weglGetSamplerParameteriv}, + {"glGetSamplerParameterIiv", NULL, &weglGetSamplerParameterIiv}, + {"glGetSamplerParameterfv", NULL, &weglGetSamplerParameterfv}, + {"glGetSamplerParameterIuiv", NULL, &weglGetSamplerParameterIuiv}, + {"glQueryCounter", NULL, &weglQueryCounter}, + {"glGetQueryObjecti64v", NULL, &weglGetQueryObjecti64v}, + {"glGetQueryObjectui64v", NULL, &weglGetQueryObjectui64v}, + {"glDrawArraysIndirect", NULL, &weglDrawArraysIndirect}, + {"glDrawElementsIndirect", NULL, &weglDrawElementsIndirect}, + {"glUniform1d", NULL, &weglUniform1d}, + {"glUniform2d", NULL, &weglUniform2d}, + {"glUniform3d", NULL, &weglUniform3d}, + {"glUniform4d", NULL, &weglUniform4d}, + {"glUniform1dv", NULL, &weglUniform1dv}, + {"glUniform2dv", NULL, &weglUniform2dv}, + {"glUniform3dv", NULL, &weglUniform3dv}, + {"glUniform4dv", NULL, &weglUniform4dv}, + {"glUniformMatrix2dv", NULL, &weglUniformMatrix2dv}, + {"glUniformMatrix3dv", NULL, &weglUniformMatrix3dv}, + {"glUniformMatrix4dv", NULL, &weglUniformMatrix4dv}, + {"glUniformMatrix2x3dv", NULL, &weglUniformMatrix2x3dv}, + {"glUniformMatrix2x4dv", NULL, &weglUniformMatrix2x4dv}, + {"glUniformMatrix3x2dv", NULL, &weglUniformMatrix3x2dv}, + {"glUniformMatrix3x4dv", NULL, &weglUniformMatrix3x4dv}, + {"glUniformMatrix4x2dv", NULL, &weglUniformMatrix4x2dv}, + {"glUniformMatrix4x3dv", NULL, &weglUniformMatrix4x3dv}, + {"glGetUniformdv", NULL, &weglGetUniformdv}, + {"glGetSubroutineUniformLocation", NULL, &weglGetSubroutineUniformLocation}, + {"glGetSubroutineIndex", NULL, &weglGetSubroutineIndex}, + {"glGetActiveSubroutineUniformName", NULL, &weglGetActiveSubroutineUniformName}, + {"glGetActiveSubroutineName", NULL, &weglGetActiveSubroutineName}, + {"glUniformSubroutinesuiv", NULL, &weglUniformSubroutinesuiv}, + {"glGetUniformSubroutineuiv", NULL, &weglGetUniformSubroutineuiv}, + {"glGetProgramStageiv", NULL, &weglGetProgramStageiv}, + {"glPatchParameteri", NULL, &weglPatchParameteri}, + {"glPatchParameterfv", NULL, &weglPatchParameterfv}, + {"glBindTransformFeedback", NULL, &weglBindTransformFeedback}, + {"glDeleteTransformFeedbacks", NULL, &weglDeleteTransformFeedbacks}, + {"glGenTransformFeedbacks", NULL, &weglGenTransformFeedbacks}, + {"glIsTransformFeedback", NULL, &weglIsTransformFeedback}, + {"glPauseTransformFeedback", NULL, &weglPauseTransformFeedback}, + {"glResumeTransformFeedback", NULL, &weglResumeTransformFeedback}, + {"glDrawTransformFeedback", NULL, &weglDrawTransformFeedback}, + {"glDrawTransformFeedbackStream", NULL, &weglDrawTransformFeedbackStream}, + {"glBeginQueryIndexed", NULL, &weglBeginQueryIndexed}, + {"glEndQueryIndexed", NULL, &weglEndQueryIndexed}, + {"glGetQueryIndexediv", NULL, &weglGetQueryIndexediv}, + {"glReleaseShaderCompiler", NULL, &weglReleaseShaderCompiler}, + {"glShaderBinary", NULL, &weglShaderBinary}, + {"glGetShaderPrecisionFormat", NULL, &weglGetShaderPrecisionFormat}, + {"glDepthRangef", NULL, &weglDepthRangef}, + {"glClearDepthf", NULL, &weglClearDepthf}, + {"glGetProgramBinary", NULL, &weglGetProgramBinary}, + {"glProgramBinary", NULL, &weglProgramBinary}, + {"glProgramParameteri", "glProgramParameteriARB", &weglProgramParameteri}, + {"glUseProgramStages", NULL, &weglUseProgramStages}, + {"glActiveShaderProgram", NULL, &weglActiveShaderProgram}, + {"glCreateShaderProgramv", NULL, &weglCreateShaderProgramv}, + {"glBindProgramPipeline", NULL, &weglBindProgramPipeline}, + {"glDeleteProgramPipelines", NULL, &weglDeleteProgramPipelines}, + {"glGenProgramPipelines", NULL, &weglGenProgramPipelines}, + {"glIsProgramPipeline", NULL, &weglIsProgramPipeline}, + {"glGetProgramPipelineiv", NULL, &weglGetProgramPipelineiv}, + {"glProgramUniform1i", NULL, &weglProgramUniform1i}, + {"glProgramUniform1iv", NULL, &weglProgramUniform1iv}, + {"glProgramUniform1f", NULL, &weglProgramUniform1f}, + {"glProgramUniform1fv", NULL, &weglProgramUniform1fv}, + {"glProgramUniform1d", NULL, &weglProgramUniform1d}, + {"glProgramUniform1dv", NULL, &weglProgramUniform1dv}, + {"glProgramUniform1ui", NULL, &weglProgramUniform1ui}, + {"glProgramUniform1uiv", NULL, &weglProgramUniform1uiv}, + {"glProgramUniform2i", NULL, &weglProgramUniform2i}, + {"glProgramUniform2iv", NULL, &weglProgramUniform2iv}, + {"glProgramUniform2f", NULL, &weglProgramUniform2f}, + {"glProgramUniform2fv", NULL, &weglProgramUniform2fv}, + {"glProgramUniform2d", NULL, &weglProgramUniform2d}, + {"glProgramUniform2dv", NULL, &weglProgramUniform2dv}, + {"glProgramUniform2ui", NULL, &weglProgramUniform2ui}, + {"glProgramUniform2uiv", NULL, &weglProgramUniform2uiv}, + {"glProgramUniform3i", NULL, &weglProgramUniform3i}, + {"glProgramUniform3iv", NULL, &weglProgramUniform3iv}, + {"glProgramUniform3f", NULL, &weglProgramUniform3f}, + {"glProgramUniform3fv", NULL, &weglProgramUniform3fv}, + {"glProgramUniform3d", NULL, &weglProgramUniform3d}, + {"glProgramUniform3dv", NULL, &weglProgramUniform3dv}, + {"glProgramUniform3ui", NULL, &weglProgramUniform3ui}, + {"glProgramUniform3uiv", NULL, &weglProgramUniform3uiv}, + {"glProgramUniform4i", NULL, &weglProgramUniform4i}, + {"glProgramUniform4iv", NULL, &weglProgramUniform4iv}, + {"glProgramUniform4f", NULL, &weglProgramUniform4f}, + {"glProgramUniform4fv", NULL, &weglProgramUniform4fv}, + {"glProgramUniform4d", NULL, &weglProgramUniform4d}, + {"glProgramUniform4dv", NULL, &weglProgramUniform4dv}, + {"glProgramUniform4ui", NULL, &weglProgramUniform4ui}, + {"glProgramUniform4uiv", NULL, &weglProgramUniform4uiv}, + {"glProgramUniformMatrix2fv", NULL, &weglProgramUniformMatrix2fv}, + {"glProgramUniformMatrix3fv", NULL, &weglProgramUniformMatrix3fv}, + {"glProgramUniformMatrix4fv", NULL, &weglProgramUniformMatrix4fv}, + {"glProgramUniformMatrix2dv", NULL, &weglProgramUniformMatrix2dv}, + {"glProgramUniformMatrix3dv", NULL, &weglProgramUniformMatrix3dv}, + {"glProgramUniformMatrix4dv", NULL, &weglProgramUniformMatrix4dv}, + {"glProgramUniformMatrix2x3fv", NULL, &weglProgramUniformMatrix2x3fv}, + {"glProgramUniformMatrix3x2fv", NULL, &weglProgramUniformMatrix3x2fv}, + {"glProgramUniformMatrix2x4fv", NULL, &weglProgramUniformMatrix2x4fv}, + {"glProgramUniformMatrix4x2fv", NULL, &weglProgramUniformMatrix4x2fv}, + {"glProgramUniformMatrix3x4fv", NULL, &weglProgramUniformMatrix3x4fv}, + {"glProgramUniformMatrix4x3fv", NULL, &weglProgramUniformMatrix4x3fv}, + {"glProgramUniformMatrix2x3dv", NULL, &weglProgramUniformMatrix2x3dv}, + {"glProgramUniformMatrix3x2dv", NULL, &weglProgramUniformMatrix3x2dv}, + {"glProgramUniformMatrix2x4dv", NULL, &weglProgramUniformMatrix2x4dv}, + {"glProgramUniformMatrix4x2dv", NULL, &weglProgramUniformMatrix4x2dv}, + {"glProgramUniformMatrix3x4dv", NULL, &weglProgramUniformMatrix3x4dv}, + {"glProgramUniformMatrix4x3dv", NULL, &weglProgramUniformMatrix4x3dv}, + {"glValidateProgramPipeline", NULL, &weglValidateProgramPipeline}, + {"glGetProgramPipelineInfoLog", NULL, &weglGetProgramPipelineInfoLog}, + {"glVertexAttribL1dv", NULL, &weglVertexAttribL1dv}, + {"glVertexAttribL2dv", NULL, &weglVertexAttribL2dv}, + {"glVertexAttribL3dv", NULL, &weglVertexAttribL3dv}, + {"glVertexAttribL4dv", NULL, &weglVertexAttribL4dv}, + {"glVertexAttribLPointer", NULL, &weglVertexAttribLPointer}, + {"glGetVertexAttribLdv", NULL, &weglGetVertexAttribLdv}, + {"glViewportArrayv", NULL, &weglViewportArrayv}, + {"glViewportIndexedf", NULL, &weglViewportIndexedf}, + {"glViewportIndexedfv", NULL, &weglViewportIndexedfv}, + {"glScissorArrayv", NULL, &weglScissorArrayv}, + {"glScissorIndexed", NULL, &weglScissorIndexed}, + {"glScissorIndexedv", NULL, &weglScissorIndexedv}, + {"glDepthRangeArrayv", NULL, &weglDepthRangeArrayv}, + {"glDepthRangeIndexed", NULL, &weglDepthRangeIndexed}, + {"glGetFloati_v", NULL, &weglGetFloati_v}, + {"glGetDoublei_v", NULL, &weglGetDoublei_v}, + {"glDebugMessageControlARB", NULL, &weglDebugMessageControlARB}, + {"glDebugMessageInsertARB", NULL, &weglDebugMessageInsertARB}, + {"glGetDebugMessageLogARB", NULL, &weglGetDebugMessageLogARB}, + {"glGetGraphicsResetStatusARB", NULL, &weglGetGraphicsResetStatusARB}, {"glResizeBuffersMESA", NULL, &weglResizeBuffersMESA}, {"glWindowPos4dvMESA", NULL, &weglWindowPos4dvMESA}, {"glWindowPos4fvMESA", NULL, &weglWindowPos4fvMESA}, diff --git a/lib/wx/c_src/gen/gl_funcs.cpp b/lib/wx/c_src/gen/gl_funcs.cpp index de73ccf555..ea82635846 100644 --- a/lib/wx/c_src/gen/gl_funcs.cpp +++ b/lib/wx/c_src/gen/gl_funcs.cpp @@ -24,7 +24,7 @@ #include "gl_fdefs.h" int gl_error_op; -void egl_dispatch(int op, char *bp, ErlDrvPort port, ErlDrvTermData caller, char *bins[]){ +void egl_dispatch(int op, char *bp, ErlDrvPort port, ErlDrvTermData caller, char *bins[], int bins_sz[]){ gl_error_op = op; switch(op) { @@ -131,10 +131,10 @@ case 5015: { // gluBuild3DMipmaps driver_send_term(port,caller,rt,AP); }; break; case 5016: { // gluCheckExtension - int * extNameLen = (int *) bp; bp += 4; - GLubyte * extName = (GLubyte *) bp; bp += (8-((*extNameLen*1+4)%8))%8; - int * extStringLen = (int *) bp; bp += 4; - GLubyte * extString = (GLubyte *) bp; bp += (8-((*extStringLen*1+4)%8))%8; + GLubyte *extName = (GLubyte *) bp; + int extNameLen[1] = {strlen((char *)extName)}; bp += extNameLen[0]+1+((8-((1+extNameLen[0]+0)%8))%8); + GLubyte *extString = (GLubyte *) bp; + int extStringLen[1] = {strlen((char *)extString)}; bp += extStringLen[0]+1+((8-((1+extStringLen[0]+0)%8))%8); GLboolean result = wegluCheckExtension(extName,extString); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -1077,16 +1077,14 @@ case 5135: { // glGetPixelMapusv driver_send_term(port,caller,rt,AP); }; break; case 5136: { // glGetPolygonStipple - GLubyte mask[128]; - weglGetPolygonStipple(mask); + 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_"); - ErlDrvBinary * BinCopy = driver_alloc_binary(128); - memcpy(BinCopy->orig_bytes, mask, 128); - rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) BinCopy; rt[AP++] = 128; rt[AP++] = 0; + 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(BinCopy); + driver_free_binary(mask); }; break; case 5137: { // glGetString GLenum *name = (GLenum *) bp; bp += 4; @@ -3227,11 +3225,11 @@ case 5442: { // glStencilOpSeparate weglStencilOpSeparate(*face,*sfail,*dpfail,*dppass); }; break; case 5443: { // glStencilFuncSeparate - GLenum *frontfunc = (GLenum *) bp; bp += 4; - GLenum *backfunc = (GLenum *) bp; bp += 4; + GLenum *face = (GLenum *) bp; bp += 4; + GLenum *func = (GLenum *) bp; bp += 4; GLint *ref = (GLint *) bp; bp += 4; GLuint *mask = (GLuint *) bp; bp += 4; - weglStencilFuncSeparate(*frontfunc,*backfunc,*ref,*mask); + weglStencilFuncSeparate(*face,*func,*ref,*mask); }; break; case 5444: { // glStencilMaskSeparate GLenum *face = (GLenum *) bp; bp += 4; @@ -3247,7 +3245,7 @@ case 5446: { // glBindAttribLocation GLuint *program = (GLuint *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); weglBindAttribLocation(*program,*index,name); }; break; case 5447: { // glCompileShader @@ -3353,7 +3351,7 @@ case 5457: { // glGetAttachedShaders case 5458: { // glGetAttribLocation GLuint *program = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); GLint result = weglGetAttribLocation(*program,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -3428,7 +3426,7 @@ case 5463: { // glGetShaderSource case 5464: { // glGetUniformLocation GLuint *program = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); GLint result = weglGetUniformLocation(*program,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4095,7 +4093,67 @@ case 5544: { // glGetVertexAttribIuiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5545: { // glGetUniformuiv +case 5545: { // glVertexAttribI1iv + GLuint *index = (GLuint *) bp; bp += 4; + GLint *v = (GLint *) bp; bp += 4; + weglVertexAttribI1iv(*index,v); +}; break; +case 5546: { // glVertexAttribI2iv + GLuint *index = (GLuint *) bp; bp += 4; + GLint *v = (GLint *) bp; bp += 4; + weglVertexAttribI2iv(*index,v); +}; break; +case 5547: { // glVertexAttribI3iv + GLuint *index = (GLuint *) bp; bp += 4; + GLint *v = (GLint *) bp; bp += 4; + weglVertexAttribI3iv(*index,v); +}; break; +case 5548: { // glVertexAttribI4iv + GLuint *index = (GLuint *) bp; bp += 4; + GLint * v = (GLint *) bp; bp += 16; + weglVertexAttribI4iv(*index,v); +}; break; +case 5549: { // glVertexAttribI1uiv + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *v = (GLuint *) bp; bp += 4; + weglVertexAttribI1uiv(*index,v); +}; break; +case 5550: { // glVertexAttribI2uiv + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *v = (GLuint *) bp; bp += 4; + weglVertexAttribI2uiv(*index,v); +}; break; +case 5551: { // glVertexAttribI3uiv + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *v = (GLuint *) bp; bp += 4; + weglVertexAttribI3uiv(*index,v); +}; break; +case 5552: { // glVertexAttribI4uiv + GLuint *index = (GLuint *) bp; bp += 4; + GLuint * v = (GLuint *) bp; bp += 16; + weglVertexAttribI4uiv(*index,v); +}; break; +case 5553: { // glVertexAttribI4bv + GLuint *index = (GLuint *) bp; bp += 4; + GLbyte * v = (GLbyte *) bp; bp += 4; + weglVertexAttribI4bv(*index,v); +}; break; +case 5554: { // glVertexAttribI4sv + GLuint *index = (GLuint *) bp; bp += 4; + GLshort * v = (GLshort *) bp; bp += 8; + weglVertexAttribI4sv(*index,v); +}; break; +case 5555: { // glVertexAttribI4ubv + GLuint *index = (GLuint *) bp; bp += 4; + GLubyte * v = (GLubyte *) bp; bp += 4; + weglVertexAttribI4ubv(*index,v); +}; break; +case 5556: { // glVertexAttribI4usv + GLuint *index = (GLuint *) bp; bp += 4; + GLushort * v = (GLushort *) bp; bp += 8; + weglVertexAttribI4usv(*index,v); +}; break; +case 5557: { // glGetUniformuiv GLuint *program = (GLuint *) bp; bp += 4; GLint *location = (GLint *) bp; bp += 4; GLuint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; @@ -4123,17 +4181,17 @@ case 5545: { // glGetUniformuiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5546: { // glBindFragDataLocation +case 5558: { // glBindFragDataLocation GLuint *program = (GLuint *) bp; bp += 4; GLuint *color = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); weglBindFragDataLocation(*program,*color,name); }; break; -case 5547: { // glGetFragDataLocation +case 5559: { // glGetFragDataLocation GLuint *program = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); GLint result = weglGetFragDataLocation(*program,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4141,25 +4199,25 @@ case 5547: { // glGetFragDataLocation rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5548: { // glUniform1ui +case 5560: { // glUniform1ui GLint *location = (GLint *) bp; bp += 4; GLuint *v0 = (GLuint *) bp; bp += 4; weglUniform1ui(*location,*v0); }; break; -case 5549: { // glUniform2ui +case 5561: { // glUniform2ui GLint *location = (GLint *) bp; bp += 4; GLuint *v0 = (GLuint *) bp; bp += 4; GLuint *v1 = (GLuint *) bp; bp += 4; weglUniform2ui(*location,*v0,*v1); }; break; -case 5550: { // glUniform3ui +case 5562: { // glUniform3ui GLint *location = (GLint *) bp; bp += 4; GLuint *v0 = (GLuint *) bp; bp += 4; GLuint *v1 = (GLuint *) bp; bp += 4; GLuint *v2 = (GLuint *) bp; bp += 4; weglUniform3ui(*location,*v0,*v1,*v2); }; break; -case 5551: { // glUniform4ui +case 5563: { // glUniform4ui GLint *location = (GLint *) bp; bp += 4; GLuint *v0 = (GLuint *) bp; bp += 4; GLuint *v1 = (GLuint *) bp; bp += 4; @@ -4167,45 +4225,45 @@ case 5551: { // glUniform4ui GLuint *v3 = (GLuint *) bp; bp += 4; weglUniform4ui(*location,*v0,*v1,*v2,*v3); }; break; -case 5552: { // glUniform1uiv +case 5564: { // glUniform1uiv GLint *location = (GLint *) bp; bp += 4; int * valueLen = (int *) bp; bp += 4; GLuint * value = (GLuint *) bp; bp += (8-((*valueLen*4+0)%8))%8; weglUniform1uiv(*location,*valueLen,value); }; break; -case 5553: { // glUniform2uiv +case 5565: { // glUniform2uiv GLint *location = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLuint * value = (GLuint *) bp; bp += *valueLen*8; weglUniform2uiv(*location,*valueLen,value); }; break; -case 5554: { // glUniform3uiv +case 5566: { // glUniform3uiv GLint *location = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLuint * value = (GLuint *) bp; bp += *valueLen*12; weglUniform3uiv(*location,*valueLen,value); }; break; -case 5555: { // glUniform4uiv +case 5567: { // glUniform4uiv GLint *location = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLuint * value = (GLuint *) bp; bp += *valueLen*16; weglUniform4uiv(*location,*valueLen,value); }; break; -case 5556: { // glTexParameterIiv +case 5568: { // glTexParameterIiv 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; weglTexParameterIiv(*target,*pname,params); }; break; -case 5557: { // glTexParameterIuiv +case 5569: { // glTexParameterIuiv GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; int *paramsLen = (int *) bp; bp += 4; GLuint *params = (GLuint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; weglTexParameterIuiv(*target,*pname,params); }; break; -case 5558: { // glGetTexParameterIiv +case 5570: { // glGetTexParameterIiv GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; GLint params[4] = {0,0,0,0}; @@ -4221,7 +4279,7 @@ case 5558: { // glGetTexParameterIiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5559: { // glGetTexParameterIuiv +case 5571: { // glGetTexParameterIuiv GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; GLuint params[4] = {0,0,0,0}; @@ -4237,35 +4295,35 @@ case 5559: { // glGetTexParameterIuiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5560: { // glClearBufferiv +case 5572: { // glClearBufferiv GLenum *buffer = (GLenum *) bp; bp += 4; GLint *drawbuffer = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLint *value = (GLint *) bp; bp += *valueLen*4+((*valueLen)+1)%2*4; weglClearBufferiv(*buffer,*drawbuffer,value); }; break; -case 5561: { // glClearBufferuiv +case 5573: { // glClearBufferuiv GLenum *buffer = (GLenum *) bp; bp += 4; GLint *drawbuffer = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLuint *value = (GLuint *) bp; bp += *valueLen*4+((*valueLen)+1)%2*4; weglClearBufferuiv(*buffer,*drawbuffer,value); }; break; -case 5562: { // glClearBufferfv +case 5574: { // glClearBufferfv GLenum *buffer = (GLenum *) bp; bp += 4; GLint *drawbuffer = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLfloat *value = (GLfloat *) bp; bp += *valueLen*4+((*valueLen)+1)%2*4; weglClearBufferfv(*buffer,*drawbuffer,value); }; break; -case 5563: { // glClearBufferfi +case 5575: { // glClearBufferfi GLenum *buffer = (GLenum *) bp; bp += 4; GLint *drawbuffer = (GLint *) bp; bp += 4; GLfloat *depth = (GLfloat *) bp; bp += 4; GLint *stencil = (GLint *) bp; bp += 4; weglClearBufferfi(*buffer,*drawbuffer,*depth,*stencil); }; break; -case 5564: { // glGetStringi +case 5576: { // glGetStringi GLenum *name = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; const GLubyte * result = weglGetStringi(*name,*index); @@ -4275,66 +4333,6 @@ case 5564: { // glGetStringi rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5565: { // glVertexAttribI1iv - GLuint *index = (GLuint *) bp; bp += 4; - GLint *v = (GLint *) bp; bp += 4; - weglVertexAttribI1iv(*index,v); -}; break; -case 5566: { // glVertexAttribI2iv - GLuint *index = (GLuint *) bp; bp += 4; - GLint *v = (GLint *) bp; bp += 4; - weglVertexAttribI2iv(*index,v); -}; break; -case 5567: { // glVertexAttribI3iv - GLuint *index = (GLuint *) bp; bp += 4; - GLint *v = (GLint *) bp; bp += 4; - weglVertexAttribI3iv(*index,v); -}; break; -case 5568: { // glVertexAttribI4iv - GLuint *index = (GLuint *) bp; bp += 4; - GLint * v = (GLint *) bp; bp += 16; - weglVertexAttribI4iv(*index,v); -}; break; -case 5569: { // glVertexAttribI1uiv - GLuint *index = (GLuint *) bp; bp += 4; - GLuint *v = (GLuint *) bp; bp += 4; - weglVertexAttribI1uiv(*index,v); -}; break; -case 5570: { // glVertexAttribI2uiv - GLuint *index = (GLuint *) bp; bp += 4; - GLuint *v = (GLuint *) bp; bp += 4; - weglVertexAttribI2uiv(*index,v); -}; break; -case 5571: { // glVertexAttribI3uiv - GLuint *index = (GLuint *) bp; bp += 4; - GLuint *v = (GLuint *) bp; bp += 4; - weglVertexAttribI3uiv(*index,v); -}; break; -case 5572: { // glVertexAttribI4uiv - GLuint *index = (GLuint *) bp; bp += 4; - GLuint * v = (GLuint *) bp; bp += 16; - weglVertexAttribI4uiv(*index,v); -}; break; -case 5573: { // glVertexAttribI4bv - GLuint *index = (GLuint *) bp; bp += 4; - GLbyte * v = (GLbyte *) bp; bp += 4; - weglVertexAttribI4bv(*index,v); -}; break; -case 5574: { // glVertexAttribI4sv - GLuint *index = (GLuint *) bp; bp += 4; - GLshort * v = (GLshort *) bp; bp += 8; - weglVertexAttribI4sv(*index,v); -}; break; -case 5575: { // glVertexAttribI4ubv - GLuint *index = (GLuint *) bp; bp += 4; - GLubyte * v = (GLubyte *) bp; bp += 4; - weglVertexAttribI4ubv(*index,v); -}; break; -case 5576: { // glVertexAttribI4usv - GLuint *index = (GLuint *) bp; bp += 4; - GLushort * v = (GLushort *) bp; bp += 8; - weglVertexAttribI4usv(*index,v); -}; break; case 5577: { // glDrawArraysInstanced GLenum *mode = (GLenum *) bp; bp += 4; GLint *first = (GLint *) bp; bp += 4; @@ -4368,103 +4366,200 @@ case 5581: { // glPrimitiveRestartIndex GLuint *index = (GLuint *) bp; bp += 4; weglPrimitiveRestartIndex(*index); }; break; -case 5582: { // glLoadTransposeMatrixfARB +case 5582: { // glGetInteger64i_v + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLint64 data[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + weglGetInteger64i_v(*target,*index,data); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint64 *dataTmp = data; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5583: { // glGetBufferParameteri64v + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint64 params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + weglGetBufferParameteri64v(*target,*pname,params); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint64 *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_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_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_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_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5584: { // glFramebufferTexture + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *attachment = (GLenum *) bp; bp += 4; + GLuint *texture = (GLuint *) bp; bp += 4; + GLint *level = (GLint *) bp; bp += 4; + weglFramebufferTexture(*target,*attachment,*texture,*level); +}; break; +case 5585: { // glVertexAttribDivisor + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *divisor = (GLuint *) bp; bp += 4; + weglVertexAttribDivisor(*index,*divisor); +}; break; +case 5586: { // glMinSampleShading + GLclampf *value = (GLclampf *) bp; bp += 4; + weglMinSampleShading(*value); +}; break; +case 5587: { // glBlendEquationi + GLuint *buf = (GLuint *) bp; bp += 4; + GLenum *mode = (GLenum *) bp; bp += 4; + weglBlendEquationi(*buf,*mode); +}; break; +case 5588: { // glBlendEquationSeparatei + GLuint *buf = (GLuint *) bp; bp += 4; + GLenum *modeRGB = (GLenum *) bp; bp += 4; + GLenum *modeAlpha = (GLenum *) bp; bp += 4; + weglBlendEquationSeparatei(*buf,*modeRGB,*modeAlpha); +}; break; +case 5589: { // glBlendFunci + GLuint *buf = (GLuint *) bp; bp += 4; + GLenum *src = (GLenum *) bp; bp += 4; + GLenum *dst = (GLenum *) bp; bp += 4; + weglBlendFunci(*buf,*src,*dst); +}; break; +case 5590: { // glBlendFuncSeparatei + GLuint *buf = (GLuint *) bp; bp += 4; + GLenum *srcRGB = (GLenum *) bp; bp += 4; + GLenum *dstRGB = (GLenum *) bp; bp += 4; + GLenum *srcAlpha = (GLenum *) bp; bp += 4; + GLenum *dstAlpha = (GLenum *) bp; bp += 4; + weglBlendFuncSeparatei(*buf,*srcRGB,*dstRGB,*srcAlpha,*dstAlpha); +}; break; +case 5591: { // glLoadTransposeMatrixfARB GLfloat * m = (GLfloat *) bp; bp += 64; weglLoadTransposeMatrixfARB(m); }; break; -case 5583: { // glLoadTransposeMatrixdARB +case 5592: { // glLoadTransposeMatrixdARB GLdouble * m = (GLdouble *) bp; bp += 128; weglLoadTransposeMatrixdARB(m); }; break; -case 5584: { // glMultTransposeMatrixfARB +case 5593: { // glMultTransposeMatrixfARB GLfloat * m = (GLfloat *) bp; bp += 64; weglMultTransposeMatrixfARB(m); }; break; -case 5585: { // glMultTransposeMatrixdARB +case 5594: { // glMultTransposeMatrixdARB GLdouble * m = (GLdouble *) bp; bp += 128; weglMultTransposeMatrixdARB(m); }; break; -case 5586: { // glWeightbvARB +case 5595: { // glWeightbvARB int * weightsLen = (int *) bp; bp += 4; GLbyte * weights = (GLbyte *) bp; bp += (8-((*weightsLen*1+4)%8))%8; weglWeightbvARB(*weightsLen,weights); }; break; -case 5587: { // glWeightsvARB +case 5596: { // glWeightsvARB int * weightsLen = (int *) bp; bp += 4; GLshort * weights = (GLshort *) bp; bp += (8-((*weightsLen*2+4)%8))%8; weglWeightsvARB(*weightsLen,weights); }; break; -case 5588: { // glWeightivARB +case 5597: { // glWeightivARB int * weightsLen = (int *) bp; bp += 4; GLint * weights = (GLint *) bp; bp += (8-((*weightsLen*4+4)%8))%8; weglWeightivARB(*weightsLen,weights); }; break; -case 5589: { // glWeightfvARB +case 5598: { // glWeightfvARB int * weightsLen = (int *) bp; bp += 4; GLfloat * weights = (GLfloat *) bp; bp += (8-((*weightsLen*4+4)%8))%8; weglWeightfvARB(*weightsLen,weights); }; break; -case 5590: { // glWeightdvARB +case 5599: { // glWeightdvARB int * weightsLen = (int *) bp; bp += 8; GLdouble * weights = (GLdouble *) bp; bp += (8-((*weightsLen*8+0)%8))%8; weglWeightdvARB(*weightsLen,weights); }; break; -case 5591: { // glWeightubvARB +case 5600: { // glWeightubvARB int * weightsLen = (int *) bp; bp += 4; GLubyte * weights = (GLubyte *) bp; bp += (8-((*weightsLen*1+4)%8))%8; weglWeightubvARB(*weightsLen,weights); }; break; -case 5592: { // glWeightusvARB +case 5601: { // glWeightusvARB int * weightsLen = (int *) bp; bp += 4; GLushort * weights = (GLushort *) bp; bp += (8-((*weightsLen*2+4)%8))%8; weglWeightusvARB(*weightsLen,weights); }; break; -case 5593: { // glWeightuivARB +case 5602: { // glWeightuivARB int * weightsLen = (int *) bp; bp += 4; GLuint * weights = (GLuint *) bp; bp += (8-((*weightsLen*4+4)%8))%8; weglWeightuivARB(*weightsLen,weights); }; break; -case 5594: { // glVertexBlendARB +case 5603: { // glVertexBlendARB GLint *count = (GLint *) bp; bp += 4; weglVertexBlendARB(*count); }; break; -case 5595: { // glCurrentPaletteMatrixARB +case 5604: { // glCurrentPaletteMatrixARB GLint *index = (GLint *) bp; bp += 4; weglCurrentPaletteMatrixARB(*index); }; break; -case 5596: { // glMatrixIndexubvARB +case 5605: { // glMatrixIndexubvARB int * indicesLen = (int *) bp; bp += 4; GLubyte * indices = (GLubyte *) bp; bp += (8-((*indicesLen*1+4)%8))%8; weglMatrixIndexubvARB(*indicesLen,indices); }; break; -case 5597: { // glMatrixIndexusvARB +case 5606: { // glMatrixIndexusvARB int * indicesLen = (int *) bp; bp += 4; GLushort * indices = (GLushort *) bp; bp += (8-((*indicesLen*2+4)%8))%8; weglMatrixIndexusvARB(*indicesLen,indices); }; break; -case 5598: { // glMatrixIndexuivARB +case 5607: { // glMatrixIndexuivARB int * indicesLen = (int *) bp; bp += 4; GLuint * indices = (GLuint *) bp; bp += (8-((*indicesLen*4+4)%8))%8; weglMatrixIndexuivARB(*indicesLen,indices); }; break; -case 5599: { // glProgramStringARB +case 5608: { // glProgramStringARB GLenum *target = (GLenum *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLvoid *string = (GLvoid *) bp; - int stringLen = strlen((char *)string); bp += stringLen+1+((8-((1+stringLen+0)%8))%8); - weglProgramStringARB(*target,*format,stringLen,string); + int stringLen[1] = {strlen((char *)string)}; bp += stringLen[0]+1+((8-((1+stringLen[0]+0)%8))%8); + weglProgramStringARB(*target,*format,*stringLen,string); }; break; -case 5600: { // glBindProgramARB +case 5609: { // glBindProgramARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *program = (GLuint *) bp; bp += 4; weglBindProgramARB(*target,*program); }; break; -case 5601: { // glDeleteProgramsARB +case 5610: { // glDeleteProgramsARB int * programsLen = (int *) bp; bp += 4; GLuint * programs = (GLuint *) bp; bp += (8-((*programsLen*4+4)%8))%8; weglDeleteProgramsARB(*programsLen,programs); }; break; -case 5602: { // glGenProgramsARB +case 5611: { // glGenProgramsARB GLsizei *n = (GLsizei *) bp; bp += 4; GLuint *programs; programs = (GLuint *) driver_alloc(sizeof(GLuint) * *n); @@ -4480,7 +4575,7 @@ case 5602: { // glGenProgramsARB driver_free(rt); driver_free(programs); }; break; -case 5603: { // glProgramEnvParameter4dARB +case 5612: { // glProgramEnvParameter4dARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble *x = (GLdouble *) bp; bp += 8; @@ -4489,13 +4584,13 @@ case 5603: { // glProgramEnvParameter4dARB GLdouble *w = (GLdouble *) bp; bp += 8; weglProgramEnvParameter4dARB(*target,*index,*x,*y,*z,*w); }; break; -case 5604: { // glProgramEnvParameter4dvARB +case 5613: { // glProgramEnvParameter4dvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble * params = (GLdouble *) bp; bp += 32; weglProgramEnvParameter4dvARB(*target,*index,params); }; break; -case 5605: { // glProgramEnvParameter4fARB +case 5614: { // glProgramEnvParameter4fARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat *x = (GLfloat *) bp; bp += 4; @@ -4504,13 +4599,13 @@ case 5605: { // glProgramEnvParameter4fARB GLfloat *w = (GLfloat *) bp; bp += 4; weglProgramEnvParameter4fARB(*target,*index,*x,*y,*z,*w); }; break; -case 5606: { // glProgramEnvParameter4fvARB +case 5615: { // glProgramEnvParameter4fvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat * params = (GLfloat *) bp; bp += 16; weglProgramEnvParameter4fvARB(*target,*index,params); }; break; -case 5607: { // glProgramLocalParameter4dARB +case 5616: { // glProgramLocalParameter4dARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble *x = (GLdouble *) bp; bp += 8; @@ -4519,13 +4614,13 @@ case 5607: { // glProgramLocalParameter4dARB GLdouble *w = (GLdouble *) bp; bp += 8; weglProgramLocalParameter4dARB(*target,*index,*x,*y,*z,*w); }; break; -case 5608: { // glProgramLocalParameter4dvARB +case 5617: { // glProgramLocalParameter4dvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble * params = (GLdouble *) bp; bp += 32; weglProgramLocalParameter4dvARB(*target,*index,params); }; break; -case 5609: { // glProgramLocalParameter4fARB +case 5618: { // glProgramLocalParameter4fARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat *x = (GLfloat *) bp; bp += 4; @@ -4534,13 +4629,13 @@ case 5609: { // glProgramLocalParameter4fARB GLfloat *w = (GLfloat *) bp; bp += 4; weglProgramLocalParameter4fARB(*target,*index,*x,*y,*z,*w); }; break; -case 5610: { // glProgramLocalParameter4fvARB +case 5619: { // glProgramLocalParameter4fvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat * params = (GLfloat *) bp; bp += 16; weglProgramLocalParameter4fvARB(*target,*index,params); }; break; -case 5611: { // glGetProgramEnvParameterdvARB +case 5620: { // glGetProgramEnvParameterdvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble params[4] = {0.0,0.0,0.0,0.0}; @@ -4556,7 +4651,7 @@ case 5611: { // glGetProgramEnvParameterdvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5612: { // glGetProgramEnvParameterfvARB +case 5621: { // glGetProgramEnvParameterfvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat params[4] = {0.0,0.0,0.0,0.0}; @@ -4573,7 +4668,7 @@ case 5612: { // glGetProgramEnvParameterfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5613: { // glGetProgramLocalParameterdvARB +case 5622: { // glGetProgramLocalParameterdvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble params[4] = {0.0,0.0,0.0,0.0}; @@ -4589,7 +4684,7 @@ case 5613: { // glGetProgramLocalParameterdvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5614: { // glGetProgramLocalParameterfvARB +case 5623: { // glGetProgramLocalParameterfvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat params[4] = {0.0,0.0,0.0,0.0}; @@ -4606,7 +4701,7 @@ case 5614: { // glGetProgramLocalParameterfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5615: { // glGetProgramStringARB +case 5624: { // glGetProgramStringARB GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; GLvoid *string = (GLvoid *) bins[0]; @@ -4617,11 +4712,39 @@ case 5615: { // glGetProgramStringARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5616: { // glDeleteObjectARB +case 5625: { // glGetBufferParameterivARB + GLenum *target = (GLenum *) bp; bp += 4; + 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}; + weglGetBufferParameterivARB(*target,*pname,params); + int AP = 0; ErlDrvTermData rt[39]; + 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_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_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_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_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5626: { // glDeleteObjectARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglDeleteObjectARB(obj); }; break; -case 5617: { // glGetHandleARB +case 5627: { // glGetHandleARB GLenum *pname = (GLenum *) bp; bp += 4; GLhandleARB result = weglGetHandleARB(*pname); int AP = 0; ErlDrvTermData rt[6]; @@ -4630,12 +4753,12 @@ case 5617: { // glGetHandleARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5618: { // glDetachObjectARB +case 5628: { // glDetachObjectARB GLhandleARB containerObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLhandleARB attachedObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglDetachObjectARB(containerObj,attachedObj); }; break; -case 5619: { // glCreateShaderObjectARB +case 5629: { // glCreateShaderObjectARB GLenum *shaderType = (GLenum *) bp; bp += 4; GLhandleARB result = weglCreateShaderObjectARB(*shaderType); int AP = 0; ErlDrvTermData rt[6]; @@ -4644,7 +4767,7 @@ case 5619: { // glCreateShaderObjectARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5620: { // glShaderSourceARB +case 5630: { // glShaderSourceARB GLhandleARB shaderObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; int * stringLen = (int *) bp; bp += 4; int * stringTotSize = (int *) bp; bp += 4; @@ -4656,11 +4779,11 @@ case 5620: { // glShaderSourceARB weglShaderSourceARB(shaderObj,*stringLen,(const GLchar **) string,NULL); driver_free(string); }; break; -case 5621: { // glCompileShaderARB +case 5631: { // glCompileShaderARB GLhandleARB shaderObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglCompileShaderARB(shaderObj); }; break; -case 5622: { // glCreateProgramObjectARB +case 5632: { // glCreateProgramObjectARB GLhandleARB result = weglCreateProgramObjectARB(); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4668,24 +4791,24 @@ case 5622: { // glCreateProgramObjectARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5623: { // glAttachObjectARB +case 5633: { // glAttachObjectARB GLhandleARB containerObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglAttachObjectARB(containerObj,obj); }; break; -case 5624: { // glLinkProgramARB +case 5634: { // glLinkProgramARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglLinkProgramARB(programObj); }; break; -case 5625: { // glUseProgramObjectARB +case 5635: { // glUseProgramObjectARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglUseProgramObjectARB(programObj); }; break; -case 5626: { // glValidateProgramARB +case 5636: { // glValidateProgramARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglValidateProgramARB(programObj); }; break; -case 5627: { // glGetObjectParameterfvARB +case 5637: { // glGetObjectParameterfvARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLenum *pname = (GLenum *) bp; bp += 4; GLfloat params[1] = {0.0}; @@ -4697,7 +4820,7 @@ case 5627: { // glGetObjectParameterfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5628: { // glGetObjectParameterivARB +case 5638: { // glGetObjectParameterivARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLenum *pname = (GLenum *) bp; bp += 4; GLint params[1] = {0}; @@ -4708,7 +4831,7 @@ case 5628: { // glGetObjectParameterivARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5629: { // glGetInfoLogARB +case 5639: { // glGetInfoLogARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLsizei *maxLength = (GLsizei *) bp; bp += 4; GLsizei length[1] = {0}; @@ -4722,7 +4845,7 @@ case 5629: { // glGetInfoLogARB driver_send_term(port,caller,rt,AP); driver_free(infoLog); }; break; -case 5630: { // glGetAttachedObjectsARB +case 5640: { // glGetAttachedObjectsARB GLhandleARB containerObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLsizei *maxCount = (GLsizei *) bp; bp += 4; GLsizei count[1] = {0}; @@ -4740,10 +4863,10 @@ case 5630: { // glGetAttachedObjectsARB driver_free(rt); driver_free(obj); }; break; -case 5631: { // glGetUniformLocationARB +case 5641: { // glGetUniformLocationARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); GLint result = weglGetUniformLocationARB(programObj,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4751,7 +4874,7 @@ case 5631: { // glGetUniformLocationARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5632: { // glGetActiveUniformARB +case 5642: { // glGetActiveUniformARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLuint *index = (GLuint *) bp; bp += 4; GLsizei *maxLength = (GLsizei *) bp; bp += 4; @@ -4771,7 +4894,7 @@ case 5632: { // glGetActiveUniformARB driver_send_term(port,caller,rt,AP); driver_free(name); }; break; -case 5633: { // glGetUniformfvARB +case 5643: { // glGetUniformfvARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLint *location = (GLint *) 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}; @@ -4800,7 +4923,7 @@ case 5633: { // glGetUniformfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5634: { // glGetUniformivARB +case 5644: { // glGetUniformivARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLint *location = (GLint *) bp; bp += 4; GLint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; @@ -4828,7 +4951,7 @@ case 5634: { // glGetUniformivARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5635: { // glGetShaderSourceARB +case 5645: { // glGetShaderSourceARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLsizei *maxLength = (GLsizei *) bp; bp += 4; GLsizei length[1] = {0}; @@ -4842,14 +4965,14 @@ case 5635: { // glGetShaderSourceARB driver_send_term(port,caller,rt,AP); driver_free(source); }; break; -case 5636: { // glBindAttribLocationARB +case 5646: { // glBindAttribLocationARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLuint *index = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); weglBindAttribLocationARB(programObj,*index,name); }; break; -case 5637: { // glGetActiveAttribARB +case 5647: { // glGetActiveAttribARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLuint *index = (GLuint *) bp; bp += 4; GLsizei *maxLength = (GLsizei *) bp; bp += 4; @@ -4869,10 +4992,10 @@ case 5637: { // glGetActiveAttribARB driver_send_term(port,caller,rt,AP); driver_free(name); }; break; -case 5638: { // glGetAttribLocationARB +case 5648: { // glGetAttribLocationARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); GLint result = weglGetAttribLocationARB(programObj,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4880,7 +5003,7 @@ case 5638: { // glGetAttribLocationARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5639: { // glIsRenderbuffer +case 5649: { // glIsRenderbuffer GLuint *renderbuffer = (GLuint *) bp; bp += 4; GLboolean result = weglIsRenderbuffer(*renderbuffer); int AP = 0; ErlDrvTermData rt[6]; @@ -4889,17 +5012,17 @@ case 5639: { // glIsRenderbuffer rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5640: { // glBindRenderbuffer +case 5650: { // glBindRenderbuffer GLenum *target = (GLenum *) bp; bp += 4; GLuint *renderbuffer = (GLuint *) bp; bp += 4; weglBindRenderbuffer(*target,*renderbuffer); }; break; -case 5641: { // glDeleteRenderbuffers +case 5651: { // glDeleteRenderbuffers int * renderbuffersLen = (int *) bp; bp += 4; GLuint * renderbuffers = (GLuint *) bp; bp += (8-((*renderbuffersLen*4+4)%8))%8; weglDeleteRenderbuffers(*renderbuffersLen,renderbuffers); }; break; -case 5642: { // glGenRenderbuffers +case 5652: { // glGenRenderbuffers GLsizei *n = (GLsizei *) bp; bp += 4; GLuint *renderbuffers; renderbuffers = (GLuint *) driver_alloc(sizeof(GLuint) * *n); @@ -4915,14 +5038,14 @@ case 5642: { // glGenRenderbuffers driver_free(rt); driver_free(renderbuffers); }; break; -case 5643: { // glRenderbufferStorage +case 5653: { // glRenderbufferStorage GLenum *target = (GLenum *) bp; bp += 4; GLenum *internalformat = (GLenum *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; GLsizei *height = (GLsizei *) bp; bp += 4; weglRenderbufferStorage(*target,*internalformat,*width,*height); }; break; -case 5644: { // glGetRenderbufferParameteriv +case 5654: { // glGetRenderbufferParameteriv GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; GLint params[1] = {0}; @@ -4933,7 +5056,7 @@ case 5644: { // glGetRenderbufferParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5645: { // glIsFramebuffer +case 5655: { // glIsFramebuffer GLuint *framebuffer = (GLuint *) bp; bp += 4; GLboolean result = weglIsFramebuffer(*framebuffer); int AP = 0; ErlDrvTermData rt[6]; @@ -4942,17 +5065,17 @@ case 5645: { // glIsFramebuffer rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5646: { // glBindFramebuffer +case 5656: { // glBindFramebuffer GLenum *target = (GLenum *) bp; bp += 4; GLuint *framebuffer = (GLuint *) bp; bp += 4; weglBindFramebuffer(*target,*framebuffer); }; break; -case 5647: { // glDeleteFramebuffers +case 5657: { // glDeleteFramebuffers int * framebuffersLen = (int *) bp; bp += 4; GLuint * framebuffers = (GLuint *) bp; bp += (8-((*framebuffersLen*4+4)%8))%8; weglDeleteFramebuffers(*framebuffersLen,framebuffers); }; break; -case 5648: { // glGenFramebuffers +case 5658: { // glGenFramebuffers GLsizei *n = (GLsizei *) bp; bp += 4; GLuint *framebuffers; framebuffers = (GLuint *) driver_alloc(sizeof(GLuint) * *n); @@ -4968,7 +5091,7 @@ case 5648: { // glGenFramebuffers driver_free(rt); driver_free(framebuffers); }; break; -case 5649: { // glCheckFramebufferStatus +case 5659: { // glCheckFramebufferStatus GLenum *target = (GLenum *) bp; bp += 4; GLenum result = weglCheckFramebufferStatus(*target); int AP = 0; ErlDrvTermData rt[6]; @@ -4977,7 +5100,7 @@ case 5649: { // glCheckFramebufferStatus rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5650: { // glFramebufferTexture1D +case 5660: { // glFramebufferTexture1D GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *textarget = (GLenum *) bp; bp += 4; @@ -4985,7 +5108,7 @@ case 5650: { // glFramebufferTexture1D GLint *level = (GLint *) bp; bp += 4; weglFramebufferTexture1D(*target,*attachment,*textarget,*texture,*level); }; break; -case 5651: { // glFramebufferTexture2D +case 5661: { // glFramebufferTexture2D GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *textarget = (GLenum *) bp; bp += 4; @@ -4993,7 +5116,7 @@ case 5651: { // glFramebufferTexture2D GLint *level = (GLint *) bp; bp += 4; weglFramebufferTexture2D(*target,*attachment,*textarget,*texture,*level); }; break; -case 5652: { // glFramebufferTexture3D +case 5662: { // glFramebufferTexture3D GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *textarget = (GLenum *) bp; bp += 4; @@ -5002,14 +5125,14 @@ case 5652: { // glFramebufferTexture3D GLint *zoffset = (GLint *) bp; bp += 4; weglFramebufferTexture3D(*target,*attachment,*textarget,*texture,*level,*zoffset); }; break; -case 5653: { // glFramebufferRenderbuffer +case 5663: { // glFramebufferRenderbuffer GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *renderbuffertarget = (GLenum *) bp; bp += 4; GLuint *renderbuffer = (GLuint *) bp; bp += 4; weglFramebufferRenderbuffer(*target,*attachment,*renderbuffertarget,*renderbuffer); }; break; -case 5654: { // glGetFramebufferAttachmentParameteriv +case 5664: { // glGetFramebufferAttachmentParameteriv GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; @@ -5021,11 +5144,11 @@ case 5654: { // glGetFramebufferAttachmentParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5655: { // glGenerateMipmap +case 5665: { // glGenerateMipmap GLenum *target = (GLenum *) bp; bp += 4; weglGenerateMipmap(*target); }; break; -case 5656: { // glBlitFramebuffer +case 5666: { // glBlitFramebuffer GLint *srcX0 = (GLint *) bp; bp += 4; GLint *srcY0 = (GLint *) bp; bp += 4; GLint *srcX1 = (GLint *) bp; bp += 4; @@ -5038,7 +5161,7 @@ case 5656: { // glBlitFramebuffer GLenum *filter = (GLenum *) bp; bp += 4; weglBlitFramebuffer(*srcX0,*srcY0,*srcX1,*srcY1,*dstX0,*dstY0,*dstX1,*dstY1,*mask,*filter); }; break; -case 5657: { // glRenderbufferStorageMultisample +case 5667: { // glRenderbufferStorageMultisample GLenum *target = (GLenum *) bp; bp += 4; GLsizei *samples = (GLsizei *) bp; bp += 4; GLenum *internalformat = (GLenum *) bp; bp += 4; @@ -5046,7 +5169,7 @@ case 5657: { // glRenderbufferStorageMultisample GLsizei *height = (GLsizei *) bp; bp += 4; weglRenderbufferStorageMultisample(*target,*samples,*internalformat,*width,*height); }; break; -case 5658: { // glFramebufferTextureLayer +case 5668: { // glFramebufferTextureLayer GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLuint *texture = (GLuint *) bp; bp += 4; @@ -5054,20 +5177,7 @@ case 5658: { // glFramebufferTextureLayer GLint *layer = (GLint *) bp; bp += 4; weglFramebufferTextureLayer(*target,*attachment,*texture,*level,*layer); }; break; -case 5659: { // glProgramParameteriARB - GLuint *program = (GLuint *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint *value = (GLint *) bp; bp += 4; - weglProgramParameteriARB(*program,*pname,*value); -}; break; -case 5660: { // glFramebufferTextureARB - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *attachment = (GLenum *) bp; bp += 4; - GLuint *texture = (GLuint *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - weglFramebufferTextureARB(*target,*attachment,*texture,*level); -}; break; -case 5661: { // glFramebufferTextureFaceARB +case 5669: { // glFramebufferTextureFaceARB GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLuint *texture = (GLuint *) bp; bp += 4; @@ -5075,28 +5185,23 @@ case 5661: { // glFramebufferTextureFaceARB GLenum *face = (GLenum *) bp; bp += 4; weglFramebufferTextureFaceARB(*target,*attachment,*texture,*level,*face); }; break; -case 5662: { // glVertexAttribDivisorARB - GLuint *index = (GLuint *) bp; bp += 4; - GLuint *divisor = (GLuint *) bp; bp += 4; - weglVertexAttribDivisorARB(*index,*divisor); -}; break; -case 5663: { // glFlushMappedBufferRange +case 5670: { // glFlushMappedBufferRange GLenum *target = (GLenum *) bp; bp += 4; bp += 4; GLintptr offset = (GLintptr) * (GLuint64EXT *) bp; bp += 8; GLsizeiptr length = (GLsizeiptr) * (GLuint64EXT *) bp; bp += 8; weglFlushMappedBufferRange(*target,offset,length); }; break; -case 5664: { // glBindVertexArray +case 5671: { // glBindVertexArray GLuint *array = (GLuint *) bp; bp += 4; weglBindVertexArray(*array); }; break; -case 5665: { // glDeleteVertexArrays +case 5672: { // glDeleteVertexArrays int * arraysLen = (int *) bp; bp += 4; GLuint * arrays = (GLuint *) bp; bp += (8-((*arraysLen*4+4)%8))%8; weglDeleteVertexArrays(*arraysLen,arrays); }; break; -case 5666: { // glGenVertexArrays +case 5673: { // glGenVertexArrays GLsizei *n = (GLsizei *) bp; bp += 4; GLuint *arrays; arrays = (GLuint *) driver_alloc(sizeof(GLuint) * *n); @@ -5112,7 +5217,7 @@ case 5666: { // glGenVertexArrays driver_free(rt); driver_free(arrays); }; break; -case 5667: { // glIsVertexArray +case 5674: { // glIsVertexArray GLuint *array = (GLuint *) bp; bp += 4; GLboolean result = weglIsVertexArray(*array); int AP = 0; ErlDrvTermData rt[6]; @@ -5121,7 +5226,7 @@ case 5667: { // glIsVertexArray rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5668: { // glGetUniformIndices +case 5675: { // glGetUniformIndices GLuint *program = (GLuint *) bp; bp += 4; int * uniformNamesLen = (int *) bp; bp += 4; int * uniformNamesTotSize = (int *) bp; bp += 4; @@ -5145,7 +5250,7 @@ case 5668: { // glGetUniformIndices driver_free(uniformIndices); driver_free(uniformNames); }; break; -case 5669: { // glGetActiveUniformsiv +case 5676: { // glGetActiveUniformsiv GLuint *program = (GLuint *) bp; bp += 4; int * uniformIndicesLen = (int *) bp; bp += 4; GLuint * uniformIndices = (GLuint *) bp; bp += (8-((*uniformIndicesLen*4+0)%8))%8; @@ -5164,7 +5269,7 @@ case 5669: { // glGetActiveUniformsiv driver_free(rt); driver_free(params); }; break; -case 5670: { // glGetActiveUniformName +case 5677: { // glGetActiveUniformName GLuint *program = (GLuint *) bp; bp += 4; GLuint *uniformIndex = (GLuint *) bp; bp += 4; GLsizei *bufSize = (GLsizei *) bp; bp += 4; @@ -5179,10 +5284,10 @@ case 5670: { // glGetActiveUniformName driver_send_term(port,caller,rt,AP); driver_free(uniformName); }; break; -case 5671: { // glGetUniformBlockIndex +case 5678: { // glGetUniformBlockIndex GLuint *program = (GLuint *) bp; bp += 4; GLchar *uniformBlockName = (GLchar *) bp; - int uniformBlockNameLen = strlen((char *)uniformBlockName); bp += uniformBlockNameLen+1+((8-((1+uniformBlockNameLen+4)%8))%8); + int uniformBlockNameLen[1] = {strlen((char *)uniformBlockName)}; bp += uniformBlockNameLen[0]+1+((8-((1+uniformBlockNameLen[0]+4)%8))%8); GLuint result = weglGetUniformBlockIndex(*program,uniformBlockName); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -5190,7 +5295,7 @@ case 5671: { // glGetUniformBlockIndex rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5672: { // glGetActiveUniformBlockiv +case 5679: { // glGetActiveUniformBlockiv GLuint *program = (GLuint *) bp; bp += 4; GLuint *uniformBlockIndex = (GLuint *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; @@ -5202,7 +5307,7 @@ case 5672: { // glGetActiveUniformBlockiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5673: { // glGetActiveUniformBlockName +case 5680: { // glGetActiveUniformBlockName GLuint *program = (GLuint *) bp; bp += 4; GLuint *uniformBlockIndex = (GLuint *) bp; bp += 4; GLsizei *bufSize = (GLsizei *) bp; bp += 4; @@ -5217,13 +5322,13 @@ case 5673: { // glGetActiveUniformBlockName driver_send_term(port,caller,rt,AP); driver_free(uniformBlockName); }; break; -case 5674: { // glUniformBlockBinding +case 5681: { // glUniformBlockBinding GLuint *program = (GLuint *) bp; bp += 4; GLuint *uniformBlockIndex = (GLuint *) bp; bp += 4; GLuint *uniformBlockBinding = (GLuint *) bp; bp += 4; weglUniformBlockBinding(*program,*uniformBlockIndex,*uniformBlockBinding); }; break; -case 5675: { // glCopyBufferSubData +case 5682: { // glCopyBufferSubData GLenum *readTarget = (GLenum *) bp; bp += 4; GLenum *writeTarget = (GLenum *) bp; bp += 4; GLintptr readOffset = (GLintptr) * (GLuint64EXT *) bp; bp += 8; @@ -5231,31 +5336,1621 @@ case 5675: { // glCopyBufferSubData GLsizeiptr size = (GLsizeiptr) * (GLuint64EXT *) bp; bp += 8; weglCopyBufferSubData(*readTarget,*writeTarget,readOffset,writeOffset,size); }; break; -case 5676: { // glResizeBuffersMESA +case 5683: { // glDrawElementsBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawElementsBaseVertex(*mode,*count,*type,indices,*basevertex); +}; break; +case 5684: { // glDrawElementsBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) bins[0]; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawElementsBaseVertex(*mode,*count,*type,indices,*basevertex); +}; break; +case 5685: { // glDrawRangeElementsBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *start = (GLuint *) bp; bp += 4; + GLuint *end = (GLuint *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawRangeElementsBaseVertex(*mode,*start,*end,*count,*type,indices,*basevertex); +}; break; +case 5686: { // glDrawRangeElementsBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *start = (GLuint *) bp; bp += 4; + GLuint *end = (GLuint *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) bins[0]; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawRangeElementsBaseVertex(*mode,*start,*end,*count,*type,indices,*basevertex); +}; break; +case 5687: { // glDrawElementsInstancedBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawElementsInstancedBaseVertex(*mode,*count,*type,indices,*primcount,*basevertex); +}; break; +case 5688: { // glDrawElementsInstancedBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) bins[0]; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawElementsInstancedBaseVertex(*mode,*count,*type,indices,*primcount,*basevertex); +}; break; +case 5689: { // glProvokingVertex + GLenum *mode = (GLenum *) bp; bp += 4; + weglProvokingVertex(*mode); +}; break; +case 5690: { // glFenceSync + GLenum *condition = (GLenum *) bp; bp += 4; + GLbitfield *flags = (GLbitfield *) bp; bp += 4; + GLsync result = weglFenceSync(*condition,*flags); + 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 5691: { // glIsSync + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + GLboolean result = weglIsSync(sync); + 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 5692: { // glDeleteSync + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + weglDeleteSync(sync); +}; break; +case 5693: { // glClientWaitSync + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + GLbitfield *flags = (GLbitfield *) bp; bp += 4; + bp += 4; + GLuint64 timeout = (GLuint64) * (GLuint64EXT *) bp; bp += 8; + GLenum result = weglClientWaitSync(sync,*flags,timeout); + 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 5694: { // glWaitSync + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + GLbitfield *flags = (GLbitfield *) bp; bp += 4; + bp += 4; + GLuint64 timeout = (GLuint64) * (GLuint64EXT *) bp; bp += 8; + weglWaitSync(sync,*flags,timeout); +}; break; +case 5695: { // glGetInteger64v + GLenum *pname = (GLenum *) bp; bp += 4; + GLint64 params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + weglGetInteger64v(*pname,params); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint64 *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_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_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_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_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5696: { // glGetSynciv + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + GLenum *pname = (GLenum *) bp; bp += 4; + GLsizei *bufSize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLint *values; + values = (GLint *) driver_alloc(sizeof(GLint) * *bufSize); + weglGetSynciv(sync,*pname,*bufSize,length,values); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*length)*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + for(int i=0; i < *length; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) values[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*length)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(values); +}; break; +case 5697: { // glTexImage2DMultisample + GLenum *target = (GLenum *) bp; bp += 4; + GLsizei *samples = (GLsizei *) bp; bp += 4; + GLint *internalformat = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLboolean *fixedsamplelocations = (GLboolean *) bp; bp += 1; + weglTexImage2DMultisample(*target,*samples,*internalformat,*width,*height,*fixedsamplelocations); +}; break; +case 5698: { // glTexImage3DMultisample + GLenum *target = (GLenum *) bp; bp += 4; + GLsizei *samples = (GLsizei *) 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; + GLboolean *fixedsamplelocations = (GLboolean *) bp; bp += 1; + weglTexImage3DMultisample(*target,*samples,*internalformat,*width,*height,*depth,*fixedsamplelocations); +}; break; +case 5699: { // glGetMultisamplefv + GLenum *pname = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLfloat val[2] = {0.0,0.0}; + weglGetMultisamplefv(*pname,*index,val); + int AP = 0; ErlDrvTermData rt[10]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble valConv[2], *valTmp = valConv; + for(int i=0; i < 2; i++) valConv[i] = (GLdouble) val[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) valTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) valTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5700: { // glSampleMaski + GLuint *index = (GLuint *) bp; bp += 4; + GLbitfield *mask = (GLbitfield *) bp; bp += 4; + weglSampleMaski(*index,*mask); +}; break; +case 5701: { // glNamedStringARB + GLenum *type = (GLenum *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); + GLchar *string = (GLchar *) bp; + int stringLen[1] = {strlen((char *)string)}; bp += stringLen[0]+1+((8-((1+stringLen[0]+0)%8))%8); + weglNamedStringARB(*type,*nameLen,name,*stringLen,string); +}; break; +case 5702: { // glDeleteNamedStringARB + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + weglDeleteNamedStringARB(*nameLen,name); +}; break; +case 5703: { // glCompileShaderIncludeARB + GLuint *shader = (GLuint *) bp; bp += 4; + int * pathLen = (int *) bp; bp += 4; + int * pathTotSize = (int *) bp; bp += 4; + GLchar **path; + path = (GLchar **) driver_alloc(sizeof(GLchar *) * *pathLen); + for(int i=0;i<*pathLen;i++) { + path[i] = (GLchar *) bp; bp += 1+strlen(bp);}; + bp += (8 - ((0 + *pathTotSize) % 8)) % 8; + weglCompileShaderIncludeARB(*shader,*pathLen,(const GLchar **) path,NULL); + driver_free(path); +}; break; +case 5704: { // glIsNamedStringARB + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLboolean result = weglIsNamedStringARB(*nameLen,name); + 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 5705: { // glGetNamedStringARB + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLsizei *bufSize = (GLsizei *) bp; bp += 4; + GLint stringlen[1] = {0}; + GLchar *string; + string = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); + weglGetNamedStringARB(*nameLen,name,*bufSize,stringlen,string); + 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) string; rt[AP++] = *stringlen; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(string); +}; break; +case 5706: { // glGetNamedStringivARB + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[1] = {0}; + weglGetNamedStringivARB(*nameLen,name,*pname,params); + 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) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5707: { // glBindFragDataLocationIndexed + GLuint *program = (GLuint *) bp; bp += 4; + GLuint *colorNumber = (GLuint *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); + weglBindFragDataLocationIndexed(*program,*colorNumber,*index,name); +}; break; +case 5708: { // glGetFragDataIndex + GLuint *program = (GLuint *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); + GLint result = weglGetFragDataIndex(*program,name); + 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 5709: { // glGenSamplers + GLsizei *count = (GLsizei *) bp; bp += 4; + GLuint *samplers; + samplers = (GLuint *) driver_alloc(sizeof(GLuint) * *count); + weglGenSamplers(*count,samplers); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*count)*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + for(int i=0; i < *count; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) samplers[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*count)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(samplers); +}; break; +case 5710: { // glDeleteSamplers + int * samplersLen = (int *) bp; bp += 4; + GLuint * samplers = (GLuint *) bp; bp += (8-((*samplersLen*4+4)%8))%8; + weglDeleteSamplers(*samplersLen,samplers); +}; break; +case 5711: { // glIsSampler + GLuint *sampler = (GLuint *) bp; bp += 4; + GLboolean result = weglIsSampler(*sampler); + 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 5712: { // glBindSampler + GLuint *unit = (GLuint *) bp; bp += 4; + GLuint *sampler = (GLuint *) bp; bp += 4; + weglBindSampler(*unit,*sampler); +}; break; +case 5713: { // glSamplerParameteri + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglSamplerParameteri(*sampler,*pname,*param); +}; break; +case 5714: { // glSamplerParameteriv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int * paramLen = (int *) bp; bp += 4; + GLint * param = (GLint *) bp; bp += (8-((*paramLen*4+4)%8))%8; + weglSamplerParameteriv(*sampler,*pname,param); +}; break; +case 5715: { // glSamplerParameterf + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglSamplerParameterf(*sampler,*pname,*param); +}; break; +case 5716: { // glSamplerParameterfv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int * paramLen = (int *) bp; bp += 4; + GLfloat * param = (GLfloat *) bp; bp += (8-((*paramLen*4+4)%8))%8; + weglSamplerParameterfv(*sampler,*pname,param); +}; break; +case 5717: { // glSamplerParameterIiv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int * paramLen = (int *) bp; bp += 4; + GLint * param = (GLint *) bp; bp += (8-((*paramLen*4+4)%8))%8; + weglSamplerParameterIiv(*sampler,*pname,param); +}; break; +case 5718: { // glSamplerParameterIuiv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int * paramLen = (int *) bp; bp += 4; + GLuint * param = (GLuint *) bp; bp += (8-((*paramLen*4+4)%8))%8; + weglSamplerParameterIuiv(*sampler,*pname,param); +}; break; +case 5719: { // glGetSamplerParameteriv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[4] = {0,0,0,0}; + weglGetSamplerParameteriv(*sampler,*pname,params); + int AP = 0; ErlDrvTermData rt[15]; + 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_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 4+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5720: { // glGetSamplerParameterIiv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[4] = {0,0,0,0}; + weglGetSamplerParameterIiv(*sampler,*pname,params); + int AP = 0; ErlDrvTermData rt[15]; + 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_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 4+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5721: { // glGetSamplerParameterfv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat params[4] = {0.0,0.0,0.0,0.0}; + weglGetSamplerParameterfv(*sampler,*pname,params); + int AP = 0; ErlDrvTermData rt[15]; + 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_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 4+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5722: { // glGetSamplerParameterIuiv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLuint params[4] = {0,0,0,0}; + weglGetSamplerParameterIuiv(*sampler,*pname,params); + int AP = 0; ErlDrvTermData rt[15]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLuint *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_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 4+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5723: { // glQueryCounter + GLuint *id = (GLuint *) bp; bp += 4; + GLenum *target = (GLenum *) bp; bp += 4; + weglQueryCounter(*id,*target); +}; break; +case 5724: { // glGetQueryObjecti64v + GLuint *id = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint64 params[1] = {0}; + weglGetQueryObjecti64v(*id,*pname,params); + 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) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5725: { // glGetQueryObjectui64v + GLuint *id = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLuint64 params[1] = {0}; + weglGetQueryObjectui64v(*id,*pname,params); + 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) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5726: { // glDrawArraysIndirect + GLenum *mode = (GLenum *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) * (int *) bp; bp += 4; + weglDrawArraysIndirect(*mode,indirect); +}; break; +case 5727: { // glDrawArraysIndirect + GLenum *mode = (GLenum *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) bins[0]; + weglDrawArraysIndirect(*mode,indirect); +}; break; +case 5728: { // glDrawElementsIndirect + GLenum *mode = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) * (int *) bp; bp += 4; + weglDrawElementsIndirect(*mode,*type,indirect); +}; break; +case 5729: { // glDrawElementsIndirect + GLenum *mode = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) bins[0]; + weglDrawElementsIndirect(*mode,*type,indirect); +}; break; +case 5730: { // glUniform1d + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *x = (GLdouble *) bp; bp += 8; + weglUniform1d(*location,*x); +}; break; +case 5731: { // glUniform2d + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *x = (GLdouble *) bp; bp += 8; + GLdouble *y = (GLdouble *) bp; bp += 8; + weglUniform2d(*location,*x,*y); +}; break; +case 5732: { // glUniform3d + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *x = (GLdouble *) bp; bp += 8; + GLdouble *y = (GLdouble *) bp; bp += 8; + GLdouble *z = (GLdouble *) bp; bp += 8; + weglUniform3d(*location,*x,*y,*z); +}; break; +case 5733: { // glUniform4d + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *x = (GLdouble *) bp; bp += 8; + GLdouble *y = (GLdouble *) bp; bp += 8; + GLdouble *z = (GLdouble *) bp; bp += 8; + GLdouble *w = (GLdouble *) bp; bp += 8; + weglUniform4d(*location,*x,*y,*z,*w); +}; break; +case 5734: { // glUniform1dv + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + int * valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += (8-((*valueLen*8+0)%8))%8; + weglUniform1dv(*location,*valueLen,value); +}; break; +case 5735: { // glUniform2dv + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*16; + weglUniform2dv(*location,*valueLen,value); +}; break; +case 5736: { // glUniform3dv + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*24; + weglUniform3dv(*location,*valueLen,value); +}; break; +case 5737: { // glUniform4dv + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*32; + weglUniform4dv(*location,*valueLen,value); +}; break; +case 5738: { // glUniformMatrix2dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*32; + weglUniformMatrix2dv(*location,*valueLen,*transpose,value); +}; break; +case 5739: { // glUniformMatrix3dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*72; + weglUniformMatrix3dv(*location,*valueLen,*transpose,value); +}; break; +case 5740: { // glUniformMatrix4dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*128; + weglUniformMatrix4dv(*location,*valueLen,*transpose,value); +}; break; +case 5741: { // glUniformMatrix2x3dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*48; + weglUniformMatrix2x3dv(*location,*valueLen,*transpose,value); +}; break; +case 5742: { // glUniformMatrix2x4dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*64; + weglUniformMatrix2x4dv(*location,*valueLen,*transpose,value); +}; break; +case 5743: { // glUniformMatrix3x2dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*48; + weglUniformMatrix3x2dv(*location,*valueLen,*transpose,value); +}; break; +case 5744: { // glUniformMatrix3x4dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*96; + weglUniformMatrix3x4dv(*location,*valueLen,*transpose,value); +}; break; +case 5745: { // glUniformMatrix4x2dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*64; + weglUniformMatrix4x2dv(*location,*valueLen,*transpose,value); +}; break; +case 5746: { // glUniformMatrix4x3dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*96; + weglUniformMatrix4x3dv(*location,*valueLen,*transpose,value); +}; break; +case 5747: { // glGetUniformdv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) 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}; + weglGetUniformdv(*program,*location,params); + int AP = 0; ErlDrvTermData rt[38]; + 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_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_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_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++] = 16; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5748: { // glGetSubroutineUniformLocation + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLint result = weglGetSubroutineUniformLocation(*program,*shadertype,name); + 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 5749: { // glGetSubroutineIndex + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLuint result = weglGetSubroutineIndex(*program,*shadertype,name); + 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 5750: { // glGetActiveSubroutineUniformName + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLsizei *bufsize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLchar *name; + name = (GLchar *) driver_alloc(sizeof(GLchar) * *bufsize); + weglGetActiveSubroutineUniformName(*program,*shadertype,*index,*bufsize,length,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) name; rt[AP++] = *length; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(name); +}; break; +case 5751: { // glGetActiveSubroutineName + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLsizei *bufsize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLchar *name; + name = (GLchar *) driver_alloc(sizeof(GLchar) * *bufsize); + weglGetActiveSubroutineName(*program,*shadertype,*index,*bufsize,length,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) name; rt[AP++] = *length; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(name); +}; break; +case 5752: { // glUniformSubroutinesuiv + GLenum *shadertype = (GLenum *) bp; bp += 4; + int * indicesLen = (int *) bp; bp += 4; + GLuint * indices = (GLuint *) bp; bp += (8-((*indicesLen*4+0)%8))%8; + weglUniformSubroutinesuiv(*shadertype,*indicesLen,indices); +}; break; +case 5753: { // glGetUniformSubroutineuiv + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + weglGetUniformSubroutineuiv(*shadertype,*location,params); + int AP = 0; ErlDrvTermData rt[38]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLuint *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_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_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_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++] = 16; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5754: { // glGetProgramStageiv + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint values[1] = {0}; + weglGetProgramStageiv(*program,*shadertype,*pname,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) *values; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5755: { // glPatchParameteri + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *value = (GLint *) bp; bp += 4; + weglPatchParameteri(*pname,*value); +}; break; +case 5756: { // glPatchParameterfv + GLenum *pname = (GLenum *) bp; bp += 4; + int * valuesLen = (int *) bp; bp += 4; + GLfloat * values = (GLfloat *) bp; bp += (8-((*valuesLen*4+0)%8))%8; + weglPatchParameterfv(*pname,values); +}; break; +case 5757: { // glBindTransformFeedback + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + weglBindTransformFeedback(*target,*id); +}; break; +case 5758: { // glDeleteTransformFeedbacks + int * idsLen = (int *) bp; bp += 4; + GLuint * ids = (GLuint *) bp; bp += (8-((*idsLen*4+4)%8))%8; + weglDeleteTransformFeedbacks(*idsLen,ids); +}; break; +case 5759: { // glGenTransformFeedbacks + GLsizei *n = (GLsizei *) bp; bp += 4; + GLuint *ids; + ids = (GLuint *) driver_alloc(sizeof(GLuint) * *n); + weglGenTransformFeedbacks(*n,ids); + 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) ids[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(ids); +}; break; +case 5760: { // glIsTransformFeedback + GLuint *id = (GLuint *) bp; bp += 4; + GLboolean result = weglIsTransformFeedback(*id); + 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 5761: { // glPauseTransformFeedback + weglPauseTransformFeedback(); +}; break; +case 5762: { // glResumeTransformFeedback + weglResumeTransformFeedback(); +}; break; +case 5763: { // glDrawTransformFeedback + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + weglDrawTransformFeedback(*mode,*id); +}; break; +case 5764: { // glDrawTransformFeedbackStream + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + GLuint *stream = (GLuint *) bp; bp += 4; + weglDrawTransformFeedbackStream(*mode,*id,*stream); +}; break; +case 5765: { // glBeginQueryIndexed + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + weglBeginQueryIndexed(*target,*index,*id); +}; break; +case 5766: { // glEndQueryIndexed + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + weglEndQueryIndexed(*target,*index); +}; break; +case 5767: { // glGetQueryIndexediv + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[1] = {0}; + weglGetQueryIndexediv(*target,*index,*pname,params); + 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) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5768: { // glReleaseShaderCompiler + weglReleaseShaderCompiler(); +}; break; +case 5769: { // glShaderBinary + int * shadersLen = (int *) bp; bp += 4; + GLuint * shaders = (GLuint *) bp; bp += (8-((*shadersLen*4+4)%8))%8; + GLenum *binaryformat = (GLenum *) bp; bp += 4; + GLvoid *binary = (GLvoid *) bins[0]; + GLsizei binary_size = bins_sz[0]; + weglShaderBinary(*shadersLen,shaders,*binaryformat,binary,binary_size); +}; break; +case 5770: { // glGetShaderPrecisionFormat + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLenum *precisiontype = (GLenum *) bp; bp += 4; + GLint range[2] = {0,0}; + GLint precision[1] = {0}; + weglGetShaderPrecisionFormat(*shadertype,*precisiontype,range,precision); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *rangeTmp = range; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *rangeTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *rangeTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *precision; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5771: { // glDepthRangef + GLclampf *n = (GLclampf *) bp; bp += 4; + GLclampf *f = (GLclampf *) bp; bp += 4; + weglDepthRangef(*n,*f); +}; break; +case 5772: { // glClearDepthf + GLclampf *d = (GLclampf *) bp; bp += 4; + weglClearDepthf(*d); +}; break; +case 5773: { // glGetProgramBinary + GLuint *program = (GLuint *) bp; bp += 4; + GLsizei *bufSize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLenum binaryFormat[1] = {0}; + ErlDrvBinary *binary = driver_alloc_binary(*bufSize); + weglGetProgramBinary(*program,*bufSize,length,binaryFormat,(GLvoid*) binary->orig_bytes); + int AP = 0; ErlDrvTermData rt[12]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *binaryFormat; + rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) binary; rt[AP++] = *length; rt[AP++] = 0; + 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_binary(binary); +}; break; +case 5774: { // glProgramBinary + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *binaryFormat = (GLenum *) bp; bp += 4; + GLvoid *binary = (GLvoid *) bins[0]; + GLsizei binary_size = bins_sz[0]; + weglProgramBinary(*program,*binaryFormat,binary,binary_size); +}; break; +case 5775: { // glProgramParameteri + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *value = (GLint *) bp; bp += 4; + weglProgramParameteri(*program,*pname,*value); +}; break; +case 5776: { // glUseProgramStages + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLbitfield *stages = (GLbitfield *) bp; bp += 4; + GLuint *program = (GLuint *) bp; bp += 4; + weglUseProgramStages(*pipeline,*stages,*program); +}; break; +case 5777: { // glActiveShaderProgram + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLuint *program = (GLuint *) bp; bp += 4; + weglActiveShaderProgram(*pipeline,*program); +}; break; +case 5778: { // glCreateShaderProgramv + GLenum *type = (GLenum *) bp; bp += 4; + int * stringsLen = (int *) bp; bp += 4; + int * stringsTotSize = (int *) bp; bp += 4; + GLchar **strings; + strings = (GLchar **) driver_alloc(sizeof(GLchar *) * *stringsLen); + for(int i=0;i<*stringsLen;i++) { + strings[i] = (GLchar *) bp; bp += 1+strlen(bp);}; + bp += (8 - ((0 + *stringsTotSize) % 8)) % 8; + GLuint result = weglCreateShaderProgramv(*type,*stringsLen,(const GLchar **) strings); + 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); + driver_free(strings); +}; break; +case 5779: { // glBindProgramPipeline + GLuint *pipeline = (GLuint *) bp; bp += 4; + weglBindProgramPipeline(*pipeline); +}; break; +case 5780: { // glDeleteProgramPipelines + int * pipelinesLen = (int *) bp; bp += 4; + GLuint * pipelines = (GLuint *) bp; bp += (8-((*pipelinesLen*4+4)%8))%8; + weglDeleteProgramPipelines(*pipelinesLen,pipelines); +}; break; +case 5781: { // glGenProgramPipelines + GLsizei *n = (GLsizei *) bp; bp += 4; + GLuint *pipelines; + pipelines = (GLuint *) driver_alloc(sizeof(GLuint) * *n); + weglGenProgramPipelines(*n,pipelines); + 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) pipelines[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(pipelines); +}; break; +case 5782: { // glIsProgramPipeline + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLboolean result = weglIsProgramPipeline(*pipeline); + 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 5783: { // glGetProgramPipelineiv + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[1] = {0}; + weglGetProgramPipelineiv(*pipeline,*pname,params); + 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) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5784: { // glProgramUniform1i + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLint *v0 = (GLint *) bp; bp += 4; + weglProgramUniform1i(*program,*location,*v0); +}; break; +case 5785: { // glProgramUniform1iv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int * valueLen = (int *) bp; bp += 4; + GLint * value = (GLint *) bp; bp += (8-((*valueLen*4+4)%8))%8; + weglProgramUniform1iv(*program,*location,*valueLen,value); +}; break; +case 5786: { // glProgramUniform1f + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLfloat *v0 = (GLfloat *) bp; bp += 4; + weglProgramUniform1f(*program,*location,*v0); +}; break; +case 5787: { // glProgramUniform1fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int * valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += (8-((*valueLen*4+4)%8))%8; + weglProgramUniform1fv(*program,*location,*valueLen,value); +}; break; +case 5788: { // glProgramUniform1d + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLdouble *v0 = (GLdouble *) bp; bp += 8; + weglProgramUniform1d(*program,*location,*v0); +}; break; +case 5789: { // glProgramUniform1dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int * valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += (8-((*valueLen*8+0)%8))%8; + weglProgramUniform1dv(*program,*location,*valueLen,value); +}; break; +case 5790: { // glProgramUniform1ui + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint *v0 = (GLuint *) bp; bp += 4; + weglProgramUniform1ui(*program,*location,*v0); +}; break; +case 5791: { // glProgramUniform1uiv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int * valueLen = (int *) bp; bp += 4; + GLuint * value = (GLuint *) bp; bp += (8-((*valueLen*4+4)%8))%8; + weglProgramUniform1uiv(*program,*location,*valueLen,value); +}; break; +case 5792: { // glProgramUniform2i + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLint *v0 = (GLint *) bp; bp += 4; + GLint *v1 = (GLint *) bp; bp += 4; + weglProgramUniform2i(*program,*location,*v0,*v1); +}; break; +case 5793: { // glProgramUniform2iv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLint * value = (GLint *) bp; bp += *valueLen*8; + weglProgramUniform2iv(*program,*location,*valueLen,value); +}; break; +case 5794: { // glProgramUniform2f + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLfloat *v0 = (GLfloat *) bp; bp += 4; + GLfloat *v1 = (GLfloat *) bp; bp += 4; + weglProgramUniform2f(*program,*location,*v0,*v1); +}; break; +case 5795: { // glProgramUniform2fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*8; + weglProgramUniform2fv(*program,*location,*valueLen,value); +}; break; +case 5796: { // glProgramUniform2d + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLdouble *v0 = (GLdouble *) bp; bp += 8; + GLdouble *v1 = (GLdouble *) bp; bp += 8; + weglProgramUniform2d(*program,*location,*v0,*v1); +}; break; +case 5797: { // glProgramUniform2dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*16; + weglProgramUniform2dv(*program,*location,*valueLen,value); +}; break; +case 5798: { // glProgramUniform2ui + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint *v0 = (GLuint *) bp; bp += 4; + GLuint *v1 = (GLuint *) bp; bp += 4; + weglProgramUniform2ui(*program,*location,*v0,*v1); +}; break; +case 5799: { // glProgramUniform2uiv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLuint * value = (GLuint *) bp; bp += *valueLen*8; + weglProgramUniform2uiv(*program,*location,*valueLen,value); +}; break; +case 5800: { // glProgramUniform3i + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLint *v0 = (GLint *) bp; bp += 4; + GLint *v1 = (GLint *) bp; bp += 4; + GLint *v2 = (GLint *) bp; bp += 4; + weglProgramUniform3i(*program,*location,*v0,*v1,*v2); +}; break; +case 5801: { // glProgramUniform3iv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLint * value = (GLint *) bp; bp += *valueLen*12; + weglProgramUniform3iv(*program,*location,*valueLen,value); +}; break; +case 5802: { // glProgramUniform3f + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLfloat *v0 = (GLfloat *) bp; bp += 4; + GLfloat *v1 = (GLfloat *) bp; bp += 4; + GLfloat *v2 = (GLfloat *) bp; bp += 4; + weglProgramUniform3f(*program,*location,*v0,*v1,*v2); +}; break; +case 5803: { // glProgramUniform3fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*12; + weglProgramUniform3fv(*program,*location,*valueLen,value); +}; break; +case 5804: { // glProgramUniform3d + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLdouble *v0 = (GLdouble *) bp; bp += 8; + GLdouble *v1 = (GLdouble *) bp; bp += 8; + GLdouble *v2 = (GLdouble *) bp; bp += 8; + weglProgramUniform3d(*program,*location,*v0,*v1,*v2); +}; break; +case 5805: { // glProgramUniform3dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*24; + weglProgramUniform3dv(*program,*location,*valueLen,value); +}; break; +case 5806: { // glProgramUniform3ui + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint *v0 = (GLuint *) bp; bp += 4; + GLuint *v1 = (GLuint *) bp; bp += 4; + GLuint *v2 = (GLuint *) bp; bp += 4; + weglProgramUniform3ui(*program,*location,*v0,*v1,*v2); +}; break; +case 5807: { // glProgramUniform3uiv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLuint * value = (GLuint *) bp; bp += *valueLen*12; + weglProgramUniform3uiv(*program,*location,*valueLen,value); +}; break; +case 5808: { // glProgramUniform4i + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLint *v0 = (GLint *) bp; bp += 4; + GLint *v1 = (GLint *) bp; bp += 4; + GLint *v2 = (GLint *) bp; bp += 4; + GLint *v3 = (GLint *) bp; bp += 4; + weglProgramUniform4i(*program,*location,*v0,*v1,*v2,*v3); +}; break; +case 5809: { // glProgramUniform4iv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLint * value = (GLint *) bp; bp += *valueLen*16; + weglProgramUniform4iv(*program,*location,*valueLen,value); +}; break; +case 5810: { // glProgramUniform4f + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLfloat *v0 = (GLfloat *) bp; bp += 4; + GLfloat *v1 = (GLfloat *) bp; bp += 4; + GLfloat *v2 = (GLfloat *) bp; bp += 4; + GLfloat *v3 = (GLfloat *) bp; bp += 4; + weglProgramUniform4f(*program,*location,*v0,*v1,*v2,*v3); +}; break; +case 5811: { // glProgramUniform4fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*16; + weglProgramUniform4fv(*program,*location,*valueLen,value); +}; break; +case 5812: { // glProgramUniform4d + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLdouble *v0 = (GLdouble *) bp; bp += 8; + GLdouble *v1 = (GLdouble *) bp; bp += 8; + GLdouble *v2 = (GLdouble *) bp; bp += 8; + GLdouble *v3 = (GLdouble *) bp; bp += 8; + weglProgramUniform4d(*program,*location,*v0,*v1,*v2,*v3); +}; break; +case 5813: { // glProgramUniform4dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*32; + weglProgramUniform4dv(*program,*location,*valueLen,value); +}; break; +case 5814: { // glProgramUniform4ui + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint *v0 = (GLuint *) bp; bp += 4; + GLuint *v1 = (GLuint *) bp; bp += 4; + GLuint *v2 = (GLuint *) bp; bp += 4; + GLuint *v3 = (GLuint *) bp; bp += 4; + weglProgramUniform4ui(*program,*location,*v0,*v1,*v2,*v3); +}; break; +case 5815: { // glProgramUniform4uiv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLuint * value = (GLuint *) bp; bp += *valueLen*16; + weglProgramUniform4uiv(*program,*location,*valueLen,value); +}; break; +case 5816: { // glProgramUniformMatrix2fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*16; + weglProgramUniformMatrix2fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5817: { // glProgramUniformMatrix3fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*36; + weglProgramUniformMatrix3fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5818: { // glProgramUniformMatrix4fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*64; + weglProgramUniformMatrix4fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5819: { // glProgramUniformMatrix2dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*32; + weglProgramUniformMatrix2dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5820: { // glProgramUniformMatrix3dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*72; + weglProgramUniformMatrix3dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5821: { // glProgramUniformMatrix4dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*128; + weglProgramUniformMatrix4dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5822: { // glProgramUniformMatrix2x3fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*24; + weglProgramUniformMatrix2x3fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5823: { // glProgramUniformMatrix3x2fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*24; + weglProgramUniformMatrix3x2fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5824: { // glProgramUniformMatrix2x4fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*32; + weglProgramUniformMatrix2x4fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5825: { // glProgramUniformMatrix4x2fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*32; + weglProgramUniformMatrix4x2fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5826: { // glProgramUniformMatrix3x4fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*48; + weglProgramUniformMatrix3x4fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5827: { // glProgramUniformMatrix4x3fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*48; + weglProgramUniformMatrix4x3fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5828: { // glProgramUniformMatrix2x3dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*48; + weglProgramUniformMatrix2x3dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5829: { // glProgramUniformMatrix3x2dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*48; + weglProgramUniformMatrix3x2dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5830: { // glProgramUniformMatrix2x4dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*64; + weglProgramUniformMatrix2x4dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5831: { // glProgramUniformMatrix4x2dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*64; + weglProgramUniformMatrix4x2dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5832: { // glProgramUniformMatrix3x4dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*96; + weglProgramUniformMatrix3x4dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5833: { // glProgramUniformMatrix4x3dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*96; + weglProgramUniformMatrix4x3dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5834: { // glValidateProgramPipeline + GLuint *pipeline = (GLuint *) bp; bp += 4; + weglValidateProgramPipeline(*pipeline); +}; break; +case 5835: { // glGetProgramPipelineInfoLog + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLsizei *bufSize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLchar *infoLog; + infoLog = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); + weglGetProgramPipelineInfoLog(*pipeline,*bufSize,length,infoLog); + 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) infoLog; rt[AP++] = *length; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(infoLog); +}; break; +case 5836: { // glVertexAttribL1dv + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertexAttribL1dv(*index,v); +}; break; +case 5837: { // glVertexAttribL2dv + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertexAttribL2dv(*index,v); +}; break; +case 5838: { // glVertexAttribL3dv + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertexAttribL3dv(*index,v); +}; break; +case 5839: { // glVertexAttribL4dv + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertexAttribL4dv(*index,v); +}; break; +case 5840: { // glVertexAttribLPointer + GLuint *index = (GLuint *) bp; bp += 4; + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + weglVertexAttribLPointer(*index,*size,*type,*stride,pointer); +}; break; +case 5841: { // glVertexAttribLPointer + GLuint *index = (GLuint *) bp; bp += 4; + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) bins[0]; + weglVertexAttribLPointer(*index,*size,*type,*stride,pointer); +}; break; +case 5842: { // glGetVertexAttribLdv + GLuint *index = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLdouble params[4] = {0.0,0.0,0.0,0.0}; + weglGetVertexAttribLdv(*index,*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 5843: { // glViewportArrayv + GLuint *first = (GLuint *) bp; bp += 4; + int *vLen = (int *) bp; bp += 4; + GLfloat * v = (GLfloat *) bp; bp += *vLen*16; + weglViewportArrayv(*first,*vLen,v); +}; break; +case 5844: { // glViewportIndexedf + GLuint *index = (GLuint *) bp; bp += 4; + GLfloat *x = (GLfloat *) bp; bp += 4; + GLfloat *y = (GLfloat *) bp; bp += 4; + GLfloat *w = (GLfloat *) bp; bp += 4; + GLfloat *h = (GLfloat *) bp; bp += 4; + weglViewportIndexedf(*index,*x,*y,*w,*h); +}; break; +case 5845: { // glViewportIndexedfv + GLuint *index = (GLuint *) bp; bp += 4; + GLfloat * v = (GLfloat *) bp; bp += 16; + weglViewportIndexedfv(*index,v); +}; break; +case 5846: { // glScissorArrayv + GLuint *first = (GLuint *) bp; bp += 4; + int *vLen = (int *) bp; bp += 4; + GLint * v = (GLint *) bp; bp += *vLen*16; + weglScissorArrayv(*first,*vLen,v); +}; break; +case 5847: { // glScissorIndexed + GLuint *index = (GLuint *) bp; bp += 4; + GLint *left = (GLint *) bp; bp += 4; + GLint *bottom = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + weglScissorIndexed(*index,*left,*bottom,*width,*height); +}; break; +case 5848: { // glScissorIndexedv + GLuint *index = (GLuint *) bp; bp += 4; + GLint * v = (GLint *) bp; bp += 16; + weglScissorIndexedv(*index,v); +}; break; +case 5849: { // glDepthRangeArrayv + GLuint *first = (GLuint *) bp; bp += 4; + bp += 4; + int *vLen = (int *) bp; bp += 8; + GLclampd * v = (GLclampd *) bp; bp += *vLen*16; + weglDepthRangeArrayv(*first,*vLen,v); +}; break; +case 5850: { // glDepthRangeIndexed + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLclampd *n = (GLclampd *) bp; bp += 8; + GLclampd *f = (GLclampd *) bp; bp += 8; + weglDepthRangeIndexed(*index,*n,*f); +}; break; +case 5851: { // glGetFloati_v + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLfloat data[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}; + weglGetFloati_v(*target,*index,data); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble dataConv[16], *dataTmp = dataConv; + for(int i=0; i < 16; i++) dataConv[i] = (GLdouble) data[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5852: { // glGetDoublei_v + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLdouble data[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}; + weglGetDoublei_v(*target,*index,data); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble *dataTmp = data; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5853: { // glDebugMessageControlARB + GLenum *source = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLenum *severity = (GLenum *) bp; bp += 4; + int * idsLen = (int *) bp; bp += 4; + GLuint * ids = (GLuint *) bp; bp += (8-((*idsLen*4+0)%8))%8; + GLboolean *enabled = (GLboolean *) bp; bp += 1; + weglDebugMessageControlARB(*source,*type,*severity,*idsLen,ids,*enabled); +}; break; +case 5854: { // glDebugMessageInsertARB + GLenum *source = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + GLenum *severity = (GLenum *) bp; bp += 4; + GLchar *buf = (GLchar *) bp; + int bufLen[1] = {strlen((char *)buf)}; bp += bufLen[0]+1+((8-((1+bufLen[0]+0)%8))%8); + weglDebugMessageInsertARB(*source,*type,*id,*severity,*bufLen,buf); +}; break; +case 5855: { // glGetDebugMessageLogARB + GLuint *count = (GLuint *) bp; bp += 4; + GLsizei *bufsize = (GLsizei *) bp; bp += 4; + GLenum *sources; + sources = (GLenum *) driver_alloc(sizeof(GLenum) * *count); + GLenum *types; + types = (GLenum *) driver_alloc(sizeof(GLenum) * *count); + GLuint *ids; + ids = (GLuint *) driver_alloc(sizeof(GLuint) * *count); + GLenum *severities; + severities = (GLenum *) driver_alloc(sizeof(GLenum) * *count); + GLsizei *lengths; + lengths = (GLsizei *) driver_alloc(sizeof(GLsizei) * *count); + GLchar *messageLog; + messageLog = (GLchar *) driver_alloc(sizeof(GLchar) * *bufsize); + GLuint result = weglGetDebugMessageLogARB(*count,*bufsize,sources,types,ids,severities,lengths,messageLog); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(23 + result*3 + result*2 + result*2 + result*2 + result*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 < (int) result; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) sources[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + for(int i=0; i < (int) result; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) types[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + for(int i=0; i < (int) result; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) ids[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + for(int i=0; i < (int) result; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) severities[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + for(int i=0; i < (int) result; i++) { + rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) messageLog; rt[AP++] = lengths[i]-1; + messageLog += lengths[i]; } + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 6; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(messageLog); + driver_free(lengths); + driver_free(severities); + driver_free(ids); + driver_free(types); + driver_free(sources); +}; break; +case 5856: { // glGetGraphicsResetStatusARB + GLenum result = weglGetGraphicsResetStatusARB(); + 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 5857: { // glResizeBuffersMESA weglResizeBuffersMESA(); }; break; -case 5677: { // glWindowPos4dvMESA +case 5858: { // glWindowPos4dvMESA GLdouble *v = (GLdouble *) bp; bp += 8; weglWindowPos4dvMESA(v); }; break; -case 5678: { // glWindowPos4fvMESA +case 5859: { // glWindowPos4fvMESA GLfloat *v = (GLfloat *) bp; bp += 4; weglWindowPos4fvMESA(v); }; break; -case 5679: { // glWindowPos4ivMESA +case 5860: { // glWindowPos4ivMESA GLint *v = (GLint *) bp; bp += 4; weglWindowPos4ivMESA(v); }; break; -case 5680: { // glWindowPos4svMESA +case 5861: { // glWindowPos4svMESA GLshort *v = (GLshort *) bp; bp += 2; weglWindowPos4svMESA(v); }; break; -case 5681: { // glDepthBoundsEXT +case 5862: { // glDepthBoundsEXT GLclampd *zmin = (GLclampd *) bp; bp += 8; GLclampd *zmax = (GLclampd *) bp; bp += 8; weglDepthBoundsEXT(*zmin,*zmax); }; break; -case 5682: { // glStencilClearTagEXT +case 5863: { // glStencilClearTagEXT GLsizei *stencilTagBits = (GLsizei *) bp; bp += 4; GLuint *stencilClearTag = (GLuint *) bp; bp += 4; weglStencilClearTagEXT(*stencilTagBits,*stencilClearTag); diff --git a/lib/wx/c_src/wxe_gl.cpp b/lib/wx/c_src/wxe_gl.cpp index f1fc848de9..e947a1bc6e 100644 --- a/lib/wx/c_src/wxe_gl.cpp +++ b/lib/wx/c_src/wxe_gl.cpp @@ -35,7 +35,7 @@ int erl_gl_initiated = FALSE; ErlDrvTermData gl_active = 0; wxeGLC glc; -typedef void (*WXE_GL_DISPATCH) (int, char *, ErlDrvPort, ErlDrvTermData, char **); +typedef void (*WXE_GL_DISPATCH) (int, char *, ErlDrvPort, ErlDrvTermData, char **, int *); WXE_GL_DISPATCH wxe_gl_dispatch; #ifdef _WIN32 @@ -146,12 +146,15 @@ void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins[]){ } }; char * bs[3]; + int bs_sz[3]; for(int i=0; i<3; i++) { - if(bins[i]) + if(bins[i]) { bs[i] = bins[i]->base; + bs_sz[i] = bins[i]->size; + } else bs[i] = NULL; } - wxe_gl_dispatch(op, bp, WXE_DRV_PORT, caller, bs); + wxe_gl_dispatch(op, bp, WXE_DRV_PORT, caller, bs, bs_sz); } diff --git a/lib/wx/include/gl.hrl b/lib/wx/include/gl.hrl index 2fa0d72a59..52f2635af9 100644 --- a/lib/wx/include/gl.hrl +++ b/lib/wx/include/gl.hrl @@ -782,7 +782,7 @@ -define(GL_TEXTURE_COMPARE_MODE, 16#884C). -define(GL_TEXTURE_COMPARE_FUNC, 16#884D). -define(GL_COMPARE_R_TO_TEXTURE, 16#884E). --define(GL_GLEXT_VERSION, 52). +-define(GL_GLEXT_VERSION, 65). -define(GL_CONSTANT_COLOR, 16#8001). -define(GL_ONE_MINUS_CONSTANT_COLOR, 16#8002). -define(GL_CONSTANT_ALPHA, 16#8003). @@ -1021,6 +1021,8 @@ -define(GL_CLIP_DISTANCE3, 16#3003). -define(GL_CLIP_DISTANCE4, 16#3004). -define(GL_CLIP_DISTANCE5, 16#3005). +-define(GL_CLIP_DISTANCE6, 16#3006). +-define(GL_CLIP_DISTANCE7, 16#3007). -define(GL_MAX_CLIP_DISTANCES, 16#D32). -define(GL_MAJOR_VERSION, 16#821B). -define(GL_MINOR_VERSION, 16#821C). @@ -1111,6 +1113,9 @@ -define(GL_QUERY_NO_WAIT, 16#8E14). -define(GL_QUERY_BY_REGION_WAIT, 16#8E15). -define(GL_QUERY_BY_REGION_NO_WAIT, 16#8E16). +-define(GL_BUFFER_ACCESS_FLAGS, 16#911F). +-define(GL_BUFFER_MAP_LENGTH, 16#9120). +-define(GL_BUFFER_MAP_OFFSET, 16#9121). -define(GL_CLAMP_VERTEX_COLOR, 16#891A). -define(GL_CLAMP_FRAGMENT_COLOR, 16#891B). -define(GL_ALPHA_INTEGER, 16#8D97). @@ -1145,6 +1150,40 @@ -define(GL_SIGNED_NORMALIZED, 16#8F9C). -define(GL_PRIMITIVE_RESTART, 16#8F9D). -define(GL_PRIMITIVE_RESTART_INDEX, 16#8F9E). +-define(GL_CONTEXT_CORE_PROFILE_BIT, 16#1). +-define(GL_CONTEXT_COMPATIBILITY_PROFILE_BIT, 16#2). +-define(GL_LINES_ADJACENCY, 16#A). +-define(GL_LINE_STRIP_ADJACENCY, 16#B). +-define(GL_TRIANGLES_ADJACENCY, 16#C). +-define(GL_TRIANGLE_STRIP_ADJACENCY, 16#D). +-define(GL_PROGRAM_POINT_SIZE, 16#8642). +-define(GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS, 16#8C29). +-define(GL_FRAMEBUFFER_ATTACHMENT_LAYERED, 16#8DA7). +-define(GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS, 16#8DA8). +-define(GL_GEOMETRY_SHADER, 16#8DD9). +-define(GL_GEOMETRY_VERTICES_OUT, 16#8916). +-define(GL_GEOMETRY_INPUT_TYPE, 16#8917). +-define(GL_GEOMETRY_OUTPUT_TYPE, 16#8918). +-define(GL_MAX_GEOMETRY_UNIFORM_COMPONENTS, 16#8DDF). +-define(GL_MAX_GEOMETRY_OUTPUT_VERTICES, 16#8DE0). +-define(GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, 16#8DE1). +-define(GL_MAX_VERTEX_OUTPUT_COMPONENTS, 16#9122). +-define(GL_MAX_GEOMETRY_INPUT_COMPONENTS, 16#9123). +-define(GL_MAX_GEOMETRY_OUTPUT_COMPONENTS, 16#9124). +-define(GL_MAX_FRAGMENT_INPUT_COMPONENTS, 16#9125). +-define(GL_CONTEXT_PROFILE_MASK, 16#9126). +-define(GL_VERTEX_ATTRIB_ARRAY_DIVISOR, 16#88FE). +-define(GL_SAMPLE_SHADING, 16#8C36). +-define(GL_MIN_SAMPLE_SHADING_VALUE, 16#8C37). +-define(GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET, 16#8E5E). +-define(GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET, 16#8E5F). +-define(GL_TEXTURE_CUBE_MAP_ARRAY, 16#9009). +-define(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY, 16#900A). +-define(GL_PROXY_TEXTURE_CUBE_MAP_ARRAY, 16#900B). +-define(GL_SAMPLER_CUBE_MAP_ARRAY, 16#900C). +-define(GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW, 16#900D). +-define(GL_INT_SAMPLER_CUBE_MAP_ARRAY, 16#900E). +-define(GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY, 16#900F). -define(GL_TEXTURE0_ARB, 16#84C0). -define(GL_TEXTURE1_ARB, 16#84C1). -define(GL_TEXTURE2_ARB, 16#84C2). @@ -1712,6 +1751,211 @@ -define(GL_INVALID_INDEX, 16#FFFFFFFF). -define(GL_COPY_READ_BUFFER, 16#8F36). -define(GL_COPY_WRITE_BUFFER, 16#8F37). +-define(GL_DEPTH_CLAMP, 16#864F). +-define(GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION, 16#8E4C). +-define(GL_FIRST_VERTEX_CONVENTION, 16#8E4D). +-define(GL_LAST_VERTEX_CONVENTION, 16#8E4E). +-define(GL_PROVOKING_VERTEX, 16#8E4F). +-define(GL_TEXTURE_CUBE_MAP_SEAMLESS, 16#884F). +-define(GL_MAX_SERVER_WAIT_TIMEOUT, 16#9111). +-define(GL_OBJECT_TYPE, 16#9112). +-define(GL_SYNC_CONDITION, 16#9113). +-define(GL_SYNC_STATUS, 16#9114). +-define(GL_SYNC_FLAGS, 16#9115). +-define(GL_SYNC_FENCE, 16#9116). +-define(GL_SYNC_GPU_COMMANDS_COMPLETE, 16#9117). +-define(GL_UNSIGNALED, 16#9118). +-define(GL_SIGNALED, 16#9119). +-define(GL_ALREADY_SIGNALED, 16#911A). +-define(GL_TIMEOUT_EXPIRED, 16#911B). +-define(GL_CONDITION_SATISFIED, 16#911C). +-define(GL_WAIT_FAILED, 16#911D). +-define(GL_SYNC_FLUSH_COMMANDS_BIT, 16#1). +-define(GL_TIMEOUT_IGNORED, 16#FFFFFFFFFFFFFFFF). +-define(GL_SAMPLE_POSITION, 16#8E50). +-define(GL_SAMPLE_MASK, 16#8E51). +-define(GL_SAMPLE_MASK_VALUE, 16#8E52). +-define(GL_MAX_SAMPLE_MASK_WORDS, 16#8E59). +-define(GL_TEXTURE_2D_MULTISAMPLE, 16#9100). +-define(GL_PROXY_TEXTURE_2D_MULTISAMPLE, 16#9101). +-define(GL_TEXTURE_2D_MULTISAMPLE_ARRAY, 16#9102). +-define(GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY, 16#9103). +-define(GL_TEXTURE_BINDING_2D_MULTISAMPLE, 16#9104). +-define(GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY, 16#9105). +-define(GL_TEXTURE_SAMPLES, 16#9106). +-define(GL_TEXTURE_FIXED_SAMPLE_LOCATIONS, 16#9107). +-define(GL_SAMPLER_2D_MULTISAMPLE, 16#9108). +-define(GL_INT_SAMPLER_2D_MULTISAMPLE, 16#9109). +-define(GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE, 16#910A). +-define(GL_SAMPLER_2D_MULTISAMPLE_ARRAY, 16#910B). +-define(GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY, 16#910C). +-define(GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY, 16#910D). +-define(GL_MAX_COLOR_TEXTURE_SAMPLES, 16#910E). +-define(GL_MAX_DEPTH_TEXTURE_SAMPLES, 16#910F). +-define(GL_MAX_INTEGER_SAMPLES, 16#9110). +-define(GL_SAMPLE_SHADING_ARB, 16#8C36). +-define(GL_MIN_SAMPLE_SHADING_VALUE_ARB, 16#8C37). +-define(GL_TEXTURE_CUBE_MAP_ARRAY_ARB, 16#9009). +-define(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB, 16#900A). +-define(GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB, 16#900B). +-define(GL_SAMPLER_CUBE_MAP_ARRAY_ARB, 16#900C). +-define(GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB, 16#900D). +-define(GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB, 16#900E). +-define(GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB, 16#900F). +-define(GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB, 16#8E5E). +-define(GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB, 16#8E5F). +-define(GL_SHADER_INCLUDE_ARB, 16#8DAE). +-define(GL_NAMED_STRING_LENGTH_ARB, 16#8DE9). +-define(GL_NAMED_STRING_TYPE_ARB, 16#8DEA). +-define(GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, 16#8E8C). +-define(GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB, 16#8E8D). +-define(GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB, 16#8E8E). +-define(GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB, 16#8E8F). +-define(GL_SRC1_COLOR, 16#88F9). +-define(GL_ONE_MINUS_SRC1_COLOR, 16#88FA). +-define(GL_ONE_MINUS_SRC1_ALPHA, 16#88FB). +-define(GL_MAX_DUAL_SOURCE_DRAW_BUFFERS, 16#88FC). +-define(GL_ANY_SAMPLES_PASSED, 16#8C2F). +-define(GL_SAMPLER_BINDING, 16#8919). +-define(GL_RGB10_A2UI, 16#906F). +-define(GL_TEXTURE_SWIZZLE_R, 16#8E42). +-define(GL_TEXTURE_SWIZZLE_G, 16#8E43). +-define(GL_TEXTURE_SWIZZLE_B, 16#8E44). +-define(GL_TEXTURE_SWIZZLE_A, 16#8E45). +-define(GL_TEXTURE_SWIZZLE_RGBA, 16#8E46). +-define(GL_TIME_ELAPSED, 16#88BF). +-define(GL_TIMESTAMP, 16#8E28). +-define(GL_INT_2_10_10_10_REV, 16#8D9F). +-define(GL_DRAW_INDIRECT_BUFFER, 16#8F3F). +-define(GL_DRAW_INDIRECT_BUFFER_BINDING, 16#8F43). +-define(GL_GEOMETRY_SHADER_INVOCATIONS, 16#887F). +-define(GL_MAX_GEOMETRY_SHADER_INVOCATIONS, 16#8E5A). +-define(GL_MIN_FRAGMENT_INTERPOLATION_OFFSET, 16#8E5B). +-define(GL_MAX_FRAGMENT_INTERPOLATION_OFFSET, 16#8E5C). +-define(GL_FRAGMENT_INTERPOLATION_OFFSET_BITS, 16#8E5D). +-define(GL_DOUBLE_VEC2, 16#8FFC). +-define(GL_DOUBLE_VEC3, 16#8FFD). +-define(GL_DOUBLE_VEC4, 16#8FFE). +-define(GL_DOUBLE_MAT2, 16#8F46). +-define(GL_DOUBLE_MAT3, 16#8F47). +-define(GL_DOUBLE_MAT4, 16#8F48). +-define(GL_DOUBLE_MAT2x3, 16#8F49). +-define(GL_DOUBLE_MAT2x4, 16#8F4A). +-define(GL_DOUBLE_MAT3x2, 16#8F4B). +-define(GL_DOUBLE_MAT3x4, 16#8F4C). +-define(GL_DOUBLE_MAT4x2, 16#8F4D). +-define(GL_DOUBLE_MAT4x3, 16#8F4E). +-define(GL_ACTIVE_SUBROUTINES, 16#8DE5). +-define(GL_ACTIVE_SUBROUTINE_UNIFORMS, 16#8DE6). +-define(GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS, 16#8E47). +-define(GL_ACTIVE_SUBROUTINE_MAX_LENGTH, 16#8E48). +-define(GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH, 16#8E49). +-define(GL_MAX_SUBROUTINES, 16#8DE7). +-define(GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS, 16#8DE8). +-define(GL_NUM_COMPATIBLE_SUBROUTINES, 16#8E4A). +-define(GL_COMPATIBLE_SUBROUTINES, 16#8E4B). +-define(GL_PATCHES, 16#E). +-define(GL_PATCH_VERTICES, 16#8E72). +-define(GL_PATCH_DEFAULT_INNER_LEVEL, 16#8E73). +-define(GL_PATCH_DEFAULT_OUTER_LEVEL, 16#8E74). +-define(GL_TESS_CONTROL_OUTPUT_VERTICES, 16#8E75). +-define(GL_TESS_GEN_MODE, 16#8E76). +-define(GL_TESS_GEN_SPACING, 16#8E77). +-define(GL_TESS_GEN_VERTEX_ORDER, 16#8E78). +-define(GL_TESS_GEN_POINT_MODE, 16#8E79). +-define(GL_ISOLINES, 16#8E7A). +-define(GL_FRACTIONAL_ODD, 16#8E7B). +-define(GL_FRACTIONAL_EVEN, 16#8E7C). +-define(GL_MAX_PATCH_VERTICES, 16#8E7D). +-define(GL_MAX_TESS_GEN_LEVEL, 16#8E7E). +-define(GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS, 16#8E7F). +-define(GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS, 16#8E80). +-define(GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS, 16#8E81). +-define(GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS, 16#8E82). +-define(GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS, 16#8E83). +-define(GL_MAX_TESS_PATCH_COMPONENTS, 16#8E84). +-define(GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS, 16#8E85). +-define(GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS, 16#8E86). +-define(GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS, 16#8E89). +-define(GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS, 16#8E8A). +-define(GL_MAX_TESS_CONTROL_INPUT_COMPONENTS, 16#886C). +-define(GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS, 16#886D). +-define(GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS, 16#8E1E). +-define(GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS, 16#8E1F). +-define(GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER, 16#84F0). +-define(GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER, 16#84F1). +-define(GL_TESS_EVALUATION_SHADER, 16#8E87). +-define(GL_TESS_CONTROL_SHADER, 16#8E88). +-define(GL_TRANSFORM_FEEDBACK, 16#8E22). +-define(GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED, 16#8E23). +-define(GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, 16#8E24). +-define(GL_TRANSFORM_FEEDBACK_BINDING, 16#8E25). +-define(GL_MAX_TRANSFORM_FEEDBACK_BUFFERS, 16#8E70). +-define(GL_MAX_VERTEX_STREAMS, 16#8E71). +-define(GL_FIXED, 16#140C). +-define(GL_IMPLEMENTATION_COLOR_READ_TYPE, 16#8B9A). +-define(GL_IMPLEMENTATION_COLOR_READ_FORMAT, 16#8B9B). +-define(GL_LOW_FLOAT, 16#8DF0). +-define(GL_MEDIUM_FLOAT, 16#8DF1). +-define(GL_HIGH_FLOAT, 16#8DF2). +-define(GL_LOW_INT, 16#8DF3). +-define(GL_MEDIUM_INT, 16#8DF4). +-define(GL_HIGH_INT, 16#8DF5). +-define(GL_SHADER_COMPILER, 16#8DFA). +-define(GL_NUM_SHADER_BINARY_FORMATS, 16#8DF9). +-define(GL_MAX_VERTEX_UNIFORM_VECTORS, 16#8DFB). +-define(GL_MAX_VARYING_VECTORS, 16#8DFC). +-define(GL_MAX_FRAGMENT_UNIFORM_VECTORS, 16#8DFD). +-define(GL_PROGRAM_BINARY_RETRIEVABLE_HINT, 16#8257). +-define(GL_PROGRAM_BINARY_LENGTH, 16#8741). +-define(GL_NUM_PROGRAM_BINARY_FORMATS, 16#87FE). +-define(GL_PROGRAM_BINARY_FORMATS, 16#87FF). +-define(GL_VERTEX_SHADER_BIT, 16#1). +-define(GL_FRAGMENT_SHADER_BIT, 16#2). +-define(GL_GEOMETRY_SHADER_BIT, 16#4). +-define(GL_TESS_CONTROL_SHADER_BIT, 16#8). +-define(GL_TESS_EVALUATION_SHADER_BIT, 16#10). +-define(GL_ALL_SHADER_BITS, 16#FFFFFFFF). +-define(GL_PROGRAM_SEPARABLE, 16#8258). +-define(GL_ACTIVE_PROGRAM, 16#8259). +-define(GL_PROGRAM_PIPELINE_BINDING, 16#825A). +-define(GL_MAX_VIEWPORTS, 16#825B). +-define(GL_VIEWPORT_SUBPIXEL_BITS, 16#825C). +-define(GL_VIEWPORT_BOUNDS_RANGE, 16#825D). +-define(GL_LAYER_PROVOKING_VERTEX, 16#825E). +-define(GL_VIEWPORT_INDEX_PROVOKING_VERTEX, 16#825F). +-define(GL_UNDEFINED_VERTEX, 16#8260). +-define(GL_SYNC_CL_EVENT_ARB, 16#8240). +-define(GL_SYNC_CL_EVENT_COMPLETE_ARB, 16#8241). +-define(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB, 16#8242). +-define(GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB, 16#8243). +-define(GL_DEBUG_CALLBACK_FUNCTION_ARB, 16#8244). +-define(GL_DEBUG_CALLBACK_USER_PARAM_ARB, 16#8245). +-define(GL_DEBUG_SOURCE_API_ARB, 16#8246). +-define(GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB, 16#8247). +-define(GL_DEBUG_SOURCE_SHADER_COMPILER_ARB, 16#8248). +-define(GL_DEBUG_SOURCE_THIRD_PARTY_ARB, 16#8249). +-define(GL_DEBUG_SOURCE_APPLICATION_ARB, 16#824A). +-define(GL_DEBUG_SOURCE_OTHER_ARB, 16#824B). +-define(GL_DEBUG_TYPE_ERROR_ARB, 16#824C). +-define(GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB, 16#824D). +-define(GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB, 16#824E). +-define(GL_DEBUG_TYPE_PORTABILITY_ARB, 16#824F). +-define(GL_DEBUG_TYPE_PERFORMANCE_ARB, 16#8250). +-define(GL_DEBUG_TYPE_OTHER_ARB, 16#8251). +-define(GL_MAX_DEBUG_MESSAGE_LENGTH_ARB, 16#9143). +-define(GL_MAX_DEBUG_LOGGED_MESSAGES_ARB, 16#9144). +-define(GL_DEBUG_LOGGED_MESSAGES_ARB, 16#9145). +-define(GL_DEBUG_SEVERITY_HIGH_ARB, 16#9146). +-define(GL_DEBUG_SEVERITY_MEDIUM_ARB, 16#9147). +-define(GL_DEBUG_SEVERITY_LOW_ARB, 16#9148). +-define(GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB, 16#4). +-define(GL_LOSE_CONTEXT_ON_RESET_ARB, 16#8252). +-define(GL_GUILTY_CONTEXT_RESET_ARB, 16#8253). +-define(GL_INNOCENT_CONTEXT_RESET_ARB, 16#8254). +-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_CONSTANT_COLOR_EXT, 16#8001). -define(GL_ONE_MINUS_CONSTANT_COLOR_EXT, 16#8002). -define(GL_CONSTANT_ALPHA_EXT, 16#8003). @@ -2921,9 +3165,9 @@ -define(GL_ACTIVE_STENCIL_FACE_EXT, 16#8911). -define(GL_TEXT_FRAGMENT_SHADER_ATI, 16#8200). -define(GL_UNPACK_CLIENT_STORAGE_APPLE, 16#85B2). --define(GL_ELEMENT_ARRAY_APPLE, 16#8768). --define(GL_ELEMENT_ARRAY_TYPE_APPLE, 16#8769). --define(GL_ELEMENT_ARRAY_POINTER_APPLE, 16#876A). +-define(GL_ELEMENT_ARRAY_APPLE, 16#8A0C). +-define(GL_ELEMENT_ARRAY_TYPE_APPLE, 16#8A0D). +-define(GL_ELEMENT_ARRAY_POINTER_APPLE, 16#8A0E). -define(GL_DRAW_PIXELS_APPLE, 16#8A0A). -define(GL_FENCE_APPLE, 16#8A0B). -define(GL_VERTEX_ARRAY_BINDING_APPLE, 16#85B5). @@ -2931,6 +3175,7 @@ -define(GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE, 16#851E). -define(GL_VERTEX_ARRAY_STORAGE_HINT_APPLE, 16#851F). -define(GL_VERTEX_ARRAY_RANGE_POINTER_APPLE, 16#8521). +-define(GL_STORAGE_CLIENT_APPLE, 16#85B4). -define(GL_STORAGE_CACHED_APPLE, 16#85BE). -define(GL_STORAGE_SHARED_APPLE, 16#85BF). -define(GL_YCBCR_422_APPLE, 16#85B9). @@ -3244,6 +3489,12 @@ -define(GL_SEPARATE_ATTRIBS_NV, 16#8C8D). -define(GL_TRANSFORM_FEEDBACK_BUFFER_NV, 16#8C8E). -define(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV, 16#8C8F). +-define(GL_LAYER_NV, 16#8DAA). +-define(GL_NEXT_BUFFER_NV, -2). +-define(GL_SKIP_COMPONENTS4_NV, -3). +-define(GL_SKIP_COMPONENTS3_NV, -4). +-define(GL_SKIP_COMPONENTS2_NV, -5). +-define(GL_SKIP_COMPONENTS1_NV, -6). -define(GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT, 16#8DE2). -define(GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT, 16#8DE3). -define(GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT, 16#8DE4). @@ -3335,11 +3586,11 @@ -define(GL_SAMPLE_MASK_VALUE_NV, 16#8E52). -define(GL_TEXTURE_BINDING_RENDERBUFFER_NV, 16#8E53). -define(GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV, 16#8E54). --define(GL_MAX_SAMPLE_MASK_WORDS_NV, 16#8E59). -define(GL_TEXTURE_RENDERBUFFER_NV, 16#8E55). -define(GL_SAMPLER_RENDERBUFFER_NV, 16#8E56). -define(GL_INT_SAMPLER_RENDERBUFFER_NV, 16#8E57). -define(GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV, 16#8E58). +-define(GL_MAX_SAMPLE_MASK_WORDS_NV, 16#8E59). -define(GL_TRANSFORM_FEEDBACK_NV, 16#8E22). -define(GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV, 16#8E23). -define(GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV, 16#8E24). @@ -3365,6 +3616,247 @@ -define(GL_FIRST_VERTEX_CONVENTION_EXT, 16#8E4D). -define(GL_LAST_VERTEX_CONVENTION_EXT, 16#8E4E). -define(GL_PROVOKING_VERTEX_EXT, 16#8E4F). +-define(GL_ALPHA_SNORM, 16#9010). +-define(GL_LUMINANCE_SNORM, 16#9011). +-define(GL_LUMINANCE_ALPHA_SNORM, 16#9012). +-define(GL_INTENSITY_SNORM, 16#9013). +-define(GL_ALPHA8_SNORM, 16#9014). +-define(GL_LUMINANCE8_SNORM, 16#9015). +-define(GL_LUMINANCE8_ALPHA8_SNORM, 16#9016). +-define(GL_INTENSITY8_SNORM, 16#9017). +-define(GL_ALPHA16_SNORM, 16#9018). +-define(GL_LUMINANCE16_SNORM, 16#9019). +-define(GL_LUMINANCE16_ALPHA16_SNORM, 16#901A). +-define(GL_INTENSITY16_SNORM, 16#901B). +-define(GL_TEXTURE_RANGE_LENGTH_APPLE, 16#85B7). +-define(GL_TEXTURE_RANGE_POINTER_APPLE, 16#85B8). +-define(GL_TEXTURE_STORAGE_HINT_APPLE, 16#85BC). +-define(GL_STORAGE_PRIVATE_APPLE, 16#85BD). +-define(GL_HALF_APPLE, 16#140B). +-define(GL_RGBA_FLOAT32_APPLE, 16#8814). +-define(GL_RGB_FLOAT32_APPLE, 16#8815). +-define(GL_ALPHA_FLOAT32_APPLE, 16#8816). +-define(GL_INTENSITY_FLOAT32_APPLE, 16#8817). +-define(GL_LUMINANCE_FLOAT32_APPLE, 16#8818). +-define(GL_LUMINANCE_ALPHA_FLOAT32_APPLE, 16#8819). +-define(GL_RGBA_FLOAT16_APPLE, 16#881A). +-define(GL_RGB_FLOAT16_APPLE, 16#881B). +-define(GL_ALPHA_FLOAT16_APPLE, 16#881C). +-define(GL_INTENSITY_FLOAT16_APPLE, 16#881D). +-define(GL_LUMINANCE_FLOAT16_APPLE, 16#881E). +-define(GL_LUMINANCE_ALPHA_FLOAT16_APPLE, 16#881F). +-define(GL_COLOR_FLOAT_APPLE, 16#8A0F). +-define(GL_VERTEX_ATTRIB_MAP1_APPLE, 16#8A00). +-define(GL_VERTEX_ATTRIB_MAP2_APPLE, 16#8A01). +-define(GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE, 16#8A02). +-define(GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE, 16#8A03). +-define(GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE, 16#8A04). +-define(GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE, 16#8A05). +-define(GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE, 16#8A06). +-define(GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE, 16#8A07). +-define(GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE, 16#8A08). +-define(GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE, 16#8A09). +-define(GL_AUX_DEPTH_STENCIL_APPLE, 16#8A14). +-define(GL_BUFFER_OBJECT_APPLE, 16#85B3). +-define(GL_RELEASED_APPLE, 16#8A19). +-define(GL_VOLATILE_APPLE, 16#8A1A). +-define(GL_RETAINED_APPLE, 16#8A1B). +-define(GL_UNDEFINED_APPLE, 16#8A1C). +-define(GL_PURGEABLE_APPLE, 16#8A1D). +-define(GL_PACK_ROW_BYTES_APPLE, 16#8A15). +-define(GL_UNPACK_ROW_BYTES_APPLE, 16#8A16). +-define(GL_RGB_422_APPLE, 16#8A1F). +-define(GL_VIDEO_BUFFER_NV, 16#9020). +-define(GL_VIDEO_BUFFER_BINDING_NV, 16#9021). +-define(GL_FIELD_UPPER_NV, 16#9022). +-define(GL_FIELD_LOWER_NV, 16#9023). +-define(GL_NUM_VIDEO_CAPTURE_STREAMS_NV, 16#9024). +-define(GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV, 16#9025). +-define(GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV, 16#9026). +-define(GL_LAST_VIDEO_CAPTURE_STATUS_NV, 16#9027). +-define(GL_VIDEO_BUFFER_PITCH_NV, 16#9028). +-define(GL_VIDEO_COLOR_CONVERSION_MATRIX_NV, 16#9029). +-define(GL_VIDEO_COLOR_CONVERSION_MAX_NV, 16#902A). +-define(GL_VIDEO_COLOR_CONVERSION_MIN_NV, 16#902B). +-define(GL_VIDEO_COLOR_CONVERSION_OFFSET_NV, 16#902C). +-define(GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV, 16#902D). +-define(GL_PARTIAL_SUCCESS_NV, 16#902E). +-define(GL_SUCCESS_NV, 16#902F). +-define(GL_FAILURE_NV, 16#9030). +-define(GL_YCBYCR8_422_NV, 16#9031). +-define(GL_YCBAYCR8A_4224_NV, 16#9032). +-define(GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV, 16#9033). +-define(GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV, 16#9034). +-define(GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV, 16#9035). +-define(GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV, 16#9036). +-define(GL_Z4Y12Z4CB12Z4CR12_444_NV, 16#9037). +-define(GL_VIDEO_CAPTURE_FRAME_WIDTH_NV, 16#9038). +-define(GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV, 16#9039). +-define(GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV, 16#903A). +-define(GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV, 16#903B). +-define(GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV, 16#903C). +-define(GL_ACTIVE_PROGRAM_EXT, 16#8B8D). +-define(GL_BUFFER_GPU_ADDRESS_NV, 16#8F1D). +-define(GL_GPU_ADDRESS_NV, 16#8F34). +-define(GL_MAX_SHADER_BUFFER_ADDRESS_NV, 16#8F35). +-define(GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV, 16#8F1E). +-define(GL_ELEMENT_ARRAY_UNIFIED_NV, 16#8F1F). +-define(GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV, 16#8F20). +-define(GL_VERTEX_ARRAY_ADDRESS_NV, 16#8F21). +-define(GL_NORMAL_ARRAY_ADDRESS_NV, 16#8F22). +-define(GL_COLOR_ARRAY_ADDRESS_NV, 16#8F23). +-define(GL_INDEX_ARRAY_ADDRESS_NV, 16#8F24). +-define(GL_TEXTURE_COORD_ARRAY_ADDRESS_NV, 16#8F25). +-define(GL_EDGE_FLAG_ARRAY_ADDRESS_NV, 16#8F26). +-define(GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV, 16#8F27). +-define(GL_FOG_COORD_ARRAY_ADDRESS_NV, 16#8F28). +-define(GL_ELEMENT_ARRAY_ADDRESS_NV, 16#8F29). +-define(GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV, 16#8F2A). +-define(GL_VERTEX_ARRAY_LENGTH_NV, 16#8F2B). +-define(GL_NORMAL_ARRAY_LENGTH_NV, 16#8F2C). +-define(GL_COLOR_ARRAY_LENGTH_NV, 16#8F2D). +-define(GL_INDEX_ARRAY_LENGTH_NV, 16#8F2E). +-define(GL_TEXTURE_COORD_ARRAY_LENGTH_NV, 16#8F2F). +-define(GL_EDGE_FLAG_ARRAY_LENGTH_NV, 16#8F30). +-define(GL_SECONDARY_COLOR_ARRAY_LENGTH_NV, 16#8F31). +-define(GL_FOG_COORD_ARRAY_LENGTH_NV, 16#8F32). +-define(GL_ELEMENT_ARRAY_LENGTH_NV, 16#8F33). +-define(GL_DRAW_INDIRECT_UNIFIED_NV, 16#8F40). +-define(GL_DRAW_INDIRECT_ADDRESS_NV, 16#8F41). +-define(GL_DRAW_INDIRECT_LENGTH_NV, 16#8F42). +-define(GL_MAX_IMAGE_UNITS_EXT, 16#8F38). +-define(GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT, 16#8F39). +-define(GL_IMAGE_BINDING_NAME_EXT, 16#8F3A). +-define(GL_IMAGE_BINDING_LEVEL_EXT, 16#8F3B). +-define(GL_IMAGE_BINDING_LAYERED_EXT, 16#8F3C). +-define(GL_IMAGE_BINDING_LAYER_EXT, 16#8F3D). +-define(GL_IMAGE_BINDING_ACCESS_EXT, 16#8F3E). +-define(GL_IMAGE_1D_EXT, 16#904C). +-define(GL_IMAGE_2D_EXT, 16#904D). +-define(GL_IMAGE_3D_EXT, 16#904E). +-define(GL_IMAGE_2D_RECT_EXT, 16#904F). +-define(GL_IMAGE_CUBE_EXT, 16#9050). +-define(GL_IMAGE_BUFFER_EXT, 16#9051). +-define(GL_IMAGE_1D_ARRAY_EXT, 16#9052). +-define(GL_IMAGE_2D_ARRAY_EXT, 16#9053). +-define(GL_IMAGE_CUBE_MAP_ARRAY_EXT, 16#9054). +-define(GL_IMAGE_2D_MULTISAMPLE_EXT, 16#9055). +-define(GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT, 16#9056). +-define(GL_INT_IMAGE_1D_EXT, 16#9057). +-define(GL_INT_IMAGE_2D_EXT, 16#9058). +-define(GL_INT_IMAGE_3D_EXT, 16#9059). +-define(GL_INT_IMAGE_2D_RECT_EXT, 16#905A). +-define(GL_INT_IMAGE_CUBE_EXT, 16#905B). +-define(GL_INT_IMAGE_BUFFER_EXT, 16#905C). +-define(GL_INT_IMAGE_1D_ARRAY_EXT, 16#905D). +-define(GL_INT_IMAGE_2D_ARRAY_EXT, 16#905E). +-define(GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT, 16#905F). +-define(GL_INT_IMAGE_2D_MULTISAMPLE_EXT, 16#9060). +-define(GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT, 16#9061). +-define(GL_UNSIGNED_INT_IMAGE_1D_EXT, 16#9062). +-define(GL_UNSIGNED_INT_IMAGE_2D_EXT, 16#9063). +-define(GL_UNSIGNED_INT_IMAGE_3D_EXT, 16#9064). +-define(GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT, 16#9065). +-define(GL_UNSIGNED_INT_IMAGE_CUBE_EXT, 16#9066). +-define(GL_UNSIGNED_INT_IMAGE_BUFFER_EXT, 16#9067). +-define(GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT, 16#9068). +-define(GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT, 16#9069). +-define(GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT, 16#906A). +-define(GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT, 16#906B). +-define(GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT, 16#906C). +-define(GL_MAX_IMAGE_SAMPLES_EXT, 16#906D). +-define(GL_IMAGE_BINDING_FORMAT_EXT, 16#906E). +-define(GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT, 16#1). +-define(GL_ELEMENT_ARRAY_BARRIER_BIT_EXT, 16#2). +-define(GL_UNIFORM_BARRIER_BIT_EXT, 16#4). +-define(GL_TEXTURE_FETCH_BARRIER_BIT_EXT, 16#8). +-define(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT, 16#20). +-define(GL_COMMAND_BARRIER_BIT_EXT, 16#40). +-define(GL_PIXEL_BUFFER_BARRIER_BIT_EXT, 16#80). +-define(GL_TEXTURE_UPDATE_BARRIER_BIT_EXT, 16#100). +-define(GL_BUFFER_UPDATE_BARRIER_BIT_EXT, 16#200). +-define(GL_FRAMEBUFFER_BARRIER_BIT_EXT, 16#400). +-define(GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT, 16#800). +-define(GL_ATOMIC_COUNTER_BARRIER_BIT_EXT, 16#1000). +-define(GL_ALL_BARRIER_BITS_EXT, 16#FFFFFFFF). +-define(GL_DOUBLE_VEC2_EXT, 16#8FFC). +-define(GL_DOUBLE_VEC3_EXT, 16#8FFD). +-define(GL_DOUBLE_VEC4_EXT, 16#8FFE). +-define(GL_DOUBLE_MAT2_EXT, 16#8F46). +-define(GL_DOUBLE_MAT3_EXT, 16#8F47). +-define(GL_DOUBLE_MAT4_EXT, 16#8F48). +-define(GL_DOUBLE_MAT2x3_EXT, 16#8F49). +-define(GL_DOUBLE_MAT2x4_EXT, 16#8F4A). +-define(GL_DOUBLE_MAT3x2_EXT, 16#8F4B). +-define(GL_DOUBLE_MAT3x4_EXT, 16#8F4C). +-define(GL_DOUBLE_MAT4x2_EXT, 16#8F4D). +-define(GL_DOUBLE_MAT4x3_EXT, 16#8F4E). +-define(GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV, 16#8E5A). +-define(GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV, 16#8E5B). +-define(GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV, 16#8E5C). +-define(GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV, 16#8E5D). +-define(GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV, 16#8E5E). +-define(GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV, 16#8E5F). +-define(GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV, 16#8F44). +-define(GL_MAX_PROGRAM_SUBROUTINE_NUM_NV, 16#8F45). +-define(GL_INT64_NV, 16#140E). +-define(GL_UNSIGNED_INT64_NV, 16#140F). +-define(GL_INT8_NV, 16#8FE0). +-define(GL_INT8_VEC2_NV, 16#8FE1). +-define(GL_INT8_VEC3_NV, 16#8FE2). +-define(GL_INT8_VEC4_NV, 16#8FE3). +-define(GL_INT16_NV, 16#8FE4). +-define(GL_INT16_VEC2_NV, 16#8FE5). +-define(GL_INT16_VEC3_NV, 16#8FE6). +-define(GL_INT16_VEC4_NV, 16#8FE7). +-define(GL_INT64_VEC2_NV, 16#8FE9). +-define(GL_INT64_VEC3_NV, 16#8FEA). +-define(GL_INT64_VEC4_NV, 16#8FEB). +-define(GL_UNSIGNED_INT8_NV, 16#8FEC). +-define(GL_UNSIGNED_INT8_VEC2_NV, 16#8FED). +-define(GL_UNSIGNED_INT8_VEC3_NV, 16#8FEE). +-define(GL_UNSIGNED_INT8_VEC4_NV, 16#8FEF). +-define(GL_UNSIGNED_INT16_NV, 16#8FF0). +-define(GL_UNSIGNED_INT16_VEC2_NV, 16#8FF1). +-define(GL_UNSIGNED_INT16_VEC3_NV, 16#8FF2). +-define(GL_UNSIGNED_INT16_VEC4_NV, 16#8FF3). +-define(GL_UNSIGNED_INT64_VEC2_NV, 16#8FF5). +-define(GL_UNSIGNED_INT64_VEC3_NV, 16#8FF6). +-define(GL_UNSIGNED_INT64_VEC4_NV, 16#8FF7). +-define(GL_FLOAT16_NV, 16#8FF8). +-define(GL_FLOAT16_VEC2_NV, 16#8FF9). +-define(GL_FLOAT16_VEC3_NV, 16#8FFA). +-define(GL_FLOAT16_VEC4_NV, 16#8FFB). +-define(GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV, 16#10). +-define(GL_MAX_PROGRAM_PATCH_ATTRIBS_NV, 16#86D8). +-define(GL_TESS_CONTROL_PROGRAM_NV, 16#891E). +-define(GL_TESS_EVALUATION_PROGRAM_NV, 16#891F). +-define(GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV, 16#8C74). +-define(GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV, 16#8C75). +-define(GL_COVERAGE_SAMPLES_NV, 16#80A9). +-define(GL_COLOR_SAMPLES_NV, 16#8E20). +-define(GL_DATA_BUFFER_AMD, 16#9151). +-define(GL_PERFORMANCE_MONITOR_AMD, 16#9152). +-define(GL_QUERY_OBJECT_AMD, 16#9153). +-define(GL_VERTEX_ARRAY_OBJECT_AMD, 16#9154). +-define(GL_SAMPLER_OBJECT_AMD, 16#9155). +-define(GL_MAX_DEBUG_LOGGED_MESSAGES_AMD, 16#9144). +-define(GL_DEBUG_LOGGED_MESSAGES_AMD, 16#9145). +-define(GL_DEBUG_SEVERITY_HIGH_AMD, 16#9146). +-define(GL_DEBUG_SEVERITY_MEDIUM_AMD, 16#9147). +-define(GL_DEBUG_SEVERITY_LOW_AMD, 16#9148). +-define(GL_DEBUG_CATEGORY_API_ERROR_AMD, 16#9149). +-define(GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD, 16#914A). +-define(GL_DEBUG_CATEGORY_DEPRECATION_AMD, 16#914B). +-define(GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD, 16#914C). +-define(GL_DEBUG_CATEGORY_PERFORMANCE_AMD, 16#914D). +-define(GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD, 16#914E). +-define(GL_DEBUG_CATEGORY_APPLICATION_AMD, 16#914F). +-define(GL_DEBUG_CATEGORY_OTHER_AMD, 16#9150). +-define(GL_SURFACE_STATE_NV, 16#86EB). +-define(GL_SURFACE_REGISTERED_NV, 16#86FD). +-define(GL_SURFACE_MAPPED_NV, 16#8700). +-define(GL_WRITE_DISCARD_NV, 16#88BE). -define(GL_VERSION_1_2, 1). -define(GL_VERSION_1_2_DEPRECATED, 1). -define(GL_VERSION_1_3, 1). @@ -3375,8 +3867,11 @@ -define(GL_VERSION_2_0, 1). -define(GL_VERSION_2_1, 1). -define(GL_VERSION_3_0, 1). --define(GL_VERSION_3_0_DEPRECATED, 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_ARB_multitexture, 1). -define(GL_ARB_transpose_matrix, 1). -define(GL_ARB_multisample, 1). @@ -3428,6 +3923,46 @@ -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_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_EXT_abgr, 1). -define(GL_EXT_blend_color, 1). -define(GL_EXT_polygon_offset, 1). @@ -3684,3 +4219,34 @@ -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). diff --git a/lib/wx/src/gen/gl.erl b/lib/wx/src/gen/gl.erl index bf56067da1..0ebf51d28a 100644 --- a/lib/wx/src/gen/gl.erl +++ b/lib/wx/src/gen/gl.erl @@ -50,6 +50,9 @@ -define(GLintptr,64/native-unsigned). -define(GLUquadric,64/native-unsigned). -define(GLhandleARB,64/native-unsigned). +-define(GLsync,64/native-unsigned). +-define(GLuint64,64/native-unsigned). +-define(GLint64,64/native-signed). -type clamp() :: float(). -type offset() :: non_neg_integer(). -type enum() :: non_neg_integer(). @@ -176,44 +179,95 @@ enablei/2,disablei/2,isEnabledi/2,beginTransformFeedback/1,endTransformFeedback/0, bindBufferRange/5,bindBufferBase/3,transformFeedbackVaryings/3,getTransformFeedbackVarying/3, clampColor/2,beginConditionalRender/2,endConditionalRender/0,vertexAttribIPointer/5, - getVertexAttribIiv/2,getVertexAttribIuiv/2,getUniformuiv/2,bindFragDataLocation/3, + getVertexAttribIiv/2,getVertexAttribIuiv/2,vertexAttribI1i/2,vertexAttribI2i/3, + vertexAttribI3i/4,vertexAttribI4i/5,vertexAttribI1ui/2,vertexAttribI2ui/3, + vertexAttribI3ui/4,vertexAttribI4ui/5,vertexAttribI1iv/2,vertexAttribI2iv/2, + vertexAttribI3iv/2,vertexAttribI4iv/2,vertexAttribI1uiv/2,vertexAttribI2uiv/2, + vertexAttribI3uiv/2,vertexAttribI4uiv/2,vertexAttribI4bv/2,vertexAttribI4sv/2, + vertexAttribI4ubv/2,vertexAttribI4usv/2,getUniformuiv/2,bindFragDataLocation/3, getFragDataLocation/2,uniform1ui/2,uniform2ui/3,uniform3ui/4,uniform4ui/5, uniform1uiv/2,uniform2uiv/2,uniform3uiv/2,uniform4uiv/2,texParameterIiv/3, texParameterIuiv/3,getTexParameterIiv/2,getTexParameterIuiv/2,clearBufferiv/3, - clearBufferuiv/3,clearBufferfv/3,clearBufferfi/4,getStringi/2,vertexAttribI1i/2, - vertexAttribI2i/3,vertexAttribI3i/4,vertexAttribI4i/5,vertexAttribI1ui/2, - vertexAttribI2ui/3,vertexAttribI3ui/4,vertexAttribI4ui/5,vertexAttribI1iv/2, - vertexAttribI2iv/2,vertexAttribI3iv/2,vertexAttribI4iv/2,vertexAttribI1uiv/2, - vertexAttribI2uiv/2,vertexAttribI3uiv/2,vertexAttribI4uiv/2,vertexAttribI4bv/2, - vertexAttribI4sv/2,vertexAttribI4ubv/2,vertexAttribI4usv/2,drawArraysInstanced/4, - drawElementsInstanced/5,texBuffer/3,primitiveRestartIndex/1,loadTransposeMatrixfARB/1, - loadTransposeMatrixdARB/1,multTransposeMatrixfARB/1,multTransposeMatrixdARB/1, - weightbvARB/1,weightsvARB/1,weightivARB/1,weightfvARB/1,weightdvARB/1, - weightubvARB/1,weightusvARB/1,weightuivARB/1,vertexBlendARB/1,currentPaletteMatrixARB/1, + clearBufferuiv/3,clearBufferfv/3,clearBufferfi/4,getStringi/2,drawArraysInstanced/4, + drawElementsInstanced/5,texBuffer/3,primitiveRestartIndex/1,getInteger64i_v/2, + getBufferParameteri64v/2,framebufferTexture/4,vertexAttribDivisor/2, + minSampleShading/1,blendEquationi/2,blendEquationSeparatei/3,blendFunci/3, + blendFuncSeparatei/5,loadTransposeMatrixfARB/1,loadTransposeMatrixdARB/1, + multTransposeMatrixfARB/1,multTransposeMatrixdARB/1,weightbvARB/1, + weightsvARB/1,weightivARB/1,weightfvARB/1,weightdvARB/1,weightubvARB/1, + weightusvARB/1,weightuivARB/1,vertexBlendARB/1,currentPaletteMatrixARB/1, matrixIndexubvARB/1,matrixIndexusvARB/1,matrixIndexuivARB/1,programStringARB/3, bindProgramARB/2,deleteProgramsARB/1,genProgramsARB/1,programEnvParameter4dARB/6, programEnvParameter4dvARB/3,programEnvParameter4fARB/6,programEnvParameter4fvARB/3, programLocalParameter4dARB/6,programLocalParameter4dvARB/3,programLocalParameter4fARB/6, programLocalParameter4fvARB/3,getProgramEnvParameterdvARB/2,getProgramEnvParameterfvARB/2, getProgramLocalParameterdvARB/2,getProgramLocalParameterfvARB/2, - getProgramStringARB/3,deleteObjectARB/1,getHandleARB/1,detachObjectARB/2, - createShaderObjectARB/1,shaderSourceARB/2,compileShaderARB/1,createProgramObjectARB/0, - attachObjectARB/2,linkProgramARB/1,useProgramObjectARB/1,validateProgramARB/1, - getObjectParameterfvARB/2,getObjectParameterivARB/2,getInfoLogARB/2, - getAttachedObjectsARB/2,getUniformLocationARB/2,getActiveUniformARB/3, - getUniformfvARB/2,getUniformivARB/2,getShaderSourceARB/2,bindAttribLocationARB/3, - getActiveAttribARB/3,getAttribLocationARB/2,isRenderbuffer/1,bindRenderbuffer/2, - deleteRenderbuffers/1,genRenderbuffers/1,renderbufferStorage/4,getRenderbufferParameteriv/2, + getProgramStringARB/3,getBufferParameterivARB/2,deleteObjectARB/1, + getHandleARB/1,detachObjectARB/2,createShaderObjectARB/1,shaderSourceARB/2, + compileShaderARB/1,createProgramObjectARB/0,attachObjectARB/2,linkProgramARB/1, + useProgramObjectARB/1,validateProgramARB/1,getObjectParameterfvARB/2, + getObjectParameterivARB/2,getInfoLogARB/2,getAttachedObjectsARB/2, + getUniformLocationARB/2,getActiveUniformARB/3,getUniformfvARB/2, + getUniformivARB/2,getShaderSourceARB/2,bindAttribLocationARB/3,getActiveAttribARB/3, + getAttribLocationARB/2,isRenderbuffer/1,bindRenderbuffer/2,deleteRenderbuffers/1, + genRenderbuffers/1,renderbufferStorage/4,getRenderbufferParameteriv/2, isFramebuffer/1,bindFramebuffer/2,deleteFramebuffers/1,genFramebuffers/1, checkFramebufferStatus/1,framebufferTexture1D/5,framebufferTexture2D/5, framebufferTexture3D/6,framebufferRenderbuffer/4,getFramebufferAttachmentParameteriv/3, generateMipmap/1,blitFramebuffer/10,renderbufferStorageMultisample/5, - framebufferTextureLayer/5,programParameteriARB/3,framebufferTextureARB/4, - framebufferTextureFaceARB/5,vertexAttribDivisorARB/2,flushMappedBufferRange/3, + framebufferTextureLayer/5,framebufferTextureFaceARB/5,flushMappedBufferRange/3, bindVertexArray/1,deleteVertexArrays/1,genVertexArrays/1,isVertexArray/1, getUniformIndices/2,getActiveUniformsiv/3,getActiveUniformName/3, getUniformBlockIndex/2,getActiveUniformBlockiv/4,getActiveUniformBlockName/3, - uniformBlockBinding/3,copyBufferSubData/5,resizeBuffersMESA/0,windowPos4dMESA/4, + uniformBlockBinding/3,copyBufferSubData/5,drawElementsBaseVertex/5, + drawRangeElementsBaseVertex/7,drawElementsInstancedBaseVertex/6, + provokingVertex/1,fenceSync/2,isSync/1,deleteSync/1,clientWaitSync/3, + waitSync/3,getInteger64v/1,getSynciv/3,texImage2DMultisample/6,texImage3DMultisample/7, + getMultisamplefv/2,sampleMaski/2,namedStringARB/3,deleteNamedStringARB/1, + compileShaderIncludeARB/2,isNamedStringARB/1,getNamedStringARB/2, + getNamedStringivARB/2,bindFragDataLocationIndexed/4,getFragDataIndex/2, + genSamplers/1,deleteSamplers/1,isSampler/1,bindSampler/2,samplerParameteri/3, + samplerParameteriv/3,samplerParameterf/3,samplerParameterfv/3,samplerParameterIiv/3, + samplerParameterIuiv/3,getSamplerParameteriv/2,getSamplerParameterIiv/2, + getSamplerParameterfv/2,getSamplerParameterIuiv/2,queryCounter/2, + getQueryObjecti64v/2,getQueryObjectui64v/2,drawArraysIndirect/2, + drawElementsIndirect/3,uniform1d/2,uniform2d/3,uniform3d/4,uniform4d/5, + uniform1dv/2,uniform2dv/2,uniform3dv/2,uniform4dv/2,uniformMatrix2dv/3, + uniformMatrix3dv/3,uniformMatrix4dv/3,uniformMatrix2x3dv/3,uniformMatrix2x4dv/3, + uniformMatrix3x2dv/3,uniformMatrix3x4dv/3,uniformMatrix4x2dv/3,uniformMatrix4x3dv/3, + getUniformdv/2,getSubroutineUniformLocation/3,getSubroutineIndex/3, + getActiveSubroutineUniformName/4,getActiveSubroutineName/4,uniformSubroutinesuiv/2, + getUniformSubroutineuiv/2,getProgramStageiv/3,patchParameteri/2, + patchParameterfv/2,bindTransformFeedback/2,deleteTransformFeedbacks/1, + genTransformFeedbacks/1,isTransformFeedback/1,pauseTransformFeedback/0, + resumeTransformFeedback/0,drawTransformFeedback/2,drawTransformFeedbackStream/3, + beginQueryIndexed/3,endQueryIndexed/2,getQueryIndexediv/3,releaseShaderCompiler/0, + shaderBinary/3,getShaderPrecisionFormat/2,depthRangef/2,clearDepthf/1, + getProgramBinary/2,programBinary/3,programParameteri/3,useProgramStages/3, + activeShaderProgram/2,createShaderProgramv/2,bindProgramPipeline/1, + deleteProgramPipelines/1,genProgramPipelines/1,isProgramPipeline/1, + getProgramPipelineiv/2,programUniform1i/3,programUniform1iv/3,programUniform1f/3, + programUniform1fv/3,programUniform1d/3,programUniform1dv/3,programUniform1ui/3, + programUniform1uiv/3,programUniform2i/4,programUniform2iv/3,programUniform2f/4, + programUniform2fv/3,programUniform2d/4,programUniform2dv/3,programUniform2ui/4, + programUniform2uiv/3,programUniform3i/5,programUniform3iv/3,programUniform3f/5, + programUniform3fv/3,programUniform3d/5,programUniform3dv/3,programUniform3ui/5, + programUniform3uiv/3,programUniform4i/6,programUniform4iv/3,programUniform4f/6, + programUniform4fv/3,programUniform4d/6,programUniform4dv/3,programUniform4ui/6, + programUniform4uiv/3,programUniformMatrix2fv/4,programUniformMatrix3fv/4, + programUniformMatrix4fv/4,programUniformMatrix2dv/4,programUniformMatrix3dv/4, + programUniformMatrix4dv/4,programUniformMatrix2x3fv/4,programUniformMatrix3x2fv/4, + programUniformMatrix2x4fv/4,programUniformMatrix4x2fv/4,programUniformMatrix3x4fv/4, + programUniformMatrix4x3fv/4,programUniformMatrix2x3dv/4,programUniformMatrix3x2dv/4, + programUniformMatrix2x4dv/4,programUniformMatrix4x2dv/4,programUniformMatrix3x4dv/4, + programUniformMatrix4x3dv/4,validateProgramPipeline/1,getProgramPipelineInfoLog/2, + vertexAttribL1d/2,vertexAttribL2d/3,vertexAttribL3d/4,vertexAttribL4d/5, + vertexAttribL1dv/2,vertexAttribL2dv/2,vertexAttribL3dv/2,vertexAttribL4dv/2, + vertexAttribLPointer/5,getVertexAttribLdv/2,viewportArrayv/2,viewportIndexedf/5, + viewportIndexedfv/2,scissorArrayv/2,scissorIndexed/5,scissorIndexedv/2, + depthRangeArrayv/2,depthRangeIndexed/3,getFloati_v/2,getDoublei_v/2, + debugMessageControlARB/5,debugMessageInsertARB/5,getDebugMessageLogARB/2, + getGraphicsResetStatusARB/0,resizeBuffersMESA/0,windowPos4dMESA/4, windowPos4dvMESA/1,windowPos4fMESA/4,windowPos4fvMESA/1,windowPos4iMESA/4, windowPos4ivMESA/1,windowPos4sMESA/4,windowPos4svMESA/1,depthBoundsEXT/2, stencilClearTagEXT/2]). @@ -3197,11 +3251,11 @@ drawBuffers(Bufs) -> stencilOpSeparate(Face,Sfail,Dpfail,Dppass) -> cast(5442, <>). -%% @spec (Frontfunc::enum(),Backfunc::enum(),Ref::integer(),Mask::integer()) -> ok +%% @spec (Face::enum(),Func::enum(),Ref::integer(),Mask::integer()) -> ok %% @doc See external documentation. -spec stencilFuncSeparate(enum(),enum(),integer(),integer()) -> ok. -stencilFuncSeparate(Frontfunc,Backfunc,Ref,Mask) -> - cast(5443, <>). +stencilFuncSeparate(Face,Func,Ref,Mask) -> + cast(5443, <>). %% @spec (Face::enum(),Mask::integer()) -> ok %% @doc See external documentation. @@ -3887,246 +3941,246 @@ getVertexAttribIiv(Index,Pname) -> getVertexAttribIuiv(Index,Pname) -> call(5544, <>). +%% @spec (Index::integer(),X::integer()) -> ok +%% @doc See external documentation. +-spec vertexAttribI1i(integer(),integer()) -> ok. +vertexAttribI1i(Index,X) -> + cast(5545, <>). + +%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok +%% @doc See external documentation. +-spec vertexAttribI2i(integer(),integer(),integer()) -> ok. +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. +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. +vertexAttribI4i(Index,X,Y,Z,W) -> + cast(5548, <>). + +%% @spec (Index::integer(),X::integer()) -> ok +%% @doc See external documentation. +-spec vertexAttribI1ui(integer(),integer()) -> ok. +vertexAttribI1ui(Index,X) -> + cast(5549, <>). + +%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok +%% @doc See external documentation. +-spec vertexAttribI2ui(integer(),integer(),integer()) -> ok. +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. +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. +vertexAttribI4ui(Index,X,Y,Z,W) -> + cast(5552, <>). + +%% @spec (Index,{X}) -> ok +%% @equiv vertexAttribI1i(Index,X) +-spec vertexAttribI1iv(integer(),{integer()}) -> ok. +vertexAttribI1iv(Index,{X}) -> vertexAttribI1i(Index,X). + +%% @spec (Index,{X,Y}) -> ok +%% @equiv vertexAttribI2i(Index,X,Y) +-spec vertexAttribI2iv(integer(),{integer(),integer()}) -> ok. +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. +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. +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. +vertexAttribI1uiv(Index,{X}) -> vertexAttribI1ui(Index,X). + +%% @spec (Index,{X,Y}) -> ok +%% @equiv vertexAttribI2ui(Index,X,Y) +-spec vertexAttribI2uiv(integer(),{integer(),integer()}) -> ok. +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. +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. +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. +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. +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. +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. +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()}. getUniformuiv(Program,Location) -> - call(5545, <>). + call(5557, <>). %% @spec (Program::integer(),Color::integer(),Name::string()) -> ok %% @doc See external documentation. -spec bindFragDataLocation(integer(),integer(),string()) -> ok. bindFragDataLocation(Program,Color,Name) -> - cast(5546, <>). + cast(5558, <>). %% @spec (Program::integer(),Name::string()) -> integer() %% @doc See external documentation. -spec getFragDataLocation(integer(),string()) -> integer(). getFragDataLocation(Program,Name) -> - call(5547, <>). + call(5559, <>). %% @spec (Location::integer(),V0::integer()) -> ok %% @doc See external documentation. -spec uniform1ui(integer(),integer()) -> ok. uniform1ui(Location,V0) -> - cast(5548, <>). + cast(5560, <>). %% @spec (Location::integer(),V0::integer(),V1::integer()) -> ok %% @doc See external documentation. -spec uniform2ui(integer(),integer(),integer()) -> ok. uniform2ui(Location,V0,V1) -> - cast(5549, <>). + cast(5561, <>). %% @spec (Location::integer(),V0::integer(),V1::integer(),V2::integer()) -> ok %% @doc See external documentation. -spec uniform3ui(integer(),integer(),integer(),integer()) -> ok. uniform3ui(Location,V0,V1,V2) -> - cast(5550, <>). + 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. uniform4ui(Location,V0,V1,V2,V3) -> - cast(5551, <>). + cast(5563, <>). %% @spec (Location::integer(),Value::[integer()]) -> ok %% @doc See external documentation. -spec uniform1uiv(integer(),[integer()]) -> ok. uniform1uiv(Location,Value) -> - cast(5552, <> || 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. uniform2uiv(Location,Value) -> - cast(5553, <> || {V1,V2} <- Value>>)/binary>>). %% @spec (Location::integer(),Value::[{integer(),integer(),integer()}]) -> ok %% @doc See external documentation. -spec uniform3uiv(integer(),[{integer(),integer(),integer()}]) -> ok. uniform3uiv(Location,Value) -> - cast(5554, <> || {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. uniform4uiv(Location,Value) -> - cast(5555, <> || {V1,V2,V3,V4} <- Value>>)/binary>>). %% @spec (Target::enum(),Pname::enum(),Params::{integer()}) -> ok %% @doc See external documentation. -spec texParameterIiv(enum(),enum(),{integer()}) -> ok. texParameterIiv(Target,Pname,Params) -> - cast(5556, <> ||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. texParameterIuiv(Target,Pname,Params) -> - cast(5557, <> ||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()}. getTexParameterIiv(Target,Pname) -> - call(5558, <>). + call(5570, <>). %% @spec (Target::enum(),Pname::enum()) -> {integer(),integer(),integer(),integer()} %% @doc See external documentation. -spec getTexParameterIuiv(enum(),enum()) -> {integer(),integer(),integer(),integer()}. getTexParameterIuiv(Target,Pname) -> - call(5559, <>). + call(5571, <>). %% @spec (Buffer::enum(),Drawbuffer::integer(),Value::{integer()}) -> ok %% @doc See external documentation. -spec clearBufferiv(enum(),integer(),{integer()}) -> ok. clearBufferiv(Buffer,Drawbuffer,Value) -> - cast(5560, <> ||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. clearBufferuiv(Buffer,Drawbuffer,Value) -> - cast(5561, <> ||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. clearBufferfv(Buffer,Drawbuffer,Value) -> - cast(5562, <> ||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. clearBufferfi(Buffer,Drawbuffer,Depth,Stencil) -> - cast(5563, <>). + cast(5575, <>). %% @spec (Name::enum(),Index::integer()) -> string() %% @doc See external documentation. -spec getStringi(enum(),integer()) -> string(). getStringi(Name,Index) -> - call(5564, <>). - -%% @spec (Index::integer(),X::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI1i(integer(),integer()) -> ok. -vertexAttribI1i(Index,X) -> - cast(5565, <>). - -%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI2i(integer(),integer(),integer()) -> ok. -vertexAttribI2i(Index,X,Y) -> - cast(5566, <>). - -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI3i(integer(),integer(),integer(),integer()) -> ok. -vertexAttribI3i(Index,X,Y,Z) -> - cast(5567, <>). - -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI4i(integer(),integer(),integer(),integer(),integer()) -> ok. -vertexAttribI4i(Index,X,Y,Z,W) -> - cast(5568, <>). - -%% @spec (Index::integer(),X::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI1ui(integer(),integer()) -> ok. -vertexAttribI1ui(Index,X) -> - cast(5569, <>). - -%% @spec (Index::integer(),X::integer(),Y::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI2ui(integer(),integer(),integer()) -> ok. -vertexAttribI2ui(Index,X,Y) -> - cast(5570, <>). - -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI3ui(integer(),integer(),integer(),integer()) -> ok. -vertexAttribI3ui(Index,X,Y,Z) -> - cast(5571, <>). - -%% @spec (Index::integer(),X::integer(),Y::integer(),Z::integer(),W::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribI4ui(integer(),integer(),integer(),integer(),integer()) -> ok. -vertexAttribI4ui(Index,X,Y,Z,W) -> - cast(5572, <>). - -%% @spec (Index,{X}) -> ok -%% @equiv vertexAttribI1i(Index,X) --spec vertexAttribI1iv(integer(),{integer()}) -> ok. -vertexAttribI1iv(Index,{X}) -> vertexAttribI1i(Index,X). - -%% @spec (Index,{X,Y}) -> ok -%% @equiv vertexAttribI2i(Index,X,Y) --spec vertexAttribI2iv(integer(),{integer(),integer()}) -> ok. -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. -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. -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. -vertexAttribI1uiv(Index,{X}) -> vertexAttribI1ui(Index,X). - -%% @spec (Index,{X,Y}) -> ok -%% @equiv vertexAttribI2ui(Index,X,Y) --spec vertexAttribI2uiv(integer(),{integer(),integer()}) -> ok. -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. -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. -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. -vertexAttribI4bv(Index,{V1,V2,V3,V4}) -> - cast(5573, <>). - -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttribI4sv(integer(),{integer(),integer(),integer(),integer()}) -> ok. -vertexAttribI4sv(Index,{V1,V2,V3,V4}) -> - cast(5574, <>). - -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttribI4ubv(integer(),{integer(),integer(),integer(),integer()}) -> ok. -vertexAttribI4ubv(Index,{V1,V2,V3,V4}) -> - cast(5575, <>). - -%% @spec (Index::integer(),V::{integer(),integer(),integer(),integer()}) -> ok -%% @doc See external documentation. --spec vertexAttribI4usv(integer(),{integer(),integer(),integer(),integer()}) -> ok. -vertexAttribI4usv(Index,{V1,V2,V3,V4}) -> - cast(5576, <>). + call(5576, <>). %% @spec (Mode::enum(),First::integer(),Count::integer(),Primcount::integer()) -> ok %% @doc See external documentation. @@ -4155,609 +4209,1762 @@ texBuffer(Target,Internalformat,Buffer) -> primitiveRestartIndex(Index) -> cast(5581, <>). +%% @spec (Target::enum(),Index::integer()) -> [integer()] +%% @doc See external documentation. +-spec getInteger64i_v(enum(),integer()) -> [integer()]. +getInteger64i_v(Target,Index) -> + call(5582, <>). + +%% @spec (Target::enum(),Pname::enum()) -> [integer()] +%% @doc See external documentation. +-spec getBufferParameteri64v(enum(),enum()) -> [integer()]. +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. +framebufferTexture(Target,Attachment,Texture,Level) -> + cast(5584, <>). + +%% @spec (Index::integer(),Divisor::integer()) -> ok +%% @doc See external documentation. +-spec vertexAttribDivisor(integer(),integer()) -> ok. +vertexAttribDivisor(Index,Divisor) -> + cast(5585, <>). + +%% @spec (Value::clamp()) -> ok +%% @doc See external documentation. +-spec minSampleShading(clamp()) -> ok. +minSampleShading(Value) -> + cast(5586, <>). + +%% @spec (Buf::integer(),Mode::enum()) -> ok +%% @doc See external documentation. +-spec blendEquationi(integer(),enum()) -> ok. +blendEquationi(Buf,Mode) -> + cast(5587, <>). + +%% @spec (Buf::integer(),ModeRGB::enum(),ModeAlpha::enum()) -> ok +%% @doc See external documentation. +-spec blendEquationSeparatei(integer(),enum(),enum()) -> ok. +blendEquationSeparatei(Buf,ModeRGB,ModeAlpha) -> + cast(5588, <>). + +%% @spec (Buf::integer(),Src::enum(),Dst::enum()) -> ok +%% @doc See external documentation. +-spec blendFunci(integer(),enum(),enum()) -> ok. +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. +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. loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - cast(5582, <>); + cast(5591, <>); loadTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - cast(5582, <>). + 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. loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - cast(5583, <>); + cast(5592, <>); loadTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - cast(5583, <>). + 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. multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - cast(5584, <>); + cast(5593, <>); multTransposeMatrixfARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - cast(5584, <>). + 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. multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12,M13,M14,M15,M16}) -> - cast(5585, <>); + cast(5594, <>); multTransposeMatrixdARB({M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,M11,M12}) -> - cast(5585, <>). + cast(5594, <>). %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. -spec weightbvARB([integer()]) -> ok. weightbvARB(Weights) -> - cast(5586, <<(length(Weights)):?GLuint, + 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. weightsvARB(Weights) -> - cast(5587, <<(length(Weights)):?GLuint, + 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. weightivARB(Weights) -> - cast(5588, <<(length(Weights)):?GLuint, + 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. weightfvARB(Weights) -> - cast(5589, <<(length(Weights)):?GLuint, + 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. weightdvARB(Weights) -> - cast(5590, <<(length(Weights)):?GLuint,0:32, + cast(5599, <<(length(Weights)):?GLuint,0:32, (<< <> || C <- Weights>>)/binary>>). %% @spec (Weights::[integer()]) -> ok %% @doc See external documentation. -spec weightubvARB([integer()]) -> ok. weightubvARB(Weights) -> - cast(5591, <<(length(Weights)):?GLuint, + 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. weightusvARB(Weights) -> - cast(5592, <<(length(Weights)):?GLuint, + 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. weightuivARB(Weights) -> - cast(5593, <<(length(Weights)):?GLuint, + 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. vertexBlendARB(Count) -> - cast(5594, <>). + cast(5603, <>). %% @spec (Index::integer()) -> ok %% @doc See external documentation. -spec currentPaletteMatrixARB(integer()) -> ok. currentPaletteMatrixARB(Index) -> - cast(5595, <>). + cast(5604, <>). %% @spec (Indices::[integer()]) -> ok %% @doc See external documentation. -spec matrixIndexubvARB([integer()]) -> ok. matrixIndexubvARB(Indices) -> - cast(5596, <<(length(Indices)):?GLuint, + 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. matrixIndexusvARB(Indices) -> - cast(5597, <<(length(Indices)):?GLuint, + 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. matrixIndexuivARB(Indices) -> - cast(5598, <<(length(Indices)):?GLuint, + 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. programStringARB(Target,Format,String) -> - cast(5599, <>). + cast(5608, <>). %% @spec (Target::enum(),Program::integer()) -> ok %% @doc See external documentation. -spec bindProgramARB(enum(),integer()) -> ok. bindProgramARB(Target,Program) -> - cast(5600, <>). + cast(5609, <>). %% @spec (Programs::[integer()]) -> ok %% @doc See external documentation. -spec deleteProgramsARB([integer()]) -> ok. deleteProgramsARB(Programs) -> - cast(5601, <<(length(Programs)):?GLuint, + 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()]. genProgramsARB(N) -> - call(5602, <>). + 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. programEnvParameter4dARB(Target,Index,X,Y,Z,W) -> - cast(5603, <>). + 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. programEnvParameter4dvARB(Target,Index,{P1,P2,P3,P4}) -> - cast(5604, <>). + 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. programEnvParameter4fARB(Target,Index,X,Y,Z,W) -> - cast(5605, <>). + 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. programEnvParameter4fvARB(Target,Index,{P1,P2,P3,P4}) -> - cast(5606, <>). + 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. programLocalParameter4dARB(Target,Index,X,Y,Z,W) -> - cast(5607, <>). + 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. programLocalParameter4dvARB(Target,Index,{P1,P2,P3,P4}) -> - cast(5608, <>). + 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. programLocalParameter4fARB(Target,Index,X,Y,Z,W) -> - cast(5609, <>). + 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. programLocalParameter4fvARB(Target,Index,{P1,P2,P3,P4}) -> - cast(5610, <>). + cast(5619, <>). %% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} %% @doc See external documentation. -spec getProgramEnvParameterdvARB(enum(),integer()) -> {float(),float(),float(),float()}. getProgramEnvParameterdvARB(Target,Index) -> - call(5611, <>). + call(5620, <>). %% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} %% @doc See external documentation. -spec getProgramEnvParameterfvARB(enum(),integer()) -> {float(),float(),float(),float()}. getProgramEnvParameterfvARB(Target,Index) -> - call(5612, <>). + call(5621, <>). %% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} %% @doc See external documentation. -spec getProgramLocalParameterdvARB(enum(),integer()) -> {float(),float(),float(),float()}. getProgramLocalParameterdvARB(Target,Index) -> - call(5613, <>). + call(5622, <>). %% @spec (Target::enum(),Index::integer()) -> {float(),float(),float(),float()} %% @doc See external documentation. -spec getProgramLocalParameterfvARB(enum(),integer()) -> {float(),float(),float(),float()}. getProgramLocalParameterfvARB(Target,Index) -> - call(5614, <>). + call(5623, <>). %% @spec (Target::enum(),Pname::enum(),String::mem()) -> ok %% @doc See external documentation. -spec getProgramStringARB(enum(),enum(),mem()) -> ok. getProgramStringARB(Target,Pname,String) -> send_bin(String), - call(5615, <>). + call(5624, <>). + +%% @spec (Target::enum(),Pname::enum()) -> [integer()] +%% @doc See external documentation. +-spec getBufferParameterivARB(enum(),enum()) -> [integer()]. +getBufferParameterivARB(Target,Pname) -> + call(5625, <>). %% @spec (Obj::integer()) -> ok %% @doc See external documentation. -spec deleteObjectARB(integer()) -> ok. deleteObjectARB(Obj) -> - cast(5616, <>). + cast(5626, <>). %% @spec (Pname::enum()) -> integer() %% @doc See external documentation. -spec getHandleARB(enum()) -> integer(). getHandleARB(Pname) -> - call(5617, <>). + call(5627, <>). %% @spec (ContainerObj::integer(),AttachedObj::integer()) -> ok %% @doc See external documentation. -spec detachObjectARB(integer(),integer()) -> ok. detachObjectARB(ContainerObj,AttachedObj) -> - cast(5618, <>). + cast(5628, <>). %% @spec (ShaderType::enum()) -> integer() %% @doc See external documentation. -spec createShaderObjectARB(enum()) -> integer(). createShaderObjectARB(ShaderType) -> - call(5619, <>). + call(5629, <>). %% @spec (ShaderObj::integer(),String::[string()]) -> ok %% @doc See external documentation. -spec shaderSourceARB(integer(),[string()]) -> ok. shaderSourceARB(ShaderObj,String) -> StringTemp = list_to_binary([[Str|[0]] || Str <- String ]), - cast(5620, <>). + cast(5630, <>). %% @spec (ShaderObj::integer()) -> ok %% @doc See external documentation. -spec compileShaderARB(integer()) -> ok. compileShaderARB(ShaderObj) -> - cast(5621, <>). + cast(5631, <>). %% @spec () -> integer() %% @doc See external documentation. -spec createProgramObjectARB() -> integer(). createProgramObjectARB() -> - call(5622, <<>>). + call(5632, <<>>). %% @spec (ContainerObj::integer(),Obj::integer()) -> ok %% @doc See external documentation. -spec attachObjectARB(integer(),integer()) -> ok. attachObjectARB(ContainerObj,Obj) -> - cast(5623, <>). + cast(5633, <>). %% @spec (ProgramObj::integer()) -> ok %% @doc See external documentation. -spec linkProgramARB(integer()) -> ok. linkProgramARB(ProgramObj) -> - cast(5624, <>). + cast(5634, <>). %% @spec (ProgramObj::integer()) -> ok %% @doc See external documentation. -spec useProgramObjectARB(integer()) -> ok. useProgramObjectARB(ProgramObj) -> - cast(5625, <>). + cast(5635, <>). %% @spec (ProgramObj::integer()) -> ok %% @doc See external documentation. -spec validateProgramARB(integer()) -> ok. validateProgramARB(ProgramObj) -> - cast(5626, <>). + cast(5636, <>). %% @spec (Obj::integer(),Pname::enum()) -> float() %% @doc See external documentation. -spec getObjectParameterfvARB(integer(),enum()) -> float(). getObjectParameterfvARB(Obj,Pname) -> - call(5627, <>). + call(5637, <>). %% @spec (Obj::integer(),Pname::enum()) -> integer() %% @doc See external documentation. -spec getObjectParameterivARB(integer(),enum()) -> integer(). getObjectParameterivARB(Obj,Pname) -> - call(5628, <>). + call(5638, <>). %% @spec (Obj::integer(),MaxLength::integer()) -> string() %% @doc See external documentation. -spec getInfoLogARB(integer(),integer()) -> string(). getInfoLogARB(Obj,MaxLength) -> - call(5629, <>). + call(5639, <>). %% @spec (ContainerObj::integer(),MaxCount::integer()) -> [integer()] %% @doc See external documentation. -spec getAttachedObjectsARB(integer(),integer()) -> [integer()]. getAttachedObjectsARB(ContainerObj,MaxCount) -> - call(5630, <>). + call(5640, <>). %% @spec (ProgramObj::integer(),Name::string()) -> integer() %% @doc See external documentation. -spec getUniformLocationARB(integer(),string()) -> integer(). getUniformLocationARB(ProgramObj,Name) -> - call(5631, <>). + 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()}. getActiveUniformARB(ProgramObj,Index,MaxLength) -> - call(5632, <>). + 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()}. getUniformfvARB(ProgramObj,Location) -> - call(5633, <>). + 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()}. getUniformivARB(ProgramObj,Location) -> - call(5634, <>). + call(5644, <>). %% @spec (Obj::integer(),MaxLength::integer()) -> string() %% @doc See external documentation. -spec getShaderSourceARB(integer(),integer()) -> string(). getShaderSourceARB(Obj,MaxLength) -> - call(5635, <>). + call(5645, <>). %% @spec (ProgramObj::integer(),Index::integer(),Name::string()) -> ok %% @doc See external documentation. -spec bindAttribLocationARB(integer(),integer(),string()) -> ok. bindAttribLocationARB(ProgramObj,Index,Name) -> - cast(5636, <>). + 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()}. getActiveAttribARB(ProgramObj,Index,MaxLength) -> - call(5637, <>). + call(5647, <>). %% @spec (ProgramObj::integer(),Name::string()) -> integer() %% @doc See external documentation. -spec getAttribLocationARB(integer(),string()) -> integer(). getAttribLocationARB(ProgramObj,Name) -> - call(5638, <>). + call(5648, <>). %% @spec (Renderbuffer::integer()) -> 0|1 %% @doc See external documentation. -spec isRenderbuffer(integer()) -> 0|1. isRenderbuffer(Renderbuffer) -> - call(5639, <>). + call(5649, <>). %% @spec (Target::enum(),Renderbuffer::integer()) -> ok %% @doc See external documentation. -spec bindRenderbuffer(enum(),integer()) -> ok. bindRenderbuffer(Target,Renderbuffer) -> - cast(5640, <>). + cast(5650, <>). %% @spec (Renderbuffers::[integer()]) -> ok %% @doc See external documentation. -spec deleteRenderbuffers([integer()]) -> ok. deleteRenderbuffers(Renderbuffers) -> - cast(5641, <<(length(Renderbuffers)):?GLuint, + 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()]. genRenderbuffers(N) -> - call(5642, <>). + call(5652, <>). %% @spec (Target::enum(),Internalformat::enum(),Width::integer(),Height::integer()) -> ok %% @doc See external documentation. -spec renderbufferStorage(enum(),enum(),integer(),integer()) -> ok. renderbufferStorage(Target,Internalformat,Width,Height) -> - cast(5643, <>). + cast(5653, <>). %% @spec (Target::enum(),Pname::enum()) -> integer() %% @doc See external documentation. -spec getRenderbufferParameteriv(enum(),enum()) -> integer(). getRenderbufferParameteriv(Target,Pname) -> - call(5644, <>). + call(5654, <>). %% @spec (Framebuffer::integer()) -> 0|1 %% @doc See external documentation. -spec isFramebuffer(integer()) -> 0|1. isFramebuffer(Framebuffer) -> - call(5645, <>). + call(5655, <>). %% @spec (Target::enum(),Framebuffer::integer()) -> ok %% @doc See external documentation. -spec bindFramebuffer(enum(),integer()) -> ok. bindFramebuffer(Target,Framebuffer) -> - cast(5646, <>). + cast(5656, <>). %% @spec (Framebuffers::[integer()]) -> ok %% @doc See external documentation. -spec deleteFramebuffers([integer()]) -> ok. deleteFramebuffers(Framebuffers) -> - cast(5647, <<(length(Framebuffers)):?GLuint, + 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()]. genFramebuffers(N) -> - call(5648, <>). + call(5658, <>). %% @spec (Target::enum()) -> enum() %% @doc See external documentation. -spec checkFramebufferStatus(enum()) -> enum(). checkFramebufferStatus(Target) -> - call(5649, <>). + 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. framebufferTexture1D(Target,Attachment,Textarget,Texture,Level) -> - cast(5650, <>). + 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. framebufferTexture2D(Target,Attachment,Textarget,Texture,Level) -> - cast(5651, <>). + 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. framebufferTexture3D(Target,Attachment,Textarget,Texture,Level,Zoffset) -> - cast(5652, <>). + cast(5662, <>). %% @spec (Target::enum(),Attachment::enum(),Renderbuffertarget::enum(),Renderbuffer::integer()) -> ok %% @doc See external documentation. -spec framebufferRenderbuffer(enum(),enum(),enum(),integer()) -> ok. framebufferRenderbuffer(Target,Attachment,Renderbuffertarget,Renderbuffer) -> - cast(5653, <>). + cast(5663, <>). %% @spec (Target::enum(),Attachment::enum(),Pname::enum()) -> integer() %% @doc See external documentation. -spec getFramebufferAttachmentParameteriv(enum(),enum(),enum()) -> integer(). getFramebufferAttachmentParameteriv(Target,Attachment,Pname) -> - call(5654, <>). + call(5664, <>). %% @spec (Target::enum()) -> ok %% @doc See external documentation. -spec generateMipmap(enum()) -> ok. generateMipmap(Target) -> - cast(5655, <>). + 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. blitFramebuffer(SrcX0,SrcY0,SrcX1,SrcY1,DstX0,DstY0,DstX1,DstY1,Mask,Filter) -> - cast(5656, <>). + 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. renderbufferStorageMultisample(Target,Samples,Internalformat,Width,Height) -> - cast(5657, <>). + 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. framebufferTextureLayer(Target,Attachment,Texture,Level,Layer) -> - cast(5658, <>). - -%% @spec (Program::integer(),Pname::enum(),Value::integer()) -> ok -%% @doc See external documentation. --spec programParameteriARB(integer(),enum(),integer()) -> ok. -programParameteriARB(Program,Pname,Value) -> - cast(5659, <>). - -%% @spec (Target::enum(),Attachment::enum(),Texture::integer(),Level::integer()) -> ok -%% @doc See external documentation. --spec framebufferTextureARB(enum(),enum(),integer(),integer()) -> ok. -framebufferTextureARB(Target,Attachment,Texture,Level) -> - cast(5660, <>). + 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. framebufferTextureFaceARB(Target,Attachment,Texture,Level,Face) -> - cast(5661, <>). - -%% @spec (Index::integer(),Divisor::integer()) -> ok -%% @doc See external documentation. --spec vertexAttribDivisorARB(integer(),integer()) -> ok. -vertexAttribDivisorARB(Index,Divisor) -> - cast(5662, <>). + cast(5669, <>). %% @spec (Target::enum(),Offset::integer(),Length::integer()) -> ok %% @doc See external documentation. -spec flushMappedBufferRange(enum(),integer(),integer()) -> ok. flushMappedBufferRange(Target,Offset,Length) -> - cast(5663, <>). + cast(5670, <>). %% @spec (Array::integer()) -> ok %% @doc See external documentation. -spec bindVertexArray(integer()) -> ok. bindVertexArray(Array) -> - cast(5664, <>). + cast(5671, <>). %% @spec (Arrays::[integer()]) -> ok %% @doc See external documentation. -spec deleteVertexArrays([integer()]) -> ok. deleteVertexArrays(Arrays) -> - cast(5665, <<(length(Arrays)):?GLuint, + 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()]. genVertexArrays(N) -> - call(5666, <>). + call(5673, <>). %% @spec (Array::integer()) -> 0|1 %% @doc See external documentation. -spec isVertexArray(integer()) -> 0|1. isVertexArray(Array) -> - call(5667, <>). + call(5674, <>). %% @spec (Program::integer(),UniformNames::[string()]) -> [integer()] %% @doc See external documentation. -spec getUniformIndices(integer(),[string()]) -> [integer()]. getUniformIndices(Program,UniformNames) -> UniformNamesTemp = list_to_binary([[Str|[0]] || Str <- UniformNames ]), - call(5668, <>). + call(5675, <>). %% @spec (Program::integer(),UniformIndices::[integer()],Pname::enum()) -> [integer()] %% @doc See external documentation. -spec getActiveUniformsiv(integer(),[integer()],enum()) -> [integer()]. getActiveUniformsiv(Program,UniformIndices,Pname) -> - call(5669, <> || 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(). getActiveUniformName(Program,UniformIndex,BufSize) -> - call(5670, <>). + call(5677, <>). %% @spec (Program::integer(),UniformBlockName::string()) -> integer() %% @doc See external documentation. -spec getUniformBlockIndex(integer(),string()) -> integer(). getUniformBlockIndex(Program,UniformBlockName) -> - call(5671, <>). + call(5678, <>). %% @spec (Program::integer(),UniformBlockIndex::integer(),Pname::enum(),Params::mem()) -> ok %% @doc See external documentation. -spec getActiveUniformBlockiv(integer(),integer(),enum(),mem()) -> ok. getActiveUniformBlockiv(Program,UniformBlockIndex,Pname,Params) -> send_bin(Params), - call(5672, <>). + call(5679, <>). %% @spec (Program::integer(),UniformBlockIndex::integer(),BufSize::integer()) -> string() %% @doc See external documentation. -spec getActiveUniformBlockName(integer(),integer(),integer()) -> string(). getActiveUniformBlockName(Program,UniformBlockIndex,BufSize) -> - call(5673, <>). + call(5680, <>). %% @spec (Program::integer(),UniformBlockIndex::integer(),UniformBlockBinding::integer()) -> ok %% @doc See external documentation. -spec uniformBlockBinding(integer(),integer(),integer()) -> ok. uniformBlockBinding(Program,UniformBlockIndex,UniformBlockBinding) -> - cast(5674, <>). + 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. copyBufferSubData(ReadTarget,WriteTarget,ReadOffset,WriteOffset,Size) -> - cast(5675, <>). + 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. +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. +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. +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. +provokingVertex(Mode) -> + cast(5689, <>). + +%% @spec (Condition::enum(),Flags::integer()) -> integer() +%% @doc See external documentation. +-spec fenceSync(enum(),integer()) -> integer(). +fenceSync(Condition,Flags) -> + call(5690, <>). + +%% @spec (Sync::integer()) -> 0|1 +%% @doc See external documentation. +-spec isSync(integer()) -> 0|1. +isSync(Sync) -> + call(5691, <>). + +%% @spec (Sync::integer()) -> ok +%% @doc See external documentation. +-spec deleteSync(integer()) -> ok. +deleteSync(Sync) -> + cast(5692, <>). + +%% @spec (Sync::integer(),Flags::integer(),Timeout::integer()) -> enum() +%% @doc See external documentation. +-spec clientWaitSync(integer(),integer(),integer()) -> enum(). +clientWaitSync(Sync,Flags,Timeout) -> + call(5693, <>). + +%% @spec (Sync::integer(),Flags::integer(),Timeout::integer()) -> ok +%% @doc See external documentation. +-spec waitSync(integer(),integer(),integer()) -> ok. +waitSync(Sync,Flags,Timeout) -> + cast(5694, <>). + +%% @spec (Pname::enum()) -> [integer()] +%% @doc See external documentation. +-spec getInteger64v(enum()) -> [integer()]. +getInteger64v(Pname) -> + call(5695, <>). + +%% @spec (Sync::integer(),Pname::enum(),BufSize::integer()) -> [integer()] +%% @doc See external documentation. +-spec getSynciv(integer(),enum(),integer()) -> [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. +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. +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()}. +getMultisamplefv(Pname,Index) -> + call(5699, <>). + +%% @spec (Index::integer(),Mask::integer()) -> ok +%% @doc See external documentation. +-spec sampleMaski(integer(),integer()) -> ok. +sampleMaski(Index,Mask) -> + cast(5700, <>). + +%% @spec (Type::enum(),Name::string(),String::string()) -> ok +%% @doc See external documentation. +-spec namedStringARB(enum(),string(),string()) -> ok. +namedStringARB(Type,Name,String) -> + cast(5701, <>). + +%% @spec (Name::string()) -> ok +%% @doc See external documentation. +-spec deleteNamedStringARB(string()) -> ok. +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. +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. +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(). +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(). +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. +bindFragDataLocationIndexed(Program,ColorNumber,Index,Name) -> + cast(5707, <>). + +%% @spec (Program::integer(),Name::string()) -> integer() +%% @doc See external documentation. +-spec getFragDataIndex(integer(),string()) -> integer(). +getFragDataIndex(Program,Name) -> + call(5708, <>). + +%% @spec (Count::integer()) -> [integer()] +%% @doc See external documentation. +-spec genSamplers(integer()) -> [integer()]. +genSamplers(Count) -> + call(5709, <>). + +%% @spec (Samplers::[integer()]) -> ok +%% @doc See external documentation. +-spec deleteSamplers([integer()]) -> ok. +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. +isSampler(Sampler) -> + call(5711, <>). + +%% @spec (Unit::integer(),Sampler::integer()) -> ok +%% @doc See external documentation. +-spec bindSampler(integer(),integer()) -> ok. +bindSampler(Unit,Sampler) -> + cast(5712, <>). + +%% @spec (Sampler::integer(),Pname::enum(),Param::integer()) -> ok +%% @doc See external documentation. +-spec samplerParameteri(integer(),enum(),integer()) -> ok. +samplerParameteri(Sampler,Pname,Param) -> + cast(5713, <>). + +%% @spec (Sampler::integer(),Pname::enum(),Param::[integer()]) -> ok +%% @doc See external documentation. +-spec samplerParameteriv(integer(),enum(),[integer()]) -> ok. +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. +samplerParameterf(Sampler,Pname,Param) -> + cast(5715, <>). + +%% @spec (Sampler::integer(),Pname::enum(),Param::[float()]) -> ok +%% @doc See external documentation. +-spec samplerParameterfv(integer(),enum(),[float()]) -> ok. +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. +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. +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()]. +getSamplerParameteriv(Sampler,Pname) -> + call(5719, <>). + +%% @spec (Sampler::integer(),Pname::enum()) -> [integer()] +%% @doc See external documentation. +-spec getSamplerParameterIiv(integer(),enum()) -> [integer()]. +getSamplerParameterIiv(Sampler,Pname) -> + call(5720, <>). + +%% @spec (Sampler::integer(),Pname::enum()) -> [float()] +%% @doc See external documentation. +-spec getSamplerParameterfv(integer(),enum()) -> [float()]. +getSamplerParameterfv(Sampler,Pname) -> + call(5721, <>). + +%% @spec (Sampler::integer(),Pname::enum()) -> [integer()] +%% @doc See external documentation. +-spec getSamplerParameterIuiv(integer(),enum()) -> [integer()]. +getSamplerParameterIuiv(Sampler,Pname) -> + call(5722, <>). + +%% @spec (Id::integer(),Target::enum()) -> ok +%% @doc See external documentation. +-spec queryCounter(integer(),enum()) -> ok. +queryCounter(Id,Target) -> + cast(5723, <>). + +%% @spec (Id::integer(),Pname::enum()) -> integer() +%% @doc See external documentation. +-spec getQueryObjecti64v(integer(),enum()) -> integer(). +getQueryObjecti64v(Id,Pname) -> + call(5724, <>). + +%% @spec (Id::integer(),Pname::enum()) -> integer() +%% @doc See external documentation. +-spec getQueryObjectui64v(integer(),enum()) -> integer(). +getQueryObjectui64v(Id,Pname) -> + call(5725, <>). + +%% @spec (Mode::enum(),Indirect::offset()|mem()) -> ok +%% @doc See external documentation. +-spec drawArraysIndirect(enum(),offset()|mem()) -> ok. +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. +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. +uniform1d(Location,X) -> + cast(5730, <>). + +%% @spec (Location::integer(),X::float(),Y::float()) -> ok +%% @doc See external documentation. +-spec uniform2d(integer(),float(),float()) -> ok. +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. +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. +uniform4d(Location,X,Y,Z,W) -> + cast(5733, <>). + +%% @spec (Location::integer(),Value::[float()]) -> ok +%% @doc See external documentation. +-spec uniform1dv(integer(),[float()]) -> ok. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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()}. +getUniformdv(Program,Location) -> + call(5747, <>). + +%% @spec (Program::integer(),Shadertype::enum(),Name::string()) -> integer() +%% @doc See external documentation. +-spec getSubroutineUniformLocation(integer(),enum(),string()) -> integer(). +getSubroutineUniformLocation(Program,Shadertype,Name) -> + call(5748, <>). + +%% @spec (Program::integer(),Shadertype::enum(),Name::string()) -> integer() +%% @doc See external documentation. +-spec getSubroutineIndex(integer(),enum(),string()) -> integer(). +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(). +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(). +getActiveSubroutineName(Program,Shadertype,Index,Bufsize) -> + call(5751, <>). + +%% @spec (Shadertype::enum(),Indices::[integer()]) -> ok +%% @doc See external documentation. +-spec uniformSubroutinesuiv(enum(),[integer()]) -> ok. +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()}. +getUniformSubroutineuiv(Shadertype,Location) -> + call(5753, <>). + +%% @spec (Program::integer(),Shadertype::enum(),Pname::enum()) -> integer() +%% @doc See external documentation. +-spec getProgramStageiv(integer(),enum(),enum()) -> integer(). +getProgramStageiv(Program,Shadertype,Pname) -> + call(5754, <>). + +%% @spec (Pname::enum(),Value::integer()) -> ok +%% @doc See external documentation. +-spec patchParameteri(enum(),integer()) -> ok. +patchParameteri(Pname,Value) -> + cast(5755, <>). + +%% @spec (Pname::enum(),Values::[float()]) -> ok +%% @doc See external documentation. +-spec patchParameterfv(enum(),[float()]) -> ok. +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. +bindTransformFeedback(Target,Id) -> + cast(5757, <>). + +%% @spec (Ids::[integer()]) -> ok +%% @doc See external documentation. +-spec deleteTransformFeedbacks([integer()]) -> ok. +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()]. +genTransformFeedbacks(N) -> + call(5759, <>). + +%% @spec (Id::integer()) -> 0|1 +%% @doc See external documentation. +-spec isTransformFeedback(integer()) -> 0|1. +isTransformFeedback(Id) -> + call(5760, <>). + +%% @spec () -> ok +%% @doc See external documentation. +-spec pauseTransformFeedback() -> ok. +pauseTransformFeedback() -> + cast(5761, <<>>). + +%% @spec () -> ok +%% @doc See external documentation. +-spec resumeTransformFeedback() -> ok. +resumeTransformFeedback() -> + cast(5762, <<>>). + +%% @spec (Mode::enum(),Id::integer()) -> ok +%% @doc See external documentation. +-spec drawTransformFeedback(enum(),integer()) -> ok. +drawTransformFeedback(Mode,Id) -> + cast(5763, <>). + +%% @spec (Mode::enum(),Id::integer(),Stream::integer()) -> ok +%% @doc See external documentation. +-spec drawTransformFeedbackStream(enum(),integer(),integer()) -> ok. +drawTransformFeedbackStream(Mode,Id,Stream) -> + cast(5764, <>). + +%% @spec (Target::enum(),Index::integer(),Id::integer()) -> ok +%% @doc See external documentation. +-spec beginQueryIndexed(enum(),integer(),integer()) -> ok. +beginQueryIndexed(Target,Index,Id) -> + cast(5765, <>). + +%% @spec (Target::enum(),Index::integer()) -> ok +%% @doc See external documentation. +-spec endQueryIndexed(enum(),integer()) -> ok. +endQueryIndexed(Target,Index) -> + cast(5766, <>). + +%% @spec (Target::enum(),Index::integer(),Pname::enum()) -> integer() +%% @doc See external documentation. +-spec getQueryIndexediv(enum(),integer(),enum()) -> integer(). +getQueryIndexediv(Target,Index,Pname) -> + call(5767, <>). + +%% @spec () -> ok +%% @doc 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. +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()}. +getShaderPrecisionFormat(Shadertype,Precisiontype) -> + call(5770, <>). + +%% @spec (N::clamp(),F::clamp()) -> ok +%% @doc See external documentation. +-spec depthRangef(clamp(),clamp()) -> ok. +depthRangef(N,F) -> + cast(5771, <>). + +%% @spec (D::clamp()) -> ok +%% @doc See external documentation. +-spec clearDepthf(clamp()) -> ok. +clearDepthf(D) -> + cast(5772, <>). + +%% @spec (Program::integer(),BufSize::integer()) -> {BinaryFormat::enum(),Binary::binary()} +%% @doc See external documentation. +-spec getProgramBinary(integer(),integer()) -> {enum(),binary()}. +getProgramBinary(Program,BufSize) -> + call(5773, <>). + +%% @spec (Program::integer(),BinaryFormat::enum(),Binary::binary()) -> ok +%% @doc See external documentation. +-spec programBinary(integer(),enum(),binary()) -> ok. +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. +programParameteri(Program,Pname,Value) -> + cast(5775, <>). + +%% @spec (Pipeline::integer(),Stages::integer(),Program::integer()) -> ok +%% @doc See external documentation. +-spec useProgramStages(integer(),integer(),integer()) -> ok. +useProgramStages(Pipeline,Stages,Program) -> + cast(5776, <>). + +%% @spec (Pipeline::integer(),Program::integer()) -> ok +%% @doc See external documentation. +-spec activeShaderProgram(integer(),integer()) -> ok. +activeShaderProgram(Pipeline,Program) -> + cast(5777, <>). + +%% @spec (Type::enum(),Strings::[string()]) -> integer() +%% @doc See external documentation. +-spec createShaderProgramv(enum(),[string()]) -> integer(). +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. +bindProgramPipeline(Pipeline) -> + cast(5779, <>). + +%% @spec (Pipelines::[integer()]) -> ok +%% @doc See external documentation. +-spec deleteProgramPipelines([integer()]) -> ok. +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()]. +genProgramPipelines(N) -> + call(5781, <>). + +%% @spec (Pipeline::integer()) -> 0|1 +%% @doc See external documentation. +-spec isProgramPipeline(integer()) -> 0|1. +isProgramPipeline(Pipeline) -> + call(5782, <>). + +%% @spec (Pipeline::integer(),Pname::enum()) -> integer() +%% @doc See external documentation. +-spec getProgramPipelineiv(integer(),enum()) -> integer(). +getProgramPipelineiv(Pipeline,Pname) -> + call(5783, <>). + +%% @spec (Program::integer(),Location::integer(),V0::integer()) -> ok +%% @doc See external documentation. +-spec programUniform1i(integer(),integer(),integer()) -> ok. +programUniform1i(Program,Location,V0) -> + cast(5784, <>). + +%% @spec (Program::integer(),Location::integer(),Value::[integer()]) -> ok +%% @doc See external documentation. +-spec programUniform1iv(integer(),integer(),[integer()]) -> ok. +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. +programUniform1f(Program,Location,V0) -> + cast(5786, <>). + +%% @spec (Program::integer(),Location::integer(),Value::[float()]) -> ok +%% @doc See external documentation. +-spec programUniform1fv(integer(),integer(),[float()]) -> ok. +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. +programUniform1d(Program,Location,V0) -> + cast(5788, <>). + +%% @spec (Program::integer(),Location::integer(),Value::[float()]) -> ok +%% @doc See external documentation. +-spec programUniform1dv(integer(),integer(),[float()]) -> ok. +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. +programUniform1ui(Program,Location,V0) -> + cast(5790, <>). + +%% @spec (Program::integer(),Location::integer(),Value::[integer()]) -> ok +%% @doc See external documentation. +-spec programUniform1uiv(integer(),integer(),[integer()]) -> ok. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +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. +validateProgramPipeline(Pipeline) -> + cast(5834, <>). + +%% @spec (Pipeline::integer(),BufSize::integer()) -> string() +%% @doc See external documentation. +-spec getProgramPipelineInfoLog(integer(),integer()) -> string(). +getProgramPipelineInfoLog(Pipeline,BufSize) -> + call(5835, <>). + +%% @spec (Index::integer(),X::float()) -> ok +%% @doc See external documentation. +-spec vertexAttribL1d(integer(),float()) -> ok. +vertexAttribL1d(Index,X) -> + cast(5836, <>). + +%% @spec (Index::integer(),X::float(),Y::float()) -> ok +%% @doc See external documentation. +-spec vertexAttribL2d(integer(),float(),float()) -> ok. +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. +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. +vertexAttribL4d(Index,X,Y,Z,W) -> + cast(5839, <>). + +%% @spec (Index,{X}) -> ok +%% @equiv vertexAttribL1d(Index,X) +-spec vertexAttribL1dv(integer(),{float()}) -> ok. +vertexAttribL1dv(Index,{X}) -> vertexAttribL1d(Index,X). + +%% @spec (Index,{X,Y}) -> ok +%% @equiv vertexAttribL2d(Index,X,Y) +-spec vertexAttribL2dv(integer(),{float(),float()}) -> ok. +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. +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. +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. +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()}. +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. +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. +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. +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. +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. +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. +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. +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. +depthRangeIndexed(Index,N,F) -> + cast(5850, <>). + +%% @spec (Target::enum(),Index::integer()) -> [float()] +%% @doc See external documentation. +-spec getFloati_v(enum(),integer()) -> [float()]. +getFloati_v(Target,Index) -> + call(5851, <>). + +%% @spec (Target::enum(),Index::integer()) -> [float()] +%% @doc See external documentation. +-spec getDoublei_v(enum(),integer()) -> [float()]. +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. +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. +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()]}. +getDebugMessageLogARB(Count,Bufsize) -> + call(5855, <>). + +%% @spec () -> enum() +%% @doc See external documentation. +-spec getGraphicsResetStatusARB() -> enum(). +getGraphicsResetStatusARB() -> + call(5856, <<>>). %% @spec () -> ok %% @doc See external documentation. -spec resizeBuffersMESA() -> ok. resizeBuffersMESA() -> - cast(5676, <<>>). + 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(5677, <>). + cast(5858, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv windowPos4dMESA(X,Y,Z,W) @@ -4768,7 +5975,7 @@ windowPos4dvMESA({X,Y,Z,W}) -> windowPos4dMESA(X,Y,Z,W). %% @doc See external documentation. -spec windowPos4fMESA(float(),float(),float(),float()) -> ok. windowPos4fMESA(X,Y,Z,W) -> - cast(5678, <>). + cast(5859, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv windowPos4fMESA(X,Y,Z,W) @@ -4779,7 +5986,7 @@ windowPos4fvMESA({X,Y,Z,W}) -> windowPos4fMESA(X,Y,Z,W). %% @doc See external documentation. -spec windowPos4iMESA(integer(),integer(),integer(),integer()) -> ok. windowPos4iMESA(X,Y,Z,W) -> - cast(5679, <>). + cast(5860, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv windowPos4iMESA(X,Y,Z,W) @@ -4790,7 +5997,7 @@ windowPos4ivMESA({X,Y,Z,W}) -> windowPos4iMESA(X,Y,Z,W). %% @doc See external documentation. -spec windowPos4sMESA(integer(),integer(),integer(),integer()) -> ok. windowPos4sMESA(X,Y,Z,W) -> - cast(5680, <>). + cast(5861, <>). %% @spec ({X,Y,Z,W}) -> ok %% @equiv windowPos4sMESA(X,Y,Z,W) @@ -4801,11 +6008,11 @@ windowPos4svMESA({X,Y,Z,W}) -> windowPos4sMESA(X,Y,Z,W). %% @doc See external documentation. -spec depthBoundsEXT(clamp(),clamp()) -> ok. depthBoundsEXT(Zmin,Zmax) -> - cast(5681, <>). + cast(5862, <>). %% @spec (StencilTagBits::integer(),StencilClearTag::integer()) -> ok %% @doc See external documentation. -spec stencilClearTagEXT(integer(),integer()) -> ok. stencilClearTagEXT(StencilTagBits,StencilClearTag) -> - cast(5682, <>). + cast(5863, <>). diff --git a/lib/wx/src/gen/glu.erl b/lib/wx/src/gen/glu.erl index 300b411fd2..c16f0cf125 100644 --- a/lib/wx/src/gen/glu.erl +++ b/lib/wx/src/gen/glu.erl @@ -50,6 +50,9 @@ -define(GLintptr,64/native-unsigned). -define(GLUquadric,64/native-unsigned). -define(GLhandleARB,64/native-unsigned). +-define(GLsync,64/native-unsigned). +-define(GLuint64,64/native-unsigned). +-define(GLint64,64/native-signed). -type enum() :: non_neg_integer(). -type mem() :: binary() | tuple(). @@ -121,13 +124,11 @@ build3DMipmaps(Target,InternalFormat,Width,Height,Depth,Format,Type,Data) -> send_bin(Data), call(5015, <>). -%% @spec (ExtName::[integer()],ExtString::[integer()]) -> 0|1 +%% @spec (ExtName::string(),ExtString::string()) -> 0|1 %% @doc See external documentation. --spec checkExtension([integer()],[integer()]) -> 0|1. +-spec checkExtension(string(),string()) -> 0|1. checkExtension(ExtName,ExtString) -> - call(5016, <<(length(ExtName)):?GLuint, - (<< <> || C <- ExtName>>)/binary,0:((8-((length(ExtName)+ 4) rem 8)) rem 8),(length(ExtString)):?GLuint, - (<< <> || C <- ExtString>>)/binary,0:((8-((length(ExtString)+ 4) rem 8)) rem 8)>>). + 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. -- cgit v1.2.3 From 8ecbdaf5eb54052d7b4756037e6dc481a36358ed Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Mon, 15 Nov 2010 15:24:58 +0100 Subject: Initilize opengl after setCurrent No rendering context is available until setCurrent is called the first time, opengl extensions can not be loaded before the rendering context is created. --- lib/wx/api_gen/gen_util.erl | 4 ++++ lib/wx/api_gen/wx_gen.erl | 2 +- lib/wx/api_gen/wx_gen.hrl | 6 +++--- lib/wx/api_gen/wx_gen_cpp.erl | 12 +++++------ lib/wx/api_gen/wx_gen_erl.erl | 22 ++++++++++---------- lib/wx/api_gen/wxapi.conf | 48 +++++++++++++++++++++---------------------- lib/wx/src/gen/wxGLCanvas.erl | 8 ++++---- 7 files changed, 53 insertions(+), 49 deletions(-) diff --git a/lib/wx/api_gen/gen_util.erl b/lib/wx/api_gen/gen_util.erl index 841e0c9594..b53f817ce0 100644 --- a/lib/wx/api_gen/gen_util.erl +++ b/lib/wx/api_gen/gen_util.erl @@ -40,6 +40,10 @@ strip_name([H|R1],[H|R2]) -> strip_name(R1,R2); strip_name(String,[]) -> String. + +get_hook(_Type, undefined) -> ignore; +get_hook(Type, List) -> proplists:get_value(Type, List, ignore). + open_write(File) -> %% io:format("Generating ~s~n",[File]), {ok, Fd} = file:open(File++".temp", [write]), diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl index c075324c1f..2f20c42a5d 100644 --- a/lib/wx/api_gen/wx_gen.erl +++ b/lib/wx/api_gen/wx_gen.erl @@ -887,7 +887,7 @@ add_method2(M0=#method{name=Name,params=Ps0,type=T0},#class{name=CName,parent=Pa id = next_id(func_id), pre_hook = get_opt(pre_hook, Name, length(Ps), Opts), post_hook = get_opt(post_hook, Name, length(Ps), Opts), - doc = get_opt(doc, Name, length(Ps), Opts) + doc = get_opt(doc, Name, length(Ps), Opts) }, M = case Name of CName -> diff --git a/lib/wx/api_gen/wx_gen.hrl b/lib/wx/api_gen/wx_gen.hrl index 17265a2842..426e3adfae 100644 --- a/lib/wx/api_gen/wx_gen.hrl +++ b/lib/wx/api_gen/wx_gen.hrl @@ -43,9 +43,9 @@ id = undefined, % Id (integer) doc, % Extra documentation virtual, % Is virtual? - pre_hook, % Pre hook before call in c-code - post_hook % Post hook after call in c-code - } + pre_hook = [], % Pre hook before call in c-code + post_hook = [] % Post hook after call in c-code + } ). -record(param, diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 4bcdbe6a68..4b33068d8f 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -269,14 +269,14 @@ gen_method(CName, M=#method{name=N,params=Ps0,type=T,method_type=MT,id=MethodId Opts = [Opt || Opt = #param{def=Def,in=In,where=Where} <- Ps2, Def =/= none, In =/= false, Where =/= c], decode_options(Opts, Align), - case M#method.pre_hook of - {c,Pre} -> w(" ~s;~n", [Pre]); - _ -> skip + case gen_util:get_hook(c, M#method.pre_hook) of + ignore -> skip; + Pre -> w(" ~s;~n", [Pre]) end, Ps3 = call_wx(N,{MT,CName},T,Ps2), - case M#method.post_hook of - {c, Post} -> w(" ~s;~n", [Post]); - _ -> skip + case gen_util:get_hook(c, M#method.post_hook) of + ignore -> skip; + Post -> w(" ~s;~n", [Post]) end, free_args(), build_return_vals(T,Ps3), diff --git a/lib/wx/api_gen/wx_gen_erl.erl b/lib/wx/api_gen/wx_gen_erl.erl index 8648174b5b..e1201ab0d4 100644 --- a/lib/wx/api_gen/wx_gen_erl.erl +++ b/lib/wx/api_gen/wx_gen_erl.erl @@ -270,14 +270,14 @@ gen_method2(M=#method{name=N,alias=A,params=Ps,type=T,method_type=MT,id=MethodId MId = arg_type_tests(Args, "?" ++ get_unique_name(MethodId)), {MArgs,Align} = marshal_args(Args), MOpts = marshal_opts(Optional, Align, Args), - case M#method.pre_hook of - {erl,Pre} -> w(" ~s~n", [Pre]); - _ -> skip + case gen_util:get_hook(erl, M#method.pre_hook) of + ignore -> skip; + Pre -> w(" ~s~n", [Pre]) end, - case M#method.post_hook of - {erl,_} -> w(" _Result = ~n", []); - _ -> skip + case gen_util:get_hook(erl, M#method.post_hook) of + ignore -> skip; + _ -> w(" _Result =", []) end, case have_return_vals(T, Ps) of @@ -288,11 +288,11 @@ gen_method2(M=#method{name=N,alias=A,params=Ps,type=T,method_type=MT,id=MethodId false -> w(" wxe_util:cast(~s,~n <<~s~s>>)", [MId, MArgs,MOpts]) end, - case M#method.post_hook of - {erl,Post} -> - w(" ~s~n", [Post]), - w(" _Result~n", []); - _ -> skip + case gen_util:get_hook(erl, M#method.post_hook) of + ignore -> skip; + Post -> + w(",~n ~s~n", [Post]), + w(" _Result", []) end, erase(current_func), diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf index 63b136e075..aec8a4944a 100644 --- a/lib/wx/api_gen/wxapi.conf +++ b/lib/wx/api_gen/wxapi.conf @@ -505,15 +505,15 @@ {"data",[in,{base,binary}]}, {"alpha",[in,{base,binary}]}, {{4,pre_hook}, - {c, "if(!static_data) {" - "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}}, + [{c, "if(!static_data) {" + "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}]}, {{5,pre_hook}, - {c, "if(!static_data) {" - " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" - " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" - " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}} + [{c, "if(!static_data) {" + " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" + " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" + " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}]} ]}, '~wxImage',%'AddHandler', 'Blur','BlurHorizontal','BlurVertical', @@ -524,15 +524,15 @@ {"data",[in,{base,binary}]}, {"alpha",[in,{base,binary}]}, {{4,pre_hook}, - {c, "if(!static_data) {" + [{c, "if(!static_data) {" "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}}, + "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}]}, {{5,pre_hook}, - {c, "if(!static_data) {" - " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" - " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" - " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}} + [{c, "if(!static_data) {" + " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" + " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" + " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}]} ]}, 'Destroy','FindFirstUnusedColour', % 'FindHandler', 'GetImageExtWildcard', @@ -551,15 +551,15 @@ 'Rotate90','SaveFile','Scale','Size', {'SetAlpha', [{{2,"alpha"},[in,{base,binary}, {def, none}]}, {{2,pre_hook}, - {c, "if(!static_data) {" - "alpha = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(alpha,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}} + [{c, "if(!static_data) {" + "alpha = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(alpha,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}]} ]}, {'SetData', [{"data",[in,{base,binary}]}, {pre_hook, - {c, "if(!static_data) {" - "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}} + [{c, "if(!static_data) {" + "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}]} ]}, 'SetMask','SetMaskColour','SetMaskFromImage','SetOption', 'SetPalette', @@ -1146,10 +1146,10 @@ {class, wxGLCanvas, wxWindow, [{skip, [{'SetCurrent', 2}]}], %% NA MAC - [{'wxGLCanvas', [{"attribList", [in, {single,array}]}, - {pre_hook, {erl, "{ok, _} = wxe_master:init_opengl(),"}}]}, + [{'wxGLCanvas', [{"attribList", [in, {single,array}]}]}, 'GetContext', - {'SetCurrent', [{post_hook,{c, "if(This->GetContext()) setActiveGL(Ecmd.caller,This)"}}]}, + {'SetCurrent', [{post_hook,[{c, "if(This->GetContext()) setActiveGL(Ecmd.caller,This)"}, + {erl, "{ok, _} = wxe_master:init_opengl(),"}]}]}, %%{'SetColour', [{"colour", [in, {single,array}]}]}, 'SwapBuffers']}. diff --git a/lib/wx/src/gen/wxGLCanvas.erl b/lib/wx/src/gen/wxGLCanvas.erl index e5d7bec4ca..032d42535d 100644 --- a/lib/wx/src/gen/wxGLCanvas.erl +++ b/lib/wx/src/gen/wxGLCanvas.erl @@ -105,7 +105,6 @@ new(#wx_ref{type=ParentT,ref=ParentRef}, Options) ({palette, #wx_ref{type=PaletteT,ref=PaletteRef}}, Acc) -> ?CLASS(PaletteT,wxPalette),[<<7:32/?UI,PaletteRef:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), - {ok, _} = wxe_master:init_opengl(), wxe_util:construct(?wxGLCanvas_new_2, <>). @@ -131,7 +130,6 @@ new(#wx_ref{type=ParentT,ref=ParentRef},#wx_ref{type=SharedT,ref=SharedRef}, Opt ({palette, #wx_ref{type=PaletteT,ref=PaletteRef}}, Acc) -> ?CLASS(PaletteT,wxPalette),[<<7:32/?UI,PaletteRef:32/?UI>>|Acc]; (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), - {ok, _} = wxe_master:init_opengl(), wxe_util:construct(SharedOP, <>). @@ -146,8 +144,10 @@ getContext(#wx_ref{type=ThisT,ref=ThisRef}) -> %% @doc See external documentation. setCurrent(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxGLCanvas), - wxe_util:cast(?wxGLCanvas_SetCurrent, - <>). + _Result = wxe_util:cast(?wxGLCanvas_SetCurrent, + <>), + {ok, _} = wxe_master:init_opengl(), + _Result. %% @spec (This::wxGLCanvas()) -> ok %% @doc See external documentation. -- cgit v1.2.3 From b69da5dbf60e0062982c89524df97066b95ce816 Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 18 Nov 2010 10:56:25 +0100 Subject: Add lib paths for *bsd variants --- lib/wx/configure.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/wx/configure.in b/lib/wx/configure.in index a2e5ff0bf7..f7128db23a 100755 --- a/lib/wx/configure.in +++ b/lib/wx/configure.in @@ -179,8 +179,6 @@ case $host_os in ;; esac -AC_SUBST(GL_LIBS) - dnl ---------------------------------------------------------------------- dnl Include CPPFLAGS in CFLAGS dnl ---------------------------------------------------------------------- @@ -223,13 +221,19 @@ if test X"$host_os" != X"win32" ; then if test X"$ac_cv_header_GL_gl_h" != Xyes ; then AC_MSG_WARN([No OpenGL headers found, wx will NOT be usable]) CPPFLAGS="$saved_CPPFLAGS" + else + GL_LIBS="-L/usr/local/lib $GL_LIBS" fi + else + GL_LIBS="-L/usr/X11R6/lib $GL_LIBS" fi fi else AC_CHECK_HEADERS([gl/gl.h],[],[],[#include ]) fi +AC_SUBST(GL_LIBS) + CXXFLAGS="$CFLAGS $CPPFLAGS" CFLAGS="$CFLAGS $CPPFLAGS $C_ONLY_FLAGS" -- cgit v1.2.3 From abc92a6f3b4615e596992eda153da0c09a3c7cbf Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Fri, 19 Nov 2010 14:57:59 +0100 Subject: Fix non available opengl functions Opengl functions are loaded at runtime and differ with drivers and cards. --- lib/wx/api_gen/gl_gen_c.erl | 35 ++++++++++++++++++++++++++--------- lib/wx/c_src/egl_impl.cpp | 10 ++-------- lib/wx/c_src/gen/gl_fdefs.h | 7 +++++++ lib/wx/c_src/gen/gl_finit.h | 6 +----- lib/wx/c_src/gen/gl_funcs.cpp | 14 ++++++++++++-- lib/wx/test/wx_opengl_SUITE.erl | 20 +++++++++++++++++--- 6 files changed, 65 insertions(+), 27 deletions(-) diff --git a/lib/wx/api_gen/gl_gen_c.erl b/lib/wx/api_gen/gl_gen_c.erl index 230b853c2b..0f5cb0e1f4 100644 --- a/lib/wx/api_gen/gl_gen_c.erl +++ b/lib/wx/api_gen/gl_gen_c.erl @@ -48,20 +48,28 @@ gen(GLFuncs, GLUFuncs) -> w("#include ~n", []), w("#include ~n", []), w("#include \"../egl_impl.h\"~n", []), - w("#include \"gl_fdefs.h\"~n", []), + w("#include \"gl_fdefs.h\"~n~n", []), + w("extern gl_fns_t gl_fns[];~n~n", []), - w("~nint gl_error_op;~n", []), w("void egl_dispatch(int op, char *bp, ErlDrvPort port, " "ErlDrvTermData caller, char *bins[], int bins_sz[]){~n", []), - w(" gl_error_op = op;~n", []), - + w(" try {~n",[]), w(" switch(op)~n{~n",[]), w(" case 5000:~n erl_tess_impl(bp, port, caller);~n break;~n", []), [funcs(F) || F <- GLUFuncs], [funcs(F) || F <- GLFuncs], + w("}} catch (char *err_msg) {\n" + "int AP = 0; ErlDrvTermData rt[12];\n" + "rt[AP++] = ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) \"_egl_error_\");\n" + "rt[AP++] = ERL_DRV_INT; rt[AP++] = (int) op;\n" + "rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *) err_msg);\n" + "// rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *) gl_fns[op-GLE_GL_FUNC_START].name);\n" + "// rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2;\n" + "rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3;\n" + "driver_send_term(port,caller,rt,AP);\n", []), w("}} /* The End */~n~n",[]), close(). @@ -530,6 +538,19 @@ gen_defines(GLFuncs,GLUFuncs) -> w("# define WXE_EXTERN~n", []), w("#else~n# define WXE_EXTERN extern~n", []), w("#endif~n~n", []), + + w("typedef struct {\n" + " const char * name;\n" + " const char * alt;\n" + " void * func;\n" + "} gl_fns_t;\n\n", []), + + GLFirst = case hd(GLFuncs) of + [First|_] when is_list(First) -> get(First); + First -> get(First) + end, + w("#define GLE_GL_FUNC_START ~p~n", [GLFirst#func.id]), + [fdefs(F) || F <- GLFuncs], [fdefs(F) || F <- GLUFuncs], close(). @@ -577,11 +598,7 @@ gl_gen_init(Funcs) -> open_write("../c_src/gen/gl_finit.h"), c_copyright(), w("/***** This file is generated do not edit ****/~n~n", []), - w("static struct {\n" - " const char * name;\n" - " const char * alt;\n" - " void * func;\n" - "} gl_fns[] = \n" + w("gl_fns_t gl_fns[] = \n" "{\n", []), [finits(F) || F <- Funcs], w(" { NULL, NULL, NULL}};\n",[]), diff --git a/lib/wx/c_src/egl_impl.cpp b/lib/wx/c_src/egl_impl.cpp index 87724f97dc..e2dbbb73c4 100644 --- a/lib/wx/c_src/egl_impl.cpp +++ b/lib/wx/c_src/egl_impl.cpp @@ -160,14 +160,8 @@ int load_gl_functions() { } void gl_error() { - // int AP = 0; ErlDrvTermData rt[8]; - // rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *)"_wxe_error_"); - // rt[AP++] = ERL_DRV_INT; rt[AP++] = (int) gl_error_op; - // rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *)"undef"); - // rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; - // driver_send_term(WXE_DRV_PORT,gl_active,rt,AP); - // BUGBUG - fprintf(stderr, "OpenGL Extension not available : %d\r\n", gl_error_op); + // fprintf(stderr, "OpenGL Extension not available \r\n"); + throw "undef_extension"; } /* ******************************************************************************* diff --git a/lib/wx/c_src/gen/gl_fdefs.h b/lib/wx/c_src/gen/gl_fdefs.h index c0fc338aa8..a45896d30d 100644 --- a/lib/wx/c_src/gen/gl_fdefs.h +++ b/lib/wx/c_src/gen/gl_fdefs.h @@ -24,6 +24,13 @@ # define WXE_EXTERN extern #endif +typedef struct { + const char * name; + const char * alt; + void * func; +} gl_fns_t; + +#define GLE_GL_FUNC_START 5037 typedef void (APIENTRY * WXEGLACCUM)(GLenum,GLfloat); WXE_EXTERN WXEGLACCUM weglAccum; typedef void (APIENTRY * WXEGLALPHAFUNC)(GLenum,GLclampf); diff --git a/lib/wx/c_src/gen/gl_finit.h b/lib/wx/c_src/gen/gl_finit.h index 3d707f4c18..583e36faf7 100644 --- a/lib/wx/c_src/gen/gl_finit.h +++ b/lib/wx/c_src/gen/gl_finit.h @@ -18,11 +18,7 @@ */ /***** This file is generated do not edit ****/ -static struct { - const char * name; - const char * alt; - void * func; -} gl_fns[] = +gl_fns_t gl_fns[] = { {"glAccum", NULL, &weglAccum}, {"glAlphaFunc", NULL, &weglAlphaFunc}, diff --git a/lib/wx/c_src/gen/gl_funcs.cpp b/lib/wx/c_src/gen/gl_funcs.cpp index ea82635846..30542a0f02 100644 --- a/lib/wx/c_src/gen/gl_funcs.cpp +++ b/lib/wx/c_src/gen/gl_funcs.cpp @@ -23,9 +23,10 @@ #include "../egl_impl.h" #include "gl_fdefs.h" -int gl_error_op; +extern gl_fns_t gl_fns[]; + void egl_dispatch(int op, char *bp, ErlDrvPort port, ErlDrvTermData caller, char *bins[], int bins_sz[]){ - gl_error_op = op; + try { switch(op) { case 5000: @@ -6955,5 +6956,14 @@ case 5863: { // glStencilClearTagEXT GLuint *stencilClearTag = (GLuint *) bp; bp += 4; weglStencilClearTagEXT(*stencilTagBits,*stencilClearTag); }; break; +}} catch (char *err_msg) { +int AP = 0; ErlDrvTermData rt[12]; +rt[AP++] = ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_error_"); +rt[AP++] = ERL_DRV_INT; rt[AP++] = (int) op; +rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *) err_msg); +// rt[AP++] = ERL_DRV_ATOM; rt[AP++] = driver_mk_atom((char *) gl_fns[op-GLE_GL_FUNC_START].name); +// rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; +rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 3; +driver_send_term(port,caller,rt,AP); }} /* The End */ diff --git a/lib/wx/test/wx_opengl_SUITE.erl b/lib/wx/test/wx_opengl_SUITE.erl index 9d12711dd7..778d089bce 100644 --- a/lib/wx/test/wx_opengl_SUITE.erl +++ b/lib/wx/test/wx_opengl_SUITE.erl @@ -113,7 +113,7 @@ canvas(Config) -> Data = {?FACES,?VS}, drawBox(0, Data), ?m(ok, wxGLCanvas:swapBuffers(Canvas)), - + ?m([], flush()), Env = wx:get_env(), Tester = self(), spawn_link(fun() -> @@ -125,10 +125,23 @@ canvas(Config) -> %% This may fail when window is deleted catch draw_loop(2,Data,Canvas) end), - ?m_receive(works), + ?m([], flush()), + io:format("Undef func ~p ~n", [catch gl:uniform1d(2, 0.75)]), + timer:sleep(500), + ?m([], flush()), wx_test_lib:wx_destroy(Frame, Config). - + +flush() -> + flush([]). + +flush(Collected) -> + receive Msg -> + flush([Msg|Collected]) + after 1 -> + lists:reverse(Collected) + end. + draw_loop(Deg,Data,Canvas) -> timer:sleep(15), drawBox(Deg,Data), @@ -136,6 +149,7 @@ draw_loop(Deg,Data,Canvas) -> draw_loop(Deg+1, Data,Canvas). + drawBox(Deg,{Fs,Vs}) -> gl:matrixMode(?GL_MODELVIEW), gl:loadIdentity(), -- cgit v1.2.3