THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/08/2008 at 08:37, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) : C++ ;
---------
Hi!
We are working on a shader plugin. For the shader we need to create a new texture for rendering. This new texture depends on the properties of the shader and the creation takes time (up to a minute and more). Once the textures were created the rendering is very fast. To avoid the permanent texture generation we cache the textures and only recreate them when the user change the shader properties. In the current approach the user has to push a 'generate-button' within shader property dialog and then the texture generation starts in the GUI-Thread.
Due to this generation the whole GUI cannot respond. To solve the issue we created a custom dialog and a separate thread. Within the thread we do our texture generation and the GUI dialog is used to inform the user about the progress. The problem is we have no clou how the thread can inform the dialog that it is done.
> \> // Generation-Thread \> \> void Main() \> { \> publicGenerateTileset(m_settings, m_bitmap); \> // texture is generated \> \> // and what now? \> // m_receive is my custom dialog \> m_receive->Close(); \> } \>
The dialog doesn't respond to the 'Close' command. We assume this is because we send the close command from a none-gui thread but how can we avoid that?
In short: how can we inform the user that the shader plugin is doing some important preparation stuff and that he has to wait until the process is ready? Remember, this should happen in the property dialog of the shader.
So hopefully it wasn't that confusing :)
It's our first plugin and it may be the complete wrong approach...