资源简介
用openGL编制的兔子模型,本模型通过兔子的便面点的构建,生成三维的兔子模型,并可用鼠标对其进行旋转移动等操作

代码片段和文件信息
//-----------------------------------------------------------------------------
// Name: ogl_stanford_bunny.cpp
// Author: Kevin Harris (kevin@codesampler.com)
// Last Modified: 02/01/05
// Description: This sample demonstrates how to make use of the useful
// Stanford Bunny model or data set for testing and prototyping
// purposes.
//
// Control Keys: Left Mouse Button - Spin the view
// Up Arrow - Move the bunny model away
// Down Arrow - Move the bunny model away
//-----------------------------------------------------------------------------
#define STRICT
#define WIN32_LEAN_AND_MEAN
#include
#include
#include
#include
#include “resource.h“
//-----------------------------------------------------------------------------
// GLOBALS
//-----------------------------------------------------------------------------
HWND g_hWnd = NULL;
HDC g_hDC = NULL;
HGLRC g_hRC = NULL;
GLuint g_stanfordBunnyDL = -1;
bool g_bRenderInWireframe = false;
float g_fDistance = -2.0f;
float g_fSpinX = 0.0f;
float g_fSpinY = 0.0f;
//-----------------------------------------------------------------------------
// PROTOTYPES
//-----------------------------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInstanceHINSTANCE hPrevInstance
LPSTR lpCmdLine int nCmdShow);
LRESULT CALLBACK WindowProc(HWND g_hWnd UINT msg WPARAM wParam LPARAM lParam);
void init(void);
void render(void);
void shutDown(void);
extern GLint Gen3DobjectList();
//-----------------------------------------------------------------------------
// Name: WinMain()
// Desc: The application‘s entry point
//-----------------------------------------------------------------------------
int WINAPI WinMain( HINSTANCE hInstance
HINSTANCE hPrevInstance
LPSTR lpCmdLine
int nCmdShow )
{
WNDCLASSEX winClass;
MSG uMsg;
memset(&uMsg0sizeof(uMsg));
winClass.lpszClassName = “MY_WINDOWS_CLASS“;
winClass.cbSize = sizeof(WNDCLASSEX);
winClass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
winClass.lpfnWndProc = WindowProc;
winClass.hInstance = hInstance;
winClass.hIcon = LoadIcon(hInstance (LPCTSTR)IDI_OPENGL_ICON);
winClass.hIconSm = LoadIcon(hInstance (LPCTSTR)IDI_OPENGL_ICON);
winClass.hCursor = LoadCursor(NULL IDC_ARROW);
winClass.hbrBackground = (HBRUSH)GetStockobject(BLACK_BRUSH);
winClass.lpszMenuName = NULL;
winClass.cbClsExtra = 0;
winClass.cbWndExtra = 0;
if( !RegisterClassEx(&winClass) )
return E_FAIL;
g_hWnd = CreateWindowEx( NULL “MY_WINDOWS_CLASS“
“OpenGL - Stanford Bunny Data Set“
WS_OVERLAPPEDWINDOW | WS_VISIBLE
0 0 640 480 NULL NULL hInstance NULL );
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7406 2003-10-07 08:50 ogl_stanford_bunny兔子\codesampler.ico
文件 8071 2005-02-01 15:24 ogl_stanford_bunny兔子\ogl_stanford_bunny.cpp
文件 4445 2004-01-12 13:53 ogl_stanford_bunny兔子\ogl_stanford_bunny.dsp
文件 561 2005-05-31 10:30 ogl_stanford_bunny兔子\ogl_stanford_bunny.dsw
文件 442368 2005-02-03 15:45 ogl_stanford_bunny兔子\ogl_stanford_bunny.exe
文件 41984 2005-05-31 10:33 ogl_stanford_bunny兔子\ogl_stanford_bunny.ncb
文件 53760 2005-05-31 10:33 ogl_stanford_bunny兔子\ogl_stanford_bunny.opt
文件 1647 2005-05-31 10:30 ogl_stanford_bunny兔子\ogl_stanford_bunny.plg
文件 3058 2003-10-07 09:46 ogl_stanford_bunny兔子\ogl_stanford_bunny.rc
文件 4981 2005-01-28 00:06 ogl_stanford_bunny兔子\ogl_stanford_bunny.vcproj
文件 1000 2002-05-02 21:30 ogl_stanford_bunny兔子\resource.h
文件 1136015 2003-08-19 12:40 ogl_stanford_bunny兔子\stanford_bunny.cpp
目录 0 2005-06-10 17:08 ogl_stanford_bunny兔子
----------- --------- ---------- ----- ----
1705514 14
- 上一篇:Kinect中文文档,
- 下一篇:安装risc-V的rocket的环境,零基础
相关资源
- 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实现飘动效果
评论
共有 条评论