使用 GLAD 进行 Raspberry Pi 项目

发布于 2025-01-11 21:17:15 字数 524 浏览 8 评论 0原文

我想弄清楚如何为我的项目创建一个窗口。我想使用 OpenGL ES,并且我找到了有关如何使用 X11 和 EGL 创建窗口的在线指南,并且此选项工作得很好。

但我正在尝试遵循 OpenGL 指南,并且我能找到的所有内容都使用 GLAD 和 GLFW 来创建窗口,并且它似乎更容易使用和理解,但每当我尝试使用它时,我都会收到一堆错误,例如 “void Glad_glClearColor(GLclampf, GLclampf, GLclampf, GLclampf)”重新声明为不同类型的实体

当我尝试使用 此处

它不适合 Linux,还是我还缺少其他东西?

I am trying to figure out how to create a window for my project. I want to work with OpenGL ES and I found online guides on how to use X11 and EGL for creating the window, and this option works just fine.

But I am trying to follow OpenGL guides and all I can find use GLAD and GLFW to create a window, and it seems much easier to work with and understand, but whenever I try to use it I get a bunch of errors like 'void glad_glClearColor(GLclampf, GLclampf, GLclampf, GLclampf)’ redeclared as different kind of entity.

I got 58 errors just like that one when I tried using the code from here.

Is it not suited for Linux, or is there something else I am missing here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

椵侞 2025-01-18 21:17:15

Raspbebrry 是基于 ARM 的开发卡,我不确定 GLFW 对树莓派的支持,但您可以使用带有 OpenGL 绑定的 SDL2 库来创建窗口并进行一些渲染

Raspbebrry is ARM based development card, I am not sure about GLFW support for raspberry pi but you can use SDL2 library with OpenGL bindings to create window and do some rendering

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文