Search found 11 matches

by theandrew80
Fri Mar 10, 2006 12:54 pm
Forum: Irrlicht.NET
Topic: Texture reference shared to all MeshSceneNode
Replies: 8
Views: 1775

Yes, I've tried your solution and it works too.

Thanks!
by theandrew80
Fri Mar 10, 2006 8:10 am
Forum: Irrlicht.NET
Topic: Texture reference shared to all MeshSceneNode
Replies: 8
Views: 1775

I've created a new method on original engine and I've wrapped it on Irrlicht.NET: and overload of existing SetMaterialTexture, with an additional parameter, "material", that specifies the index of the material the texture refers. It's strange that that overload doesn't exists in the offici...
by theandrew80
Thu Mar 09, 2006 4:29 pm
Forum: Irrlicht.NET
Topic: Texture reference shared to all MeshSceneNode
Replies: 8
Views: 1775

I read the documentation of the SetMaterialTexture method: Sets the texture of the specified layer in all materials of this scene node to the new texture. The problem is that I want to apply the texture only to one material of the mesh. Do you know if a method exists? I could create the method modif...
by theandrew80
Thu Mar 09, 2006 4:04 pm
Forum: Irrlicht.NET
Topic: Texture reference shared to all MeshSceneNode
Replies: 8
Views: 1775

Mmmmh.... SetMaterialTexture adds my texture to all faces of my mesh, but i nedd to apply only on front face... That methods take a parameter, textureLayer, that i set to 0. What is exactly that parameter?
by theandrew80
Thu Mar 09, 2006 3:44 pm
Forum: Irrlicht.NET
Topic: Texture reference shared to all MeshSceneNode
Replies: 8
Views: 1775

I've just tried the Martin's solution, and it's working perfectly.
Thanks Martins... for the second time! :wink:
by theandrew80
Thu Mar 09, 2006 3:06 pm
Forum: Irrlicht.NET
Topic: Texture reference shared to all MeshSceneNode
Replies: 8
Views: 1775

Texture reference shared to all MeshSceneNode

Hi! I'm getting a reference to a texture of a mesh with this code: m_FullCardMeshNode.GetMaterial(0).Texture1 Then I replace the bitmap contained into that texture with another bitmap, but this change affects all the meshes on the screen. The other meshes are into the same SceneManager and derive fr...
by theandrew80
Wed Mar 08, 2006 8:03 am
Forum: Irrlicht.NET
Topic: bool keyboard input with c#
Replies: 3
Views: 2087

Hi olli, the method is the same: derive a custom class from the interface IEventReceiver, like this: class MyEventReceiver : IEventReceiver { public MyEventReceiver() { } public bool OnEvent(Irrlicht.Event e) { bool Handled = true; if( e.Type == EventType.KeyInput && !e.KeyPressedDown ) { sw...
by theandrew80
Tue Mar 07, 2006 3:23 pm
Forum: Irrlicht.NET
Topic: Replacing a model texture at runtime
Replies: 7
Views: 1886

I've downloaded the Irrlicht.NET source from CVS using WinCvs and I've added the RegenerateMipMapLevels() method to the .NET ITexture interface.
Now all works well :D !!!

Thanks Martin for your help!
by theandrew80
Tue Mar 07, 2006 1:35 pm
Forum: Irrlicht.NET
Topic: Replacing a model texture at runtime
Replies: 7
Views: 1886

Martins wrote:I went to sourceforge CVS and it has full .NET source code.
Please can you post the link for sourceforge CVS? Thanks!
by theandrew80
Tue Mar 07, 2006 12:31 pm
Forum: Irrlicht.NET
Topic: Replacing a model texture at runtime
Replies: 7
Views: 1886

I had a look at C++ implementation, and ITexture has a virtual method ITexture::regenerateMipMapLevels(). Very interesting! I'll try to call it from my c# code. I will try to add missing method definition to ITexture and try this out later when I get home. Ok! Please, let me know the results! :D Is...
by theandrew80
Tue Mar 07, 2006 8:36 am
Forum: Irrlicht.NET
Topic: Replacing a model texture at runtime
Replies: 7
Views: 1886

Replacing a model texture at runtime

Hi all. I'm trying to replace the content of a texture (statically applied to the material using a 3d model tool) with the content of a bitmap, using the following code: IAnimatedMesh mesh = m_Device.SceneManager.GetMesh(@"Card.x"); m_FullCardMeshNode = m_Device.SceneManager.AddAnimatedMes...