diff options
author | Palmer Truelson <palmer@lindenlab.com> | 2010-03-17 14:23:53 -0700 |
---|---|---|
committer | Palmer Truelson <palmer@lindenlab.com> | 2010-03-17 14:23:53 -0700 |
commit | 86229c1b57fbb748d622caf875e879c227fce762 (patch) | |
tree | 5e45b15b31e577fe78bbef8921c75b91cdf31e79 /indra/media_plugins/example/media_plugin_example.cpp | |
parent | fd749ea7d5dac43f6efdb2e7eefe9131cf57ec97 (diff) | |
parent | 1e713c886c2ba688a6145d682a8685e547de54ad (diff) |
merge
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" ); |