Since the .sln is at the root folder, removing that "..\" could resolve the problem.cannot open input file ';..\irrlicht\lib\Win32-visualstudio\Irrlicht.lib'
Same error for others paths, like includes..
Code: Select all
int SelectedIndex { int get(); } // it returns -1 if no item selected, that is correct, so cannot use uint here
void SetItemChecked(unsigned int index, bool isChecked); // it takes uint as index, this is correct, since -1 is not valid index and uint is fine here
But after this, when you need write a simple thing, like:
menu.SetItemChecked((uint)menu.SelectedIndex, true); // compiler requires you to cast index to uint
Code: Select all
for (int i = 0; i < menu.ItemCount; i++)
menu.SetItemChecked(i, true);
Code: Select all
// when you need set fog quickly
driver.Fog = new Fog(new Color(255, 220, 220), FogType::Linear, 200, 1000, 0.1f); // also set of contructor' overloads available here, from 0 arguments up to full list - 7 items.
// when you need to read and modify just 1 value (for example End)
Fog f = driver.Fog;
f.End = 500;
driver.Fog = f;
Code: Select all
skybox = smgr.AddSkyBoxSceneNode(
"irrlicht2_up.jpg", "irrlicht2_dn.jpg",
"irrlicht2_lf.jpg", "irrlicht2_rt.jpg",
"irrlicht2_ft.jpg", "irrlicht2_bk.jpg");
Code: Select all
// this example shows how to make pixel at 10,10 to be red
TexturePainter p = texture.GetTexturePainter();
if (p.Lock())
{
p.SetPixel(10, 10, new Color(255, 0, 0));
p.Unlock(true); // "true" here means also to call texture->regenerateMipMapLevels()
}
Code: Select all
Color^ GetPixel(int x, int y);
bool Lock(bool readOnly, int mipmapLevel);
bool Lock(bool readOnly);
bool Lock();
void SetPixel(int x, int y, Color^ color);
void Unlock(bool alsoRegenerateMipMapLevels);
void Unlock();
property bool Locked { bool get(); }
property int MipMapLevel { int get(); }
property int MipMapLevelCount { int get(); }
property int MipMapLevelHeight { int get(); }
property int MipMapLevelWidth { int get(); }
property bool ReadOnly { bool get(); }
property Video::Texture^ Texture { Video::Texture^ get(); }
Code: Select all
smgr->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true);
Code: Select all
IrrlichtCreationParameters p = new IrrlichtCreationParameters();
p.DriverType = DriverType.Direct3D9;
p.WindowSize = new Dimension2Di(1280, 800);
p.BitsPerPixel = 32;
p.AntiAliasing = 4;
IrrlichtDevice device = IrrlichtDevice.CreateDevice(p);
if (device == null)
{
// failed
}
// succeeded
Code: Select all
device.SceneManager.MeshCache.Clear(); // will remove all meshes
// or
device.SceneManager.MeshCache.Clear(true); // will remove unused meshes only
Code: Select all
cam.Rotation = new Vector3Df(cam.Target.X - (prevX - e.X), cam.Target.Y, cam.Target.Z);
Code: Select all
for (int i = 0; i < GameObjects.Count; i++)
{
GameObjects[i].Node.Rotation += .1f;
GameObjects[i].Update();
}
Code: Select all
public CubeObject(String newName, float newSize, Vector3Df newPos, Vector3Df rotation)
{
indexAmount++;
Index = indexAmount;
smgr = device.SceneManager;
MeshNode = smgr.AddCubeSceneNode(newSize, smgr.RootNode, indexAmount, newPos, rotation);
MeshNode.Name = newName;
Node = MeshNode;
}
Jesterstear wrote: GameObjects.Rotation += 1.f; should do the same thing, but it isn't working for some reason.
Code: Select all
cube1.Rotation += 0.05f;
Code: Select all
Vector3Df r = cube1.Rotation;
r.X += 0.05f;
cube1.Rotation = r;
// OR
cube1.Rotation = new Vector3Df(cube1.Rotation.X + 0.05f, cube1.Rotation.Y, cube1.Rotation.Z);
Code: Select all
cube1.Rotation.X += 0.05f;
Its a pity, but as far as i know, there is no ability to get error code or some other error identifier from Irrlicht. Its native method createDevice() may return only null in case of error, also it may write something to console. If it returns null, IrrlichtLime' CreateDevice() also return null, so you have to check return value.Jesterstear wrote: I hit build, and now device is always equal to "null". Maybe I have a corrupt project file;
Was not able to create Direct3D8 device.
Was not able to create Direct3D8 device.
Could not create DIRECT3D8 Driver.
Code: Select all
public Vector3Df Rotation
{
get
{
return Node.Rotation;
}
set
{
Node.Rotation = Rotation;
}
}