From c1fbeaea51014fe158d5bf8a9f5e31c1c6e21590 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 14 Jun 2018 16:08:17 +0200 Subject: [PATCH] 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. --- panda/src/display/frameBufferProperties.I | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panda/src/display/frameBufferProperties.I b/panda/src/display/frameBufferProperties.I index 5b6453af24..756a98c0be 100644 --- a/panda/src/display/frameBufferProperties.I +++ b/panda/src/display/frameBufferProperties.I @@ -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); }