display: allow full access to all 4 of each aux buffer category

I think there was some confusion about how set_aux_rgba (and friends) worked; it seems the original intent was to toggle each individual buffer whereas it is actually interpreted as a count of how many of these buffers should be enabled.  We should try to clarify the API and/or replace it with something better as soon as possible.
This commit is contained in:
rdb 2018-06-14 16:08:17 +02:00
parent b2bfb31114
commit c1fbeaea51

View File

@ -322,7 +322,7 @@ set_accum_bits(int n) {
*/
INLINE void FrameBufferProperties::
set_aux_rgba(int n) {
nassertv(n < 4);
nassertv(n <= 4);
_property[FBP_aux_rgba] = n;
_specified |= (1 << FBP_aux_rgba);
}
@ -332,7 +332,7 @@ set_aux_rgba(int n) {
*/
INLINE void FrameBufferProperties::
set_aux_hrgba(int n) {
nassertv(n < 4);
nassertv(n <= 4);
_property[FBP_aux_hrgba] = n;
_specified |= (1 << FBP_aux_hrgba);
}
@ -342,7 +342,7 @@ set_aux_hrgba(int n) {
*/
INLINE void FrameBufferProperties::
set_aux_float(int n) {
nassertv(n < 4);
nassertv(n <= 4);
_property[FBP_aux_float] = n;
_specified |= (1 << FBP_aux_float);
}