why is makePlanarTextureMapping not working

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

why is makePlanarTextureMapping not working

Post by Guest »

like the title says, why is it only working with terrain, not with x files?
here is my code:

Code: Select all

	IAnimatedMesh* level		= smgr->getMesh("data/models/groundmesh.x");
	ISceneNode* levelnode	= smgr->addOctTreeSceneNode(level->getMesh(0));
	levelnode->	setPosition(vector3df(0,-2000,0));
	levelnode->	setScale(vector3df(2000,2000,2000));
	levelnode->	setMaterialFlag(EMF_LIGHTING, false);
	levelnode->	setMaterialTexture( 0, driver->getTexture("data/textures/environment/tex070.jpg"));
	smgr->getMeshManipulator()->makePlanarTextureMapping(level->getMesh(0), 0.002f);
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

comment out the set material line; with x files the material info is included in the mesh, but you must have your tex070.jpg in the same folder as your groundmesh.x

see if it changes anything. I thing you're declaring things twice and therefore confusing the renderer.
Guest

Post by Guest »

nope sorry that does not help :)
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

I'm sorry. regards to Maffay!!! he/she is beautiful!

edited: and you should be an architect!! I just saw your blueprint of your room. Dont know why or what you did that for, but someone who's so concerned about spaces must definitely be an architect!!!!! :D and imagine an architect with your programming experience!!

last comment: sometime ago I asked you about the advantages of splitting your code into different source files and then including them in the main file. I really like that, but besides organizing your stuff, are there any other benefits from doing this?

cheers pal!
Last edited by afecelis on Sat Nov 13, 2004 1:05 am, edited 1 time in total.
Guest

Post by Guest »

no rpoblem :) i gues i found the problme by tomorrow!

btw: you like maffay? cool man! you are one of the first! :) he is a he .. *G*

ps: sorrym, drunk a litle too much h ... forigive me !!! :oops:
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

heheh, np man. it's friday, have some drinks on me, PROST!

oh yes, I forgot, your app is looking damn cool. little bug, if you right click on it imemdiately after opening it crashes, but if you clcik on build, and then create a box, you can right click to erase the builder with np.

final word: I also had bunnies in my apartment. I bought the first one , then got him a grilfriend, and then we had like 16!!!!! we had to take them to the farm!!! lol

the white one is cutu (tha male) and the black one is his girlfriend. :D
http://www.danielpatton.com/afecelis/sc ... s/cutu.JPG
Last edited by afecelis on Sat Nov 13, 2004 1:39 am, edited 1 time in total.
Guest

Post by Guest »

i dont know *lol* i do it only for organizing, but i know it must have some deeper reason, maybe classes or somewhat like that :)

oh yeah the room, it was for a friend of mine who asked how my room would look :) but you have brought me to a wonderful idea, maybe modelling my room in blender *g* yeah that would be cool.

ps: greetz from maffay :wink: he seems to be happy ^^

cheers! (i dont know what i does mean, but you write that too so i guess its something positive :roll: )


edit: 16!? man thats much!! *lol* the white one looks cool! but the black one looks cool, too! they look like programmer friends *g* did you give all the bunnys to the farm? well, 16, wow! cutu did a good job hehe

about the app:
ok i fixed the problem, i forgot an:
if(dummy != 0){code}else{return;}
otherwise it had crashed.
cool you looked at my source! i dont know much who did that :) it keeps improving every day!

but right now im trying all your gmax tutorials and model some cool level to experiment with! its so cool to use lightmaps, gives irrlicht a totally other feeling :)

ps: ok, ill have some extra drinks for you! :D (but not too much, or otherwise i couldnt write anymore ... ok i actually can not do it correctly now too *gg* )

see you :wink:
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

hehehe!!! :D :D
you opened my apetite for wine!!! I just came back from the liquor store and got myself 2 boxes of wine!!! Still celebrating my anniversary !!!

about the bunnies: 16 here in the apartment in 2 rows (8 bunnies each) then like 250 in the farm!!!! amazing huh!!!

love Maffay's lowered ears!!!

oh yes, and cheers=prost, or a very formal bye bye in the UK. :D

so...prost!!!!

ps. I'm gonna try and reorganize my apps your way.
Harry_Mystic
Posts: 32
Joined: Sun Nov 23, 2003 10:23 pm

Post by Harry_Mystic »

About splitting code in multiple files.

In short:
Organising project, especially when you work with classes. Each class has a header for the implementation and a source for the declaration. And if you have really long functions you can put them in a sepetate file as well. So you don't need to scoll thousands of lines to find something.

Faster compilation time. Only the changed files get recompiled. In small projects not importand but in big ones.

Reusable code, again, espacially with classes. For example, you create your own button class and want to use it in another project. Then you just need to add the header/source files to this project and you can create a new button.

These are the reasons why I split my code, a better and longer explanation is here:
http://www.gamedev.net/reference/progra ... efault.asp

I am not an experienced programmer so any correction or additional hints are welcome.
Post Reply