Skip to content

Commit 9dbe170

Browse files
committed
fix for macos and linux
fix for macos and linux
1 parent 01e0943 commit 9dbe170

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Tutorial4_Shaders/OGL3D/source/OGL3D/Graphics/OShaderProgram.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SOFTWARE.*/
2828
#include <sstream>
2929
#include <string>
3030
#include <vector>
31+
#include <filesystem>
3132

3233
OShaderProgram::OShaderProgram(const OShaderProgramDesc& desc)
3334
{
@@ -55,7 +56,10 @@ ui32 OShaderProgram::getId()
5556
void OShaderProgram::attach(const wchar_t* shaderFilePath, const OShaderType& type)
5657
{
5758
std::string shaderCode;
58-
std::ifstream shaderStream(shaderFilePath);
59+
60+
auto path = std::filesystem::path(shaderFilePath);
61+
62+
std::ifstream shaderStream(path);
5963
if (shaderStream.is_open())
6064
{
6165
std::stringstream sstr;

0 commit comments

Comments
 (0)