void Shader::SendVector2(const std::string &pVarName, const Vector2F &pVector){ float toSend[2]; pVector.XY(toSend); glUniform2fv(glGetUniformLocation(mProgram, pVarName.c_str()), 1, toSend); #ifdef _DEBUG GLenum error = GL_NO_ERROR; if((error = glGetError()) != GL_NO_ERROR){ throw Exception(String("OpenGL Error: \"")+GetGLErrorStr(error)+"\" in function \"SendVector2\"\n\tDoes \""+pVarName+"\" exists or has the right type?"); } #endif }