COpenGL::OnDestroy

virtual void OnDestroy( void );

Remarks

The OnDestroy method function destroys the rendering context created by the OnCreate function and performs all further necessary reinitialization of the COpenGL object. The current thread’s rendering context is undefined after this function is called. The result of any COpenGL object’s function called after the OnDestroy function is undefined.

Example

class COglSampleView : public CView
{
  // specify operations or attributes as desired …
public:
  COpenGL     m_OpenGL;
  // specify operations or attributes as desired …
};
void COglSampleView::OnDestroy()
{
  // call framework OnDestroy event processing
  CView::OnDestroy();
  // COpenGL destroy window event processing
  m_OpenGL.OnDestroy();
}

See Also

PreCreateWindow, OnCreate, OnSize