here code:
public void loadtexture(string textureid, string path) { int devilid = 0; il.ilgenimages(1, out devilid); il.ilbindimage(devilid); // set active texture if (!il.illoadimage(path)) { system.diagnostics.debug.assert(false, "could not open file, [" + path + "]."); } // files we'll using need flipped before passing opengl ilu.iluflipimage(); int width = il.ilgetinteger(il.il_image_width); int height = il.ilgetinteger(il.il_image_height); int openglid = ilut.ilutglbindteximage(); system.diagnostics.debug.assert(openglid != 0); il.ildeleteimages(1, ref devilid); _texturedatabase.add(textureid, new texture(openglid, width, height)); }
i getting assertion failed, not open file [face.tif] error. made sure face.tif file in project folder, solution folder, bin folder, bin\debug folder still can't open it.
i'm trying follow book c# game programming serious game creation.
it looking file face.tif
in same directory code running.
what setting path
being passed method loadtexture
?
Comments
Post a Comment