Fixes related to framebufferproperties.has_mode
This commit is contained in:
parent
029f03053e
commit
ac32dd5d14
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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) &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue