Bladeren bron

add get_frame_buffer

David Rose 16 jaren geleden
bovenliggende
commit
024c9c31cb
2 gewijzigde bestanden met toevoegingen van 13 en 0 verwijderingen
  1. 11 0
      panda/src/tinydisplay/tinyGraphicsBuffer.I
  2. 2 0
      panda/src/tinydisplay/tinyGraphicsBuffer.h

+ 11 - 0
panda/src/tinydisplay/tinyGraphicsBuffer.I

@@ -12,3 +12,14 @@
 //
 //
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 
 
+
+////////////////////////////////////////////////////////////////////
+//     Function: TinyGraphicsBuffer::get_frame_buffer
+//       Access: Public
+//  Description: Returns a direct pointer to the frame buffer used in
+//               this object.
+////////////////////////////////////////////////////////////////////
+ZBuffer *TinyGraphicsBuffer::
+get_frame_buffer() {
+  return _frame_buffer;
+}

+ 2 - 0
panda/src/tinydisplay/tinyGraphicsBuffer.h

@@ -37,6 +37,8 @@ public:
   virtual bool begin_frame(FrameMode mode, Thread *current_thread);
   virtual bool begin_frame(FrameMode mode, Thread *current_thread);
   virtual void end_frame(FrameMode mode, Thread *current_thread);
   virtual void end_frame(FrameMode mode, Thread *current_thread);
 
 
+  INLINE ZBuffer *get_frame_buffer();
+
 protected:
 protected:
   virtual void close_buffer();
   virtual void close_buffer();
   virtual bool open_buffer();
   virtual bool open_buffer();