diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-24 18:04:26 +0200 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-24 18:04:26 +0200 |
| commit | d3a606f8323a32c660c71675257e3abd95cb097e (patch) | |
| tree | 11e272b194cb42bd9b11b861395f44793d3fa9f6 /indra/media_plugins/example/media_plugin_example.cpp | |
| parent | 5f46430a1aa16212838dd7a9493a42fcb5e92ec3 (diff) | |
| parent | 7857f59f9e7c673f1ddbf32d6a66e85f78004445 (diff) | |
Manual merge from default branch.
Resolved conflicts in llpanellandmarks.cpp.
--HG--
branch : product-engine
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" ); |
