Windows Programming RC (rendering context)

This is a windows OpenGL programmin issue.

We noticed a serious memory leak whenever a new RC (rendering context)is created in our application. Is it bad or OK to use a single RC for more than one thread inside an application? We’ve tried this and it appears to work, but can’t find any documentation regarding this being done.

Note: we use “m_hRC = wglCreateContext(m_cDC->GetSafeHdc()”
to create an rc.

Thanks, and please refernce me someplace else if you think somewhere else is likely to have the answer.

Quoting from the MSDN on wglMakeCurrent(hdc, hglrc):

“The hdc parameter must refer to a drawing surface supported by OpenGL. It need not be the same hdc that was passed to wglCreateContext when hglrc was created, but it must be on the same device and have the same pixel format.”

Subject to the above limitations, you should be fine.