SFML community forums

Help => Graphics => Topic started by: ronag on September 20, 2010, 09:54:01 pm

Title: OpenGL with no or hidden window
Post by: ronag on September 20, 2010, 09:54:01 pm
I'm using SMFL to do some gpgpu computing... which doesnt require a window however a ogl context is still needed.

In what ways can I run OpenGL SFML with no or someway hidden window?
Title: OpenGL with no or hidden window
Post by: Laurent on September 20, 2010, 10:07:53 pm
With SFML there's always an OpenGL context activated in the main thread, you don't have to do anything.
Title: OpenGL with no or hidden window
Post by: ronag on September 20, 2010, 10:38:34 pm
And if the main is unavailable... how do I add an ogl context to a new thread without creating a window?
Title: OpenGL with no or hidden window
Post by: Laurent on September 20, 2010, 11:47:02 pm
Code: [Select]
sf::Context context;
Title: OpenGL with no or hidden window
Post by: ronag on September 21, 2010, 12:33:09 am
Thanks. Almost there.

One last problem. How do I swap buffers using the context? It seems to create a dummy window in the background. However it is a private member and I cannot call Display on it.
Title: OpenGL with no or hidden window
Post by: ronag on September 21, 2010, 12:46:00 am
EDIT: Solved, I'm just overthinking things.

Thanks for the help.