1
Graphics / SFML Failed to open vertex shader
« on: October 26, 2020, 01:32:30 pm »
Hey, I am using a book SFML Game Development and I also use the code included inside.When I try to open the game, menu loads okay but when I try to open new game I get an error SFML Failed to open vertex shader.
I created text files in Media/Shaders folder Fullpass.vert
I tried to load file from full path c:/ but I also get the same error. All other resources load well, music,graphic etc. Do you see any solutions?
BloomEffect::BloomEffect()
: mShaders()
, mBrightnessTexture()
, mFirstPassTextures()
, mSecondPassTextures()
{
mShaders.load(Shaders::BrightnessPass, "Media/Shaders/Fullpass.vert", "Media/Shaders/Brightness.frag");
mShaders.load(Shaders::DownSamplePass, "Media/Shaders/Fullpass.vert", "Media/Shaders/DownSample.frag");
mShaders.load(Shaders::GaussianBlurPass, "Media/Shaders/Fullpass.vert", "Media/Shaders/GuassianBlur.frag");
mShaders.load(Shaders::AddPass, "Media/Shaders/Fullpass.vert", "Media/Shaders/Add.frag");
}
: mShaders()
, mBrightnessTexture()
, mFirstPassTextures()
, mSecondPassTextures()
{
mShaders.load(Shaders::BrightnessPass, "Media/Shaders/Fullpass.vert", "Media/Shaders/Brightness.frag");
mShaders.load(Shaders::DownSamplePass, "Media/Shaders/Fullpass.vert", "Media/Shaders/DownSample.frag");
mShaders.load(Shaders::GaussianBlurPass, "Media/Shaders/Fullpass.vert", "Media/Shaders/GuassianBlur.frag");
mShaders.load(Shaders::AddPass, "Media/Shaders/Fullpass.vert", "Media/Shaders/Add.frag");
}
I created text files in Media/Shaders folder Fullpass.vert
void main()
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_TexCoord[0] = gl_MultiTexCoord0;
}
{
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
gl_TexCoord[0] = gl_MultiTexCoord0;
}
I tried to load file from full path c:/ but I also get the same error. All other resources load well, music,graphic etc. Do you see any solutions?