diff options
| author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-03-26 16:32:38 +0200 |
|---|---|---|
| committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-03-26 16:32:38 +0200 |
| commit | 35b5b5e2a3dceaf98fdf770d971c45b1c80116ed (patch) | |
| tree | 3f34f5deff668a9a0001f79560b3823dd48d6f49 /indra/media_plugins/example/media_plugin_example.cpp | |
| parent | e962b8418f8a37c1d18743c31199dd9c33d5c74b (diff) | |
| parent | 379517ce5e1535b20a94ef3a581e1b25223f8798 (diff) | |
merge
--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" ); |
