السلام عليكم
استخدم #Directx with c
انا استخدم هذا الكود للاكساء
try
{
Bitmap testImage = (Bitmap)Bitmap.FromFile("img.jpg");
tex = Texture.FromBitmap(Dev1, testImage, 0, Pool.Managed);
}
catch
{
// We must be running from within Visual Studio. Relocate the
// current directory and try again.
System.IO.Directory.SetCurrentDirectory(
System.Windows.Forms.Application.StartupPath + @"\..\..\");
Bitmap testImage = (Bitmap)Bitmap.FromFile("img.jpg");
tex = Texture.FromBitmap(Dev1, testImage, 0, Pool.Managed);
}
Dev1.SamplerState[0].MinFilter = TextureFilter.Linear;وعند رسم الابريق teapot استخدم هذا الكود
LoadMesh = Mesh.Teapot(Dev1);
Dev1.SetTexture(1,tex);
ObjMat.Ambient = Color.Green;
ObjMat.Diffuse = Color.White;
ObjMat.Specular = Color.White;
Dev1.Material = ObjMat;
LoadMesh.DrawSubset(0);ولكن الابريق يظهر بدون الصورة
ارجو المساعده