How can i set mosaic texture?
How can i set mosaic texture?
Well, first of all, sorry about my flood of newbie questions xD, but i really want to learn Irrlicht.
Well, i set a Texture to a IAnimatedMeshSceneNode, and, its TOTALLY SCALED, and its big, so its look horrible, how can i set a flag or something to set mosaic texture, to repeat the texture its original size.
Thanks again!
Well, i set a Texture to a IAnimatedMeshSceneNode, and, its TOTALLY SCALED, and its big, so its look horrible, how can i set a flag or something to set mosaic texture, to repeat the texture its original size.
Thanks again!
-
piiichan
- Posts: 59
- Joined: Thu May 01, 2008 1:20 am
- Location: New Caledonia (France - Pacific)
- Contact:
Try this
The scale of the texture is the number of times the texture will be repeated.
It's working, but I get an error when the program ends: the debugger brings me to ireferencecounted.h, line 124.
Is it a bug, or am I doing something wrong?
Code: Select all
node->getMaterial(0).getTextureMatrix(0).setTextureScale(10,10);
It's working, but I get an error when the program ends: the debugger brings me to ireferencecounted.h, line 124.
Is it a bug, or am I doing something wrong?
Well, i have a new problem!
If your line isnt in my code, the texture of Dwarf (Warrior) its there, but if a set it in my code, the texture of the floor scale good, but Dwarf´s texture dissapear, whats happening? I have a screenshots:

Here is my code normally WITHOUT floor->getMaterial(0).getTextureMatrix(0).setTextureScale(600,600);
As you see, the texture of the floor is mega-scaled.

Here is my code WITH floor->getMaterial(0).getTextureMatrix(0).setTextureScale(600,600);
Now, floor´s texture is ok but Dwarf´s texture dissapear.
Do you know why?
Thanks a lot!
If your line isnt in my code, the texture of Dwarf (Warrior) its there, but if a set it in my code, the texture of the floor scale good, but Dwarf´s texture dissapear, whats happening? I have a screenshots:

Here is my code normally WITHOUT floor->getMaterial(0).getTextureMatrix(0).setTextureScale(600,600);
As you see, the texture of the floor is mega-scaled.

Here is my code WITH floor->getMaterial(0).getTextureMatrix(0).setTextureScale(600,600);
Now, floor´s texture is ok but Dwarf´s texture dissapear.
Do you know why?
Thanks a lot!
You could also try:
Code: Select all
SceneManager->getMeshManipulator()->makePlanarTextureMapping(YOURMESHHERE, TRYDIFFERENTVALUESHERE);ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Ok, thanks everybody.
@BlindSide: It doesnt work, i dont know why. it says no matching funtion for call.
Well, here is a .rar archive, it has Dev-cpp Project+main.cpp, and the media folder. I will really appreciate if somebody fix my problem, thanks again and bye!
LINK: http://www.mediafire.com/?tciigwjzzgc
PD: Sorry about the comments and some variables, they are in Spanish.
@BlindSide: It doesnt work, i dont know why. it says no matching funtion for call.
Well, here is a .rar archive, it has Dev-cpp Project+main.cpp, and the media folder. I will really appreciate if somebody fix my problem, thanks again and bye!
LINK: http://www.mediafire.com/?tciigwjzzgc
PD: Sorry about the comments and some variables, they are in Spanish.
The first parameter is an IMesh, the second parameter is a float.@BlindSide: It doesnt work, i dont know why. it says no matching funtion for call.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net



