Externalized ImGUI compilation and fixed white screen issue
This commit is contained in:
@ -54,7 +54,7 @@ std::vector<BarinkEngine::Mesh> ModelImporter::Test() {
|
||||
//spdlog::info("======= Assimp ======");
|
||||
|
||||
Assimp::Importer importer;
|
||||
const aiScene* scene = importer.ReadFile("build/SandboxApplication/Debug/Cube.obj", aiProcess_Triangulate | aiProcess_FlipUVs);
|
||||
const aiScene* scene = importer.ReadFile("build/SandboxApplication/Debug/Models/Cube.obj", aiProcess_Triangulate | aiProcess_FlipUVs);
|
||||
|
||||
aiNode* currentNode = scene->mRootNode;
|
||||
|
||||
|
@ -30,7 +30,7 @@ Renderable::Renderable()
|
||||
|
||||
VAO.AttachAttribute(0, 3, sizeof(BarinkEngine::Vertex));
|
||||
|
||||
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(BarinkEngine::Vertex),(void*) offsetof(BarinkEngine::Vertex, vertices));
|
||||
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(BarinkEngine::Vertex),(void* )offsetof(BarinkEngine::Vertex, vertices));
|
||||
glEnableVertexAttribArray(1);
|
||||
|
||||
vertexBuffer.Unbind(false);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "Graphics/Shader.h"
|
||||
|
||||
#include "spdlog/spdlog.h"
|
||||
Shader::Shader(const std::string vertexShaderPath, const std::string fragmentShaderPath)
|
||||
{
|
||||
char infoLog[512];
|
||||
@ -15,7 +15,7 @@ Shader::Shader(const std::string vertexShaderPath, const std::string fragmentSha
|
||||
glGetShaderiv(vertId, GL_COMPILE_STATUS, &succes);
|
||||
if(!succes){
|
||||
glGetShaderInfoLog(vertId, 512, NULL, infoLog);
|
||||
//spdlog::error( "Vertex shader has compile error {}", infoLog);
|
||||
spdlog::error( "Vertex shader has compile error {}", infoLog);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ Shader::Shader(const std::string vertexShaderPath, const std::string fragmentSha
|
||||
glGetShaderiv(fragId, GL_COMPILE_STATUS, &succes);
|
||||
if(!succes){
|
||||
glGetShaderInfoLog(fragId, 512, NULL, infoLog);
|
||||
//spdlog::error("Fragment shader has compile error {}", infoLog);
|
||||
spdlog::error("Fragment shader has compile error {}", infoLog);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ char* Shader::readFile (const char* filePath){
|
||||
file.open(filePath);
|
||||
|
||||
if(file.is_open() == false){
|
||||
//spdlog::info("File not found.");
|
||||
spdlog::info("File not found.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
#version 440 core
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
uniform vec3 Color;
|
||||
|
||||
in vec2 TexCoord;
|
||||
|
||||
uniform sampler2D Texture;
|
||||
|
||||
|
||||
void main(){
|
||||
FragColor = mix ( texture(Texture, TexCoord), vec4(Color, 1.0f));
|
||||
FragColor = mix ( texture(Texture, TexCoord), vec4(Color, 1.0f), 0.5f);
|
||||
}
|
Reference in New Issue
Block a user