Browse Source

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.
rdb 7 years ago
parent
commit
c1fbeaea51
1 changed files with 3 additions and 3 deletions
  1. 3 3
      panda/src/display/frameBufferProperties.I

+ 3 - 3
panda/src/display/frameBufferProperties.I

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