Particles are not drawing

All information about Magic Particles: news, question, comments, etc.

Particles are not drawing

Postby ajgamester » Wed Oct 14, 2009 12:11 pm

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
ajgamester
 
Posts: 11
Joined: Fri Oct 09, 2009 6:55 am

Re: Particles are not drawing

Postby Odin_KG » Wed Oct 14, 2009 10:15 pm

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.
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: Particles are not drawing

Postby ajgamester » Thu Oct 15, 2009 1:28 pm

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
ajgamester
 
Posts: 11
Joined: Fri Oct 09, 2009 6:55 am

Re: Particles are not drawing

Postby Odin_KG » Fri Oct 16, 2009 12:53 am

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)
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm


Return to Magic Particles

Who is online

Users browsing this forum: No registered users and 14 guests

cron