资源简介
opengl实现分形山脉,计算机图形学的作业。

代码片段和文件信息
// Copyright 1996 Microsoft Systems Journal.
/////////////////////////////////////////////////////////////////////////////
//
// COpenGLView.cpp : implementation of the COpenGLView class
//
/////////////////////////////////////////////////////////////////////////////
#include “stdafx.h“
//#include “resource.h“ // main symbols
#include “COpenGLView.h“
#include // for MM timers (you‘ll need WINMM.LIB)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// add support for OpenGL 1.1 if we‘re using an old header
// These are new PIXELFORMATDEscriptOR flags for OpenGL 1.1
#ifndef PFD_GENERIC_ACCELERATED
#define PFD_GENERIC_ACCELERATED 0x00001000
#endif
#ifndef PFD_DEPTH_DONTCARE
#define PFD_DEPTH_DONTCARE 0x20000000
#endif
#define INSTALLABLE_DRIVER_TYPE_MASK (PFD_GENERIC_ACCELERATED|PFD_GENERIC_FORMAT)
/////////////////////////////////////////////////////////////////////////////
const char* const COpenGLView::_ErrorStrings[]= {
{“No Error“} // 0
{“Unable to get a DC“} // 1
{“ChoosePixelFormat failed“} // 2
{“SelectPixelFormat failed“} // 3
{“wglCreateContext failed“} // 4
{“wglMakeCurrent failed“} // 5
{“wglDeleteContext failed“} // 6
{“SwapBuffers failed“} // 7
};
/////////////////////////////////////////////////////////////////////////////
// COpenGLView
IMPLEMENT_DYNCREATE(COpenGLView CView)
BEGIN_MESSAGE_MAP(COpenGLView CView)
//{{AFX_MSG_MAP(COpenGLView)
ON_WM_CREATE()
ON_WM_DESTROY()
ON_WM_ERASEBKGND()
ON_WM_SIZE()
// If you don‘t have an ID_ANIMATE you can either add one
// to your menu (Add an Animate command) or comment out the
// references
//#if defined ID_ANIMATE
// ON_COMMAND(ID_ANIMATE OnAnimate)
// ON_UPDATE_COMMAND_UI(ID_ANIMATE OnUpdateAnimate)
//#else
// #pragma message( “No Animation Accelerator Interface Defined in COpenGLView“ )
//#endif
ON_WM_KEYDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// COpenGLView construction/destruction
COpenGLView::COpenGLView() :
m_PixelFormat(0)m_hRC(0) m_pDC(0)
m_ErrorString(_ErrorStrings[0])
{
// TODO: add construction code here
}
/////////////////////////////////////////////////////////////////////////////
COpenGLView::~COpenGLView()
{
}
/////////////////////////////////////////////////////////////////////////////
BOOL COpenGLView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Add your specialized code here and/or call the base class
// An OpenGL window must be created with the following flags and must not
// include CS_PARENTDC for the class style. Refer to SetPixelFormat
// documentation in the “Comments“ section for further information.
cs.style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
return CView::PreCreateWindow(cs);
}
///////////////////
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3385 1997-09-13 19:00 Fractal Example.clw
文件 998 1997-08-15 12:56 Fractal Example.h
文件 3821 1997-08-15 12:56 Fractal Example.cpp
文件 502 1997-08-15 12:56 StdAfx.h
文件 213 1997-09-04 21:04 StdAfx.cpp
文件 988 1997-08-15 12:56 MainFrm.h
文件 1473 1997-08-15 12:56 MainFrm.cpp
文件 1102 1997-08-15 12:56 Fractal ExampleDoc.h
文件 1901 1997-08-15 12:56 Fractal ExampleDoc.cpp
文件 2194 1997-09-13 13:10 Fractal ExampleView.h
文件 27769 1997-09-13 19:01 Fractal ExampleView.cpp
目录 0 1997-09-17 07:47 res\
文件 1522 1997-09-13 13:05 resource.h
文件 12957 1997-09-13 13:05 Fractal Example.rc
文件 2862 1997-09-16 21:03 COpenGLView.h
文件 16680 1997-09-13 14:16 Fractal Example.mak
文件 66560 1997-09-16 21:03 Fractal Example.ncb
文件 38400 1997-09-16 21:03 Fractal Example.mdp
文件 17031 1997-09-16 21:03 COpenGLView.cpp
文件 18030 1997-09-13 18:16 fractmod.c
文件 712 1997-09-13 13:14 fractmod.h
文件 1017 1997-09-13 13:13 FractalOptionsDlg.h
文件 2158 1997-09-13 13:13 FractalOptionsDlg.cpp
文件 47104 1997-09-13 19:02 Fractal Example.exe
文件 407 1997-08-15 12:56 res\Fractal Example.rc2
文件 1078 1997-08-15 12:56 res\Fractal ExampleDoc.ico
文件 1078 1997-09-06 12:15 res\Fractal Example.ico
- 上一篇:ht16c23.rar
- 下一篇:三菱Q系列ST语言教程高清
相关资源
- OpenGL参考手册
- Qt Creator opengl实现四元数鼠标控制轨迹
- OpenGL文档,api大全,可直接查询函数
- opengl轮廓字体源代码
- MFC读三维模型obj文件
- 利用OpenGL写毛笔字算法
- MFC中OpenGL面和体的绘制以及动画效果
- 基于OPENGL的光线跟踪源代码368758
- VC 实现三维旋转(源码)
- 自编用openGL实现3D分形树,分形山
- OpenGL球形贴图自旋程序
- OpenGL导入贴图的Texture类
- 计算机图形学(openGL)代码
- 用OpenGL开发的机械臂运动仿真程序(
- OpenGL-3D坦克模拟
- OPENGL实现世界上最小的3D游戏
- VS2012OpenGL配置所需要的全部libdllh文件
- 基于OpenGL的仿蝗虫机器人三维动态仿
- 图形学 - OpenGL实现3种三维茶壶显示源
- opengl程序-会跳舞的骷髅
- opengl实现三维网格光顺Laplacian算法
- opengl——爆炸
- OpenGL三维地形建模
- opengl游戏编程徐明亮版(含源码)
- 用OPENGL画的一个简单的直升飞机
- opengl完美天空盒
- 3D绘图程序设计:使用Direct3D 10/9和Ope
- OpenGL绘制可运动自行车源程序.zip
- OpenGL实现飘动效果
- opengl室内场景的绘制,包括碰撞检测
评论
共有 条评论