diff --git a/engine/components/mesh_filter.cpp b/engine/components/mesh_filter.cpp index 97e6e77..e232824 100644 --- a/engine/components/mesh_filter.cpp +++ b/engine/components/mesh_filter.cpp @@ -5,9 +5,30 @@ MeshFilter::MeshFilter(const FString &path) { // Load the mesh from the file - auto vertices = Utils::File::ReadObjFile(path); + auto [shapes, materials] = Utils::File::ReadObjFile(path); - mesh = LoadResource(vertices); + TVector> textures; + for (const auto &material : materials) { + auto texture_binary = Utils::File::ReadBinaryFile( + path.substr(0, path.find_last_of("/")) + .append("/") + .append(material.diffuse_texname.substr( + 0, material.diffuse_texname.find_last_of("."))) + .append(".img.bin")); + + // auto palette_binary = Utils::File::ReadBinaryFile( + // path.substr(0, path.find_last_of("/")) + // .append("/") + // .append(material.diffuse_texname.substr( + // 0, material.diffuse_texname.find_last_of("."))) + // .append(".pal.bin")); + + auto palette_binary = TVector(); + + textures.push_back(LoadResource(texture_binary, palette_binary)); + } + + mesh = LoadResource(shapes, materials, textures); } PtrUnq MeshFilter::Initialize(const FString &path) { diff --git a/engine/core/engine.cpp b/engine/core/engine.cpp index f72abac..45a38b6 100644 --- a/engine/core/engine.cpp +++ b/engine/core/engine.cpp @@ -44,12 +44,19 @@ PtrUnq &Engine::GetInstance() { } void Engine::run() { - // TEST ------------------------ + Renderer::GetInstance(); + // TEST ------------------------ // Create a MeshInstance3D PtrShr meshInstance = NewNode("meshes/mococo/mococo.obj"); + // PtrShr meshIPnstance = + // NewNode("meshes/cube/cube-tex.obj"); + + // PtrShr meshInstance = + // NewNode("meshes/quad/quad.obj"); + // ----------------------------- while (pmMainLoop()) { @@ -63,6 +70,9 @@ void Engine::processInput() { Input::Update(); } void Engine::update() { // Update + if (Input::IsButtonDown(EButton::A)) { + iprintf("A button pressed\n"); + } } void Engine::render() { @@ -84,8 +94,7 @@ void Engine::render() { Engine::Engine() { // Initialize nitroFS - char nitroFSPath[32]; - strcpy(nitroFSPath, "assets"); + char nitroFSPath[] = {"assets"}; char *nitroFSPathptr = nitroFSPath; if (!nitroFSInit(&nitroFSPathptr)) exit(-1); diff --git a/engine/graphics/renderer.cpp b/engine/graphics/renderer.cpp index 5588e29..1d211e8 100644 --- a/engine/graphics/renderer.cpp +++ b/engine/graphics/renderer.cpp @@ -7,6 +7,8 @@ #include #include +#include "input/input.h" + PtrUnq Renderer::Instance; PtrUnq &Renderer::GetInstance() { @@ -16,34 +18,45 @@ PtrUnq &Renderer::GetInstance() { return Instance; } +// TEST ------------------- +float rotation = 45.f; +// TEST ------------------- void Renderer::beginFrame() { glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(70, 256.0 / 192.0, 0.1, 100); + // glPolyFmt(POLY_ALPHA(31) | POLY_CULL_BACK); + + // glMatrixMode(GL_TEXTURE); + // glLoadIdentity(); glMatrixMode(GL_MODELVIEW); - glPushMatrix(); // Save the current matrix state - - glPolyFmt(POLY_ALPHA(31) | POLY_CULL_BACK); - glLoadIdentity(); // Load the identity matrix + // TEST ------------------- + if (Input::IsButtonHeld(EButton::LEFT)) + rotation++; + if (Input::IsButtonHeld(EButton::RIGHT)) + rotation--; + // TEST ------------------- + // Render scene - glTranslatef(0.f, 0.f, -4.f); // Move the camera back - glRotatef(45, 1, 1, 0); // Rotation + glTranslatef(0.f, -.75f, -2.f); // Move the camera back + glRotatef(rotation, 1, 1, 0); // Rotation } void Renderer::render(const Transform &transform, const MeshFilter &meshFilter) { - // drawCube(1.0f); // Draw a cube + glPolyFmt(POLY_ALPHA(31) | POLY_CULL_BACK); + glBindTexture(0, meshFilter.getMesh()->getTextures()[0]->getId()); glBegin(GL_TRIANGLES); - for (const auto &shapes : meshFilter.getMesh()->getVertices()) { - for (const auto &vertex : shapes) { - glColor3f(1.0, 0.0, 0.0); // Red - glVertex3f(vertex.position.x, vertex.position.y, vertex.position.z); - glNormal3f(vertex.normal.x, vertex.normal.y, vertex.normal.z); + glColor3b(255, 255, 255); + for (const auto &shape : meshFilter.getMesh()->getShapes()) { + for (const auto &vertex : shape.vertices) { + // glNormal3f(vertex.normal.x, vertex.normal.y, vertex.normal.z); glTexCoord2f(vertex.texCoords.x, vertex.texCoords.y); + glVertex3f(vertex.position.x, vertex.position.y, vertex.position.z); } } @@ -110,19 +123,30 @@ void Renderer::drawCube(float size) { Renderer::Renderer() { // Initialize the video subsystem - lcdMainOnTop(); // Set the main screen on top - videoSetMode(MODE_0_3D); // Set 3D rendering mode - videoSetModeSub(MODE_5_2D); // Set 2D rendering mode for the sub-screen - vramSetBankA(VRAM_A_MAIN_BG); // Allocate VRAM for textures + lcdMainOnTop(); // Set the main screen on top + videoSetMode(MODE_0_3D); // Set 3D rendering mode + videoSetModeSub(MODE_5_2D); // Set 2D rendering mode for the sub-screen + vramSetBankB(VRAM_B_TEXTURE); + vramSetBankC(VRAM_C_TEXTURE); + vramSetBankD(VRAM_D_TEXTURE); + vramSetBankE(VRAM_E_TEX_PALETTE); + vramSetBankF(VRAM_F_LCD); + // vramSetBankG(VRAM_G_TEX_PALETTE); // Initialize the 3D engine glInit(); + glEnable(GL_TEXTURE_2D); + glViewport(0, 0, 255, 191); // Set viewport glEnable(GL_ANTIALIAS); glClearColor(0, 0, 0, 31); // Set clear color (black) glClearPolyID(63); // Set default polygon ID glClearDepth(GL_MAX_DEPTH); // Set clear depth - glViewport(0, 0, 255, 191); // Set viewport + glEnable(GL_BLEND); + + vramSetBankA(VRAM_A_TEXTURE); // Allocate VRAM for textures + vramSetBankB(VRAM_B_LCD); // Debug + consoleInit(NULL, 0, BgType_Text4bpp, BgSize_T_256x256, 23, 2, false, true); consoleDemoInit(); } diff --git a/engine/input/input.cpp b/engine/input/input.cpp index 3047930..cb10cf6 100644 --- a/engine/input/input.cpp +++ b/engine/input/input.cpp @@ -4,20 +4,20 @@ #include // Static members -u32 Input::KeysHeldState = 0; -u32 Input::KeysDownState = 0; -u32 Input::KeysUpState = 0; +u32 Input::ButtonsHeldState = 0; +u32 Input::ButtonsDownState = 0; +u32 Input::ButtonsUpState = 0; void Input::Update() { // Update key states scanKeys(); - KeysHeldState = keysHeld(); - KeysDownState = keysDown(); - KeysUpState = keysUp(); + ButtonsHeldState = keysHeld(); + ButtonsDownState = keysDown(); + ButtonsUpState = keysUp(); } -bool Input::IsKeyHeld(EKey key) { return KeysHeldState & key; } +bool Input::IsButtonHeld(EButton key) { return ButtonsHeldState & key; } -bool Input::IsKeyDown(EKey key) { return KeysDownState & key; } +bool Input::IsButtonDown(EButton key) { return ButtonsDownState & key; } -bool Input::IsKeyUp(EKey key) { return KeysUpState & key; } +bool Input::IsButtonUp(EButton key) { return ButtonsUpState & key; } diff --git a/engine/resources/mesh.cpp b/engine/resources/mesh.cpp index b98f9e5..bc1ad56 100644 --- a/engine/resources/mesh.cpp +++ b/engine/resources/mesh.cpp @@ -1,8 +1,11 @@ #include "resources/mesh.h" -Mesh Mesh::Load(const TVector> &vertices) { - return std::move(Mesh(vertices)); +Mesh Mesh::Load(const TVector &shapes, + const TVector &materials, + const TVector> &textures) { + return std::move(Mesh(shapes, materials, textures)); } -Mesh::Mesh(const TVector> &vertices) - : Super(), vertices(vertices) {} \ No newline at end of file +Mesh::Mesh(const TVector &shapes, const TVector &materials, + const TVector> &textures) + : Super(), shapes(shapes), materials(materials), textures(textures) {} \ No newline at end of file diff --git a/engine/resources/texture.cpp b/engine/resources/texture.cpp new file mode 100644 index 0000000..3024ef9 --- /dev/null +++ b/engine/resources/texture.cpp @@ -0,0 +1,27 @@ +#include "resources/texture.h" + +#include + +Texture::~Texture() { + // TODO: Check what the hell is happening here + // glBindTexture(0, id); + // glColorTableEXT(0, 0, 0, 0, 0, nullptr); + // glDeleteTextures(1, &id); + + // iprintf("Texture %d deleted\n", id); +} + +Texture Texture::Load(TVector &data, + TVector &palette) { + return Texture(data, palette); +} + +Texture::Texture(TVector &data, TVector &palette) + : Super() { + glGenTextures(1, &id); + glBindTexture(0, id); + // TODO: Manage different texture formats + glTexImage2D(0, 0, GL_RGBA, TEXTURE_SIZE_128, TEXTURE_SIZE_128, 0, + TEXGEN_TEXCOORD, (u8 *)data.data()); + // glColorTableEXT(0, 0, 32, 0, 0, (u16 *)palette.data()); +} \ No newline at end of file diff --git a/engine/utils/file.cpp b/engine/utils/file.cpp index 4b22362..1d55d69 100644 --- a/engine/utils/file.cpp +++ b/engine/utils/file.cpp @@ -2,6 +2,7 @@ #define TINYOBJLOADER_IMPLEMENTATION #include "tiny_obj_loader.h" +#include namespace Utils::File { @@ -11,15 +12,13 @@ FString ReadTextFile(const FString &path) { FString result; FILE *f = fopen(AssetPath(path).c_str(), "rb"); if (!f) { - iprintf("No se pudo abrir el archivo\n"); + // TODO: iprintf("No se pudo abrir el archivo\n"); } else { - iprintf("Archivo abierto\n"); - fseek(f, 0, SEEK_END); size_t size = ftell(f); rewind(f); - TVector buffer(size); + TVector buffer(size); fread(buffer.data(), 1, size, f); fclose(f); @@ -30,28 +29,29 @@ FString ReadTextFile(const FString &path) { return std::move(result); } -TVector> ReadObjFile(const FString &path) { +TTuple, TVector> ReadObjFile(const FString &path) { + FString nitroPath = AssetPath(path); + FString baseFolder = + nitroPath.substr(0, nitroPath.find_last_of("/")).append("/"); + tinyobj::attrib_t attrib; TVector shapes; TVector materials; FString err; bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &err, - AssetPath(path).c_str(), - AssetPath(path + "/..").c_str(), true); + nitroPath.c_str(), baseFolder.c_str(), true); - if (ret) - iprintf("Cargado correctamente\n"); - else - iprintf("Error al cargar el archivo: %s\n", err.c_str()); + if (!ret) { + // TODO: print error + return {TVector(), TVector()}; + } - iprintf("Numero de materiales: %d\n", materials.size()); - - TVector> vertices; + TVector shape_vertices; // Loop over shapes for (size_t s = 0; s < shapes.size(); s++) { - vertices.push_back({}); + shape_vertices.push_back({}); // Loop over faces(polygon) size_t index_offset = 0; for (size_t f = 0; f < shapes[s].mesh.num_face_vertices.size(); f++) { @@ -88,20 +88,23 @@ TVector> ReadObjFile(const FString &path) { tinyobj::real_t ty = attrib.texcoords[2 * size_t(idx.texcoord_index) + 1]; + // I lost 3 days bacause of this :') + ty = 1.0f - std::clamp(ty, 0.0f, 1.0f); + texCoords = FVector2(tx, ty); } - vertices[s].push_back(FVertex(positions, normals, texCoords)); + shape_vertices[s].vertices.push_back( + FVertex(positions, normals, texCoords)); } index_offset += fv; // per-face material - // shapes[s].mesh.material_ids[f]; + // shape_materials.push_back(materials[shapes[s].mesh.material_ids[f]]); } } - return std::move(vertices); + return {shape_vertices, materials}; } - } // namespace Utils::File diff --git a/include/tinyobjloader/tiny_obj_loader.h b/include/tinyobjloader/tiny_obj_loader.h index ee44076..e2f0ea1 100644 --- a/include/tinyobjloader/tiny_obj_loader.h +++ b/include/tinyobjloader/tiny_obj_loader.h @@ -23,6 +23,7 @@ THE SOFTWARE. */ // +// xrbDS 0.1 : Change TINYOBJ_SSCANF_BUFFER_SIZE to 512 // version 1.0.6 : Add TINYOBJLOADER_USE_DOUBLE option(#124) // version 1.0.5 : Ignore `Tr` when `d` exists in MTL(#43) // version 1.0.4 : Support multiple filenames for 'mtllib'(#112) @@ -98,15 +99,15 @@ namespace tinyobj { // cube_left | cube_right #ifdef TINYOBJLOADER_USE_DOUBLE - //#pragma message "using double" - typedef double real_t; +// #pragma message "using double" +typedef double real_t; #else - //#pragma message "using float" - typedef float real_t; +// #pragma message "using float" +typedef float real_t; #endif typedef enum { - TEXTURE_TYPE_NONE, // default + TEXTURE_TYPE_NONE, // default TEXTURE_TYPE_SPHERE, TEXTURE_TYPE_CUBE_TOP, TEXTURE_TYPE_CUBE_BOTTOM, @@ -118,18 +119,18 @@ typedef enum { typedef struct { texture_type_t type; // -type (default TEXTURE_TYPE_NONE) - real_t sharpness; // -boost (default 1.0?) - real_t brightness; // base_value in -mm option (default 0) - real_t contrast; // gain_value in -mm option (default 1) - real_t origin_offset[3]; // -o u [v [w]] (default 0 0 0) - real_t scale[3]; // -s u [v [w]] (default 1 1 1) - real_t turbulence[3]; // -t u [v [w]] (default 0 0 0) + real_t sharpness; // -boost (default 1.0?) + real_t brightness; // base_value in -mm option (default 0) + real_t contrast; // gain_value in -mm option (default 1) + real_t origin_offset[3]; // -o u [v [w]] (default 0 0 0) + real_t scale[3]; // -s u [v [w]] (default 1 1 1) + real_t turbulence[3]; // -t u [v [w]] (default 0 0 0) // int texture_resolution; // -texres resolution (default = ?) TODO - bool clamp; // -clamp (default false) - char imfchan; // -imfchan (the default for bump is 'l' and for decal is 'm') - bool blendu; // -blendu (default on) - bool blendv; // -blendv (default on) - real_t bump_multiplier; // -bm (for bump maps only, default 1.0) + bool clamp; // -clamp (default false) + char imfchan; // -imfchan (the default for bump is 'l' and for decal is 'm') + bool blendu; // -blendu (default on) + bool blendv; // -blendv (default on) + real_t bump_multiplier; // -bm (for bump maps only, default 1.0) } texture_option_t; typedef struct { @@ -141,20 +142,20 @@ typedef struct { real_t transmittance[3]; real_t emission[3]; real_t shininess; - real_t ior; // index of refraction - real_t dissolve; // 1 == opaque; 0 == fully transparent + real_t ior; // index of refraction + real_t dissolve; // 1 == opaque; 0 == fully transparent // illumination model (see http://www.fileformat.info/format/material/) int illum; - int dummy; // Suppress padding warning. + int dummy; // Suppress padding warning. - std::string ambient_texname; // map_Ka - std::string diffuse_texname; // map_Kd - std::string specular_texname; // map_Ks - std::string specular_highlight_texname; // map_Ns - std::string bump_texname; // map_bump, bump - std::string displacement_texname; // disp - std::string alpha_texname; // map_d + std::string ambient_texname; // map_Ka + std::string diffuse_texname; // map_Kd + std::string specular_texname; // map_Ks + std::string specular_highlight_texname; // map_Ns + std::string bump_texname; // map_bump, bump + std::string displacement_texname; // disp + std::string alpha_texname; // map_d texture_option_t ambient_texopt; texture_option_t diffuse_texopt; @@ -166,20 +167,20 @@ typedef struct { // PBR extension // http://exocortex.com/blog/extending_wavefront_mtl_to_support_pbr - real_t roughness; // [0, 1] default 0 - real_t metallic; // [0, 1] default 0 - real_t sheen; // [0, 1] default 0 - real_t clearcoat_thickness; // [0, 1] default 0 - real_t clearcoat_roughness; // [0, 1] default 0 - real_t anisotropy; // aniso. [0, 1] default 0 - real_t anisotropy_rotation; // anisor. [0, 1] default 0 + real_t roughness; // [0, 1] default 0 + real_t metallic; // [0, 1] default 0 + real_t sheen; // [0, 1] default 0 + real_t clearcoat_thickness; // [0, 1] default 0 + real_t clearcoat_roughness; // [0, 1] default 0 + real_t anisotropy; // aniso. [0, 1] default 0 + real_t anisotropy_rotation; // anisor. [0, 1] default 0 real_t pad0; real_t pad1; - std::string roughness_texname; // map_Pr - std::string metallic_texname; // map_Pm - std::string sheen_texname; // map_Ps - std::string emissive_texname; // map_Ke - std::string normal_texname; // norm. For normal mapping. + std::string roughness_texname; // map_Pr + std::string metallic_texname; // map_Pm + std::string sheen_texname; // map_Ps + std::string emissive_texname; // map_Ke + std::string normal_texname; // norm. For normal mapping. texture_option_t roughness_texopt; texture_option_t metallic_texopt; @@ -210,11 +211,11 @@ typedef struct { typedef struct { std::vector indices; - std::vector num_face_vertices; // The number of vertices per - // face. 3 = polygon, 4 = quad, - // ... Up to 255. - std::vector material_ids; // per-face material ID - std::vector tags; // SubD tag + std::vector num_face_vertices; // The number of vertices per + // face. 3 = polygon, 4 = quad, + // ... Up to 255. + std::vector material_ids; // per-face material ID + std::vector tags; // SubD tag } mesh_t; typedef struct { @@ -224,9 +225,9 @@ typedef struct { // Vertex attributes typedef struct { - std::vector vertices; // 'v' - std::vector normals; // 'vn' - std::vector texcoords; // 'vt' + std::vector vertices; // 'v' + std::vector normals; // 'vn' + std::vector texcoords; // 'vt' } attrib_t; typedef struct callback_t_ { @@ -254,18 +255,12 @@ typedef struct callback_t_ { void (*object_cb)(void *user_data, const char *name); callback_t_() - : vertex_cb(NULL), - normal_cb(NULL), - texcoord_cb(NULL), - index_cb(NULL), - usemtl_cb(NULL), - mtllib_cb(NULL), - group_cb(NULL), - object_cb(NULL) {} + : vertex_cb(NULL), normal_cb(NULL), texcoord_cb(NULL), index_cb(NULL), + usemtl_cb(NULL), mtllib_cb(NULL), group_cb(NULL), object_cb(NULL) {} } callback_t; class MaterialReader { - public: +public: MaterialReader() {} virtual ~MaterialReader(); @@ -276,7 +271,7 @@ class MaterialReader { }; class MaterialFileReader : public MaterialReader { - public: +public: explicit MaterialFileReader(const std::string &mtl_basedir) : m_mtlBaseDir(mtl_basedir) {} virtual ~MaterialFileReader() {} @@ -284,12 +279,12 @@ class MaterialFileReader : public MaterialReader { std::vector *materials, std::map *matMap, std::string *err); - private: +private: std::string m_mtlBaseDir; }; class MaterialStreamReader : public MaterialReader { - public: +public: explicit MaterialStreamReader(std::istream &inStream) : m_inStream(inStream) {} virtual ~MaterialStreamReader() {} @@ -297,7 +292,7 @@ class MaterialStreamReader : public MaterialReader { std::vector *materials, std::map *matMap, std::string *err); - private: +private: std::istream &m_inStream; }; @@ -341,9 +336,9 @@ void LoadMtl(std::map *material_map, std::vector *materials, std::istream *inStream, std::string *warning); -} // namespace tinyobj +} // namespace tinyobj -#endif // TINY_OBJ_LOADER_H_ +#endif // TINY_OBJ_LOADER_H_ #ifdef TINYOBJLOADER_IMPLEMENTATION #include @@ -361,7 +356,7 @@ namespace tinyobj { MaterialReader::~MaterialReader() {} -#define TINYOBJ_SSCANF_BUFFER_SIZE (4096) +#define TINYOBJ_SSCANF_BUFFER_SIZE (512) struct vertex_index { int v_idx, vt_idx, vn_idx; @@ -401,31 +396,35 @@ static std::istream &safeGetline(std::istream &is, std::string &t) { for (;;) { int c = sb->sbumpc(); switch (c) { - case '\n': - return is; - case '\r': - if (sb->sgetc() == '\n') sb->sbumpc(); - return is; - case EOF: - // Also handle the case when the last line has no line ending - if (t.empty()) is.setstate(std::ios::eofbit); - return is; - default: - t += static_cast(c); + case '\n': + return is; + case '\r': + if (sb->sgetc() == '\n') + sb->sbumpc(); + return is; + case EOF: + // Also handle the case when the last line has no line ending + if (t.empty()) + is.setstate(std::ios::eofbit); + return is; + default: + t += static_cast(c); } } } #define IS_SPACE(x) (((x) == ' ') || ((x) == '\t')) -#define IS_DIGIT(x) \ +#define IS_DIGIT(x) \ (static_cast((x) - '0') < static_cast(10)) #define IS_NEW_LINE(x) (((x) == '\r') || ((x) == '\n') || ((x) == '\0')) // Make index zero-base, and also support relative index. static inline int fixIndex(int idx, int n) { - if (idx > 0) return idx - 1; - if (idx == 0) return 0; - return n + idx; // negative value = relative + if (idx > 0) + return idx - 1; + if (idx == 0) + return 0; + return n + idx; // negative value = relative } static inline std::string parseString(const char **token) { @@ -521,9 +520,11 @@ static bool tryParseDouble(const char *s, const char *s_end, double *result) { } // We must make sure we actually got something. - if (read == 0) goto fail; + if (read == 0) + goto fail; // We allow numbers of form "#", "###" etc. - if (!end_not_reached) goto assemble; + if (!end_not_reached) + goto assemble; // Read the decimal part. if (*curr == '.') { @@ -548,7 +549,8 @@ static bool tryParseDouble(const char *s, const char *s_end, double *result) { goto assemble; } - if (!end_not_reached) goto assemble; + if (!end_not_reached) + goto assemble; // Read the exponent part. if (*curr == 'e' || *curr == 'E') { @@ -574,13 +576,14 @@ static bool tryParseDouble(const char *s, const char *s_end, double *result) { end_not_reached = (curr != s_end); } exponent *= (exp_sign == '+' ? 1 : -1); - if (read == 0) goto fail; + if (read == 0) + goto fail; } assemble: - *result = - (sign == '+' ? 1 : -1) * - (exponent ? std::ldexp(mantissa * std::pow(5.0, exponent), exponent) : mantissa); + *result = (sign == '+' ? 1 : -1) * + (exponent ? std::ldexp(mantissa * std::pow(5.0, exponent), exponent) + : mantissa); return true; fail: return false; @@ -597,16 +600,16 @@ static inline real_t parseReal(const char **token, double default_value = 0.0) { } static inline void parseReal2(real_t *x, real_t *y, const char **token, - const double default_x = 0.0, - const double default_y = 0.0) { + const double default_x = 0.0, + const double default_y = 0.0) { (*x) = parseReal(token, default_x); (*y) = parseReal(token, default_y); } -static inline void parseReal3(real_t *x, real_t *y, real_t *z, const char **token, - const double default_x = 0.0, - const double default_y = 0.0, - const double default_z = 0.0) { +static inline void parseReal3(real_t *x, real_t *y, real_t *z, + const char **token, const double default_x = 0.0, + const double default_y = 0.0, + const double default_z = 0.0) { (*x) = parseReal(token, default_x); (*y) = parseReal(token, default_y); (*z) = parseReal(token, default_z); @@ -638,8 +641,9 @@ static inline bool parseOnOff(const char **token, bool default_value = true) { return ret; } -static inline texture_type_t parseTextureType( - const char **token, texture_type_t default_value = TEXTURE_TYPE_NONE) { +static inline texture_type_t +parseTextureType(const char **token, + texture_type_t default_value = TEXTURE_TYPE_NONE) { (*token) += strspn((*token), " \t"); const char *end = (*token) + strcspn((*token), " \t\r"); texture_type_t ty = default_value; @@ -715,7 +719,7 @@ static vertex_index parseTriple(const char **token, int vsize, int vnsize, } // i/j/k - (*token)++; // skip '/' + (*token)++; // skip '/' vi.vn_idx = fixIndex(atoi((*token)), vnsize); (*token) += strcspn((*token), "/ \t\r"); return vi; @@ -723,7 +727,7 @@ static vertex_index parseTriple(const char **token, int vsize, int vnsize, // Parse raw triples: i, i/j/k, i//k, i/j static vertex_index parseRawTriple(const char **token) { - vertex_index vi(static_cast(0)); // 0 is an invalid index in OBJ + vertex_index vi(static_cast(0)); // 0 is an invalid index in OBJ vi.v_idx = atoi((*token)); (*token) += strcspn((*token), "/ \t\r"); @@ -748,7 +752,7 @@ static vertex_index parseRawTriple(const char **token) { } // i/j/k - (*token)++; // skip '/' + (*token)++; // skip '/' vi.vn_idx = atoi((*token)); (*token) += strcspn((*token), "/ \t\r"); return vi; @@ -785,7 +789,7 @@ static bool ParseTextureNameAndOption(std::string *texname, texopt->turbulence[2] = 0.0f; texopt->type = TEXTURE_TYPE_NONE; - const char *token = linebuf; // Assume line ends with NULL + const char *token = linebuf; // Assume line ends with NULL while (!IS_NEW_LINE((*token))) { if ((0 == strncmp(token, "-blendu", 7)) && IS_SPACE((token[7]))) { @@ -806,15 +810,15 @@ static bool ParseTextureNameAndOption(std::string *texname, } else if ((0 == strncmp(token, "-o", 2)) && IS_SPACE((token[2]))) { token += 3; parseReal3(&(texopt->origin_offset[0]), &(texopt->origin_offset[1]), - &(texopt->origin_offset[2]), &token); + &(texopt->origin_offset[2]), &token); } else if ((0 == strncmp(token, "-s", 2)) && IS_SPACE((token[2]))) { token += 3; parseReal3(&(texopt->scale[0]), &(texopt->scale[1]), &(texopt->scale[2]), - &token, 1.0, 1.0, 1.0); + &token, 1.0, 1.0, 1.0); } else if ((0 == strncmp(token, "-t", 2)) && IS_SPACE((token[2]))) { token += 3; parseReal3(&(texopt->turbulence[0]), &(texopt->turbulence[1]), - &(texopt->turbulence[2]), &token); + &(texopt->turbulence[2]), &token); } else if ((0 == strncmp(token, "-type", 5)) && IS_SPACE((token[5]))) { token += 5; texopt->type = parseTextureType((&token), TEXTURE_TYPE_NONE); @@ -822,7 +826,7 @@ static bool ParseTextureNameAndOption(std::string *texname, token += 9; token += strspn(token, " \t"); const char *end = token + strcspn(token, " \t\r"); - if ((end - token) == 1) { // Assume one char for -imfchan + if ((end - token) == 1) { // Assume one char for -imfchan texopt->imfchan = (*token); } token = end; @@ -831,12 +835,12 @@ static bool ParseTextureNameAndOption(std::string *texname, parseReal2(&(texopt->brightness), &(texopt->contrast), &token, 0.0, 1.0); } else { // Assume texture filename - token += strspn(token, " \t"); // skip space - size_t len = strcspn(token, " \t\r"); // untile next space + token += strspn(token, " \t"); // skip space + size_t len = strcspn(token, " \t\r"); // untile next space texture_name = std::string(token, token + len); token += len; - token += strspn(token, " \t"); // skip space + token += strspn(token, " \t"); // skip space found_texname = true; } @@ -887,10 +891,11 @@ static void InitMaterial(material_t *material) { material->unknown_parameter.clear(); } -static bool exportFaceGroupToShape( - shape_t *shape, const std::vector > &faceGroup, - const std::vector &tags, const int material_id, - const std::string &name, bool triangulate) { +static bool +exportFaceGroupToShape(shape_t *shape, + const std::vector> &faceGroup, + const std::vector &tags, const int material_id, + const std::string &name, bool triangulate) { if (faceGroup.empty()) { return false; } @@ -940,7 +945,7 @@ static bool exportFaceGroupToShape( shape->mesh.num_face_vertices.push_back( static_cast(npolys)); - shape->mesh.material_ids.push_back(material_id); // per face + shape->mesh.material_ids.push_back(material_id); // per face } } @@ -1004,9 +1009,11 @@ void LoadMtl(std::map *material_map, token += strspn(token, " \t"); assert(token); - if (token[0] == '\0') continue; // empty line + if (token[0] == '\0') + continue; // empty line - if (token[0] == '#') continue; // comment line + if (token[0] == '#') + continue; // comment line // new mtl if ((0 == strncmp(token, "newmtl", 6)) && IS_SPACE((token[6]))) { @@ -1305,7 +1312,7 @@ void LoadMtl(std::map *material_map, token += 5; ParseTextureNameAndOption( &(material.normal_texname), &(material.normal_texopt), token, - /* is_bump */ false); // @fixme { is_bump will be true? } + /* is_bump */ false); // @fixme { is_bump will be true? } continue; } @@ -1431,7 +1438,7 @@ bool LoadObj(attrib_t *attrib, std::vector *shapes, std::vector vn; std::vector vt; std::vector tags; - std::vector > faceGroup; + std::vector> faceGroup; std::string name; // material @@ -1464,9 +1471,11 @@ bool LoadObj(attrib_t *attrib, std::vector *shapes, token += strspn(token, " \t"); assert(token); - if (token[0] == '\0') continue; // empty line + if (token[0] == '\0') + continue; // empty line - if (token[0] == '#') continue; // comment line + if (token[0] == '#') + continue; // comment line // vertex if (token[0] == 'v' && IS_SPACE((token[1]))) { @@ -1564,9 +1573,8 @@ bool LoadObj(attrib_t *attrib, std::vector *shapes, if (filenames.empty()) { if (err) { - (*err) += - "WARN: Looks like empty filename for mtllib. Use default " - "material. \n"; + (*err) += "WARN: Looks like empty filename for mtllib. Use default " + "material. \n"; } } else { bool found = false; @@ -1575,7 +1583,7 @@ bool LoadObj(attrib_t *attrib, std::vector *shapes, bool ok = (*readMatFn)(filenames[s].c_str(), materials, &material_map, &err_mtl); if (err && (!err_mtl.empty())) { - (*err) += err_mtl; // This should be warn message. + (*err) += err_mtl; // This should be warn message. } if (ok) { @@ -1586,9 +1594,8 @@ bool LoadObj(attrib_t *attrib, std::vector *shapes, if (!found) { if (err) { - (*err) += - "WARN: Failed to load material file(s). Use default " - "material.\n"; + (*err) += "WARN: Failed to load material file(s). Use default " + "material.\n"; } } } @@ -1617,7 +1624,7 @@ bool LoadObj(attrib_t *attrib, std::vector *shapes, while (!IS_NEW_LINE(token[0])) { std::string str = parseString(&token); names.push_back(str); - token += strspn(token, " \t\r"); // skip tag + token += strspn(token, " \t\r"); // skip tag } assert(names.size() > 0); @@ -1716,7 +1723,7 @@ bool LoadObj(attrib_t *attrib, std::vector *shapes, if (ret || shape.mesh.indices.size()) { shapes->push_back(shape); } - faceGroup.clear(); // for safety + faceGroup.clear(); // for safety if (err) { (*err) += errss.str(); @@ -1737,7 +1744,7 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, // material std::map material_map; - int material_id = -1; // -1 = invalid + int material_id = -1; // -1 = invalid std::vector indices; std::vector materials; @@ -1770,14 +1777,16 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, token += strspn(token, " \t"); assert(token); - if (token[0] == '\0') continue; // empty line + if (token[0] == '\0') + continue; // empty line - if (token[0] == '#') continue; // comment line + if (token[0] == '#') + continue; // comment line // vertex if (token[0] == 'v' && IS_SPACE((token[1]))) { token += 2; - real_t x, y, z, w; // w is optional. default = 1.0 + real_t x, y, z, w; // w is optional. default = 1.0 parseV(&x, &y, &z, &w, &token); if (callback.vertex_cb) { callback.vertex_cb(user_data, x, y, z, w); @@ -1799,7 +1808,7 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, // texcoord if (token[0] == 'v' && token[1] == 't' && IS_SPACE((token[2]))) { token += 3; - real_t x, y, z; // y and z are optional. default = 0.0 + real_t x, y, z; // y and z are optional. default = 0.0 parseReal3(&x, &y, &z, &token); if (callback.texcoord_cb) { callback.texcoord_cb(user_data, x, y, z); @@ -1873,9 +1882,8 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, if (filenames.empty()) { if (err) { - (*err) += - "WARN: Looks like empty filename for mtllib. Use default " - "material. \n"; + (*err) += "WARN: Looks like empty filename for mtllib. Use default " + "material. \n"; } } else { bool found = false; @@ -1884,7 +1892,7 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, bool ok = (*readMatFn)(filenames[s].c_str(), &materials, &material_map, &err_mtl); if (err && (!err_mtl.empty())) { - (*err) += err_mtl; // This should be warn message. + (*err) += err_mtl; // This should be warn message. } if (ok) { @@ -1895,9 +1903,8 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, if (!found) { if (err) { - (*err) += - "WARN: Failed to load material file(s). Use default " - "material.\n"; + (*err) += "WARN: Failed to load material file(s). Use default " + "material.\n"; } } else { if (callback.mtllib_cb) { @@ -1918,7 +1925,7 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, while (!IS_NEW_LINE(token[0])) { std::string str = parseString(&token); names.push_back(str); - token += strspn(token, " \t\r"); // skip tag + token += strspn(token, " \t\r"); // skip tag } assert(names.size() > 0); @@ -1967,7 +1974,7 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, continue; } -#if 0 // @todo +#if 0 // @todo if (token[0] == 't' && IS_SPACE(token[1])) { tag_t tag; @@ -2024,6 +2031,6 @@ bool LoadObjWithCallback(std::istream &inStream, const callback_t &callback, return true; } -} // namespace tinyobj +} // namespace tinyobj #endif diff --git a/include/xrbds/core/types.h b/include/xrbds/core/types.h index 44c0402..ffd09dc 100644 --- a/include/xrbds/core/types.h +++ b/include/xrbds/core/types.h @@ -19,9 +19,11 @@ #include #include #include +#include #include #include #include +#include ///////////////////////////////////// // MEMORY @@ -71,6 +73,17 @@ template using TVector = std::vector; * @tparam S The size of the array. */ template using TArray = std::array; +/** + * @brief Alias template for creating a std::tuple with a variadic list of + * types. + * + * This alias simplifies the usage of std::tuple by allowing the user to write + * TTuple instead of std::tuple. + * + * @tparam T... Variadic template parameter pack representing the types to be + * included in the tuple. + */ +template using TTuple = std::tuple; ///////////////////////////////////// // BASIC TYPES @@ -141,4 +154,10 @@ using FVector3 = glm::vec3; */ using FVector3Int = glm::ivec3; +///////////////////////////////////// +// SHAPES +///////////////////////////////////// + +using FMaterial = tinyobj::material_t; + #endif // XRBDS_CORE_TYPES_H \ No newline at end of file diff --git a/include/xrbds/input/input.h b/include/xrbds/input/input.h index 81a1561..1d14d0d 100644 --- a/include/xrbds/input/input.h +++ b/include/xrbds/input/input.h @@ -6,7 +6,7 @@ * * This header defines the Input class, which provides static methods to query * the state of keys (held, pressed, or released) on the system. It also defines - * the EKey enumeration for representing individual keys. + * the EButton enumeration for representing individual keys. * * The Input class is designed as a utility class and cannot be instantiated. * It maintains internal states for keys and provides methods to update and @@ -14,8 +14,8 @@ * * Usage: * - Call Input::Update() periodically to refresh the key states. - * - Use Input::IsKeyHeld(), Input::IsKeyDown(), or Input::IsKeyUp() to query - * the state of specific keys. + * - Use Input::IsButtonHeld(), Input::IsButtonDown(), or Input::IsButtonUp() to + * query the state of specific keys. * * @author Daniel Ramirez Morilla * @date 2025-04-19 @@ -33,7 +33,7 @@ #include /** - * @enum EKey + * @enum EButton * @brief Represents the keys available on the NDS platform. * * This enumeration defines constants for each key on the NDS system, mapping @@ -44,7 +44,7 @@ * * Example usage: * @code - * if (Input::IsKeyDown(EKey::A)) { + * if (Input::IsButtonDown(EButton::A)) { * // Handle A button press * } * @endcode @@ -52,7 +52,7 @@ * @note These key codes are specific to the NDS platform and rely on the * platform's key definitions. */ -enum EKey : u16 { +enum EButton : u16 { A = KEY_A, B = KEY_B, X = KEY_X, @@ -70,9 +70,9 @@ enum EKey : u16 { /** * @class Input - * @brief Provides static methods to handle input states for keys. + * @brief Provides static methods to handle input states for buttons. * - * The Input class is a utility class that allows querying the state of keys + * The Input class is a utility class that allows querying the state of buttons * (held, pressed, or released) using static methods. It is not meant to be * instantiated. */ @@ -81,46 +81,47 @@ public: /** * @brief Updates the internal state of the input system. * - * This method should be called periodically to refresh the key states. + * This method should be called periodically to refresh the button states. */ static void Update(); /** - * @brief Checks if a specific key is currently being held down. - * @param key The key to check. - * @return True if the key is held down, false otherwise. + * @brief Checks if a specific button is currently being held down. + * @param button The button to check. + * @return True if the button is held down, false otherwise. */ - static bool IsKeyHeld(EKey key); + static bool IsButtonHeld(EButton button); /** - * @brief Checks if a specific key was pressed in the current update cycle. - * @param key The key to check. - * @return True if the key was pressed, false otherwise. + * @brief Checks if a specific button was pressed in the current update cycle. + * @param button The button to check. + * @return True if the button was pressed, false otherwise. */ - static bool IsKeyDown(EKey key); + static bool IsButtonDown(EButton button); /** - * @brief Checks if a specific key was released in the current update cycle. - * @param key The key to check. - * @return True if the key was released, false otherwise. + * @brief Checks if a specific button was released in the current update + * cycle. + * @param button The button to check. + * @return True if the button was released, false otherwise. */ - static bool IsKeyUp(EKey key); + static bool IsButtonUp(EButton button); private: /** - * @brief Stores the state of keys currently being held down. + * @brief Stores the state of buttons currently being held down. */ - static u32 KeysHeldState; + static u32 ButtonsHeldState; /** - * @brief Stores the state of keys pressed in the current update cycle. + * @brief Stores the state of buttons pressed in the current update cycle. */ - static u32 KeysDownState; + static u32 ButtonsDownState; /** - * @brief Stores the state of keys released in the current update cycle. + * @brief Stores the state of buttons released in the current update cycle. */ - static u32 KeysUpState; + static u32 ButtonsUpState; /** * @brief Deleted constructor to prevent instantiation of the Input class. diff --git a/include/xrbds/resources/mesh.h b/include/xrbds/resources/mesh.h index 4d590ff..5f5c242 100644 --- a/include/xrbds/resources/mesh.h +++ b/include/xrbds/resources/mesh.h @@ -3,6 +3,7 @@ #include "resource.h" #include "core/types.h" +#include "resources/texture.h" #include @@ -15,19 +16,30 @@ struct FVertex { : position(pos), normal(norm), texCoords(tex) {} }; +struct FShape { + TVector vertices; +}; + class Mesh : public Resource { using Super = Resource; public: - static Mesh Load(const TVector> &vertices); + static Mesh Load(const TVector &shapes, + const TVector &materials, + const TVector> &textures); - TVector> getVertices() const { return vertices; } + const TVector &getShapes() const { return shapes; } + const TVector &getMaterials() const { return materials; } + const TVector> &getTextures() const { return textures; } private: - TVector> vertices; + TVector shapes; + TVector materials; + TVector> textures; Mesh() = default; - Mesh(const TVector> &vertices); + Mesh(const TVector &shapes, const TVector &materials, + const TVector> &textures); }; #endif // XRBDS_RESOURCES_MESH_H \ No newline at end of file diff --git a/include/xrbds/resources/texture.h b/include/xrbds/resources/texture.h new file mode 100644 index 0000000..af174e6 --- /dev/null +++ b/include/xrbds/resources/texture.h @@ -0,0 +1,46 @@ +#ifndef XRBDS_RESOURCES_TEXTURE_H +#define XRBDS_RESOURCES_TEXTURE_H + +#include "resource.h" +#include "core/types.h" + +/** + * @class Texture + * @brief Represents a texture resource that includes pixel data and a color + * palette. + * + * The Texture class is derived from the Resource class and provides + * functionality to load and manage texture data and its associated palette. It + * also provides access to the texture's unique identifier. + */ +class Texture : public Resource { + using Super = Resource; + +public: + virtual ~Texture(); + + /** + * @brief Loads a texture from the given pixel data and palette. + * + * @param data A reference to a vector containing the texture's pixel data. + * @param palette A reference to a vector containing the texture's color + * palette. + * @return A Texture object initialized with the provided data and palette. + */ + static Texture Load(TVector &data, + TVector &palette); + + /** + * @brief Retrieves the unique identifier of the texture. + * + * @return The unique identifier of the texture as an unsigned 8-bit integer. + */ + const u8 getId() { return id; } + +private: + Texture(TVector &data, TVector &palette); + + int id; +}; + +#endif // XRBDS_RESOURCES_TEXTURE_H \ No newline at end of file diff --git a/include/xrbds/utils/file.h b/include/xrbds/utils/file.h index 376115c..32da646 100644 --- a/include/xrbds/utils/file.h +++ b/include/xrbds/utils/file.h @@ -4,8 +4,14 @@ #include "core/types.h" #include "resources/mesh.h" +struct FObjData { + TVector> vertices; +}; + namespace Utils::File { +FString AssetPath(const FString &path); + /** * @brief Reads the contents of a text file and returns it as a string. * @@ -20,13 +26,38 @@ FString ReadTextFile(const FString &path); * vector of vertices. * * @param path The file path to the OBJ file as an FString. - * @return A TVector of TVector of FVertex, where each inner vector represents a - * group of vertices. + * @return A TVector of TVector of FVertex, where each inner vector represents + * a group of vertices. * * @note Ensure the file at the specified path exists and is in a valid OBJ * format. */ -TVector> ReadObjFile(const FString &path); +TTuple, TVector> ReadObjFile(const FString &path); + +/** + * @brief Reads a binary file and returns its contents as a TVector of type T. + * + * @tparam T The type of data to read from the binary file. + * @param path The file path to the binary file to be read. + * @return TVector A vector containing the contents of the binary file. + */ +template TVector ReadBinaryFile(const FString &path) { + FILE *file = fopen(AssetPath(path).c_str(), "rb"); + if (!file) { + // TODO: iprintf("Error abriendo: %s\n", path.c_str()); + return {}; + } + + fseek(file, 0, SEEK_END); + size_t size = ftell(file); + rewind(file); + + TVector buffer(size); + fread(buffer.data(), 1, size, file); + fclose(file); + + return buffer; +} } // namespace Utils::File diff --git a/samples/hello_world/assets/meshes/cube/cube-tex.obj b/samples/hello_world/assets/meshes/cube/cube-tex.obj new file mode 100644 index 0000000..44283ee --- /dev/null +++ b/samples/hello_world/assets/meshes/cube/cube-tex.obj @@ -0,0 +1,98 @@ +# cube-tex.obj +# Import into Blender with Y-forward, Z-up +# +# Vertices: Faces: +# f-------g +-------+ +# /. /| /. 5 /| 3 back +# / . / | / . / | +# e-------h | 2 +-------+ 1| +# | b . .|. c z right | . . .|. + +# | . | / | /y | . 4 | / +# |. |/ |/ |. |/ +# a-------d +---- x +-------+ +# 6 +# bottom + +# Material defined in separate file. +mtllib cube.mtl + +g cube + +# Vertices +v 0.0 0.0 0.0 # 1 a +v 0.0 1.0 0.0 # 2 b +v 1.0 1.0 0.0 # 3 c +v 1.0 0.0 0.0 # 4 d +v 0.0 0.0 1.0 # 5 e +v 0.0 1.0 1.0 # 6 f +v 1.0 1.0 1.0 # 7 g +v 1.0 0.0 1.0 # 8 h + +# Normal vectors +# One for each face. Shared by all vertices in that face. +vn 1.0 0.0 0.0 # 1 cghd +vn -1.0 0.0 0.0 # 2 aefb +vn 0.0 1.0 0.0 # 3 gcbf +vn 0.0 -1.0 0.0 # 4 dhea +vn 0.0 0.0 1.0 # 5 hgfe +vn 0.0 0.0 -1.0 # 6 cdab + +# Texture +# (u,v) coordinate into texture map image, ranging from 0.0 - 1.0. +# +---f---g---+---+ +# | | 5 | | | +# f---e---h---g---+ +# | 2 | 4 | 1 | | v +# b---a---d---c---+ | +# | | 6 | | | | +# +---b---c---+---+ +---- u +# | | 3 | | | +# +---f---g---+---+ +vt 0.25 1.00 # 1 f(5) = f for face 5 +vt 0.50 1.00 # 2 g(5) +vt 0 0.75 # 3 f(2) +vt 0.25 0.75 # 4 e(2,4,5) +vt 0.50 0.75 # 5 h(1,4,5) +vt 0.75 0.75 # 6 g(1) +vt 0 0.50 # 7 b(2) +vt 0.25 0.50 # 8 a(2,4,6) +vt 0.50 0.50 # 9 d(1,4,6) +vt 0.75 0.50 # 10 c(1) +vt 0.25 0.25 # 11 b(3,6) +vt 0.50 0.25 # 12 c(3,6) +vt 0.25 0 # 13 f(3) +vt 0.50 0 # 14 g(3) + +# Define material for the following faces +usemtl texture + +# Faces v/vt/vn +# 3-------2 +# | - | +# | # | Each face = 2 triangles (ccw) +# | - | = 1-2-3 + 1-3-4 +# 4-------1 + +# Face 1: cghd = cgh + chd +f 3/10/1 7/6/1 8/5/1 +f 3/10/1 8/5/1 4/9/1 + +# Face 2: aefb = aef + afb +f 1/8/2 5/4/2 6/3/2 +f 1/8/2 6/3/2 2/7/2 + +# Face 3: gcbf = gcb + gbf +f 7/14/3 3/12/3 2/11/3 +f 7/14/3 2/11/3 6/13/3 + +# Face 4: dhea = dhe + dea +f 4/9/4 8/5/4 5/4/4 +f 4/9/4 5/4/4 1/8/4 + +# Face 5: hgfe = hgf + hfe +f 8/5/5 7/2/5 6/1/5 +f 8/5/5 6/1/5 5/4/5 + +# Face 6: cdab = cda + cab +f 3/12/6 4/9/6 1/8/6 +f 3/12/6 1/8/6 2/11/6 diff --git a/samples/hello_world/assets/meshes/cube/cube.mtl b/samples/hello_world/assets/meshes/cube/cube.mtl new file mode 100644 index 0000000..dcd20c5 --- /dev/null +++ b/samples/hello_world/assets/meshes/cube/cube.mtl @@ -0,0 +1,7 @@ +newmtl texture +Ka 0.0 0.0 0.0 +Kd 0.5 0.5 0.5 +Ks 0.0 0.0 0.0 +Ns 10.0 +illum 2 +map_Kd texture.png diff --git a/samples/hello_world/assets/meshes/cube/texture.img.bin b/samples/hello_world/assets/meshes/cube/texture.img.bin new file mode 100644 index 0000000..06fa6ec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BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB \ No newline at end of file diff --git a/samples/hello_world/assets/meshes/cube/texture.png b/samples/hello_world/assets/meshes/cube/texture.png new file mode 100644 index 0000000..d7eb856 Binary files /dev/null and b/samples/hello_world/assets/meshes/cube/texture.png differ diff --git a/samples/hello_world/assets/meshes/mococo/ATTRIBUTION.txt b/samples/hello_world/assets/meshes/mococo/ATTRIBUTION.txt new file mode 100644 index 0000000..c954a8a --- /dev/null +++ b/samples/hello_world/assets/meshes/mococo/ATTRIBUTION.txt @@ -0,0 +1,6 @@ +Model: mococo.obj +Author: pyr0xene +License: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/) +Source: https://sketchfab.com/3d-models/mococo-2c53699f4fe647beb52a7926821f5d9c + +This model is used under the terms of the Creative Commons Attribution-NonCommercial license. diff --git a/samples/hello_world/assets/meshes/mococo/cube.obj b/samples/hello_world/assets/meshes/mococo/cube.obj deleted file mode 100644 index 8b0a83f..0000000 --- a/samples/hello_world/assets/meshes/mococo/cube.obj +++ /dev/null @@ -1,46 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: '' -# www.blender.org -mtllib cube.mtl -o Cube -v 1.000000 -1.000000 -1.000000 -v 1.000000 -1.000000 1.000000 -v -1.000000 -1.000000 1.000000 -v -1.000000 -1.000000 -1.000000 -v 1.000000 1.000000 -0.999999 -v 0.999999 1.000000 1.000001 -v -1.000000 1.000000 1.000000 -v -1.000000 1.000000 -1.000000 -vt 1.000000 0.333333 -vt 1.000000 0.666667 -vt 0.666667 0.666667 -vt 0.666667 0.333333 -vt 0.666667 0.000000 -vt 0.000000 0.333333 -vt 0.000000 0.000000 -vt 0.333333 0.000000 -vt 0.333333 1.000000 -vt 0.000000 1.000000 -vt 0.000000 0.666667 -vt 0.333333 0.333333 -vt 0.333333 0.666667 -vt 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 1.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn -0.000000 0.000000 1.000000 -vn -1.000000 -0.000000 -0.000000 -vn 0.000000 0.000000 -1.000000 -usemtl Material -s off -f 2/1/1 3/2/1 4/3/1 -f 8/1/2 7/4/2 6/5/2 -f 5/6/3 6/7/3 2/8/3 -f 6/8/4 7/5/4 3/4/4 -f 3/9/5 7/10/5 8/11/5 -f 1/12/6 4/13/6 8/11/6 -f 1/4/1 2/1/1 4/3/1 -f 5/14/2 8/1/2 6/5/2 -f 1/12/3 5/6/3 2/8/3 -f 2/12/4 6/8/4 3/4/4 -f 4/13/5 3/9/5 8/11/5 -f 5/6/6 1/12/6 8/11/6 diff --git a/samples/hello_world/assets/meshes/mococo/mococotexture_face1.img.bin b/samples/hello_world/assets/meshes/mococo/mococotexture_face1.img.bin new file mode 100644 index 0000000..6a3f41b --- /dev/null +++ b/samples/hello_world/assets/meshes/mococo/mococotexture_face1.img.bin @@ -0,0 +1,27 @@ +C"667764C62̤줞~~~~~EfefffffDDEEE{1Qҵk9B"d7ddC7ˤˤ~~~~~ɈfeeefeDDέkkkkjkRJJŬҌ0Q֔޴;C"ddd4ddcC6ˤʠ~~~~~ɜɜeefɜkRڵޔޔ޵11kSkt1kRkRk0Z9ŠIދrҬssҵ1ҋɔΌ1ҵsQҬdC"dccdddcC4ˤɠ~~~~ʠȜʠʜɜȜɜʜɜɜɜȜ렿Jssڵ9ZZZ9{9ZZڵkƤJz{9{{{|{9Z{9rڴ1ssάJB!dcCcdccc3Ɯ줩~~~~ɜɜɜɜȜɜɜꠧȜ꠿kŭ1R0Qֵs1sڴs1sڵsRִ9{sZZ1ɓR֓1Z1{ZZ{1{Δsڔ1ͬͭJB!ccCccccc4ɠ~~~~ ɜɠȜɜɜ ɠɠȜ jJjkŌ11RRRsstޔޔ޵޵޵Z9rͭk)1Ҕ{{ZZZsQ1ɭŌkkB!cdCBcCCC61ʠ~~~, +, , M N - -Jŭ1Rsssޔޔ޵޵9ZZ999sR͵޵9Z{ZZ999srRRR11ͭŌkJBcccBBCCC:3ʠ~~~On,o,M-M N-pN,o-O N NOj1RRsڔ޵޵Z{Zs9|{{Z{{{{Z޴ssR11ɮŭkj""CCCC"CCC[ť3ʠ~~ɑMNoopooooNN4ΐRsڔ޵91֞տѿT9{{ڔtu:ZZޔXѼ͞͞}ɝɝ}}}ɞͽͻѻ͛͜\<WŎd""CCCcB"CC\ŦTˤ~oչoսսNopvU2Rڔ2ֿ4ҵRSζڔt\uҖ:^ɟ͟͟^^===^^^^^=d""CCCCCB"C[Ŧɠ52줩~ɻѻњ͙͙>ڞ>ћ͙wxXXzͻRڵ޵ޔޔ޵2ٿ?ڿ<ޕ՟ѿ|ŕֶ=տџ͟]==^^ɟ?_^=Žd""BCBCCC"B[ǜ8Tʠ~ɝ~ΝΝΝνҝΝΝҽҾ֜|:;Z|ΝYVUSڵ޵ssR11ͭŌ?????ޞɶڶ;_[־;ڿտџ^ɟ^==>^_^^^=[d""CBCBBCB![ǜ6Uˤ||[ƞΞ|ξҾҾξҿ֞οֿ~\99:[|=_^=<<<]}}]]Ş_?͘Y_޵ɞџ^]===^^^^_~^^===d""CCBB"CB[ǜUV:[|ʝ|ʾֿҿ?~\9:9:ƿ=\=^=>^^^~ɟ͟Ϳտџ?޿\?__Ҿ?_]:85UVUTTSSs11ѲɕxY[^=d""CCB"""BZǜWU:[{}ΝΞʿ_ڿΞ;99Z1͕|<<=]==^^~ɟ_ޟ??џ~]ſ|?[|zvSڔޔ޵ޓsRRR1d"!CC""!"!"UUZ[|ʞΝΞ?_Ҟ}::99Zt4џ^>====]==]]]~~ɿ????џ]ޝ{9|||{[[:c""CB""!""TS99[ʜΝΝξ?__?ֿΞ[:988ƿҞΞΞΞΞ~οɞ===]^~ɞͿ?ٟ_?ֿ___???־ҽҽҝҝΝΝΝΝΝΞΝΞΞΞΞξҾҾҞοҿֿҾҝҞҿcC"CB""3389{ʝΞνҾ??ֿΞ|[989֞ΞξҿҿҞΞΞŽŽ||\<<=]~ɞͿ՟??_?ڽҽ||||}}}}ʞʝ}ʞʞʞΞΞξξξҿҿҿֿ־ҝ~ΞcB"CB!"22Y|ʞΞξҾ֞Ξ|Z9Ɲҝ~ʞοҾҿҿҞ}|\||\[[[[[[[[[[[[[Z[ʜΝҾΞҝΞҽ||}}ΝΝ}ʞ~ʞ~~~~ʞʞʞʞʞΞΞΞΞοξҞ~~}|cB"cB!ǜU29|ʞΞξҾھҞ|Z8|}}~~ΞΞΞ\{[[{{{{{{{[{{{{{{{{[|||}ʞ__ZZZ:[|}}ʝʞʞʞʞʞʞʞʞʞʞʞʞʞ~~ʞʞΞΞ~~}}{cCBcB"!ǜ\28Z|||ʾҾҾҾҾ־ΝZԽӽӽ?;\___?ڜֽ:[\\}~~~}~~~~~~~}}~~}}}}\}ZcCBcCBǜ}T998Y{|[Z{[||ʝξҾҝ{9ֹֹֹ::|ʾҽ{ֹֹֹ::::;[\\\\[[\}\\\\\;cBBdB"}}ɐӽXX7XYYXY788YZZ7ԽӹMRs2Z{{{{[R2Թչչֹ::::::cCBcCB"6}* +sRLm+ssȤC""""֞}\\[\\\\[[[Z8799:Z[\\Z{:ZչֹֹֹֹֽչֹֽcCBcdCB"""""";}9 +*ZZ +m*9d}}|\\\\\\[[Z:98799:Z[\{ZK{ӽԽӹydCCddcCBB""=9ddȠ lKǠǠǠǠBz~ǠȠǜǜǜǠǠǠǠƜǠǠȠǠǜǜ  dcBƜdCB"CC"Tdm +m {{Km+Ǡ"~~ƜǜǜƜǠǜȠǠȠȠȠȠҵ9_ſ ŭŭdBǜǠcBCC"""UDǠKǜǜǠ:ZȠ +l+ZǠǠc"~~Ǡǜ}}]]\[:97654TTVUU*ŭŭsڔdBǠCd3cCCc!"""UD +Ƞ:9 L +{cBB~~Ǡǜ~~}}\Z85434442322K?_?? ŭŭŭŭŭŭŭŭŭŭŭ1RddBdƜUCcd""#TD +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?޿ll_͝|9zʜ{{?:|ʛΛZҞ}~~<ξξҿҾҞ?ҝ־[Rփͨd ++騕ޕ慘ǠǠtڵdc"_⍹_ֿ͝9YXZ=>?>=:ŗ?ֹZ[Z}~~<__??_?|Rcͤe +*LlꦜǠ넔ǠǠC"_殽_ֿ͞996:~՟ݟ^\7X?ֽZ99W;\}};__BB__?֜ΔAͤǠ KTǠYǠ*8YǜC"_Ůڿ͞]^ѿ??ݞ98?·cB־ڽҵ!ΨǠ 3L{X*X蠦BD_ͯڿ͞д\ ݿ_ _=[?׹ֹֹ׹:!B??___߽ҵAǠ *ǠȠY *8zǠc"_ڿ͞д:s9:z9\:ϴ׹ֹֹֹ"?__ڼҵޤ褦 ++ + +Z***K"_ޟڞ͞Xϴдɝџ{{Z_;ϴ6?_?bȠ*KůL+KmmBɯ?Ҟδдɜ1Z*JZQ־дΰ???_?ބȠ +KKm{9列d?_ֿ͞ΰ:_{4){K4Z9ϴΰ|?ΰΰ__Ҿ??9楜!3Ƞ ++ům{9녔"B?ڿmѾΰδZִ͚9 )*ɍ ǠƜ8R|:ϴΰΰ_ѭΰѸ_;??:Ɯ4 +KK+Klm褆dd"!"_+KͿδΰΰΰдQsZ)Ǡ_ϴΰΰ8[9_??_?9Ơ!4 Ků +Llm+ǠdcB!"_*KδδдY͟s{{{9XXӼϴΰ9[_?ֹֹֹR!!"??!4e mK:dBC!_* +0δϴӼYխQֵ޴sڔ)R*sڔޔsŜ{ϴδд9__ֹֹֹֹֹ!!!_?_?ŜCeǠȠ +{9dB""!_Ƞ ӼXss1ZZZKƵtJ9ZRss1_ид__?ֹֹֹֹ!_?ŜdeȤȠ + +*{:{Ƞ{9dB"""_օRRZZZZ99ݿ9ZZs9Z{Q2R5Ҹдд_?ֹֹֹJ!___?xڤCde褍Ŏ +:ZKmȠZdC""""҆1QRZ޽ *sڜZZZ{Q11Ɍ6Ҹд_?ֹֹֹ!cB___?[u !Ue 4ίǠZ9 +Ƞ{류C""""]]}11Z8Z){Z01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]^=~~=}\θʸʸʘƘƘv55ҹv{{91kIIJ]<<<<==^~~^=^w˜wָθʘƘƘƘwUҘιwVZSs1͌JJI}<\<<}]]=^~~<ߺι>ֹʘ>ZָҸθΗƗƗʗvV׹wιָʹw˜Z101֌kJJJ\\\<]]~==^?ΘƘ=>{9ڷvڷҗΗwvv˜ҹvҘҹʹҹʸƹι׸v˜ss10ͭkj<<]<<^~~~~=^]^>>{֗ΖvvƹVƘƘVΗUΘwƹʹVVZ9RRڔRͭŬ}]<}}~~}=]Ϳ>?]<\Z99֗ΖVvUvvv˜ƗVΘUv¸wVw{9[ZޔRsڵ1}}<ߞѾ=ן޺κ\}\\{Z{Z9ڷ5w˜w5ƹVUƸv˜:99RR1RڔRRs޵ssR}<=?^ڟں<<<\{{Z9wUwVV˜Ҹʸ[:991RRRsssRR1<}ڞ}\]=~]}{{Z99޶UwU{[11RRRRR1}}<]Ҝ{]\~\;{{{Z99v5V;1RR11ֽ|Z:=}<<\_11}}<Ҝ{Z]}]?_??_?__?]}ξֽ|[:ֹֹ<=]~~????_?:ƞ\<ߞ֝{Z:ֹֹ׹ιҿ]۾??_?_:[{|ص]]<־|[:ֹֹֹֹҹ]<߹<?_??:[|ʝξȘ?ҿҿҿҿ?_ʟ]֝|[9׹ֹҹι۹ʹʹ_????:{ʜνȘ?__??ҿҿҿ_ڟ__:Z9]־ҝ{::::ҹιʹʹ___??_Z|ʜ?___??__:::\־|[99::::Zιʹdd???_?[|?˘եե +__:99}?ҝ{:::::::Z5}dddd_?_?:|ӵ_ɘե ުkr2??褹Z9ֽ|[::::::5555<ιddddd__??:ұ?ɘ i0_??????_?_ι9ҝ{ZZZ:ƽҽ555555Uw]<]焔dddd___?׹?Ș I0______?vw7׹[{ʜνҽҜ[[ƜΜ5555555v˜҅dCdd___??׹ֹ9½?ɘզ gR1?VVV8|[[{ʜνҽҽҽҽҽҽҽνҝ|{5555555UVwdǠ蠦Cdd?___׹׹9½ڕ̘զ _ΘvVV7Z[|ΜΜΝΝΝΜΝνҽΝ[5555555555w˜Ƙƹ<dǠǠȠǠCddֹZƝνҔT>֝ιʘwV69Z[{|||Ν>:65555555UVVwww˜Ƙ<_?_663ҖTl ǠCdd9s9Rsڵ9r{ޔ[Z99[ʝξ?_ޟ?[v¸ʗww˜VUVw—ƘƗvwƜ_֞?ѽ[85d͔ޓʹ9RsZ1RRR1ޔ޴ޔ__?}}}]\<\ǠǠddd}]} \ No newline at end of file diff --git a/samples/hello_world/assets/meshes/mococo/mococotexture_face1.png b/samples/hello_world/assets/meshes/mococo/mococotexture_face1.png new file mode 100644 index 0000000..a518553 Binary files /dev/null and b/samples/hello_world/assets/meshes/mococo/mococotexture_face1.png differ diff --git a/samples/hello_world/assets/meshes/mococo/textures/mococotexture_face1.png b/samples/hello_world/assets/meshes/mococo/textures/mococotexture_face1.png deleted file mode 100644 index b83055d..0000000 Binary files a/samples/hello_world/assets/meshes/mococo/textures/mococotexture_face1.png and /dev/null differ diff --git a/samples/hello_world/assets/meshes/quad/quad.mtl b/samples/hello_world/assets/meshes/quad/quad.mtl new file mode 100644 index 0000000..dcd20c5 --- /dev/null +++ b/samples/hello_world/assets/meshes/quad/quad.mtl @@ -0,0 +1,7 @@ +newmtl texture +Ka 0.0 0.0 0.0 +Kd 0.5 0.5 0.5 +Ks 0.0 0.0 0.0 +Ns 10.0 +illum 2 +map_Kd texture.png diff --git a/samples/hello_world/assets/meshes/quad/quad.obj b/samples/hello_world/assets/meshes/quad/quad.obj new file mode 100644 index 0000000..3e35ab4 --- /dev/null +++ b/samples/hello_world/assets/meshes/quad/quad.obj @@ -0,0 +1,15 @@ +# Blender v2.57 (sub 0) OBJ File: '' +# www.blender.org +mtllib quad.mtl +o Cube_Cube.001 +v -1.000000 1.000000 0.000000 +v 1.000000 1.000000 0.000000 +v -1.000000 -1.000000 0.000000 +v 1.000000 -1.000000 0.000000 +vt 1.000000 1.000000 +vt 0.000000 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +s off +f 4/4 3/3 1/2 +f 2/1 4/4 1/2 diff --git a/samples/hello_world/assets/meshes/quad/texture.img.bin b/samples/hello_world/assets/meshes/quad/texture.img.bin new file mode 100644 index 0000000..b29fa9c Binary files /dev/null and b/samples/hello_world/assets/meshes/quad/texture.img.bin differ diff --git a/samples/hello_world/assets/meshes/quad/texture.png b/samples/hello_world/assets/meshes/quad/texture.png new file mode 100644 index 0000000..e26ad67 Binary files /dev/null and b/samples/hello_world/assets/meshes/quad/texture.png differ