00001 #pragma once 00002 00003 #ifndef DYNAMIC_RENDERABLE_H 00004 #define DYNAMIC_RENDERABLE_H 00005 00006 #include "OgreSimpleRenderable.h" 00007 00008 00009 namespace ASR 00010 { 00012 class DynamicRenderable : public Ogre::SimpleRenderable 00013 { 00014 public: 00016 DynamicRenderable(); 00018 virtual ~DynamicRenderable(); 00019 00028 void initialize(Ogre::RenderOperation::OperationType operationType, 00029 bool useIndices); 00030 00032 virtual Ogre::Real getBoundingRadius(void) const; 00034 virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera* cam) const; 00035 00036 protected: 00038 size_t mVertexBufferCapacity; 00040 size_t mIndexBufferCapacity; 00041 00047 virtual void createVertexDeclaration() = 0; 00048 00063 void prepareHardwareBuffers(size_t vertexCount, size_t indexCount); 00064 00071 virtual void fillHardwareBuffers() = 0; 00072 }; 00073 } 00074 00075 #endif // DYNAMIC_RENDERABLE_H