瀏覽代碼

get_display_region

David Rose 16 年之前
父節點
當前提交
5b3fc8b4be
共有 2 個文件被更改,包括 25 次插入0 次删除
  1. 22 0
      panda/src/framework/windowFramework.I
  2. 3 0
      panda/src/framework/windowFramework.h

+ 22 - 0
panda/src/framework/windowFramework.I

@@ -75,6 +75,28 @@ get_camera(int n) const {
   return _cameras[n];
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: WindowFramework::get_display_region_2d
+//       Access: Public
+//  Description: Returns the default DisplayRegion created for the 2-d
+//               scene (render2d).
+////////////////////////////////////////////////////////////////////
+INLINE DisplayRegion *WindowFramework::
+get_display_region_2d() const {
+  return _display_region_2d;
+}
+
+////////////////////////////////////////////////////////////////////
+//     Function: WindowFramework::get_display_region_3d
+//       Access: Public
+//  Description: Returns the default DisplayRegion created for the 3-d
+//               scene (render).
+////////////////////////////////////////////////////////////////////
+INLINE DisplayRegion *WindowFramework::
+get_display_region_3d() const {
+  return _display_region_3d;
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: WindowFramework::get_anim_controls
 //       Access: Public

+ 3 - 0
panda/src/framework/windowFramework.h

@@ -75,6 +75,9 @@ public:
   INLINE int get_num_cameras() const;
   INLINE Camera *get_camera(int n) const;
 
+  INLINE DisplayRegion *get_display_region_2d() const;
+  INLINE DisplayRegion *get_display_region_3d() const;
+
   NodePath get_render();
   NodePath get_render_2d();
   NodePath get_aspect_2d();