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/api_gen/wx_gen_cpp.erl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/wx/api_gen/wx_gen_cpp.erl') 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), -- cgit v1.2.3