OpenGL下立方体 正四面体绘制与贴图。


可执行文件 实现 立方体 正四面体绘制与贴图 显示在不同视点下 的观测结果
资源截图
代码片段和文件信息
// Cube.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “Cube.h“

#include “MainFrm.h“
#include “CubeDoc.h“
#include “CubeView.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCubeApp

BEGIN_MESSAGE_MAP(CCubeApp CWinApp)
//{{AFX_MSG_MAP(CCubeApp)
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()

/////////////////////////////////////////////////////////////////////////////
// CCubeApp construction

CCubeApp::CCubeApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CCubeApp object

CCubeApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CCubeApp initialization

BOOL CCubeApp::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(CCubeDoc)
RUNTIME_CLASS(CMainframe)       // main SDI frame window
RUNTIME_CLASS(CCubeView));
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;
}


/////////////////////////

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3128  2011-05-24 11:22  Cube204.bmp

     文件      12344  2011-05-24 13:17  Cube205.bmp

     文件      49208  2011-05-24 13:44  Cube206.bmp

     文件      49208  2011-05-24 13:52  Cube2071.bmp

     文件      49208  2011-05-24 14:05  Cube2081.bmp

     文件      49208  2011-05-24 14:09  Cube2091.bmp

     文件      49208  2011-05-24 14:11  Cube2101.bmp

     文件      49208  2011-05-24 14:13  Cube2111.bmp

     文件      49208  2011-05-24 14:15  Cube2121.bmp

     文件      28412  2011-05-24 11:46  Cube2Cube.aps

     文件       2315  2011-05-24 14:48  Cube2Cube.clw

     文件       4173  2011-04-06 19:01  Cube2Cube.cpp

     文件       4513  2011-04-06 19:01  Cube2Cube.dsp

     文件        516  2011-04-06 19:01  Cube2Cube.dsw

     文件       1334  2011-04-06 19:01  Cube2Cube.h

     文件     132096  2011-05-24 14:48  Cube2Cube.ncb

     文件      49664  2011-05-24 14:48  Cube2Cube.opt

     文件       1207  2011-05-24 14:46  Cube2Cube.plg

     文件      11679  2011-05-21 20:43  Cube2Cube.rc

     文件       1702  2011-04-06 19:01  Cube2CubeDoc.cpp

     文件       1453  2011-04-06 19:01  Cube2CubeDoc.h

     文件      25933  2011-05-24 14:46  Cube2CubeView.cpp

     文件       3197  2011-05-24 14:43  Cube2CubeView.h

     文件       3128  2011-05-24 11:22  Cube2Debug04.bmp

     文件      12344  2011-05-24 13:17  Cube2Debug05.bmp

     文件      49208  2011-05-24 13:44  Cube2Debug06.bmp

     文件      49208  2011-05-24 13:52  Cube2Debug071.bmp

     文件      49208  2011-05-24 14:05  Cube2Debug081.bmp

     文件      49208  2011-05-24 14:09  Cube2Debug091.bmp

     文件      49208  2011-05-24 14:11  Cube2Debug101.bmp

............此处省略33个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)