/* ----------------------------------------------------------------------------- GSFramework Copyright 2001-2013 Emmanuel Julien. All Rights Reserved. ----------------------------------------------------------------------------- */ #ifndef __GPUGEOMETRY__ #define __GPUGEOMETRY__ #include "gpu/gpu_display_list.h" namespace GS { namespace Render { struct Material; } namespace GPU { struct Geometry : public Render::Geometry { Renderer &renderer; Array > vbo; Array > display_list; /// Allocate geometry VBO. virtual bool AllocateVBO(uint); /// Get geometry VBO count. virtual uint GetVBOCount() const { return vbo.GetCount(); } /// Get geometry VBO. virtual VBO *GetVBO(uint n) { return (VBO *)&vbo[n]; } /// Change a material in the material table. virtual bool SetMaterial(uint index, Render::Material *); virtual bool Create(Render::ResourceFactory &, const Core::Geometry &); virtual bool ShouldReloadOnDependencyChange(const char *) const; Geometry(Renderer &r, const char *name) : Render::Geometry(name), renderer(r) {} }; } // GPU } // GS #endif // __GPUGEOMETRY__