Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 Raspberry Pi 2 上运行我的 OpenGL 包装器。包装器在单声道上运行,用 C# 编写。我使用 VideoCore IV API 在 RPi 上运行了我的基本示例,但屏幕上没有显示图像。
位于的示例/opt/vc/src/hello_triangle运行良好,我的程序没有发现任何错误。似乎eglSwapBuffers根本不交换任何东西。
/opt/vc/src/hello_triangle
eglSwapBuffers
您可以在此问题上找到我的应用程序的 BCM/EGL/GL 调用日志。您可以在此处获取示例的完整来源。
我发现了这个问题。问题出在
glClearColor(1, 0, 0, 0)
...你注意到 alpha 上的零了吗?是的。VideoCore IV 具有 32 位帧缓冲区,将窗口内容与背景颜色混合。
就是这样。