Added Gorrilla-Audio and Tinygltf Library
Started laying out a assetManager / ModelImporter
This commit is contained in:
22
MyGraphicsEngine/include/AssetManager/ModelImporter.h
Normal file
22
MyGraphicsEngine/include/AssetManager/ModelImporter.h
Normal file
@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#define TINYGLTF_NO_EXTERNAL_IMAGE
|
||||
|
||||
#include <tiny_gltf.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <string>
|
||||
|
||||
class ModelImporter {
|
||||
private:
|
||||
void ImportFBX(std::string path);
|
||||
void ImportBlend(std::string path);
|
||||
void ImportGLTF(std::string path);
|
||||
void ImportOBJ(std::string path);
|
||||
|
||||
public:
|
||||
void Import(std::string path);
|
||||
|
||||
static void Test();
|
||||
};
|
@ -1,13 +1,22 @@
|
||||
#pragma once
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
|
||||
class Camera {
|
||||
public:
|
||||
glm::vec3 Position;
|
||||
glm::vec3 Rotation;
|
||||
float Zoom;
|
||||
|
||||
Camera(glm::vec3 position, glm::vec3 rotation, float zoom );
|
||||
~Camera();
|
||||
|
||||
glm::mat4 GetViewMatrix();
|
||||
|
||||
|
||||
struct Camera {
|
||||
glm::vec3 Position;
|
||||
glm::mat4 ViewMat;
|
||||
float Zoom;
|
||||
private:
|
||||
glm::vec3 Front;
|
||||
glm::vec3 Right;
|
||||
glm::vec3 Up;
|
||||
glm::vec3 Front;
|
||||
glm::vec3 Right;
|
||||
glm::vec3 Up;
|
||||
|
||||
};
|
@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
class Mesh {
|
||||
public:
|
||||
std::vector<float> vertices;
|
||||
std::vector<int> elements;
|
||||
std::vector<float> uv;
|
||||
|
||||
std::vector<glm::vec3> vertices;
|
||||
std::vector<GLushort> elements;
|
||||
std::vector<glm::vec2> uv;
|
||||
};
|
@ -4,15 +4,23 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
|
||||
class Shader {
|
||||
private:
|
||||
int id;
|
||||
const size_t CHUNK_SIZE = 10;
|
||||
char* readFile (const char* filePath);
|
||||
public:
|
||||
Shader(const std::string vertexShaderPath, const std::string fragmentShaderPath);
|
||||
void Use();
|
||||
void setUniformMat4(std::string uniformName, glm::mat4 matrix4);
|
||||
void setUniformVec4(std::string uniformName, glm::vec4 vector4);
|
||||
void setUniformVec3(std::string uniformName, glm::vec3 vector3);
|
||||
void setUniformVec2(std::string uniformName, glm::vec2 vector2);
|
||||
void setUniformFloat(std::string uniformName, float value);
|
||||
void setUniformInt(std::string uniformName, int value);
|
||||
|
||||
|
||||
};
|
Reference in New Issue
Block a user