0
\$\begingroup\$

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

\$\endgroup\$
  • \$\begingroup\$ Have you tried Window::setVisible(false)? \$\endgroup\$ – bcrist Feb 14 '15 at 3:57
  • \$\begingroup\$ Normally (with glfw for instance) you would make the window hidden by default and then grab the opengl context before showing the window \$\endgroup\$ – Daniel Carlsson Feb 14 '15 at 11:58
1
\$\begingroup\$
sf::Context context;

creates a valid OpenGL context.

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

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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