Page 1 of 1

Absolutely stupid: Mesh cache

Posted: Mon Sep 12, 2005 5:39 pm
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

Posted: Mon Sep 12, 2005 6:50 pm
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.

Posted: Mon Sep 12, 2005 7:13 pm
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

Re: Absolutely stupid: Mesh cache

Posted: Mon Sep 12, 2005 8:22 pm
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!

Posted: Tue Sep 13, 2005 3:38 pm
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

Posted: Tue Sep 13, 2005 5:40 pm
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.