资源简介
3d opengl 飞行射击游戏源码和论文,好多都可以用,
代码片段和文件信息
#include “.\boxsky.h“
BoxSky::BoxSky()
{
}
BoxSky::~BoxSky(void)
{
}
bool BoxSky::SetVertexBuffer(IDirect3DDevice9 *Device LPCSTR fontFileName LPCSTR backFileName LPCSTR leftFileName LPCSTR rightFileName LPCSTR topFileName LPCSTR bottomFileName float skywidth float skyheight)
{
if(FAILED(D3DXCreateTextureFromFile(DevicefontFileName&Skytex[0])))
{
return false;
}
if(FAILED(D3DXCreateTextureFromFile(DevicebackFileName&Skytex[1])))
{
return false;
}
if(FAILED(D3DXCreateTextureFromFile(DeviceleftFileName&Skytex[2])))
{
return false;
}
if(FAILED(D3DXCreateTextureFromFile(DevicerightFileName&Skytex[3])))
{
return false;
}
if(FAILED(D3DXCreateTextureFromFile(DevicetopFileName&Skytex[4])))
{
return false;
}
if(FAILED(D3DXCreateTextureFromFile(DevicebottomFileName&Skytex[5])))
{
return false;
}
if(FAILED(Device->CreateVertexBuffer(24* sizeof(CUSTOMVERTEX) 0 CUSTOMVERTEX_FVF D3DPOOL_MANAGED&m_pVertexBuffer 0)))
{
MessageBox(NULL““““1);
}
CUSTOMVERTEX *skyvertex;
m_pVertexBuffer->Lock(0 0 (void**)&skyvertex 0);
//前面
skyvertex[0] = CUSTOMVERTEX(skywidth/2.0f 0.0f -skywidth/2.0f 1.0f 1.0f);//点E
skyvertex[1] = CUSTOMVERTEX(skywidth/2.0f skyheight -skywidth/2.0f 1.0f 0.0f);//点F
skyvertex[2] = CUSTOMVERTEX(-skywidth/2.0f 0.0f -skywidth/2.0f 0.0f 1.0f);//点O
skyvertex[3] = CUSTOMVERTEX(-skywidth/2.0f skyheight -skywidth/2.0f 0.0f 0.0f);//点G
//后面
skyvertex[4] = CUSTOMVERTEX(-skywidth/2.0f 0.0f skywidth/2.0f 1.0f 1.0f);//点D
skyvertex[5] = CUSTOMVERTEX(-skywidth/2.0f skyheight skywidth/2.0f 1.0f 0.0f);//点A
skyvertex[6] = CUSTOMVERTEX(skywidth/2.0f 0.0f skywidth/2.0f 0.0f 1.0f);//点C
skyvertex[7] = CUSTOMVERTEX(skywidth/2.0f skyheight skywidth/2.0f 0.0f 0.0f);//点B
//左面
skyvertex[8] = CUSTOMVERTEX(-skywidth/2.0f 0.0f -skywidth/2.0f 1.0f 1.0f);
skyvertex[9] = CUSTOMVERTEX(-skywidth/2.0f skyheight -skywidth/2.0f 1.0f 0.0f);//点G
skyvertex[10] = CUSTOMVERTEX(-skywidth/2.0f 0.0f skywidth/2.0f 0.0f 1.0f);//点D
skyvertex[11] = CUSTOMVERTEX(-skywidth/2.0f skyheight skywidth/2.0f 0.0f 0.0f);//点A
//右面
skyvertex[12] = CUSTOMVERTEX(skywidth/2.0f 0.0f skywidth/2.0f 1.0f 1.0f);//点C
skyvertex[13] = CUSTOMVERTEX(skywidth/2.0f skyheight skywidth/2.0f 1.0f 0.0f);//点B
skyvertex[14] = CUSTOMVERTEX(skywidth/2.0f 0.0f -skywidth/2.0f 0.0f 1.0f);//点E
skyvertex[15] = CUSTOMVERTEX(skywidth/2.0f skyheight -skywidth/2.0f 0.0f 0.0f);//点F
//顶面
skyvertex[16] = CUSTOMVERTEX(skywidth/2.0f skyheight -skywidth/2.0f 1.0f 1.0f);//点F
skyvertex[17] = CUSTOMVERTEX(skywidth/2.0f skyheight skywidth/2.0f 1.0f 0.0f);//点B
skyvertex[18] = CUSTOMVERTEX(-skywidth/2.0f skyheight -skywidth/2.0f 0.0f 1.0f);//点G
skyvertex[19] = CUSTOMVERTEX(-skywidth/2.0f skyheight skywidth/2.0f 0.0f 0.0f);//点A
//底面
skyvertex[20] = CUSTOMVERTEX(-skywidth/2.0f 0.0f -skywidth/2.0f 1.0f 1.0f);//点O
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 364724 2005-10-19 15:55 Lelecode.com\FighterTest\Aereo.ms3d
文件 28668 2005-10-19 15:55 Lelecode.com\FighterTest\FighterTest.aps
文件 2359 2005-10-19 15:55 Lelecode.com\FighterTest\FighterTest.clw
文件 4335 2011-11-07 13:30 Lelecode.com\FighterTest\FighterTest.cpp
文件 5086 2005-10-19 15:55 Lelecode.com\FighterTest\FighterTest.dsp
文件 547 2005-10-19 15:55 Lelecode.com\FighterTest\FighterTest.dsw
文件 1408 2005-10-19 15:55 Lelecode.com\FighterTest\FighterTest.h
文件 10610 2005-10-19 15:55 Lelecode.com\FighterTest\FighterTest.rc
文件 1878 2011-11-07 13:30 Lelecode.com\FighterTest\FighterTestDoc.cpp
文件 1527 2005-10-19 15:55 Lelecode.com\FighterTest\FighterTestDoc.h
文件 19577 2011-11-07 13:30 Lelecode.com\FighterTest\FighterTestView.cpp
文件 4304 2005-10-19 15:55 Lelecode.com\FighterTest\FighterTestView.h
文件 17462 2005-10-19 15:55 Lelecode.com\FighterTest\Floor.bmp
文件 2548 2011-11-07 13:30 Lelecode.com\FighterTest\MainFrm.cpp
文件 1581 2005-10-19 15:55 Lelecode.com\FighterTest\MainFrm.h
文件 5773 2005-10-19 15:55 Lelecode.com\FighterTest\MilkshapeModel.cpp
文件 745 2005-10-19 15:55 Lelecode.com\FighterTest\MilkshapeModel.h
文件 3122 2005-10-19 15:55 Lelecode.com\FighterTest\Model.cpp
文件 1741 2005-10-19 15:55 Lelecode.com\FighterTest\Model.h
文件 2102 2005-10-19 15:55 Lelecode.com\FighterTest\Puf.bmp
文件 4430 2005-10-19 15:55 Lelecode.com\FighterTest\ReadMe.txt
文件 1078 2005-10-19 15:55 Lelecode.com\FighterTest\RES\FighterTest.ico
文件 403 2005-10-19 15:55 Lelecode.com\FighterTest\RES\FighterTest.rc2
文件 1078 2005-10-19 15:55 Lelecode.com\FighterTest\RES\FighterTestDoc.ico
..A.SH. 6144 2005-10-19 15:55 Lelecode.com\FighterTest\RES\Thumbs.db
文件 1078 2005-10-19 15:55 Lelecode.com\FighterTest\RES\Toolbar.bmp
文件 499 2005-10-19 15:55 Lelecode.com\FighterTest\Resource.h
文件 786486 2005-10-19 15:55 Lelecode.com\FighterTest\Sky.bmp
文件 213 2005-10-19 15:55 Lelecode.com\FighterTest\StdAfx.cpp
文件 1327 2005-10-19 15:55 Lelecode.com\FighterTest\StdAfx.h
............此处省略8个文件信息
- 上一篇:ST-li
nk软件工具.zip - 下一篇:pcb名片.rar
相关资源
- STM32开发板PCB图,带3d封装,可直接打
- Unity 2D 游戏开发教程
- 20个可读的obj模型文件
- Unity3D网络游戏实战
- opengl实现模型读取以及光照,移动等
- unity3d联网斗地主服务端+客户端
- Obi Fluidv4.0.1+Obi Cloth 4.0.1
- 3D Infinite Runner Toolkit
- 立创商城PCB封装库V1.01 带有3D模型 A
- 3D数学基础:图形与游戏开发-[PDF][高
- 3D数学基础:图形与游戏开发高清带目
- unity 3D虚拟漫游
- d3d(texture)渲染YUV420
- solidworks减速机模型
- Introduction.To.Direct3D9中文版翁云兵版
- Opengl实现旗帜飘扬效果
- OpenGL星星公转自转
- 3D机房环境监控系统源码
- OpenGL显示三维点云图像
- FLY3D2.0 完整的教学3D引擎
- coin3D所有安装文件和安装说明
- LS DYNA3D理论基础与分析 含命令流K文件
- opengl绘制太阳、地球、月球
- 中文版3D数学基础:图形与游戏开发
- untiy3d 简单td防守+射击游戏
- Unity3D树木、地皮贴图
- 用Unity3d做一个魔方
- 3ds 模型文件
- Qt通过控件控制立方体旋转
- Unity 2018 Shaders and Effects Cookbook 3rd Ed
评论
共有 条评论