opengl中gpu与cpu交互_OpenGL 环境配置与教程推荐

这篇博客介绍了OpenGL的基本概念,阐述了为什么需要GLFW作为图形库框架,并提供了在Windows 10环境下使用Visual Studio 2019配置GLFW以运行OpenGL程序的详细步骤。同时,给出了相关教程资源和注意事项。
摘要由CSDN通过智能技术生成

ce916222e549aafb7babeb224fb6d422.png

我们先了解一下 OpenGL 是什么:

摘自 Wikipedia:

Open Graphics Library (OpenGL) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.

总的来说,OpenGL 就是一个应用程序接口(API),用来帮助我们与GPU交互,来使用硬件加速渲染图形。OpenGL只是一个规范,不同的显卡厂商有不同的实现,但这无关紧要,只要用起来相同就行了。值得一提的是,OpenGL 是无需下载的,系统里已经有这个库了(opengl32.lib, opengl64.lib for Windows)。如果你已经很久没更新显卡驱动,我建议你去更新至最新的稳定版。

In all three major desktop platforms (Linux, macOS, and Windows), OpenGL more or less comes with the system.

但是,只有 OpenGL 是不够的,原因大致有二:

  1. OpenGL 本身提供的 API 比较底层,不便于使用,我们需要一个更高层次的封装。
  2. OpenGL 并没有提供创建 context,管理窗口以及处理用户输入等机制。

GLFW 就是我们所需要的所谓的“更高层次的封装”,下面将介绍其配置。

GLFW (Graphics Library Framework)

摘自 Wikipedia:

GLFW is a lightweight utility library for use with OpenGL. GLFW stands
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值