使用 AGL 枚举所有像素格式 - 如何? (Mac OS X)

发布于 2024-10-04 10:49:39 字数 329 浏览 1 评论 0原文

我想创建 OpenGL 所有可用像素格式的列表。在Windows 上,我可以通过在循环中调用DescribePixelFormat,增加像素格式id,直到返回false 来完成此操作。

不幸的是, aglDescribePixelFormat 似乎不能这样工作。它的 AGLPixelFormat 参数是一个指向不透明结构的指针 - 我不能在循环中调用它。

苹果的文档也没有提供任何提示,谷歌也没有提供任何提示。有 AGL 专家愿意分享他们的知识吗?

编辑:我见过提到 aglListPixelFmts() 函数,但这没有在 agl.h 中列出,我也找不到 Apple 文档中的任何提及。什么给?

I would like to create a list of all available pixel formats for OpenGL. On Windows, I can do this by calling DescribePixelFormat in a loop, increasing the pixel format id, until it returns false.

Unfortunately, it seems that aglDescribePixelFormat does not work like this. Its AGLPixelFormat parameter is a pointer to an opaque struct - I can't call this in a loop.

Apple's documentation doesn't provide any hints either, nor does google. Any AGL experts out there willing to share their knowledge?

Edit: I've seen mention of a aglListPixelFmts() function but this is not listed in agl.h, nor can I find any mention in Apple's documentation. What gives?

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

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

发布评论

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

评论(1

扛起拖把扫天下 2024-10-11 10:49:39

事实上,苹果的文档确实给出了提示。在aglDescribePixelFormat下,它说:

以像素格式检索数据
除第一个对象之外的对象
列表,调用 aglNextPixelFormat。
然后传入返回的像素格式
对象 aglDescribePixelFormat 为
检索属性值。

Actually, Apple's documentation does give a hint. Under aglDescribePixelFormat, it says:

To retrieve the data in pixel format
objects other than the first one in
the list, call aglNextPixelFormat.
Then pass the returned pixel format
object to aglDescribePixelFormat to
retrieve an attribute value.

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