renamed to VBOAccessData from Primitive::VBOData and then move to VK.h
This commit is contained in:
parent
2fdd7e7bd5
commit
fff7fd3af0
@ -59,6 +59,18 @@ struct DeviceBufferData;
|
|||||||
class VertexAttribBuffer;
|
class VertexAttribBuffer;
|
||||||
using VBO=VertexAttribBuffer;
|
using VBO=VertexAttribBuffer;
|
||||||
|
|
||||||
|
struct VBOAccessData
|
||||||
|
{
|
||||||
|
VBO *buf;
|
||||||
|
VkDeviceSize offset;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
CompOperatorMemcmp(const VBOAccessData &);
|
||||||
|
};//struct VBOAccessData
|
||||||
|
|
||||||
|
using VBOAccessMap=Map<AnsiString,VBOAccessData>;
|
||||||
|
|
||||||
class IndexBuffer;
|
class IndexBuffer;
|
||||||
|
|
||||||
struct IndexBufferData
|
struct IndexBufferData
|
||||||
|
@ -15,17 +15,7 @@ class Primitive
|
|||||||
GPUDevice *device;
|
GPUDevice *device;
|
||||||
AnsiString prim_name;
|
AnsiString prim_name;
|
||||||
|
|
||||||
struct VBOData
|
VBOAccessMap buffer_list;
|
||||||
{
|
|
||||||
VBO *buf;
|
|
||||||
VkDeviceSize offset;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
CompOperatorMemcmp(const VBOData &);
|
|
||||||
};
|
|
||||||
|
|
||||||
Map<AnsiString,VBOData> buffer_list;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ bool Primitive::Set(const AnsiString &name,VBO *vbo,VkDeviceSize offset)
|
|||||||
if(!vbo)return(false);
|
if(!vbo)return(false);
|
||||||
if(buffer_list.KeyExist(name))return(false);
|
if(buffer_list.KeyExist(name))return(false);
|
||||||
|
|
||||||
VBOData bd;
|
VBOAccessData bd;
|
||||||
|
|
||||||
bd.buf=vbo;
|
bd.buf=vbo;
|
||||||
bd.offset=offset;
|
bd.offset=offset;
|
||||||
@ -57,7 +57,7 @@ VBO *Primitive::GetVBO(const AnsiString &name,VkDeviceSize *offset)
|
|||||||
if(!offset)return(nullptr);
|
if(!offset)return(nullptr);
|
||||||
if(name.IsEmpty())return(nullptr);
|
if(name.IsEmpty())return(nullptr);
|
||||||
|
|
||||||
VBOData bd;
|
VBOAccessData bd;
|
||||||
|
|
||||||
if(buffer_list.Get(name,bd))
|
if(buffer_list.Get(name,bd))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user