source/Graphics/Shader.cpp: minor fix.
This commit is contained in:
parent
f3a3a6aa4d
commit
87a59ef21f
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue