#include <cstdint>
#include <tuple>
#include <iostream>
#include "vertex.h"
#include "parray.h"

//方案一，使用静态变量存储数据
//方案二，模板元编程，传递数据
int main() {
	cout << "std::is_aggregate_v<PosVertex> = "<< is_aggregate_v<PosVertex> << endl;
	cout << "std::is_aggregate_v<TexVertex> = "<< is_aggregate_v<TexVertex> << endl;
	cout << "std::is_aggregate_v<BoneVertex> = "<< is_aggregate_v<BoneVertex> << endl;
	float x1 = 1.0, x2 = 2.0, x3 = 3.0;
	PosVertex p;
	TexVertex t;
	BoneVertex b;
	ptarray<Vertex, PosVertex> vertices(10);
	//ptarray<Vertex, TexVertex> vertices2(10);
	vertices.push_back(p);
	parray<Vertex> pv = vertices;

	auto Position = make_tuple(1, 2, 3);

	auto pv0 = *(PosVertex*)pv.at(0);
	//vertices.push_back(t);
	cout<< "sizeof " << sizeof(p) << "," << sizeof(t) << "," << sizeof(b)<<"\n";
	//auto r1 = b.BindLayout();
	//auto r2 = t.BindLayout();
	//auto r3 = p.BindLayout();
	//cout << "vector " << get<0>(r1[0]) << "," << get<0>(r2[0]) << "," << get<0>(r3[0]) << "\n";
}




