Irrlicht Lime is a .NET wrapper for Irrlicht Engine
maybe someone can help me find out why methods are being called for my custom scenenode even when putting:
Code: Select all
AddHandler me.OnRegisterSceneNode, AddressOf CDecal_OnRegisterSceneNode
AddHandler Me.OnRender, AddressOf CDecal_OnRender
AddHandler Me.OnGetBoundingBox, AddressOf CDecal_OnGetBoundingBox
AddHandler Me.OnGetMaterialCount, AddressOf CDecal_OnGetMaterialCount
AddHandler Me.OnGetMaterial, AddressOf CDecal_OnGetMaterial
Code: Select all
Public Class CDecal
Inherits SceneNode
Private bbox As New AABBox()
Private vertices As New List(of vertex3d)
Private material As New Material()
Public Sub New(parent As SceneNode, smgr As SceneManager, id As Integer, size as Single, byval tex as string)
MyBase.New(parent, smgr, id)
AddHandler OnRegisterSceneNode, AddressOf me.CDecal_OnRegisterSceneNode
AddHandler OnRender, AddressOf me.CDecal_OnRender
AddHandler OnGetBoundingBox, AddressOf me.CDecal_OnGetBoundingBox
AddHandler OnGetMaterialCount, AddressOf me.CDecal_OnGetMaterialCount
AddHandler OnGetMaterial, AddressOf me.CDecal_OnGetMaterial
material.Wireframe = false
material.Lighting = False
vertices.Add(New Vertex3D(New Vector3Df(-1, 1, 0)))
vertices.Add(New Vertex3D(New Vector3Df(1, 1, 0)))
vertices.Add(New Vertex3D(New Vector3Df(1, -1, 0)))
vertices.Add(New Vertex3D(New Vector3Df(-1, -1, 0)))
dim t as Texture = dev.VideoDriver.GetTexture(tex)
me.SetMaterialTexture(0, t)
End Sub
Private Sub CDecal_OnRegisterSceneNode()
If Visible Then
SceneManager.RegisterNodeForRendering(Me)
End If
End Sub
Private Sub CDecal_OnRender()
Dim indices As New List(Of UShort)()
indices.Add(0)
indices.Add(1)
indices.Add(2)
indices.Add(1)
indices.Add(2)
indices.Add(3)
dev.VideoDriver.SetMaterial(material)
dev.videodriver.SetTransform(TransformationState.World, AbsoluteTransformation)
dev.videodriver.DrawVertexPrimitiveList(vertices, indices)
End Sub
Private Function CDecal_OnGetBoundingBox() As AABBox
Return bbox
End Function
Private Function CDecal_OnGetMaterialCount() As Integer
Return 1
End Function
Private Function CDecal_OnGetMaterial(index As Integer) As Material
Return material
End Function
End Class
-
- Posts: 1
- Joined: Tue Jan 11, 2011 10:52 pm
Grunt does the Scenemanager for a Device add this node? or Do you add the node to that scenemanagers parent? (Don't know VB very well)
Thank you for this rapper, GreenYa! I had trouble trying to get it to work because of assembly not loading, but it was fixed by convert my project to .net 4.0 and rebuilding the lime code into 4.0 visual 2010.
I having been making a 2D game engine with csscripting for a year and irrlicht.net has been great to me, but because of Lime I am up to date with a very good framerate!
Thank you for this rapper, GreenYa! I had trouble trying to get it to work because of assembly not loading, but it was fixed by convert my project to .net 4.0 and rebuilding the lime code into 4.0 visual 2010.
I having been making a 2D game engine with csscripting for a year and irrlicht.net has been great to me, but because of Lime I am up to date with a very good framerate!
not sure what the problem is here but if I add a shadowvolumescenenode, then the shadowing gets all messed up as you can see in this image:
If I change it to direct3d8, the shadow works but then the reflections are garbled as seen in this image. Not sure if this has to be doing with the fact that it is embedded in windows forms and Im running it in a thread.
I just wish both would work at the same time. OpenGL doesnt work at all for me in winforms. Same thing happens on my laptop.
If I change it to direct3d8, the shadow works but then the reflections are garbled as seen in this image. Not sure if this has to be doing with the fact that it is embedded in windows forms and Im running it in a thread.
I just wish both would work at the same time. OpenGL doesnt work at all for me in winforms. Same thing happens on my laptop.
I wouldn't expect much from shadows implementation in Irrlicht. As i know it unable to build shadow with correct projection (I have described this in http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=25717). Also i have tested on different video cards (actually Radeon 200M, Radeon X1650, GF 9600M and GF 8600) and noticed that shadows renders not very good for all video cards (Radeons has weeker implementation of OpenGL, but maybe this is not truth for top Radeon cards): i have transparent dots all over the shadow volume, some times complete triangles are transparent (of a shadow volume).
So I think that in your example, it is one of the same problems. Anyway, I don't think that this is wrapper's bug. But, I can test it for you, if you write small as possible test case (in C#) - I will translate it in C++ and check and post the result.
So I think that in your example, it is one of the same problems. Anyway, I don't think that this is wrapper's bug. But, I can test it for you, if you write small as possible test case (in C#) - I will translate it in C++ and check and post the result.
Version 0.8 has been released
New examples: 19.MouseAndJoystick and L05.ScreenshotToTexture.
Release Notes
~
Added attributes support. Added Attrbiutes class and all (or almost all) which uses it. It is possible now to read and write VideoDriver.Attributes and SceneManager.Attributes. You can create your own empty attributes collection by FileSystem.CreateAttributes().
~
Added JoystickInfo class and IrrlcihtDevice.ActivateJoysticks().
~
Added class Quaternion, ViewFrustum and CameraSceneNode.ViewFrustum prop.
L05.ScreenshotToTexture
This example demonstrates how easily to grab screenshot data from the desktop. Indeed it uses 512x512 window and the texture of the same size; each frame it updates the texture using 512x512 rectange on the desktop with the center of mouse cursor. This example also demonstarates how to convert .NET Bitmap object to Irrlicht Lime Texture object on the fly, see getDesktopTexture() method for details. It runs at about 20 fps (on two machines that i checked) just because i believe desktop cannot be grabbed more often.
Sceenshot:
~
Updated Irrlicht SDK to trunk rev. 3601.
See changes.txt for full list of changes.
New examples: 19.MouseAndJoystick and L05.ScreenshotToTexture.
Release Notes
~
Added attributes support. Added Attrbiutes class and all (or almost all) which uses it. It is possible now to read and write VideoDriver.Attributes and SceneManager.Attributes. You can create your own empty attributes collection by FileSystem.CreateAttributes().
~
Added JoystickInfo class and IrrlcihtDevice.ActivateJoysticks().
~
Added class Quaternion, ViewFrustum and CameraSceneNode.ViewFrustum prop.
L05.ScreenshotToTexture
This example demonstrates how easily to grab screenshot data from the desktop. Indeed it uses 512x512 window and the texture of the same size; each frame it updates the texture using 512x512 rectange on the desktop with the center of mouse cursor. This example also demonstarates how to convert .NET Bitmap object to Irrlicht Lime Texture object on the fly, see getDesktopTexture() method for details. It runs at about 20 fps (on two machines that i checked) just because i believe desktop cannot be grabbed more often.
Sceenshot:
~
Updated Irrlicht SDK to trunk rev. 3601.
See changes.txt for full list of changes.
Hi, i'm using your wrapper, and I found It very helpful!
I'm using it on a Managed C++ Project, I added a Panel to show the irrlicht's output..but...everything is blank! The panel doesn't change his color, but the FPS counter works! I found that the problem is in the irrlicht's parameters initialization:
It seems that the Handle is not correct...In fact, if I overwrite the code with this one
or with this
The graphics still appears...why that?!
I'm using it on a Managed C++ Project, I added a Panel to show the irrlicht's output..but...everything is blank! The panel doesn't change his color, but the FPS counter works! I found that the problem is in the irrlicht's parameters initialization:
Code: Select all
params->WindowID = this->panel1->Handle;
Code: Select all
params->WindowID = 0;
Code: Select all
params->WindowID = this->Handle; //Form handle
The graphics still appears...why that?!
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
The only irrlicht-physics wrapper that uses multithread technology.