[HGE] Using DDS textures causes wrapper to crash

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

[HGE] Using DDS textures causes wrapper to crash

Postby sonictk » Thu Mar 11, 2010 8:20 am

Hello again. I have another technical issue with Magic Particles.

For reasons of convenience, I have been designing all my special effects using PNG as my texture format. However, as we need to optimize the effects, I am planning to switch to converting all textures to DDS format. However, it seems that while Magic Particles appears to read DDS fine and the effect plays nicely in the scene editor, when it is placed in the HGE wrapper, it causes it to crash.

I have tried looking through the documentation for the wrapper but have found nothing about DDS format. HGE does support DDS, as we are bringing in sprites in DDS format as well. Is there anything that we can do to modify the Magic Particles HGE wrapper to enable it to support DDS textures? This could prove critical to helping improve the performance of the effects.
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE] Using DDS textures causes wrapper to crash

Postby Odin_KG » Thu Mar 11, 2010 2:27 pm

Magic Particles API does not load the textures. This is the task of HGE:

Code: Select all
// eng: Loads texture frame
void MP_Atlas_WRAP::LoadFrame(MAGIC_TEXTURE* magic_texture, const char* texture_folder)
{
   HTEXTURE texture_from;
   if (magic_texture->data)
      texture_from=hge->Texture_Load(magic_texture->data,magic_texture->length,false);
   else
   {
      MP_String path=texture_folder;
      path+=magic_texture->file;
      texture_from=hge->Texture_Load(path.c_str(),0,false);
   }
...
...
...
User avatar
Odin_KG
Administrator
Administrator
 
Posts: 255
Joined: Sat May 09, 2009 10:53 pm

Re: [HGE] Using DDS textures causes wrapper to crash

Postby sonictk » Fri Mar 12, 2010 6:15 am

We are currently using DDS textures for our map sprites and they seem to load fine. Would you happen to know why it seems to crash the HGE engine whenever I introduce DDS textures into the ptc files? I understand that how HGE deals with loading textures is not under your purview but it would help a great deal if we could get any advice on this matter.
sonictk
 
Posts: 28
Joined: Sun Feb 07, 2010 6:31 am

Re: [HGE] Using DDS textures causes wrapper to crash

Postby Odin_KG » Fri Mar 12, 2010 8:11 am

Hello!

Error happens in this line of HGE-wrapper:
texture_from=hge->Texture_Load(magic_texture->data,magic_texture->length,false);

If you use HGE then you may not use DDS for particles or you have to load DDS in HGE yourself.
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 3 guests

cron