| 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 26 matching lines...) Expand all Loading... |
| 37 #define O3D_COMMAND_BUFFER_SERVICE_WIN_D3D9_GEOMETRY_D3D9_H_ | 37 #define O3D_COMMAND_BUFFER_SERVICE_WIN_D3D9_GEOMETRY_D3D9_H_ |
| 38 | 38 |
| 39 #include <vector> | 39 #include <vector> |
| 40 #include <utility> | 40 #include <utility> |
| 41 #include "command_buffer/common/cross/gapi_interface.h" | 41 #include "command_buffer/common/cross/gapi_interface.h" |
| 42 #include "command_buffer/service/win/d3d9/d3d9_utils.h" | 42 #include "command_buffer/service/win/d3d9/d3d9_utils.h" |
| 43 #include "command_buffer/service/cross/resource.h" | 43 #include "command_buffer/service/cross/resource.h" |
| 44 | 44 |
| 45 namespace o3d { | 45 namespace o3d { |
| 46 namespace command_buffer { | 46 namespace command_buffer { |
| 47 namespace o3d { |
| 47 | 48 |
| 48 class GAPID3D9; | 49 class GAPID3D9; |
| 49 | 50 |
| 50 // D3D9 version of VertexBuffer. | 51 // D3D9 version of VertexBuffer. |
| 51 class VertexBufferD3D9 : public VertexBuffer { | 52 class VertexBufferD3D9 : public VertexBuffer { |
| 52 public: | 53 public: |
| 53 VertexBufferD3D9(unsigned int size, unsigned int flags) | 54 VertexBufferD3D9(unsigned int size, unsigned int flags) |
| 54 : VertexBuffer(size, flags), | 55 : VertexBuffer(size, flags), |
| 55 d3d_vertex_buffer_(NULL) {} | 56 d3d_vertex_buffer_(NULL) {} |
| 56 virtual ~VertexBufferD3D9(); | 57 virtual ~VertexBufferD3D9(); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Compiles the vertex declaration and stream map. | 114 // Compiles the vertex declaration and stream map. |
| 114 void Compile(IDirect3DDevice9 *d3d_device); | 115 void Compile(IDirect3DDevice9 *d3d_device); |
| 115 | 116 |
| 116 bool dirty_; | 117 bool dirty_; |
| 117 typedef std::pair<ResourceId, unsigned int> StreamPair; | 118 typedef std::pair<ResourceId, unsigned int> StreamPair; |
| 118 std::vector<StreamPair> streams_; | 119 std::vector<StreamPair> streams_; |
| 119 IDirect3DVertexDeclaration9 *d3d_vertex_decl_; | 120 IDirect3DVertexDeclaration9 *d3d_vertex_decl_; |
| 120 DISALLOW_COPY_AND_ASSIGN(VertexStructD3D9); | 121 DISALLOW_COPY_AND_ASSIGN(VertexStructD3D9); |
| 121 }; | 122 }; |
| 122 | 123 |
| 124 } // namespace o3d |
| 123 } // namespace command_buffer | 125 } // namespace command_buffer |
| 124 } // namespace o3d | 126 } // namespace o3d |
| 125 | 127 |
| 126 #endif // O3D_COMMAND_BUFFER_SERVICE_WIN_D3D9_GEOMETRY_D3D9_H_ | 128 #endif // O3D_COMMAND_BUFFER_SERVICE_WIN_D3D9_GEOMETRY_D3D9_H_ |
| OLD | NEW |