Created a basic shader object and window object
Using GLAD to load OpenGL/Vulkan extensions
This commit is contained in:
		
							
								
								
									
										13
									
								
								MyGraphicsEngine/include/MyGraphicsEngine/Camera.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								MyGraphicsEngine/include/MyGraphicsEngine/Camera.h
									
									
									
									
									
										Normal 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;
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
@ -1,9 +0,0 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
#include <spdlog/spdlog.h>
 | 
			
		||||
#include "MyGraphicsEngine/window.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
inline void test (){
 | 
			
		||||
    spdlog::info("Linked correctly!");
 | 
			
		||||
    
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										18
									
								
								MyGraphicsEngine/include/MyGraphicsEngine/Shader.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								MyGraphicsEngine/include/MyGraphicsEngine/Shader.h
									
									
									
									
									
										Normal 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();
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
		Reference in New Issue
	
	Block a user