diff --git a/panda/src/display/frameBufferProperties.I b/panda/src/display/frameBufferProperties.I index 04f5a899dd..924482495e 100644 --- a/panda/src/display/frameBufferProperties.I +++ b/panda/src/display/frameBufferProperties.I @@ -124,16 +124,19 @@ is_single_buffered() const { } //////////////////////////////////////////////////////////////////// -// Function: FrameBufferProperties::has_mode +// Function: FrameBufferProperties::specifies_mode // Access: Published // Description: Returns true if the frame buffer mode, logically -// anded with the given mask, is nonzero. This is a +// anded with the given mask, is nonzero and the frame +// buffer mode is specified. This is a // convenience function to access this useful tidbit of // data. //////////////////////////////////////////////////////////////////// INLINE bool FrameBufferProperties:: -has_mode(int bits) const { - nassertr(has_frame_buffer_mode(), false); +specifies_mode(int bits) const { + if ((_specified & S_frame_buffer_mode)==0) { + return false; + } return (_frame_buffer_mode & bits) != 0; } diff --git a/panda/src/display/frameBufferProperties.h b/panda/src/display/frameBufferProperties.h index 4519c302de..efe3ebb277 100644 --- a/panda/src/display/frameBufferProperties.h +++ b/panda/src/display/frameBufferProperties.h @@ -62,7 +62,7 @@ PUBLISHED: INLINE void set_specified(); INLINE int get_buffer_mask() const; INLINE bool is_any_specified() const; - INLINE bool has_mode(int bit) const; + INLINE bool specifies_mode(int bit) const; INLINE bool is_single_buffered() const; INLINE bool is_stereo() const; diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index 5b5e30d3eb..99dbfd43d5 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -341,11 +341,11 @@ make_output(GraphicsPipe *pipe, ((flags&GraphicsPipe::BF_can_bind_color)==0)&& ((flags&GraphicsPipe::BF_can_bind_every)==0)&& ((flags&GraphicsPipe::BF_rtt_cumulative)==0)&& - (prop.has_mode(FrameBufferProperties::FM_index)==false)&& - (prop.has_mode(FrameBufferProperties::FM_buffer)==false)&& - (prop.has_mode(FrameBufferProperties::FM_accum)==false)&& - (prop.has_mode(FrameBufferProperties::FM_stencil)==false)&& - (prop.has_mode(FrameBufferProperties::FM_multisample)==false)&& + (prop.specifies_mode(FrameBufferProperties::FM_index)==false)&& + (prop.specifies_mode(FrameBufferProperties::FM_buffer)==false)&& + (prop.specifies_mode(FrameBufferProperties::FM_accum)==false)&& + (prop.specifies_mode(FrameBufferProperties::FM_stencil)==false)&& + (prop.specifies_mode(FrameBufferProperties::FM_multisample)==false)&& (prop.get_aux_rgba() == 0)&& (prop.get_aux_hrgba() == 0)&& (prop.get_aux_float() == 0)) { diff --git a/panda/src/wgldisplay/wglGraphicsPipe.cxx b/panda/src/wgldisplay/wglGraphicsPipe.cxx index 2626ac8539..518296ab7f 100644 --- a/panda/src/wgldisplay/wglGraphicsPipe.cxx +++ b/panda/src/wgldisplay/wglGraphicsPipe.cxx @@ -176,11 +176,11 @@ make_output(const string &name, (host==0)|| ((flags&BF_require_parasite)!=0)|| ((flags&BF_require_window)!=0)|| - (properties.has_mode(FrameBufferProperties::FM_index))|| - (properties.has_mode(FrameBufferProperties::FM_buffer))|| - (properties.has_mode(FrameBufferProperties::FM_accum))|| - (properties.has_mode(FrameBufferProperties::FM_stencil))|| - (properties.has_mode(FrameBufferProperties::FM_multisample))) { + (properties.specifies_mode(FrameBufferProperties::FM_index))|| + (properties.specifies_mode(FrameBufferProperties::FM_buffer))|| + (properties.specifies_mode(FrameBufferProperties::FM_accum))|| + (properties.specifies_mode(FrameBufferProperties::FM_stencil))|| + (properties.specifies_mode(FrameBufferProperties::FM_multisample))) { return NULL; } if ((wglgsg != 0) &&