00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef FRAMEBUFFERPROPERTIES_H
00020 #define FRAMEBUFFERPROPERTIES_H
00021
00022 #include "pandabase.h"
00023
00024
00025
00026
00027
00028
00029
00030 class EXPCL_PANDA FrameBufferProperties {
00031 PUBLISHED:
00032 FrameBufferProperties();
00033 INLINE FrameBufferProperties(const FrameBufferProperties ©);
00034 void operator = (const FrameBufferProperties ©);
00035 INLINE ~FrameBufferProperties();
00036
00037 bool operator == (const FrameBufferProperties &other) const;
00038 INLINE bool operator != (const FrameBufferProperties &other) const;
00039
00040 enum FrameBufferMode {
00041 FM_rgba = 0x0000,
00042 FM_rgb = 0x0000,
00043 FM_index = 0x0001,
00044 FM_single_buffer = 0x0000,
00045 FM_double_buffer = 0x0002,
00046 FM_triple_buffer = 0x0004,
00047 FM_accum = 0x0008,
00048 FM_alpha = 0x0010,
00049 FM_depth = 0x0020,
00050 FM_stencil = 0x0040,
00051 FM_multisample = 0x0080,
00052 FM_stereo = 0x0100,
00053 FM_luminance = 0x0200,
00054 };
00055
00056 void clear();
00057 INLINE bool is_any_specified() const;
00058
00059 INLINE void set_frame_buffer_mode(int frameBuffer_mode);
00060 INLINE int get_frame_buffer_mode() const;
00061 INLINE bool has_frame_buffer_mode() const;
00062 INLINE void clear_frame_buffer_mode();
00063
00064 INLINE void set_depth_bits(int depth_bits);
00065 INLINE int get_depth_bits() const;
00066 INLINE bool has_depth_bits() const;
00067 INLINE void clear_depth_bits();
00068
00069 INLINE void set_color_bits(int color_bits);
00070 INLINE int get_color_bits() const;
00071 INLINE bool has_color_bits() const;
00072 INLINE void clear_color_bits();
00073
00074 void add_properties(const FrameBufferProperties &other);
00075
00076 void output(ostream &out) const;
00077
00078 private:
00079
00080
00081
00082 enum Specified {
00083 S_frame_buffer_mode = 0x0200,
00084 S_depth_bits = 0x0400,
00085 S_color_bits = 0x0800,
00086 };
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096 int _specified;
00097 int _flags;
00098 int _frame_buffer_mode;
00099 int _depth_bits;
00100 int _color_bits;
00101 };
00102
00103 INLINE ostream &operator << (ostream &out, const FrameBufferProperties &properties);
00104
00105 #include "frameBufferProperties.I"
00106
00107 #endif