Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
OpenGL with no or hidden window
Print
Pages: [
1
]
Author
Topic: OpenGL with no or hidden window (Read 3922 times)
0 Members and 2 Guests are viewing this topic.
ronag
Newbie
Posts: 24
OpenGL with no or hidden window
«
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?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
OpenGL with no or hidden window
«
Reply #1 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.
Logged
Laurent Gomila - SFML developer
ronag
Newbie
Posts: 24
OpenGL with no or hidden window
«
Reply #2 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?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
OpenGL with no or hidden window
«
Reply #3 on:
September 20, 2010, 11:47:02 pm »
Code:
[Select]
sf::Context context;
Logged
Laurent Gomila - SFML developer
ronag
Newbie
Posts: 24
OpenGL with no or hidden window
«
Reply #4 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.
Logged
ronag
Newbie
Posts: 24
OpenGL with no or hidden window
«
Reply #5 on:
September 21, 2010, 12:46:00 am »
EDIT: Solved, I'm just overthinking things.
Thanks for the help.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
OpenGL with no or hidden window