Exemple #1
0
extern "C" __declspec(dllexport) void libyabause_deinit()
{
	PerPortReset();
	YabauseDeInit();
	if (usinggl)
	{
		KillGLContext();
		usinggl = 0;
	}
	if (glbuff)
	{
		free(glbuff);
		glbuff = NULL;
	}
}
Exemple #2
0
void glWindow::KillWindow () {

    // Close the window
    Hide ();

    // Must destroy OpenGL context first
    KillGLContext ();

    // Delete the window
    glWindows.erase (m_HWnd);           // Remove from window list
	if (m_HDC) {
        ReleaseDC(m_HWnd,m_HDC);
        m_HDC = 0;
    }
	if (m_HWnd) {
        DestroyWindow(m_HWnd);
        m_HWnd = 0;
    }
}
Exemple #3
0
void glWindow::RecreateGLContext () {

    // Delete existing context
    KillGLContext ();

    // Create main context
	if (!(m_HGLRC=wglCreateContext(m_HDC)))				// Are We Able To Get A Rendering Context?
	{
        SetError ("Could not create OpenGL rendering context");
        return;
	}
	if(!wglMakeCurrent(m_HDC,m_HGLRC))					// Try To Activate The Rendering Context
	{
        SetError ("Could not activate OpenGL rendering context");
        return;
	}

    // Multitexture extension pointers may not be valid anymore, so re-fetch them
    InitMultitexture ();

    // Setup OpenGL defaults
    OpenGLDefaults ();
}