   SlimDX DirectX9 Problem rendering bitmap[C#]
  Hello, the title mostly explains what I'm using and what the problem is. So I will paste my code and see if you guys can find any mistakes.public DirectX(Control window){try{Direct3D Direct3D = new Direct3D();PresentParameters PresentParameters = new PresentParameters();PresentParameters.Windowed = true;PresentParameters.SwapEffect = SwapEffect.Discard;PresentParameters.BackBufferCount = 1;PresentParameters.BackBufferHeight = window.Height;PresentParameters.BackBufferWidth = window.Width;PresentParameters.DeviceWindowHandle = window.Handle;this.Device = new Device(Direct3D, 0, DeviceType.Hardware, window.Handle, CreateFlags.SoftwareVertexProcessing, PresentParameters);}catch (Direct3D9Exception e){MessageBox.Show(e.Message);}}Form1 form = new Form1();form.Show();DirectX DirectX = new DirectX(form.pictureBox2);Texture texture = Texture.FromFile(DirectX.Device, "C:\\Users\\Addison\\Desktop\\test.bmp");while (form.Created == true){DateTime now = DateTime.Now;DirectX.Device.Clear(ClearFlags.Target, (Color4)Color.White, 0.0f, 0);Sprite sprite = new Sprite(DirectX.Device);sprite.Begin(SpriteFlags.None);sprite.Draw(texture, (Color4)Color.Black);sprite.End();DirectX.Device.Present();DateTime after = DateTime.Now;Console.WriteLine(after.Subtract(now).Milliseconds.ToString());Application.DoEvents();Thread.Sleep(1);}Some criteria you might want to know: texture is valid, the picturebox does turn white, but it does not draw the texture.[Edited by - addy914 on May 21, 2010 6:31:27 AM]
  The Color you specify to the Draw method is multiplied with the texture color. Try using Color.White instead.Also if you need to post code here, you can use the "code" or "source" tags. See the FAQ.   