diff options
author | Dan Gudmundsson <[email protected]> | 2010-11-26 15:10:27 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2010-11-26 15:10:27 +0100 |
commit | 8339345b4e7e0b2f6520af9ecf512c7a8e538276 (patch) | |
tree | 0f165c27fcd9ce0b3a367c2284ce2a992e6c2d2b /lib/wx/src/wx.erl | |
parent | 99a28d961d2d760e98353b55991f1fc51dee06b0 (diff) | |
parent | abc92a6f3b4615e596992eda153da0c09a3c7cbf (diff) | |
download | otp-8339345b4e7e0b2f6520af9ecf512c7a8e538276.tar.gz otp-8339345b4e7e0b2f6520af9ecf512c7a8e538276.tar.bz2 otp-8339345b4e7e0b2f6520af9ecf512c7a8e538276.zip |
Merge branch 'dgud/wx/separate-opengl' into dev
* dgud/wx/separate-opengl:
Fix non available opengl functions
Add lib paths for *bsd variants
Initilize opengl after setCurrent
Update to OpenGL 4.1
Remove ostype sub dirs below wx/priv
Windows and Mac build issues
Add dialyser spec
Better make dependecies for api generation
Split opengl functionality into separate dynamic library
Diffstat (limited to 'lib/wx/src/wx.erl')
-rw-r--r-- | lib/wx/src/wx.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/wx/src/wx.erl b/lib/wx/src/wx.erl index 14abd0d817..9d76f3bc42 100644 --- a/lib/wx/src/wx.erl +++ b/lib/wx/src/wx.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% Copyright Ericsson AB 2008-2010. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -96,7 +96,8 @@ new() -> %% @doc Starts a wx server. %% Option may be {debug, Level}, see debug/1. new(Options) when is_list(Options) -> - #wx_env{} = wxe_server:start(), + #wx_env{port=Port} = wxe_server:start(), + put(opengl_port, Port), Debug = proplists:get_value(debug, Options, 0), debug(Debug), null(). @@ -121,8 +122,9 @@ get_env() -> %% @spec (wx_env()) -> ok %% @doc Sets the process wx environment, allows this process to use %% another process wx environment. -set_env(#wx_env{sv=Pid} = Env) -> - put(?WXE_IDENTIFIER, Env), +set_env(#wx_env{sv=Pid, port=Port} = Env) -> + put(?WXE_IDENTIFIER, Env), + put(opengl_port, Port), %% wxe_util:cast(?REGISTER_PID, <<>>), wxe_server:register_me(Pid), ok. |