Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
sf::Shader::isAvailable() breaks asset use
Print
Pages: [
1
]
Author
Topic: sf::Shader::isAvailable() breaks asset use (Read 1089 times)
0 Members and 1 Guest are viewing this topic.
DCurro
Newbie
Posts: 5
sf::Shader::isAvailable() breaks asset use
«
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.
«
Last Edit: May 05, 2014, 01:04:36 am by DCurro
»
Logged
DCurro
Newbie
Posts: 5
Re: sf::Shader::isAvailable() breaks asset use
«
Reply #1 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.
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: sf::Shader::isAvailable() breaks asset use
«
Reply #2 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?
Logged
Laurent Gomila - SFML developer
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
sf::Shader::isAvailable() breaks asset use
anything