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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 explicit SourceBuffer(ServiceLocator* service_locator); | 299 explicit SourceBuffer(ServiceLocator* service_locator); |
300 | 300 |
301 protected: | 301 protected: |
302 // Frees the buffer if it exists. | 302 // Frees the buffer if it exists. |
303 void ConcreteFree(); | 303 void ConcreteFree(); |
304 | 304 |
305 private: | 305 private: |
306 friend class IClassManager; | 306 friend class IClassManager; |
307 static ObjectBase::Ref Create(ServiceLocator* service_locator); | 307 static ObjectBase::Ref Create(ServiceLocator* service_locator); |
308 | 308 |
309 char* buffer_; // The actual data for this buffer. | 309 scoped_array<char> buffer_; // The actual data for this buffer. |
310 | 310 |
311 O3D_DECL_CLASS(SourceBuffer, VertexBufferBase); | 311 O3D_DECL_CLASS(SourceBuffer, VertexBufferBase); |
312 DISALLOW_COPY_AND_ASSIGN(SourceBuffer); | 312 DISALLOW_COPY_AND_ASSIGN(SourceBuffer); |
313 }; | 313 }; |
314 | 314 |
315 // IndexBuffer is a buffer object used for storing geometry index data (e.g. | 315 // IndexBuffer is a buffer object used for storing geometry index data (e.g. |
316 // triangle indices). It is an abstract class declaring the interface only. | 316 // triangle indices). It is an abstract class declaring the interface only. |
317 // Each rendering platform should derive its own implementation of the | 317 // Each rendering platform should derive its own implementation of the |
318 // interface. | 318 // interface. |
319 // | 319 // |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 Buffer* buffer_; | 385 Buffer* buffer_; |
386 void* data_; | 386 void* data_; |
387 bool locked_; | 387 bool locked_; |
388 | 388 |
389 DISALLOW_COPY_AND_ASSIGN(BufferLockHelper); | 389 DISALLOW_COPY_AND_ASSIGN(BufferLockHelper); |
390 }; | 390 }; |
391 | 391 |
392 } // namespace o3d | 392 } // namespace o3d |
393 | 393 |
394 #endif // O3D_CORE_CROSS_BUFFER_H_ | 394 #endif // O3D_CORE_CROSS_BUFFER_H_ |
OLD | NEW |