Absolutely stupid: Mesh cache

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
WToma
Posts: 70
Joined: Tue Aug 09, 2005 8:38 am
Location: Szeged, Hungary

Absolutely stupid: Mesh cache

Post by WToma »

Hi all!
What's wrong with this code:

Code: Select all

#include <irrlicht/irrlicht.h>

using namespace irr;

#include <iostream>
#include <string>

using namespace std;

int main() {
	string meshfilename="trabi.my3d";
	IrrlichtDevice* dev=createDevice(video::EDT_DIRECTX9,core::dimension2d<s32>(640,480),32);
	scene::ISceneManager* smgr=dev->getSceneManager();
	video::IVideoDriver* drv=dev->getVideoDriver();
	scene::IMeshCache* meshc=smgr->getMeshCache();
	scene::IAnimatedMesh* mesh01=smgr->getMesh(meshfilename.c_str());
	meshc->addMesh(meshfilename.c_str(),mesh01); //(***)
    return 0;
}
Compiler says (to line ***): addMesh undeclared. Says the same to all mesh cache methods. (mingw 3.3.1, irr 0.12)
Help me, please! This silly code drives me mad!

Toma
"This is not a bug, this is a feature!"
Reiyn
Posts: 23
Joined: Sat Mar 05, 2005 7:51 pm
Location: Canada

Post by Reiyn »

Hahaha, I like it. Frustration posts should always begin that way. "ARRRGH!!" in the title lol. "So freak'n annoying - HELP!" lol.

I can't help as I haven't tried the new cache/library stuff yet. =/

I just wanted to post some banter and a helpful bump I suppose - heh.
Reiyn
Creating "Chimera", an Online RPG
DAoC - Guinevere - Druid rr11
WoW - Gorgonnash - Druid 55
WToma
Posts: 70
Joined: Tue Aug 09, 2005 8:38 am
Location: Szeged, Hungary

Post by WToma »

You like seeing people being frustrated by stupid errors and post some even-more-frustrating reply? You should see your psychologist, I think...

Anyway, does someone have max7 sdk with some docs and especially with examples showing how to use it with mingw compilers? I have some headers and libs (came with my3d exporter) but I cannot compile with Dev-C++ (mingw 3.3.1).

Toma
"This is not a bug, this is a feature!"
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Re: Absolutely stupid: Mesh cache

Post by etcaptor »

WToma wrote: Compiler says (to line ***): addMesh undeclared. Says the same to all mesh cache methods. (mingw 3.3.1, irr 0.12)
Help me, please! This silly code drives me mad!
Toma
One line :wink:

Code: Select all

#include <IMeshCache.h>
[/color]Enjoy!
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
WToma
Posts: 70
Joined: Tue Aug 09, 2005 8:38 am
Location: Szeged, Hungary

Post by WToma »

Aaargh :D
Thanks a lot. It was strange because usually I don't need to include any headers but irrlicht.h, and documentation did not tell anything about it.

Toma
"This is not a bug, this is a feature!"
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

I also got this error when trying this at first. Seems that this line is not included in Irrlicht.h or other interface headers. Most irrlicht classes uses #include "CMeshCache.h" internaly, and CMeshCache is derivated by IMeshCache.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
Post Reply