setMaterialTexture with jpg files

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Guest

setMaterialTexture with jpg files

Post by Guest »

I am using

Node->setMaterialTexture(0, driver->getTexture("tex.jpg"));

for setting my node's texture ...
But when i run my application, it is terminated direclty after displaying "jpeg parameter struct ..." message ...

Any idea ?
Guest

Post by Guest »

Try another jpeg first to see if image may be corrupt,
if same indications post some more code.
Guest

Post by Guest »

I know that they aren't corrupted because same code is working with 0.8 ...

I also tried openning the jpg file with an image editor and resaving as tex2.jpg ...

some more code;

Code: Select all

scene::IAnimatedMeshSceneNode* Node = 0;
    
    scene::IAnimatedMesh* model = smgr->getMesh("ball.X");
    node = smgr->addAnimatedMeshSceneNode(model);
    node->setMaterialFlag(video::EMF_LIGHTING, false);
    node->setMaterialType(video::EMT_SOLID);	
    node->setMaterialTexture(0, driver->getTexture("tex.jpg")); 
    node->setPosition(core::vector3df(0,0,35));
laforced
Posts: 39
Joined: Tue Feb 01, 2005 5:07 am
Location: South Carolina,USA
Contact:

Post by laforced »

Go to the examples folder.
Open the Movement example.
Replace sydney.md2 with ball.x
replace sydney.bmp with tex.jpg.
Make No other changes.
If same results:

1. X-file is corrupt
2. DLL's from previous version in system folder
if using a windows based OS.
3. path to resources incorrect.
4. problem in the non posted portion of your code.
If you're not making GREAT games
you belong in an institute!
The Game Institute.
www.gameinstitute.com
Post Reply