aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wx_gen_cpp.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2010-10-06 14:05:36 +0200
committerDan Gudmundsson <[email protected]>2010-11-15 10:13:05 +0100
commita9f305c51ebccefc3ce6725b4f90700a7d250287 (patch)
tree64f522982e763eb5eda411196413a15704db36c4 /lib/wx/api_gen/wx_gen_cpp.erl
parentb48be79573171e530d97cdf078488eb66fc23f30 (diff)
downloadotp-a9f305c51ebccefc3ce6725b4f90700a7d250287.tar.gz
otp-a9f305c51ebccefc3ce6725b4f90700a7d250287.tar.bz2
otp-a9f305c51ebccefc3ce6725b4f90700a7d250287.zip
Split opengl functionality into separate dynamic library
The idea is to build a separate opengl library which can be reused by other erlang applications.
Diffstat (limited to 'lib/wx/api_gen/wx_gen_cpp.erl')
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl12
1 files changed, 8 insertions, 4 deletions
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),