How can I know how many max bits to pass as parameters in attributes for
I use all of these.Is there any limitation of total number of bits they can take together?
I don’t quite understand what you meant with “max bit to pass”. All attributes you have mentioned are values not flags.
Generally, you can iterate through all supported pixel formats and find a format that suites your needs best.
I meant bits and not bit
What are maximal number of bits for these attributes and can I just pass maximal number of bits for each of these attributes?
Is there any side effects of passing maximal values?
I’m a beginner and I can’t find any material explaining how to know these correct values.I remember I once read about z-buffer - that if we can afford then better to pass as much as we can (even 32 bits). I dont understand - why I could not afford to have 32 bits for z-bufer?
Realistic values are 8 bits for alpha and stencil.
24 for depth. 32 bits depth only exists as offscreen buffers.
Number of supported and/or useful samples vary wildly between cards. Using 2 or 4 is good value for decent hardware, drop to 0 if too slow. Can be much larger on some cards, but “available” does not mean “fast enough to be usable”.
But regards multisampling, what do you mean “if too slow drop to 0” - then will be no multisampling ? I’m using it for polygon antialiasing. Did you mean it makes little difference having 2 samples or not all?
He’s saying that multisampling costs performance, and therefore if it is too slow for your application, you should turn it off by asking for 0 samples.