Windows mobile, Problem with textures

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
FST
Posts: 3
Joined: Fri Mar 20, 2009 6:45 pm

Windows mobile, Problem with textures

Post by FST »

Here is what we have on handheld computer
Image
And here is what we have on personal computer
Image

Code

Code: Select all

int _tmain(int argc, _TCHAR* argv[])
{
  E_DRIVER_TYPE driverType = EDT_BURNINGSVIDEO;

  IrrlichtDevice *device =createDevice(video::EDT_BURNINGSVIDEO, dimension2d<s32>(240, 320), 16, true );
if (device == 0)
    return 1; 

  MyEventReceiver receiver(device);
  device->setEventReceiver(&receiver);

  IVideoDriver* driver = device->getVideoDriver();
  ISceneManager* smgr = device->getSceneManager();
  IGUIEnvironment* guienv = device->getGUIEnvironment();

  guienv->addStaticText(L"Hello World! This is the Irrlicht!",
    rect<s32>(30,10,260,22), false);
   guienv->addButton(core::rect<int>(30,35,70,50), 0, 2, L"uQit");

  IAnimatedMesh* mesh = smgr->getMesh("\\Program Files\\TestIRWinMobile\\1.3ds");

  if (!mesh)
    return 1;
  IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
  if (node)
  {
    node->setMaterialTexture( 0, driver->getTexture("\\Program Files\\TestIRWinMobile\\1.tga") );
    node->setMaterialFlag(video::EMF_LIGHTING, false);
    node->setAnimationSpeed(10);
    node->setFrameLoop(node->getStartFrame(),node->getEndFrame());

    }
  smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,20,0));
  IGUIStaticText *text =   guienv->addStaticText(L"FPS: 25",rect<s32>(60,55,200,70), false );
  u32 frames=0;

    while(device->run())
  {
    driver->beginScene(true, true, SColor(255,100,101,140));

    smgr->drawAll();
    guienv->drawAll();

        if (++frames==10)
    {
      stringw str = L"FPS: ";
      str += (s32)driver->getFPS();

      text->setText ( str.c_str() );
      frames=0;
    }

    driver->endScene();
  }

  device->drop();

  return 0;
};
irrlicht-1.5. What reason can cause it?
gabba
Posts: 8
Joined: Wed Jan 21, 2009 7:56 am

Post by gabba »

I assume you read this thread?

You seem to have more success than I had, actually, I couldn't get texture to display at all, while you seem to have something showing on that cube. Also, it would crash all the time. Are you on Windows Mobile 5 or 6? Does your app crash when you move the camera around?

A random suggestion: try loading plain .bmp textures before trying out the other formats.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

What should the mesh look like? I don't understand the desktop pc picture at all.
FST
Posts: 3
Joined: Fri Mar 20, 2009 6:45 pm

Post by FST »

textured plane
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ah, ok. So the windows mobile version is just too dark?
FST
Posts: 3
Joined: Fri Mar 20, 2009 6:45 pm

Post by FST »

yes, texture is too dark
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You should probably try to contact Thomas Alten, the author of burningsvideo driver and the wince device. Or submit a bug tracker ticket (https://sourceforge.net/tracker/?atid=5 ... unc=browse) and I'll assign it to him (will also toggle a mail for him).
Post Reply