Obj parser, plane is loading correctly with texcoords etc! now OS defines the bitmap layout and format

This commit is contained in:
Krzosa Karol
2022-02-18 15:58:19 +01:00
parent 84c6191df6
commit 6e36d7596c
8 changed files with 1137 additions and 33 deletions

14
objparser.h Normal file
View File

@@ -0,0 +1,14 @@
#pragma once
struct Obj {
float* vertices; // sets of 3 floats
float* texture; // sets of 2 floats
float* normals; // sets of 3 floats
int vertices_count; // count of sets(vertices, textures, normals)
int* indices; // layout: vvv/ttt/nnn
int indices_count; // 1 count == 1 full face == 3vertex indices, 3 texture coordinate indices, 3 normal indices
size_t memory_taken;
};
Obj Obj_Parse(char* memory, size_t memory_size, char* data);
void Obj_Test();