浏览代码

Forgot to change these cases of _x_size and _y_size

rdb 11 年之前
父节点
当前提交
162786ae3b
共有 2 个文件被更改,包括 16 次插入18 次删除
  1. 4 5
      panda/src/dxgsg8/wdxGraphicsBuffer8.cxx
  2. 12 13
      panda/src/dxgsg9/wdxGraphicsBuffer9.cxx

+ 4 - 5
panda/src/dxgsg8/wdxGraphicsBuffer8.cxx

@@ -229,14 +229,13 @@ rebuild_bitplanes() {
   // Decide how big the bitplanes should be.
   // Decide how big the bitplanes should be.
 
 
   if ((_host != 0)&&(_creation_flags & GraphicsPipe::BF_size_track_host)) {
   if ((_host != 0)&&(_creation_flags & GraphicsPipe::BF_size_track_host)) {
-    if ((_host->get_x_size() != _x_size)||
-        (_host->get_y_size() != _y_size)) {
+    if (_host->get_size() != _size) {
       set_size_and_recalc(_host->get_x_size(),
       set_size_and_recalc(_host->get_x_size(),
                           _host->get_y_size());
                           _host->get_y_size());
     }
     }
   }
   }
-  int bitplane_x = _x_size;
-  int bitplane_y = _y_size;
+  int bitplane_x = get_x_size();
+  int bitplane_y = get_y_size();
   if (Texture::get_textures_power_2() != ATS_none) {
   if (Texture::get_textures_power_2() != ATS_none) {
     bitplane_x = Texture::up_to_power_2(bitplane_x);
     bitplane_x = Texture::up_to_power_2(bitplane_x);
     bitplane_y = Texture::up_to_power_2(bitplane_y);
     bitplane_y = Texture::up_to_power_2(bitplane_y);
@@ -350,7 +349,7 @@ rebuild_bitplanes() {
           << "Unable to re-create texture " << *depth_ctx->get_texture() << endl;
           << "Unable to re-create texture " << *depth_ctx->get_texture() << endl;
         return false;
         return false;
       }
       }
-      
+
       if (depth_tex->get_texture_type() == Texture::TT_2d_texture) {
       if (depth_tex->get_texture_type() == Texture::TT_2d_texture) {
         depth_d3d_tex = depth_ctx->_d3d_2d_texture;
         depth_d3d_tex = depth_ctx->_d3d_2d_texture;
         nassertr(depth_d3d_tex != 0, false);
         nassertr(depth_d3d_tex != 0, false);

+ 12 - 13
panda/src/dxgsg9/wdxGraphicsBuffer9.cxx

@@ -276,25 +276,24 @@ rebuild_bitplanes() {
   IDirect3DSurface9 *color_surf = 0;
   IDirect3DSurface9 *color_surf = 0;
   IDirect3DSurface9 *depth_surf = 0;
   IDirect3DSurface9 *depth_surf = 0;
   DWORD render_target_index;
   DWORD render_target_index;
-  
+
   render_target_index = 0;
   render_target_index = 0;
-  
+
   // Decide how big the bitplanes should be.
   // Decide how big the bitplanes should be.
 
 
   if ((_host != 0)&&(_creation_flags & GraphicsPipe::BF_size_track_host)) {
   if ((_host != 0)&&(_creation_flags & GraphicsPipe::BF_size_track_host)) {
-    if ((_host->get_x_size() != _x_size)||
-        (_host->get_y_size() != _y_size)) {
+    if (_host->get_size() != _size) {
       set_size_and_recalc(_host->get_x_size(),
       set_size_and_recalc(_host->get_x_size(),
                           _host->get_y_size());
                           _host->get_y_size());
     }
     }
   }
   }
-  int bitplane_x = _x_size;
-  int bitplane_y = _y_size;
+  int bitplane_x = get_x_size();
+  int bitplane_y = get_y_size();
   if (Texture::get_textures_power_2() != ATS_none) {
   if (Texture::get_textures_power_2() != ATS_none) {
     bitplane_x = Texture::up_to_power_2(bitplane_x);
     bitplane_x = Texture::up_to_power_2(bitplane_x);
     bitplane_y = Texture::up_to_power_2(bitplane_y);
     bitplane_y = Texture::up_to_power_2(bitplane_y);
   }
   }
-  
+
   // Find the color and depth textures.  Either may be present,
   // Find the color and depth textures.  Either may be present,
   // or neither.
   // or neither.
   //
   //
@@ -342,7 +341,7 @@ rebuild_bitplanes() {
           }
           }
           break;
           break;
         }
         }
-      }                
+      }
     }
     }
   }
   }
 
 
@@ -373,7 +372,7 @@ rebuild_bitplanes() {
       _color_backing_store = NULL;
       _color_backing_store = NULL;
     }
     }
     color_tex = get_texture(color_tex_index);
     color_tex = get_texture(color_tex_index);
-    color_tex->set_size_padded(_x_size, _y_size);
+    color_tex->set_size_padded(get_x_size(), get_y_size());
 //    color_tex->set_format(Texture::F_rgba);
 //    color_tex->set_format(Texture::F_rgba);
     color_ctx =
     color_ctx =
       DCAST(DXTextureContext9,
       DCAST(DXTextureContext9,
@@ -445,14 +444,14 @@ rebuild_bitplanes() {
       _depth_backing_store = NULL;
       _depth_backing_store = NULL;
     }
     }
 
 
-    if (_shared_depth_buffer) {      
+    if (_shared_depth_buffer) {
       depth_tex = _shared_depth_buffer -> get_texture(depth_tex_index);
       depth_tex = _shared_depth_buffer -> get_texture(depth_tex_index);
     }
     }
-    if (depth_tex == 0) {        
+    if (depth_tex == 0) {
       depth_tex = get_texture(depth_tex_index);
       depth_tex = get_texture(depth_tex_index);
     }
     }
 
 
-    depth_tex->set_size_padded(_x_size, _y_size);
+    depth_tex->set_size_padded(get_x_size(), get_y_size());
     depth_tex->set_format(Texture::F_depth_stencil);
     depth_tex->set_format(Texture::F_depth_stencil);
     depth_ctx =
     depth_ctx =
       DCAST(DXTextureContext9,
       DCAST(DXTextureContext9,
@@ -855,7 +854,7 @@ share_depth_buffer(GraphicsOutput *graphics_output) {
     if (_debug) {
     if (_debug) {
       printf ("share_depth_buffer\n");
       printf ("share_depth_buffer\n");
     }
     }
-    
+
     // check buffer sizes
     // check buffer sizes
     if (this -> get_x_size() != input_graphics_output -> get_x_size()) {    
     if (this -> get_x_size() != input_graphics_output -> get_x_size()) {    
       if (_debug) {
       if (_debug) {