fn create_render_target(&mut self, width: usize, height: usize) -> Self::RenderTarget {
        unsafe {
            // Get the window device context...
            let dc  = GetDC(self.window);
            if dc.is_null() {
                panic!("Unable to fetch device context for offscreen window: {}", GetLastError());
            }

            // Make the openGL context for the window current
            if wgl::wgl::MakeCurrent(dc as *const _, self.context as *const _) == 0 {
                panic!("Could not make OpenGL context current: {}", GetLastError());
            }

            // Renderer is reader
            OpenGlOffscreenRenderer::new(width, height)
        }
    }
///
/// Creates a new render target for this context
///
Creates a new render target for this context
Creates a new render target for this context
fn create_render_target(&mut self, width: usize, height: usize) -> Self::RenderTarget {
        unsafe {
            // Get the window device context...
            let dc  = GetDC(self.window);
            if dc.is_null() {
                panic!("Unable to fetch device context for offscreen window: {}", GetLastError());
            }
            // Make the openGL context for the window current
            if wgl::wgl::MakeCurrent(dc as *const _, self.context as *const _) == 0 {
                panic!("Could not make OpenGL context current: {}", GetLastError());
            }
            // Renderer is reader
            OpenGlOffscreenRenderer::new(width, height)
        }
    }
fn create_render_target ( & mut self , width : usize , height : usize ) -> Self :: RenderTarget { unsafe { // Get the window device context... let dc = GetDC ( self . window ) ; if dc . is_null ( ) { panic ! ( " " GetLastError ( ) ) ; } // Make the openGL context for the window current if wgl :: wgl :: MakeCurrent ( dc as * const _ , self . context as * const _ ) == 0 { panic ! ( " " GetLastError ( ) ) ; } // Renderer is reader OpenGlOffscreenRenderer :: new ( width , height ) } }
Creates a new render target for this context
Creates a new render target for this context
&mut self
width
usize
height
usize