loadTextFile function:
std::string ResourceManager::loadTextFile(const std::string& path)
{
std::ifstream file(path);
if(!file.good())
{
OutputDebugStringA("File not found");
return nullptr;
}
std::stringstream stream ;
stream << file.rdbuf();
file.close();
return stream.str();
}
i cant use cout, becuase i dont have console, but OutputDebugStringA on each of them gives this:
#version 400
in vec3 vector_position;
void main()
{
gl_Position = vec4(vector_position, 1.0f);
}#version 400
out vec4 color;
void main()
{
color = vec4(1.0f, 0.0f, 0.0f, 1.0f);
}
last line dont have '\n', thats why they looked merged
EDIT:
changing to multibyte, didnt do anything