Skip to content

zGameDeveloper/LearnOpenGL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LearnOpenGL

前言

记录学习OpenGL的过程,顺便把踩过的坑和大家分享一下。每个项目都可以单独运行。

开发环境和工具

  • Windows 10
  • Visual Studio Community 2022

项目文件结构

├── Project 解决方案
│    ├─ Dependencies 依赖文件夹
│    ├─ 01_CreateWindow
│    ├─ 02_HelloPrimitive
│    ├─ 03_GLEW
│    ├─ 04_DrawArrays
│    ├─ 05_DrawElements
│    ├─ 06_Shader
│           ├─ src
│               ├─ Shader
│           ├─ res
│    ├─ 07_Texture
│           ├─ src
│               ├─ vendor
│                     ├─ stb_image
│               ├─ Shader
│               ├─ Texture2D
│           ├─ res
│    ├─ 08_Transformation
│           ├─ src
│               ├─ vendor
│                     ├─ stb_image
│                     ├─ glm
│               ├─ Shader
│               ├─ Texture2D
│           ├─ res
│    ├─ 09_CoordinateSystem
│           ├─ src
│               ├─ vendor
│                     ├─ stb_image
│                     ├─ glm
│               ├─ Shader
│               ├─ Texture2D
│           ├─ res
│    ├─ 10_Assimp
│           ├─ res
│    ├─ 11_Mesh
│           ├─ src
│               ├─ vendor
│                     ├─ stb_image
│                     ├─ glm
│               ├─ Mesh
│               ├─ Shader
│               ├─ Texture2D
│           ├─ res
│    ├─ 12_Model
│           ├─ src
│               ├─ vendor
│                     ├─ stb_image
│                     ├─ glm
│               ├─ Mesh
│               ├─ Model
│               ├─ Shader
│               ├─ Texture2D
│           ├─ res
├── Project.sln 工程文件

目录

每一个项目工程都可以独立运行的。

  1. 打开一个窗口:01_CreateWindow       https://www.toutiao.com/article/7294560261539725843/ 01.CreateWindow

    • 通过 GLFW 创建一个窗口
  2. 你好,图元:02_HelloPrimitive        https://www.toutiao.com/article/7298165586935333417/ 02.HelloPrimitive

    • glBegin
    • glVertex3f
    • glEnd
    • glPointSize
    • glLineWidth
  3. 接入GLEW:03_GLEW            https://www.toutiao.com/article/7299268967548486155/ 03.GLEW

  4. 使用DrawArrays进行绘制:04_DrawArrays   https://www.toutiao.com/article/7314116504373510695/ 04.DrawArrays

    • glGenBuffers
    • glBindBuffer
    • glBufferData
    • glVertexAttribPointer
    • glEnableVertexAttribArray
    • glDrawArrays
  5. 使用DrawElemtes进行绘制:05_DrawElements https://www.toutiao.com/article/7317075299152527883/ 05.DrawElements

    • glDrawElements
  6. 着色器基础:06_Shader           https://www.toutiao.com/article/7317915584849723915/ 06.Shader

    • glCreateShader
    • glShaderSource
    • glCompileShader
    • glCreateProgram
    • glAttachShader
    • glLinkProgram
    • glUseProgram
  7. 纹理基础:07_Texture           https://www.toutiao.com/article/7323047177029190180/ 07.Texture

    • glGenTextures
    • glBindTexture
    • glTexParameteri
    • glTexImage2D
    • glGenerateMipmap
    • glActiveTexture
  8. 变换:08_Transformation          https://www.toutiao.com/article/7327209720761401868/ 08.Transformation

    • glGetUniformLocation
    • glUniformMatrix4fv
  9. 坐标系统:09_CoordinateSystem      https://www.toutiao.com/article/7327967563743347239/ 09.CoordinateSystem

  10. Assimp构建和导入:10_Assimp       https://www.toutiao.com/article/7355314396362457663/

  11. 网格基础:11_Mesh            https://www.toutiao.com/article/7363125067305304595/ 11.Mesh

  12. 导入3D模型:12_Model          https://www.toutiao.com/article/7363461359126594067/ 12.Model

参考

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published