⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 application.cpp

📁 To review what a metaball is, and how to render them and to describe a new optimization I ve made
💻 CPP
字号:
//-----------------------------------------------------------------------------
// Copyright (c) 2001 Andreas J鰊sson
//-----------------------------------------------------------------------------
#include "application.h"

// Initialize static member
CApplication *CApplication::m_pApplication = 0;

//-----------------------------------------------------------------------------
// CApplication()
//-----------------------------------------------------------------------------
CApplication::CApplication()
{
	m_hInstance    = 0;
    m_pWindow      = 0;
	m_bActive	   = false;

	m_pApplication = this;
}

//-----------------------------------------------------------------------------
// GetInstance()
//-----------------------------------------------------------------------------
CApplication *CApplication::GetInstance()
{
	return m_pApplication;
}


//-----------------------------------------------------------------------------
// Initialize()
//-----------------------------------------------------------------------------
HRESULT CApplication::Initialize(HINSTANCE hInst, char *sCmdLine)
{
	m_hInstance = hInst;

	return S_OK;
}


//-----------------------------------------------------------------------------
// Run()
// Message-processing loop. 
//-----------------------------------------------------------------------------
int CApplication::Run()
{
    // Now we're ready to recieve and process Windows messages.
	while( !m_pWindow->CheckMessage(!m_bActive) )
	{
	}

    return 0;
}


//-----------------------------------------------------------------------------
// Activate()
//-----------------------------------------------------------------------------
void CApplication::Activate(bool bActivate)
{
	if( bActivate )
	{
		Pause(false);

		// Restore lost surfaces
	}
	else
	{
		Pause(true);
	}
}


//-----------------------------------------------------------------------------
// Pause()
//-----------------------------------------------------------------------------
void CApplication::Pause(bool bPause)
{
	if( bPause )
	{
		m_bActive = false;
	}
	else
	{
		m_bActive = true;
	}
}


//-----------------------------------------------------------------------------
// Resize()
//-----------------------------------------------------------------------------
void CApplication::Resize(int nWidth, int nHeight)
{
	// Resize the framebuffer
}

//-----------------------------------------------------------------------------
// Render()
//-----------------------------------------------------------------------------
void CApplication::Render()
{
	// Render the last frame to the window
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -