Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML Failed to open vertex shader  (Read 1463 times)

0 Members and 1 Guest are viewing this topic.

Xarcane

  • Newbie
  • *
  • Posts: 1
    • View Profile
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.

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");
}

I created text files in Media/Shaders folder Fullpass.vert

void main()
{
    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?