Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sudgy

Pages: [1]
1
Graphics / Re: Drawing onto an externally-created context
« on: June 10, 2019, 04:27:09 pm »
In case anybody's wondering, I did find a way to work this out.  I drew onto a RenderTexture, copied those pixels to a texture in the external context, and did a bit of raw opengl just to draw a single texture.  It's probably not the most efficient due to the extra copying through memory, but it works for my case.

2
Graphics / Re: Drawing onto an externally-created context
« on: November 07, 2018, 11:00:15 pm »
I don't see any way to get the native window handle in my GUI library (although I'm not too familiar with it at the moment and I could be missing something).  I see a way to make the window's context current, and then one thing that "returns an integer handle to the underlying OpenGL context" (it says on linux it's the result of glXCreateContext and on windows it's the result of wglCreateContext).  I'm sure I could get the native handle from those somehow (I only need to support linux and windows), but is there any way to tell SFML to just draw to the current context?  If not, I'll find some way to get the handle, but it would be nice if there was a simpler way.

3
Graphics / Drawing onto an externally-created context
« on: November 07, 2018, 07:53:56 pm »
Hello,

I have some graphics code that draws by inheriting sf::Drawable, does a bunch of complicated stuff to draw, etc.  Now, I want to use this same drawing code in a different application.  The issue is that this different application is using a GUI library that creates the OpenGL context for you.  As far as I can tell, the only thing that I can get from this GUI library is the context itself.  Is there any way I can tell SFML to draw to this context?  It seems like SFML's classes must draw onto a RenderTarget, and I can't find a way to tell it to draw to my context.  Is there any way to do this?

Pages: [1]