开发者

Enumerate all pixel formats with AGL - how? (Mac OS X)

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开发者_如何学JAVA 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜