1
Graphics / Rephrase : how to copy MFC CDC (or Win DC) fo RenderWindow ?
« on: March 10, 2010, 09:21:02 pm »
Just subj, trying to use current DC as background sprite but have no idea how to do it properly and effectively
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.
sf::WindowSettings st;
st.AntialiasingLevel = 8; // Make smooth drawing
delete(m_pSfmlView);
m_pSfmlView = new sf::RenderWindow(GetSafeHwnd(), st);
void WindowImplWin32::CreateContext(const VideoMode& Mode, WindowSettings& Params)
{
...
bool IsValid = wglChoosePixelFormatARB(myDeviceContext, IntAttributes, FloatAttributes, sizeof(Formats) / sizeof(*Formats), Formats, &NbFormats) != 0;
..
}
// Get the wglChoosePixelFormatARB function (it is an extension)
PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = reinterpret_cast<PFNWGLCHOOSEPIXELFORMATARBPROC>(wglGetProcAddress("wglChoosePixelFormatARB"));