Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
bdpdonp
Posts: 68
Joined: Sat Oct 10, 2009 6:35 am

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by bdpdonp »

I upgraded my current project to the latest Lime (1.3), and I get an error at runtime attempting to load a texture into a SkyDome.

Code: Select all

 
smgr = device.SceneManager;
smgr.AddSkyDomeSceneNode(driver.GetTexture(@"c:\Development\Projects\Fleet Command\Redist\images\starfield\starfield1.jpg"));
 
The error:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I went back to Version 1.2 and the code works fine.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

Have upgraded both DLLs (IrrlichtLime.dll and Irrlicht.dll)? Please make sure you upgraded both.
Have you recompiled your project after upgrading?
bdpdonp
Posts: 68
Joined: Sat Oct 10, 2009 6:35 am

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by bdpdonp »

Yes, but I will try again. I also comple irrlichtLime
rubenwardy
Posts: 91
Joined: Mon Mar 05, 2012 4:51 pm
Location: Bristol, UK
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by rubenwardy »

bdpdonp wrote:I upgraded my current project to the latest Lime (1.3), and I get an error at runtime attempting to load a texture into a SkyDome.

Code: Select all

 
smgr = device.SceneManager;
smgr.AddSkyDomeSceneNode(driver.GetTexture(@"c:\Development\Projects\Fleet Command\Redist\images\starfield\starfield1.jpg"));
 
The error:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I went back to Version 1.2 and the code works fine.
This is the error I got.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

As i understood, the examples works fine for you. They load textures so GetTexture works for them. But somehow your project after upgrading stopped to work. Please, reproduce the problem in smallest as possible test case and post it here.
jimmyh
Posts: 12
Joined: Sun Feb 19, 2012 8:40 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by jimmyh »

I started to create an editor using the L02.WinFormsWindow(Directx9) example, but as soon as I make the window(render panel) much larger, the windows ui controls become unresponsive.

Switching to OpenGL seems to fix the problem, but I would really like to use Dx9. Could this issue be looked into or is this a Dx9 problem?

Regards.
jimmyh
Posts: 12
Joined: Sun Feb 19, 2012 8:40 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by jimmyh »

jimmyh wrote:I started to create an editor using the L02.WinFormsWindow(Directx9) example, but as soon as I make the window(render panel) much larger, the windows ui controls become unresponsive.

Switching to OpenGL seems to fix the problem, but I would really like to use Dx9. Could this issue be looked into or is this a Dx9 problem?

Regards.
I should have said I'm using Windows 7 64Bit (dx11 gfx card), doing the same thing on Windows XP 32Bit (dx9 gfx card) works fine.

I'll have to go through and make sure every thing is uptodate.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

Don't know why controls become unresponsive after you just resized rendering area. But be aware, using method provided in L02.WinFormsWindowm you can only render, the mouse or keyboard input cannot be caught by Irrlicht Engine. Events can be caught only if Irrlicht has created the window itself (so you don't pass existing window handle, you let Irrlicht create the window), but you will not be able to use WinForms controls.
jimmyh
Posts: 12
Joined: Sun Feb 19, 2012 8:40 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by jimmyh »

greenya wrote:Don't know why controls become unresponsive after you just resized rendering area. But be aware, using method provided in L02.WinFormsWindowm you can only render, the mouse or keyboard input cannot be caught by Irrlicht Engine. Events can be caught only if Irrlicht has created the window itself (so you don't pass existing window handle, you let Irrlicht create the window), but you will not be able to use WinForms controls.
Would it not be possible for WinForms to catch the events and then post them to Irrlicht?

I use that method with wxWidgets and Irrlicht, but would like to move to WinForms.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

I was not able to achieve this. You can try also. If you will get any positive results - feel free to share.
jimmyh
Posts: 12
Joined: Sun Feb 19, 2012 8:40 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by jimmyh »

greenya wrote:I was not able to achieve this. You can try also. If you will get any positive results - feel free to share.
Got the user events working :) Well mouse movement works.

I've added a mouse move event to the render panel, which creates a new event and posts it to irrlicht:

Code: Select all

        private void panelRenderingWindow_MouseMove(object sender, MouseEventArgs e)
        {
            int mouseX = e.X;
            int mouseY = e.Y;
 
            IrrlichtLime.Event irrEvt = new IrrlichtLime.Event ( IrrlichtLime.MouseEventType.Move, mouseX, mouseY );
 
            if (dev != null)
                dev.PostEvent (irrEvt);
 
        }
I also added an event handler to the device.

Code: Select all

dev.OnEvent += new IrrlichtDevice.EventHandler ( device_OnEvent );
device_OnEvent looks like:

Code: Select all

        static bool device_OnEvent(Event evnt)
        {
            if (evnt.Type == EventType.Mouse)
            {
                if ( evnt.Mouse.Type == MouseEventType.Move )
                    Console.WriteLine("Mouse Move Event: {0}, {1}", evnt.Mouse.X, evnt.Mouse.Y); 
            }
            return false;
        }
Hope this helps some one.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

Very good. At least mouse.
FPS camera will not work because it needs keyboard, but i a lot of cases it is not needed.
nguyenvuduc
Posts: 1
Joined: Fri Feb 08, 2013 10:07 am

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by nguyenvuduc »

Have anyone succeeded in compile Irrlicht Lime for 64 bit?

I tried to compile the Irllicht Lime against Irrlich x64 revision r4098. But it always end up with Memory Violation when my program is running.
My program use Irrlicht Lime and it needs big memory for computing. The limit of 2GBs for x86 .NET application is not enough for my application.

Thank you
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by greenya »

I tried to compile Lime for x64 platform but i got bunch of compilation errors which didn't know how to solve. That was like a half of a year ago and now i cannot say for sure what was the errors.
jimmyh
Posts: 12
Joined: Sun Feb 19, 2012 8:40 pm

Re: Irrlicht Lime is a .NET wrapper for Irrlicht Engine

Post by jimmyh »

greenya wrote:Don't know why controls become unresponsive after you just resized rendering area.
I managed to get around the unresponsiveness by not using the background worker, instead it uses the on paint event to render the frame.

However on some computers the panel shows with a big red cross over it. Both dll's are in the same directory as the exe.
Image
Post Reply