aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wx_gen_erl.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2010-11-15 15:24:58 +0100
committerDan Gudmundsson <[email protected]>2010-11-15 15:24:58 +0100
commit8ecbdaf5eb54052d7b4756037e6dc481a36358ed (patch)
tree3db1d8e9cf250003fa240ba33072d509edeab382 /lib/wx/api_gen/wx_gen_erl.erl
parent2e605129613ba88427de27520a19456903d40cca (diff)
downloadotp-8ecbdaf5eb54052d7b4756037e6dc481a36358ed.tar.gz
otp-8ecbdaf5eb54052d7b4756037e6dc481a36358ed.tar.bz2
otp-8ecbdaf5eb54052d7b4756037e6dc481a36358ed.zip
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.
Diffstat (limited to 'lib/wx/api_gen/wx_gen_erl.erl')
-rw-r--r--lib/wx/api_gen/wx_gen_erl.erl22
1 files changed, 11 insertions, 11 deletions
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),