# Qt-OpenGL **Repository Path**: yan-zhikai/Qt-OpenGL ## Basic Information - **Project Name**: Qt-OpenGL - **Description**: 透过 Qt5 ,展示 OpenGL 的渲染效果。 - **Primary Language**: C++ - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 31 - **Forks**: 12 - **Created**: 2019-08-13 - **Last Updated**: 2025-06-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Qt-OpenGL #### 介绍 透过 Qt 6 ,展示 OpenGL 的渲染效果。 #### 软件架构 Qt 6 (core gui opengl 三个模块) #### 安装教程 1. 安装 Qt 6 2. 如果运行 ModelViewer 项目,需另外安装 assimp 开发包。 #### 使用说明 1. ClearColor - OpenGL 入门,演示 ClearColor 特性。 2. AnimatedClearColor - 基于 ClearColor 项目,演示与屏幕刷新(vertical refresh)同步的动画功能。 2.1 AnimatedWidget - 基于 AnimatedClearColor 项目,演示 QOpenGLWindow 如何嵌入 QWidget 窗口。 3. ShaderProgram - 基于 ClearColor 项目,演示 vertex shader 和 fragment shader。 4. VertexAttribute - 基于 ShaderProgram 项目,演示 vertex attribute 的设置方法。 5. VAO - 基于 ShaderProgram 项目,演示 VAO 特性。 6. Uniform - 基于 VAO 和 AnimatedClearColor 项目,演示 uniform 变量。 7. FragmentInterpolation - 基于 VAO 项目,演示 fragment interpolation 特性。 8. EBO - 基于 VAO 项目,演示 EBO 的特性。 9. InOutVariables - 基于 VAO 项目,演示 GLSL 的输入与输出变量。 10. OutInBlocks - 基于 VAO 项目,演示 GLSL 的 block 特性。 11. Tessellation - 基于 VAO 项目,演示 tessellation shaders。 12. BypassedTCS - 基于 Tessellation 项目,演示 tessellation control shader 可被忽略。 13. GeometryShader - 基于 Tessellation 项目,演示 geometry shader。 14. Viewport - 基于 BypassedTCS 项目,演示 viewport 特性。 15. texture - 基于 EBO 项目, 演示纹理特性。 16. TextureUnits - 基于 texture 项目,演示多层纹理特性。 17. transformation - 基于 TextureUnits 项目,演示变换(QMatrix4x4)。 18. TransformationFlow - 基于 transformation 项目,演示 model, view, projection 变换矩阵。 19. ColoredCube - 基于 EBO 项目, 演示 3D 特性。 20. TextureCube - 基于 ColoredCube 和 TextureUnits 项目,演示带纹理的 3D 特性。 21. CircleCamera - 基于 ColoredCube 项目,演示矩阵的 lookat 方法。 22. WalkAround - 基于 CircleCamera 项目,演示固定 camera 视角,移动 camera 位置(通过 WASD 按键)的情形。 23. WalkLookAround - 基于 WalkAround 项目,演示欧拉 pitch 与 yaw 旋转角(通过鼠标在横纵轴上移动触发)。 24. CameraClass - 基于 WalkLookAround 项目,抽象出了 Camera 类。 25. PhongLightingModel - 基于 CameraClass 项目,演示冯氏光照模型。 26. ModelViewer - 基于 PhongLightingModel 项目,演示了模型的加载与渲染。 #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 码云特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)