Ocular Engine
MeshResourceSaver.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_MESH_RESOURCE_SAVER__H__
19 #define __H__OCULAR_GRAPHICS_MESH_RESOURCE_SAVER__H__
20 
21 #include "Resources/ResourceSaver.hpp"
22 #include <vector>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Graphics
37  {
38  class VertexBuffer;
39  class IndexBuffer;
40 
52  {
53  public:
54 
55  MeshResourceSaver(std::string const& extension);
56  virtual ~MeshResourceSaver();
57 
58  virtual bool saveResource(Core::Resource* resource, Core::File const& file);
59 
60  protected:
61 
77  virtual bool saveFile(Core::File const& file, VertexBuffer const* vertexBuffer, IndexBuffer const* indexBuffer) = 0;
78 
87  virtual bool isFileValid(Core::File& file);
88 
89  private:
90  };
91  }
95 }
100 //------------------------------------------------------------------------------------------
101 
102 #endif
Definition: VertexBuffer.hpp:78
virtual bool saveFile(Core::File const &file, VertexBuffer const *vertexBuffer, IndexBuffer const *indexBuffer)=0
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: MeshResourceSaver.hpp:51
virtual bool isFileValid(Core::File &file)
Definition: MeshResourceSaver.cpp:85
Definition: IndexBuffer.hpp:77
Definition: File.hpp:41
virtual bool saveResource(Core::Resource *resource, Core::File const &file)
Definition: MeshResourceSaver.cpp:47
Definition: ResourceSaver.hpp:49
Definition: Resource.hpp:46