Created a basic shader object and window object

Using GLAD to load OpenGL/Vulkan extensions
This commit is contained in:
2022-04-22 22:37:38 +02:00
parent dab01f1541
commit 168b936945
10 changed files with 171 additions and 23 deletions

View File

@ -0,0 +1,13 @@
#pragma once
#include <glm/glm.hpp>
struct Camera {
glm::vec3 Position;
glm::mat4 ViewMat;
float Zoom;
private:
glm::vec3 Front;
glm::vec3 Right;
glm::vec3 Up;
};

View File

@ -1,9 +0,0 @@
#pragma once
#include <spdlog/spdlog.h>
#include "MyGraphicsEngine/window.h"
inline void test (){
spdlog::info("Linked correctly!");
}

View File

@ -0,0 +1,18 @@
#pragma once
#include <glad/glad.h>
#include <string>
#include <iostream>
#include <fstream>
#include <spdlog/spdlog.h>
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();
};