Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
[SOLVED] How to share a texture made in SFML with an external OpenGL context?
Print
Pages: [
1
]
Author
Topic: [SOLVED] How to share a texture made in SFML with an external OpenGL context? (Read 1417 times)
0 Members and 1 Guest are viewing this topic.
tbop
Newbie
Posts: 34
[SOLVED] How to share a texture made in SFML with an external OpenGL context?
«
on:
June 27, 2013, 05:16:07 pm »
Hi,
I have a question regarding sharing lists (in our case just textures) with an external (not sfml) OpenGL context (rendered via a sf::RenderTexture):
Is there a proper way to share the lists with an external context?
Or do we have to get the buffer from the texture and upload it a texture of the external context and so on... But it could lead to performance issues so I'm trying to find out whether it's possible (perhaps we have to alter SFML's source code?)
Cheers!
«
Last Edit: June 28, 2013, 03:32:34 pm by tbop
»
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: How to share a texture made in SFML with an external OpenGL context?
«
Reply #1 on:
June 27, 2013, 07:33:27 pm »
Get the SFML context with wglGetCurrentContext (or equivalent according to your OS), and then you can share your external context with it easily. Note that you can get any SFML context, since they are all shared internally.
Logged
Laurent Gomila - SFML developer
tbop
Newbie
Posts: 34
Re: How to share a texture made in SFML with an external OpenGL context?
«
Reply #2 on:
June 28, 2013, 03:32:24 pm »
Ok that was pretty simple after all, cheers.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
[SOLVED] How to share a texture made in SFML with an external OpenGL context?
anything