first commit
This commit is contained in:
46
include/engine/gpu/gpu_geometry.h
Normal file
46
include/engine/gpu/gpu_geometry.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
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 <AutoPtr <VBO> > vbo;
|
||||
Array <AutoPtr <DisplayList> > 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__
|
||||
Reference in New Issue
Block a user