Form1.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

// 下载于www.51aspx.com
using OpenTK.Graphics.OpenGL;
using OpenTK;
using OpenTK.Input;

namespace NeHe010
{
    public partial class Form1 : Form
    {
        private Matrix4 neheMatrixt;

        public Form1()
        {
            InitializeComponent();
        }

       

        private void glControl1_Load(object sender, EventArgs e)
        {
           
            GL.ClearColor(Color.SkyBlue);                               // Yey! .NET Colors can be used directly!清屏颜色为蓝色
            GL.ShadeModel(ShadingModel.Smooth);							// Enable Smooth Shading
           
            GL.ClearDepth(1.0f);									// Depth Buffer Setup
            GL.Enable(EnableCap.DepthTest);							// Enables Depth Testing
            GL.DepthFunc(DepthFunction.Lequal);								// The Type Of Depth Testing To Do
            GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Nicest);
            glControl1_Resize(glControl1, EventArgs.Empty);
        }
      

        private void glControl1_Paint(object sender, PaintEventArgs e)
        {
              //Matrix4 lookat = Matrix4.LookAt(0, 0, 5, 0, 0, 0, 0, 1, 0);
              //GL.MatrixMode(MatrixMode.Modelview);
              //GL.LoadMatrix(ref lookat);




             
             GL.LoadIdentity();
            glControl1.MakeCurrent();
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);	// Clear Screen And Depth Buffer

            /*DrawCube();*/
           
            /*DrawTriangle();*/


后面还有 186 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。