diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-03-17 13:35:39 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-03-17 13:35:39 -0400 |
commit | 6e761bb5f2fac9155b03b74008cfca141968ae6c (patch) | |
tree | 8fa1dcf8f2f6edae67e832dc34a6286901ae771d /indra/media_plugins/example/media_plugin_example.cpp | |
parent | a5c43859c355afbb5a24d8599756297cad07f590 (diff) | |
parent | 509457b8ef7bfb8e5b6dcb1a25996ae8fe329007 (diff) |
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/media_plugins/example/media_plugin_example.cpp')
-rw-r--r-- | indra/media_plugins/example/media_plugin_example.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/media_plugins/example/media_plugin_example.cpp b/indra/media_plugins/example/media_plugin_example.cpp index f5b077fea0..49bbca6c52 100644 --- a/indra/media_plugins/example/media_plugin_example.cpp +++ b/indra/media_plugins/example/media_plugin_example.cpp @@ -119,17 +119,6 @@ void MediaPluginExample::receiveMessage( const char* message_string ) std::string plugin_version = "Example media plugin, Example Version 1.0.0.0"; message.setValue( "plugin_version", plugin_version ); sendMessage( message ); - - // Plugin gets to decide the texture parameters to use. - message.setMessage( LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params" ); - message.setValueS32( "default_width", mWidth ); - message.setValueS32( "default_height", mHeight ); - message.setValueS32( "depth", mDepth ); - message.setValueU32( "internalformat", GL_RGBA ); - message.setValueU32( "format", GL_RGBA ); - message.setValueU32( "type", GL_UNSIGNED_BYTE ); - message.setValueBoolean( "coords_opengl", false ); - sendMessage( message ); } else if ( message_name == "idle" ) @@ -191,7 +180,20 @@ void MediaPluginExample::receiveMessage( const char* message_string ) else if ( message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA ) { - if ( message_name == "size_change" ) + if ( message_name == "init" ) + { + // Plugin gets to decide the texture parameters to use. + LLPluginMessage message( LLPLUGIN_MESSAGE_CLASS_MEDIA, "texture_params" ); + message.setValueS32( "default_width", mWidth ); + message.setValueS32( "default_height", mHeight ); + message.setValueS32( "depth", mDepth ); + message.setValueU32( "internalformat", GL_RGBA ); + message.setValueU32( "format", GL_RGBA ); + message.setValueU32( "type", GL_UNSIGNED_BYTE ); + message.setValueBoolean( "coords_opengl", false ); + sendMessage( message ); + } + else if ( message_name == "size_change" ) { std::string name = message_in.getValue( "name" ); S32 width = message_in.getValueS32( "width" ); |