Ok i fixed a few of the errors I beleive but now I have errors that make no sense. It is down to 5 now.
Errors:
1>------ Build started: Project: IrrlichtTest, Configuration: Debug Win32 ------
1>Compiling...
1>main.cpp
1>.\main.cpp(31) : error C2664: 'Irrlicht::Scene::ISceneManager::AddCameraSceneNode' : cannot convert parameter 2 from 'Irrlicht::Core::Vector3D ^' to 'Irrlicht::Core::Vector3D'
1> No user-defined-conversion operator available, or
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>.\main.cpp(34) : error C2664: 'Irrlicht::Scene::ISceneNode ^Irrlicht::Scene::ISceneManager::AddTestSceneNode(float,Irrlicht::Scene::ISceneNode ^,int,Irrlicht::Core::Vector3D)' : cannot convert parameter 4 from 'Irrlicht::Core::Vector3D ^' to 'Irrlicht::Core::Vector3D'
1> No user-defined-conversion operator available, or
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>.\main.cpp(49) : error C2664: 'Irrlicht::Video::IVideoDriver::BeginScene' : cannot convert parameter 3 from 'Irrlicht::Video::Color ^' to 'Irrlicht::Video::Color'
1> No user-defined-conversion operator available, or
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>.\main.cpp(57) : error C2664: 'Irrlicht::Core::Rect::Rect(Irrlicht::Core::Position2D,Irrlicht::Core::Dimension2D)' : cannot convert parameter 1 from 'Irrlicht::Core::Position2D ^' to 'Irrlicht::Core::Position2D'
1> No user-defined-conversion operator available, or
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>.\main.cpp(57) : fatal error C1903: unable to recover from previous error(s); stopping compilation
- Code: Select all
#using<............Irrlicht.NET.dll>
#using<System.dll>
using namespace Irrlicht;
using namespace Irrlicht::Video;
using namespace Irrlicht::Core;
using namespace Irrlicht::Scene;
using namespace System;
int main()
{
IrrlichtDevice^ device = gcnew IrrlichtDevice(DriverType::OPENGL);
device->ResizeAble = true;
device->WindowCaption = "Irrlicht.Net using C++/CLI";
ITexture^ texSydney = device->VideoDriver->GetTexture("..\\..\\media\\sydney.bmp");
ITexture^ texWall = device->VideoDriver->GetTexture("..\\..\\media\\wall.bmp");
ITexture^ texLogo = device->VideoDriver->GetTexture("..\\..\\media\\irrlichtlogoaligned.jpg");
Irrlicht::Scene::IAnimatedMesh^ mesh = device->SceneManager->GetMesh("..\\..\\media\\sydney.md2");
if(mesh == nullptr)
{
Console::WriteLine("Could not load mesh");
return 1;
}
ICameraSceneNode^ cam = device->SceneManager->AddCameraSceneNode(nullptr,
gcnew Vector3D((float)20,(float)0,(float)-50),
gcnew Vector3D(), -1);
ISceneNode^ node = device->SceneManager->AddTestSceneNode(15,
nullptr, -1, gcnew Vector3D((float)30,(float)-15,(float)0));
node->SetMaterialTexture(0, texWall);
node = device->SceneManager->AddAnimatedMeshSceneNode(mesh, nullptr, -1);
node->SetMaterialTexture(0, texSydney);
node->SetMaterialFlag(MaterialFlag::LIGHTING, false);
device->CursorControl->Visible = false;
int fps = 0;
while(device->Run())
{
if (device->WindowActive)
{
device->VideoDriver->BeginScene(true, true, gcnew Color(0,100,100,100));
device->SceneManager->DrawAll();
// draw the logo
device->VideoDriver->Draw2DImage(
texLogo, gcnew Position2D(10,10),
gcnew Rect(0,0,88,31),
gcnew Rect(gcnew Position2D(0,0),device->VideoDriver->ScreenSize),
gcnew Color(0xffffff), false);
device->VideoDriver->EndScene();
if (fps != device->VideoDriver->FPS)
{
fps = device->VideoDriver->FPS;
device->WindowCaption = "Irrlicht.NET C++/CLI example 01 - Hello World ["+
device->VideoDriver->Name + "] fps:" + fps;
}
}
}
}