Files
Webcam/include/engine/gpu/gpu_geometry.h
2026-06-22 11:49:35 +02:00

47 lines
1.1 KiB
C++

/* -----------------------------------------------------------------------------
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__