1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| using System.Windows.Forms;
using Microsoft.Xna.Framework.Graphics;
namespace WindowsFormsApplication4
{
public partial class Form1 : Form
{
GraphicsDevice graphicsDevice;
public Form1()
{
InitializeComponent();
PresentationParameters presentParams = new PresentationParameters();
graphicsDevice = new GraphicsDevice(GraphicsAdapter.DefaultAdapter, DeviceType.Hardware, panel1.Handle, presentParams);
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
graphicsDevice.Clear(Color.Black);
//Affichage de la vidéo ici
graphicsDevice.Present();
}
}
} |
Partager