문제

SFML allows the programmer to specify a 'bitsperpixel' value using sf::VideoMode.

It also allows the programmer to specify a 'depth' value using sf::ContextSettings.

What is the difference between these things, or are they the same?

도움이 되었습니까?

해결책

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.

다른 팁

I believe they are the same in SFML if I recall correctly, however I may be wrong. Look here for more info: http://sfml-dev.org/documentation/2.0/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top