charcoal/OpenGLEngine/MySimpleShaderProgram.cpp
Elipzer 90bac19849 3D Cube
Finally got a 3D cube to be rendered. While doing it, fixed a
bug in MeshFactory that caused it to allocate the incorrect amount
of memory for each mesh.
2018-09-11 16:49:34 -04:00

14 lines
368 B
C++

#include "MySimpleShaderProgram.h"
#include "Util.h"
MySimpleShaderProgram::MySimpleShaderProgram()
: ShaderProgram(),
m_vertex_shader(Util::load_file(SHADER_PATH "MySimpleVS.glsl"), VERTEX_SHADER),
m_fragment_shader(Util::load_file(SHADER_PATH "MySimpleFS.glsl"), FRAGMENT_SHADER)
{
attach_shader(m_vertex_shader);
attach_shader(m_fragment_shader);
link();
}