Browse Source

minor code cleanup

aignacio_sf 20 years ago
parent
commit
8e33595bd0
1 changed files with 3 additions and 3 deletions
  1. 3 3
      panda/src/dxgsg9/wdxGraphicsBuffer9.cxx

+ 3 - 3
panda/src/dxgsg9/wdxGraphicsBuffer9.cxx

@@ -252,14 +252,14 @@ select_cube_map(int cube_map_index) {
   render_target_index = 0;
   dx_texture_context9 = _dx_texture_context9;
 
-  // render to cubemap face
-  IDirect3DCubeTexture9 *direct_3d_cube_texture;
-
   if (_direct_3d_surface) {
       _direct_3d_surface -> Release ( );
       _direct_3d_surface = NULL;
   }
 
+  // render to cubemap face
+  IDirect3DCubeTexture9 *direct_3d_cube_texture;
+
   direct_3d_cube_texture = dx_texture_context9 -> _d3d_cube_texture;
   if (direct_3d_cube_texture) {
       if (_cube_map_index >= 0 && _cube_map_index < 6) {