diff options
author | Dan Gudmundsson <[email protected]> | 2010-11-15 15:24:58 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2010-11-15 15:24:58 +0100 |
commit | 8ecbdaf5eb54052d7b4756037e6dc481a36358ed (patch) | |
tree | 3db1d8e9cf250003fa240ba33072d509edeab382 /lib/wx/api_gen/wx_gen_cpp.erl | |
parent | 2e605129613ba88427de27520a19456903d40cca (diff) | |
download | otp-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_cpp.erl')
-rw-r--r-- | lib/wx/api_gen/wx_gen_cpp.erl | 12 |
1 files changed, 6 insertions, 6 deletions
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), |