Browse Source

reorder make_cube_map() parameters

David Rose 20 years ago
parent
commit
2c6ef8d261

+ 2 - 2
direct/src/showbase/ShowBase.py

@@ -1604,7 +1604,7 @@ class ShowBase(DirectObject.DirectObject):
             source = source.getWindow()
 
         rig = NodePath(namePrefix)
-        buffer = source.makeCubeMap(namePrefix, size, 1, rig, cameraMask)
+        buffer = source.makeCubeMap(namePrefix, size, rig, cameraMask, 1)
         if buffer == None:
             raise StandardError, "Could not make cube map."
 
@@ -1664,7 +1664,7 @@ class ShowBase(DirectObject.DirectObject):
 
         # Now make the cube map buffer.
         rig = NodePath(namePrefix)
-        buffer = toSphere.makeCubeMap(namePrefix, size, 0, rig, cameraMask)
+        buffer = toSphere.makeCubeMap(namePrefix, size, rig, cameraMask, 0)
         if buffer == None:
             base.graphicsEngine.removeWindow(toSphere)
             raise StandardError, "Could not make cube map."

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

@@ -626,8 +626,8 @@ static ShowBuffersCubeMapRegions cube_map_regions[6] = {
 //               rig.
 ////////////////////////////////////////////////////////////////////
 GraphicsOutput *GraphicsOutput::
-make_cube_map(const string &name, int size, bool to_ram,
-              NodePath &camera_rig, DrawMask camera_mask) {
+make_cube_map(const string &name, int size, NodePath &camera_rig, 
+	      DrawMask camera_mask, bool to_ram) {
   if (!to_ram) {
     // Check the limits imposed by the GSG.  (However, if we're
     // rendering the texture to RAM only, these limits may be

+ 4 - 2
panda/src/display/graphicsOutput.h

@@ -112,8 +112,10 @@ PUBLISHED:
 
   GraphicsOutput *make_texture_buffer(const string &name, int x_size, int y_size,
                                       Texture *tex = NULL, bool to_ram = false);
-  GraphicsOutput *make_cube_map(const string &name, int size, bool to_ram,
-                                NodePath &camera_rig, DrawMask camera_mask);
+  GraphicsOutput *make_cube_map(const string &name, int size,
+				NodePath &camera_rig,
+				DrawMask camera_mask = DrawMask::all_on(),
+				bool to_ram = false);
 
   INLINE static Filename make_screenshot_filename(const string &prefix = "screenshot");
   INLINE Filename save_screenshot_default(const string &prefix = "screenshot");