コード例 #1
0
 public GraphicsDevice(Bitmap bitmap, Camera camera) {
     canvas = bitmap;
     this.camera = camera;
     canvasGraphics = Graphics.FromImage(canvas);
     bytes = new byte[Width * Height * 4];
     emptyBytes = new byte[Width * Height * 4];
     zBuffer = new float[Width * Height];
 }
コード例 #2
0
 private void LoadContent() {
     form = new Form {
         Size = new Size(Width, Height),
         StartPosition = FormStartPosition.CenterScreen
     };
     formGraphics = form.CreateGraphics();
     camera = new Camera { Position = new Vector(0, 0, 10), Target = Vector.Zero };
     buffer = new GraphicsBuffer(Width, Height, camera);
     meshes = Mesh.FromBabylonModel("Contents/monkey.babylon");
 }
コード例 #3
0
 public GraphicsBuffer(int width, int height, Camera camera) {
     Current = new Bitmap(width, height);
     CurrentGraphicsDevice = new GraphicsDevice(Current, camera);
     Background = new Bitmap(width, height);
     BackgroundGraphicsDevice = new GraphicsDevice(Background, camera);
 }