0

SFML 允许程序员使用 sf::VideoMode 指定 'bitsperpixel' 值。

它还允许程序员使用 sf::ContextSettings 指定一个“深度”值。

这些东西有什么区别,或者它们是一样的吗?

4

2 回答 2

3

They are two distinct parameters.

bitsPerPixel represents the bit depth, also know as the color depth. Usually you would use a value of 32 here to have good rendering.

And the depth is defined as follow in the documentation:

All these settings have no impact on the regular SFML rendering (graphics module) – except the anti-aliasing level, so you may need to use this structure only if you're using SFML as a windowing system for custom OpenGL rendering.

The depthBits and stencilBits members define the number of bits per pixel requested for the (respectively) depth and stencil buffers.

So you don't have to care about this depth parameter if you don't directly use OpenGL.

于 2013-06-24T06:08:11.897 回答
-1

如果我没记错的话,我相信它们在 SFML 中是相同的,但我可能是错的。在这里查看更多信息:http ://sfml-dev.org/documentation/2.0/

于 2013-06-23T22:04:03.690 回答