aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/src/gen/wxGLCanvas.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wx/src/gen/wxGLCanvas.erl')
-rw-r--r--lib/wx/src/gen/wxGLCanvas.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/wx/src/gen/wxGLCanvas.erl b/lib/wx/src/gen/wxGLCanvas.erl
index 3e0d1bd9ae..032d42535d 100644
--- a/lib/wx/src/gen/wxGLCanvas.erl
+++ b/lib/wx/src/gen/wxGLCanvas.erl
@@ -144,8 +144,10 @@ getContext(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxglcanvas.html#wxglcanvassetcurrent">external documentation</a>.
setCurrent(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGLCanvas),
- wxe_util:cast(?wxGLCanvas_SetCurrent,
- <<ThisRef:32/?UI>>).
+ _Result = wxe_util:cast(?wxGLCanvas_SetCurrent,
+ <<ThisRef:32/?UI>>),
+ {ok, _} = wxe_master:init_opengl(),
+ _Result.
%% @spec (This::wxGLCanvas()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxglcanvas.html#wxglcanvasswapbuffers">external documentation</a>.