Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace eu07;
- struct Vertex {
- x: float;
- y: float;
- z: float;
- }
- struct Quaternion {
- x: float;
- y: float;
- z: float;
- w: float;
- }
- table Texture {
- name: string;
- }
- table Program {
- geometry: string;
- fragment: string;
- }
- enum NormalFormat: byte = { DISABLED = 0, FLOAT = 1, INT_2_10_10_10 = 2 }
- enum TexCoordFormat: byte = { FLOAT = 0, HALF_FLOAT = 2, SHORT = 3, BYTE = 4 }
- struct VertexFormat {
- normal: NormalFormat;
- texCoord: TexCoordFormat;
- texCoordCount: byte;
- }
- table Header {
- version: uint;
- textures: [Texture];
- programs: [Program];
- }
- table Mesh {
- position: Vertex;
- orientation: Quaternion;
- format: VertexFormat;
- data: [ubyte]; // vertex data
- uniforms: [ubyte];
- textures: [ubyte]; // texture index in header, UCHAR_MAX - n for replaceable textures
- program: ubyte; // GLSL program index in header
- }
- table InstancedMesh {
- mesh: Mesh;
- count: uint;
- }
- table AnimatedMesh {
- mesh: Mesh;
- }
- union AnyMesh { Mesh, InstancedMesh, AnimatedMesh }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement