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.

Topics - Aire

Pages: [1]
I was trying to get this so I can pass them to openxr which needs to know about these handles.

I saw 2 ways of doing this and expected both ways to give me the same address but they don't so I'm a bit confused by this and I'm not sure what I'm missing here.

1st way is to just use wglGetCurrentDC() and wglGetCurrentContext(). I figured this would be fine since all of this is done on the main thread during initialization anyway but I wanted to be sure that I was grabbing the context of the window generated by SFML.

So I started to see if I could do it this way (2nd way)
sf::RenderWindow window(...);
auto win_handle  = window.getSystemHandle();
auto win_context = GetDC(win_handle ); // the hDC address I get back from doing this does not match the address I get back from wglGetDeviceContext

// Im not really sure how to get to the hGLRC since it is private.


Is there a way to get both the hDC and hGLRC from SFML, even it's like what I'm trying to do in the code part?

Pages: [1]