-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloaders.h
36 lines (25 loc) · 959 Bytes
/
loaders.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
This file is part of OpenGL-StarterPack (GLSP), an open source OpenGL based framework
that facilitates and speeds up demo and project creation by offering an abstraction to
the basic objects of OpenGL as well as incluing the necessary libraries.
MIT License
Copyright (c) 2024 Antonio Espinosa Garcia
*/
#ifndef __LOADERS__
#define __LOADERS__
#include <unordered_map>
#include <algorithm>
#include <tiny_obj_loader.h>
#include <tinyply.h>
#include <stb_image.h>
#include <GLSP/mesh.h>
#include <GLSP/utils.h>
GLSP_NAMESPACE_BEGIN
namespace loaders
{
void load_OBJ(Mesh *const mesh, const char *fileName, bool importMaterials = false, bool calculateTangents = false);
void load_PLY(Mesh *const mesh, const char *fileName, bool preload = true, bool verbose = false, bool calculateTangents = false);
void load_image(Texture *const texture, const char *fileName, bool isPanorama = false);
}
GLSP_NAMESPACE_END
#endif