1
0
Fork 0

source/Graphics/Shader.cpp: minor fix.

This commit is contained in:
Henrik Hautakoski 2019-05-31 20:19:00 +02:00
parent f3a3a6aa4d
commit 87a59ef21f

View file

@ -4,7 +4,7 @@
#include <Spectre/Graphics/OpenGL.h>
#include <Spectre/Graphics/Shader.h>
Shader::Shader(Type type, const std::string& name) :
Shader::Shader(Type type, const std::string& name) :
m_name (name)
{
GLenum internal_type = type == Vertex ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER;
@ -57,7 +57,7 @@ bool Shader::loadFromMemory(const std::string& source)
const char *s = source.c_str();
glShaderSource(m_handle, 1, &s, NULL);
return compile();
}
@ -92,7 +92,7 @@ bool Shader::compile()
std::string Shader::fetchErrorLog()
{
GLchar buf[4096] = { '\0 ' };
GLchar buf[4096] = { '\0' };
glGetShaderInfoLog(m_handle, sizeof(buf), NULL, buf);