Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to create an OpenGL context to initialize some assets before actually showing the window with SFML. How can I do this?

share|improve this question
    
Have you tried Window::setVisible(false)? –  bcrist Feb 14 at 3:57
    
Normally (with glfw for instance) you would make the window hidden by default and then grab the opengl context before showing the window –  Daniel Carlsson Feb 14 at 11:58

1 Answer 1

up vote 1 down vote accepted
sf::Context context;

creates a valid OpenGL context.

You can find more info in the official tutorial or the documentation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.