Browse Source

make functions const

David Rose 18 years ago
parent
commit
21de5d551f

+ 2 - 2
panda/src/display/graphicsOutput.I

@@ -313,8 +313,8 @@ get_right_eye_color_mask() const {
 //       Access: Published
 //  Description: Returns the framebuffer properties of the window.
 ////////////////////////////////////////////////////////////////////
-INLINE FrameBufferProperties &GraphicsOutput::
-get_fb_properties() {
+INLINE const FrameBufferProperties &GraphicsOutput::
+get_fb_properties() const {
   return _fb_properties;
 }
 

+ 1 - 1
panda/src/display/graphicsOutput.h

@@ -149,7 +149,7 @@ PUBLISHED:
   INLINE unsigned int get_left_eye_color_mask() const;
   INLINE unsigned int get_right_eye_color_mask() const;
 
-  INLINE FrameBufferProperties &get_fb_properties();
+  INLINE const FrameBufferProperties &get_fb_properties() const;
   INLINE bool is_stereo() const;
 
   INLINE void clear_delete_flag();

+ 1 - 1
panda/src/display/graphicsStateGuardian.I

@@ -743,7 +743,7 @@ get_inv_cs_transform() const {
 //               window/buffer with the given FrameBufferProperties
 ////////////////////////////////////////////////////////////////////
 INLINE void GraphicsStateGuardian::
-set_current_properties(FrameBufferProperties *prop) {
+set_current_properties(const FrameBufferProperties *prop) {
   _current_properties = prop;
 }
 

+ 2 - 2
panda/src/display/graphicsStateGuardian.h

@@ -208,7 +208,7 @@ public:
   virtual void end_scene();
   virtual void end_frame(Thread *current_thread);
 
-  void set_current_properties(FrameBufferProperties *properties);
+  void set_current_properties(const FrameBufferProperties *properties);
 
   virtual bool depth_offset_decals();
   virtual CPT(RenderState) begin_decal_base_first();
@@ -329,7 +329,7 @@ protected:
   CPT(Lens) _current_lens;
   CPT(TransformState) _projection_mat;
   CPT(TransformState) _projection_mat_inv;
-  FrameBufferProperties *_current_properties;
+  const FrameBufferProperties *_current_properties;
 
   CoordinateSystem _coordinate_system;
   CoordinateSystem _internal_coordinate_system;