Page 1 of 1

Particles are not drawing

PostPosted: Wed Oct 14, 2009 12:11 pm
by ajgamester
Hi !
I integrated Magic Particles in Playground sdk , and it is working fine but if u change mode ( fullscreen to windowmode and vice versa ), particles are not drawing
... i posted same question in sdk , there hope less because sdk has particle editor , they are suggesting to use , but that editor not that much good as magic particles.... so please help me out in this ... which is happening in Magic particles wrapper also

Re: Particles are not drawing

PostPosted: Wed Oct 14, 2009 10:15 pm
by Odin_KG
Hi,

When you change the screen mode Direct3D loses the textures. You need to restore the textures yourself. For example, you may save texture atlases in temporary files and load texture atlases back if Direct3D loses their.

Re: Particles are not drawing

PostPosted: Thu Oct 15, 2009 1:28 pm
by ajgamester
const char* temp_folder=GetPathToTemp();
MP->Initialization(MAGIC_INTERPOLATION_ENABLE, MAGIC_NOLOOP, MAGIC_CHANGE_EMITTER_ONLY, temp_folder);

const char* file=GetFirstFile();
MP->LoadEmittersFromFile(file);

// Loading Textures
const char* texture_folder=GetPathToTexture();
MP->LoadTextures(texture_folder,1024,1024,0,0.1f);


after toggle the full screen mode what should i write for loading textures again ? can help with small snippet
/// for loading again

Re: Particles are not drawing

PostPosted: Fri Oct 16, 2009 12:53 am
by Odin_KG
can help with small snippet


I have made the restoring of the textures:
http://www.astralax.ru/download/program ... rapper.zip (it is version with russian comments, but it is not important)