From fa58befffe0c0520f50cf9414c3de9949d8c0eed Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Wed, 8 Jul 2020 00:22:44 -0300 Subject: Code fixes to compile in MinGW and MSVC CMakeLists includes --- Project/Shader.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Project/Shader.cpp') diff --git a/Project/Shader.cpp b/Project/Shader.cpp index 7835fec..10751e2 100644 --- a/Project/Shader.cpp +++ b/Project/Shader.cpp @@ -72,8 +72,12 @@ ShaderSource Shader::ParseShader(const wxString& filepath) const ss[static_cast(type)] << line + std::string("\n"); } } + + ShaderSource source; + source.vertexShader = ss[0].str(); + source.fragmentShader = ss[1].str(); - return { ss[0].str(), ss[1].str() }; + return source; } unsigned int Shader::CreateShader(std::string& vertexShader, std::string& fragmentShader) const @@ -131,7 +135,7 @@ unsigned int Shader::GetUniformLocation(const std::string& name) GLCall(int location = glGetUniformLocation(m_rendererID, name.c_str())); if (location == -1) { - wxMessageBox(wxString::Format("Atenção! uniform \"%s\" não encontrado", name)); + wxMessageBox(wxString::Format("Atenção! uniform \"%s\" não encontrado", name)); } m_uniformLocationCache[name] = location; -- cgit