| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 class Texture2DD3D9 : public TextureD3D9 { | 93 class Texture2DD3D9 : public TextureD3D9 { |
| 94 public: | 94 public: |
| 95 Texture2DD3D9(unsigned int levels, | 95 Texture2DD3D9(unsigned int levels, |
| 96 texture::Format format, | 96 texture::Format format, |
| 97 unsigned int flags, | 97 unsigned int flags, |
| 98 unsigned int width, | 98 unsigned int width, |
| 99 unsigned int height, | 99 unsigned int height, |
| 100 IDirect3DTexture9 *texture, | 100 IDirect3DTexture9 *texture, |
| 101 IDirect3DTexture9 *shadow, | 101 IDirect3DTexture9 *shadow, |
| 102 bool enable_render_surfaces) | 102 bool enable_render_surfaces) |
| 103 : TextureD3D9(texture::TEXTURE_2D, levels, format, | 103 : TextureD3D9(texture::kTexture2d, levels, format, |
| 104 enable_render_surfaces, flags), | 104 enable_render_surfaces, flags), |
| 105 width_(width), | 105 width_(width), |
| 106 height_(height), | 106 height_(height), |
| 107 d3d_texture_(texture), | 107 d3d_texture_(texture), |
| 108 d3d_shadow_(shadow) {} | 108 d3d_shadow_(shadow) {} |
| 109 virtual ~Texture2DD3D9(); | 109 virtual ~Texture2DD3D9(); |
| 110 | 110 |
| 111 // Creates a 2D texture resource. | 111 // Creates a 2D texture resource. |
| 112 static Texture2DD3D9 *Create(GAPID3D9 *gapi, | 112 static Texture2DD3D9 *Create(GAPID3D9 *gapi, |
| 113 unsigned int width, | 113 unsigned int width, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 public: | 157 public: |
| 158 Texture3DD3D9(unsigned int levels, | 158 Texture3DD3D9(unsigned int levels, |
| 159 texture::Format format, | 159 texture::Format format, |
| 160 unsigned int flags, | 160 unsigned int flags, |
| 161 unsigned int width, | 161 unsigned int width, |
| 162 unsigned int height, | 162 unsigned int height, |
| 163 unsigned int depth, | 163 unsigned int depth, |
| 164 IDirect3DVolumeTexture9 *texture, | 164 IDirect3DVolumeTexture9 *texture, |
| 165 IDirect3DVolumeTexture9 *shadow, | 165 IDirect3DVolumeTexture9 *shadow, |
| 166 bool enable_render_surfaces) | 166 bool enable_render_surfaces) |
| 167 : TextureD3D9(texture::TEXTURE_2D, levels, format, | 167 : TextureD3D9(texture::kTexture3d, levels, format, |
| 168 enable_render_surfaces, flags), | 168 enable_render_surfaces, flags), |
| 169 width_(width), | 169 width_(width), |
| 170 height_(height), | 170 height_(height), |
| 171 depth_(depth), | 171 depth_(depth), |
| 172 d3d_texture_(texture), | 172 d3d_texture_(texture), |
| 173 d3d_shadow_(shadow) {} | 173 d3d_shadow_(shadow) {} |
| 174 virtual ~Texture3DD3D9(); | 174 virtual ~Texture3DD3D9(); |
| 175 // Creates a 3D texture resource. | 175 // Creates a 3D texture resource. |
| 176 static Texture3DD3D9 *Create(GAPID3D9 *gapi, | 176 static Texture3DD3D9 *Create(GAPID3D9 *gapi, |
| 177 unsigned int width, | 177 unsigned int width, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // A cube map texture resource for D3D. | 221 // A cube map texture resource for D3D. |
| 222 class TextureCubeD3D9 : public TextureD3D9 { | 222 class TextureCubeD3D9 : public TextureD3D9 { |
| 223 public: | 223 public: |
| 224 TextureCubeD3D9(unsigned int levels, | 224 TextureCubeD3D9(unsigned int levels, |
| 225 texture::Format format, | 225 texture::Format format, |
| 226 unsigned int flags, | 226 unsigned int flags, |
| 227 unsigned int side, | 227 unsigned int side, |
| 228 IDirect3DCubeTexture9 *texture, | 228 IDirect3DCubeTexture9 *texture, |
| 229 IDirect3DCubeTexture9 *shadow, | 229 IDirect3DCubeTexture9 *shadow, |
| 230 bool enable_render_surfaces) | 230 bool enable_render_surfaces) |
| 231 : TextureD3D9(texture::TEXTURE_CUBE, levels, format, | 231 : TextureD3D9(texture::kTextureCube, levels, format, |
| 232 enable_render_surfaces, flags), | 232 enable_render_surfaces, flags), |
| 233 side_(side), | 233 side_(side), |
| 234 d3d_texture_(texture), | 234 d3d_texture_(texture), |
| 235 d3d_shadow_(shadow) {} | 235 d3d_shadow_(shadow) {} |
| 236 virtual ~TextureCubeD3D9(); | 236 virtual ~TextureCubeD3D9(); |
| 237 // Creates a cube map texture resource. | 237 // Creates a cube map texture resource. |
| 238 static TextureCubeD3D9 *Create(GAPID3D9 *gapi, | 238 static TextureCubeD3D9 *Create(GAPID3D9 *gapi, |
| 239 unsigned int side, | 239 unsigned int side, |
| 240 unsigned int levels, | 240 unsigned int levels, |
| 241 texture::Format format, | 241 texture::Format format, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 unsigned int side_; | 273 unsigned int side_; |
| 274 CComPtr<IDirect3DCubeTexture9> d3d_texture_; | 274 CComPtr<IDirect3DCubeTexture9> d3d_texture_; |
| 275 IDirect3DCubeTexture9 *d3d_shadow_; | 275 IDirect3DCubeTexture9 *d3d_shadow_; |
| 276 DISALLOW_COPY_AND_ASSIGN(TextureCubeD3D9); | 276 DISALLOW_COPY_AND_ASSIGN(TextureCubeD3D9); |
| 277 }; | 277 }; |
| 278 | 278 |
| 279 } // namespace command_buffer | 279 } // namespace command_buffer |
| 280 } // namespace o3d | 280 } // namespace o3d |
| 281 | 281 |
| 282 #endif // O3D_COMMAND_BUFFER_SERVICE_WIN_D3D9_TEXTURE_D3D9_H_ | 282 #endif // O3D_COMMAND_BUFFER_SERVICE_WIN_D3D9_TEXTURE_D3D9_H_ |
| OLD | NEW |