-
大小: 3.79MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-08-15
- 語(yǔ)言: C/C++
- 標(biāo)簽: opengl??MFC??opengl動(dòng)畫??
資源簡(jiǎn)介
基于單文檔的opengl動(dòng)畫,vc MFC下實(shí)現(xiàn),模擬時(shí)鐘轉(zhuǎn)動(dòng),實(shí)現(xiàn)的mfc下紋理映射,坐標(biāo)轉(zhuǎn)換,旋轉(zhuǎn)等一系列功能。對(duì)初學(xué)者有很大的幫助

代碼片段和文件信息
//?GL.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“GL.h“
#include?“MainFrm.h“
#include?“GLDoc.h“
#include?“GLView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CGLApp
BEGIN_MESSAGE_MAP(CGLApp?CWinApp)
//{{AFX_MSG_MAP(CGLApp)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
//?Standard?print?setup?command
ON_COMMAND(ID_FILE_PRINT_SETUP?CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CGLApp?construction
CGLApp::CGLApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CGLApp?object
CGLApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CGLApp?initialization
BOOL?CGLApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
LoadStdProfileSettings();??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CGLDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CGLView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return?TRUE;
}
/////////////////////////////////////////////////////////
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????786488??2009-12-27?12:27??openGL鐘表\1.bmp
?????文件?????786488??2009-12-27?12:27??openGL鐘表\Debug\1.bmp
?????文件????2240597??2009-12-27?12:35??openGL鐘表\Debug\GL.exe
?????文件????2838956??2009-12-27?12:35??openGL鐘表\Debug\GL.ilk
?????文件??????21189??2009-12-14?16:15??openGL鐘表\Debug\GL.obj
?????文件????5633340??2009-12-14?15:00??openGL鐘表\Debug\GL.pch
?????文件????4326400??2009-12-27?12:35??openGL鐘表\Debug\GL.pdb
?????文件??????14728??2009-12-14?14:55??openGL鐘表\Debug\GL.res
?????文件??????12981??2009-12-14?15:00??openGL鐘表\Debug\GLDoc.obj
?????文件??????33717??2009-12-27?12:35??openGL鐘表\Debug\GLView.obj
?????文件??????18361??2009-12-14?15:00??openGL鐘表\Debug\MainFrm.obj
?????文件?????106566??2009-12-14?15:00??openGL鐘表\Debug\StdAfx.obj
?????文件?????222208??2009-12-27?12:36??openGL鐘表\Debug\vc60.idb
?????文件?????372736??2009-12-27?12:35??openGL鐘表\Debug\vc60.pdb
?????文件???????2166??2009-12-24?18:05??openGL鐘表\GL.clw
?????文件???????4137??2009-12-14?14:55??openGL鐘表\GL.cpp
?????文件???????4439??2009-12-14?16:11??openGL鐘表\GL.dsp
?????文件????????527??2009-12-14?14:55??openGL鐘表\GL.dsw
?????文件???????1312??2009-12-14?14:55??openGL鐘表\GL.h
?????文件??????91136??2009-12-27?12:36??openGL鐘表\GL.ncb
?????文件??????48640??2009-12-27?12:36??openGL鐘表\GL.opt
?????文件????????238??2009-12-27?12:36??openGL鐘表\GL.plg
?????文件??????10485??2009-12-14?14:55??openGL鐘表\GL.rc
?????文件???????1662??2009-12-14?14:55??openGL鐘表\GLDoc.cpp
?????文件???????1431??2009-12-14?14:55??openGL鐘表\GLDoc.h
?????文件??????79898??1998-08-18?16:25??openGL鐘表\glut32.lib
?????文件??????12263??2009-12-27?12:35??openGL鐘表\GLView.cpp
?????文件???????2116??2009-12-21?13:03??openGL鐘表\GLView.h
?????文件???????2503??2009-12-14?14:55??openGL鐘表\MainFrm.cpp
?????文件???????1581??2009-12-14?14:55??openGL鐘表\MainFrm.h
............此處省略16個(gè)文件信息
評(píng)論
共有 條評(píng)論