| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // This file implements the D3D9 versions of the render surface resources, | 33 // This file implements the D3D9 versions of the render surface resources, |
| 34 // as well as the related GAPID3D9 function implementations. | 34 // as well as the related GAPID3D9 function implementations. |
| 35 | 35 |
| 36 #include "command_buffer/service/win/d3d9/render_surface_d3d9.h" | 36 #include "command_buffer/service/win/d3d9/render_surface_d3d9.h" |
| 37 #include "command_buffer/service/win/d3d9/gapi_d3d9.h" | 37 #include "command_buffer/service/win/d3d9/gapi_d3d9.h" |
| 38 #include "command_buffer/service/win/d3d9/texture_d3d9.h" | 38 #include "command_buffer/service/win/d3d9/texture_d3d9.h" |
| 39 | 39 |
| 40 | 40 |
| 41 namespace o3d { | 41 namespace o3d { |
| 42 namespace command_buffer { | 42 namespace command_buffer { |
| 43 namespace o3d { |
| 43 | 44 |
| 44 RenderSurfaceD3D9::RenderSurfaceD3D9(int width, | 45 RenderSurfaceD3D9::RenderSurfaceD3D9(int width, |
| 45 int height, | 46 int height, |
| 46 int mip_level, | 47 int mip_level, |
| 47 int side, | 48 int side, |
| 48 TextureD3D9 *texture, | 49 TextureD3D9 *texture, |
| 49 IDirect3DSurface9 *direct3d_surface) | 50 IDirect3DSurface9 *direct3d_surface) |
| 50 : width_(width), | 51 : width_(width), |
| 51 height_(height), | 52 height_(height), |
| 52 mip_level_(mip_level), | 53 mip_level_(mip_level), |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 return parse_error::kParseNoError; | 219 return parse_error::kParseNoError; |
| 219 } | 220 } |
| 220 | 221 |
| 221 void GAPID3D9::SetBackSurfaces() { | 222 void GAPID3D9::SetBackSurfaces() { |
| 222 // Get the device and set the render target and the depth stencil surface. | 223 // Get the device and set the render target and the depth stencil surface. |
| 223 IDirect3DDevice9 *device = this->d3d_device(); | 224 IDirect3DDevice9 *device = this->d3d_device(); |
| 224 HR(d3d_device()->SetRenderTarget(0, back_buffer_surface_)); | 225 HR(d3d_device()->SetRenderTarget(0, back_buffer_surface_)); |
| 225 HR(d3d_device()->SetDepthStencilSurface(back_buffer_depth_surface_)); | 226 HR(d3d_device()->SetDepthStencilSurface(back_buffer_depth_surface_)); |
| 226 } | 227 } |
| 227 | 228 |
| 229 } // namespace o3d |
| 228 } // namespace command_buffer | 230 } // namespace command_buffer |
| 229 } // namespace o3d | 231 } // namespace o3d |
| 230 | 232 |
| OLD | NEW |