diff options
author | Dan Gudmundsson <[email protected]> | 2010-10-06 14:05:36 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2010-11-15 10:13:05 +0100 |
commit | a9f305c51ebccefc3ce6725b4f90700a7d250287 (patch) | |
tree | 64f522982e763eb5eda411196413a15704db36c4 /lib/wx/src/wx.erl | |
parent | b48be79573171e530d97cdf078488eb66fc23f30 (diff) | |
download | otp-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/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. |