Exemple #1
0
 private void tprojectionToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);
     this.scene.Figure = new CubeFigure(CubeProjectionType.TProjection);
     scene.Figure.Create();
     Winapi.SwapBuffers(hdc);
     Gl.glFlush();
 }
Exemple #2
0
 private void tmrPaint_Tick(object sender, EventArgs e)
 {
     Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);
     scene.Camera.Update(verticalMove, horizontalMove);
     horizontalMove = 0;
     verticalMove   = 0;
     scene.DrawScene();
     Winapi.SwapBuffers(hdc);
     Gl.glFlush();
 }
Exemple #3
0
        private void sphericToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);

            scene.Figure = new SphereFigure();
            scene.Figure.Create();
            Winapi.SwapBuffers(hdc);

            Gl.glFlush();
        }
Exemple #4
0
        private void OnClose(object sender, CancelEventArgs e)
        {
            try
            {
                var result = PictureCombiner.CombineImages(paths.Select(t => new FileInfo(t)).ToArray());
                scene.FileName = Path.GetFileName(result.Item2);
                Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);
                this.scene.Figure = new CubeFigure(CubeProjectionType.SeparateProjection)
                {
                    Textures = result.Item1
                };
                scene.Figure.Create();
                Winapi.SwapBuffers(hdc);

                Gl.glFlush();
            }
            catch (Exception)
            {
                return;
            }
        }