SFML community forums

Help => Graphics => Topic started by: DCurro on May 05, 2014, 12:53:33 am

Title: sf::Shader::isAvailable() breaks asset use
Post by: DCurro on May 05, 2014, 12:53:33 am
I have not done anything with shaders yet.  I merely call
sf::Shader::isAvailable()

If I remove/don't use the call, everything looks like this:
https://www.dropbox.com/s/qgctd6fkg8uz8ru/normal.png

If I use the call, everything looks like this:
https://www.dropbox.com/s/femb2d20mf4y0o7/broken.png

Remember, I am only using any sf::Shader stuff once, and it's with the sf::Shader::IsAvailable().

Using OSX, Intel i7 all the ram in the world, with the best graphics card that comes with a new Macbook pro.
Title: Re: sf::Shader::isAvailable() breaks asset use
Post by: DCurro on May 05, 2014, 07:23:26 am
I moved the query after the RenderWindow was created and it solved the problem.  I suspected that this call might have required a GLContext to have been setup.

Thanks anyways!  Hopefully this helps anyone else who has had this problem.
Title: Re: sf::Shader::isAvailable() breaks asset use
Post by: Laurent on May 05, 2014, 07:48:14 am
It does create a context if there's none. Can you please provide a complete and minimal code that reproduces the problem?