diff --git a/test/test.cpp b/test/test.cpp index 712366f..e36fc6f 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -10,10 +10,6 @@ using namespace std; shared_ptr array1; shared_ptr array2; -shared_ptr vs; -shared_ptr vs2; -shared_ptr fs; -shared_ptr fs2; shared_ptr program; shared_ptr program2; shared_ptr buffer; @@ -28,13 +24,16 @@ bool init(void) array1 = make_shared(); array2 = make_shared(); - vs = glcxx::Shader::create_from_file(GL_VERTEX_SHADER, "test/vert.glsl"); - fs = glcxx::Shader::create_from_file(GL_FRAGMENT_SHADER, "test/frag.glsl"); - program = glcxx::Program::create(vs, fs, "position", 0); + program = glcxx::Program::create( + glcxx::Shader::create_from_file(GL_VERTEX_SHADER, "test/vert.glsl"), + glcxx::Shader::create_from_file(GL_FRAGMENT_SHADER, "test/frag.glsl"), + "position", 0); - vs2 = glcxx::Shader::create_from_file(GL_VERTEX_SHADER, "test/vert2.glsl"); - fs2 = glcxx::Shader::create_from_file(GL_FRAGMENT_SHADER, "test/frag2.glsl"); - program2 = glcxx::Program::create(vs2, fs2, "position", 0, "color", 1); + program2 = glcxx::Program::create( + glcxx::Shader::create_from_file(GL_VERTEX_SHADER, "test/vert2.glsl"), + glcxx::Shader::create_from_file(GL_FRAGMENT_SHADER, "test/frag2.glsl"), + "position", 0, + "color", 1); GLfloat coords[] = { -0.5, -0.5,