91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.81MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-13
  • 語言: C/C++
  • 標簽:

資源簡介

用MFC做的3D動畫小車,兩輛小跑車3D外形,白色紋理,可在3D的藍色小山坡上運動。一輛用小鍵盤上下左右鍵控制,一輛用大鍵盤W,D鍵控制。十分適合做圖形學和動畫的學習資料和作業,絕對物超所值。

資源截圖

代碼片段和文件信息

//***********************************************************************//
// ?//
// -?“Talk?to?me?like?I‘m?a?3?year?old!“?Programming?Lessons?- ?//
//???????????????????????????????????????????????????????????????????????//
// $Author: DigiBen digiben@gametutorials.com ?//
// ?//
// $Program: 3DS?Loader ?//
// ?//
// $Description: Demonstrates?how?to?load?a?.3ds?file?format ?//
// ?//
// $Date: 10/6/01 ?//
// ?//
//***********************************************************************//
#include?“stdafx.h“
#include?
#include?
#include?
#include?
#include?
#include?
#include? //?Header?File?For?The?OpenGL32?Library
#include? //?Header?File?For?The?GLu32?Library
#include?
#include?
using?namespace?std;
#include?“3ds.h“
#include?
#include?
#include?
#include?
//?Global
int?gBuffer[50000]?=?{0}; //?This?is?used?to?read?past?unwanted?data

//?This?file?handles?all?of?the?code?needed?to?load?a?.3DS?file.
//?Basically?how?it?works?is?you?load?a?chunk?then?you?check
//?the?chunk?ID.??Depending?on?the?chunk?ID?you?load?the?information
//?that?is?stored?in?that?chunk.??If?you?do?not?want?to?read?that?information
//?you?read?past?it.??You?know?how?many?bytes?to?read?past?the?chunk?because
//?every?chunk?stores?the?length?in?bytes?of?that?chunk.

/////////////////////////////////?CLOAD3DS?\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*
/////
///// This?constructor?initializes?the?tChunk?data
/////
/////////////////////////////////?CLOAD3DS?\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*
void?CreateTexture(UINT?textureArray[]?LPSTR?strFileName?int?textureID)
{
AUX_RGBImageRec?*pBitmap?=?NULL;

if(!strFileName) //?Return?from?the?function?if?no?file?name?was?passed?in
return;

pBitmap?=?auxDIBImageLoad(strFileName); //?Load?the?bitmap?and?store?the?data

if(pBitmap?==?NULL) //?If?we?can‘t?load?the?file?quit!
exit(0);

//?Generate?a?texture?with?the?associative?texture?ID?stored?in?the?array
glGenTextures(1?&textureArray[textureID]);

//?This?sets?the?alignment?requirements?for?the?start?of?each?pixel?row?in?memory.
glPixelStorei?(GL_UNPACK_ALIGNMENT?1);

//?Bind?the?texture?to?the?texture?arrays?index?and?init?the?texture
glBindTexture(GL_TEXTURE_2D?textureArray[textureID]);

//?Build?Mipmaps?(builds?different?versions?of?the?picture?for?distances?-?looks?better)
gluBuild2DMipmaps(GL_TEXTURE_2D?3?pBitmap->sizeX?pBitmap->sizeY?GL_RGB?GL_UNSIGNED_BYTE?pBitmap->data);

//?Lastly?we?need?to?tell?OpenGL?the?quality?of?our?texture?map.??GL_LINEAR_MIPMAP_LINEAR
//?is?the?smoothest.??GL_LINEAR_MIPMAP_NEAREST?is?faster?than?GL_LINEAR_MIPMAP_LINEAR?
//?but?looks?blochy?and?pixilated.??Good?for?s

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-03-20?16:34??3D小車\
?????文件???????42443??2004-07-31?01:24??3D小車\3ds.cpp
?????文件????????6803??2004-07-23?11:22??3D小車\3ds.h
?????文件???????26180??2004-09-27?20:53??3D小車\AICar.aps
?????文件????????1831??2004-10-11?21:40??3D小車\AICar.clw
?????文件????????4098??2004-09-27?21:02??3D小車\AICar.cpp
?????文件????????4642??2004-09-28?00:45??3D小車\AICar.dsp
?????文件?????????533??2004-09-27?20:50??3D小車\AICar.dsw
?????文件????????1345??2004-09-27?20:50??3D小車\AICar.h
?????文件???????99328??2013-03-20?16:34??3D小車\AICar.ncb
?????文件???????53760??2013-03-20?16:34??3D小車\AICar.opt
?????文件?????????244??2013-03-20?16:33??3D小車\AICar.plg
?????文件????????9144??2004-09-27?20:50??3D小車\AICar.rc
?????文件????????1722??2004-09-27?20:50??3D小車\AICarDoc.cpp
?????文件????????1464??2004-09-27?20:50??3D小車\AICarDoc.h
?????文件???????16078??2004-10-13?18:49??3D小車\AICarView.cpp
?????文件????????3007??2004-10-11?20:05??3D小車\AICarView.h
?????文件??????455541??2004-09-28?00:23??3D小車\car.3DS
?????目錄???????????0??2004-09-27?21:05??3D小車\data\
?????文件??????786486??2004-09-27?23:17??3D小車\data\map.bmp
?????目錄???????????0??2013-03-20?16:32??3D小車\Debug\
?????文件???????70658??2013-03-20?16:32??3D小車\Debug\3ds.obj
?????文件??????200752??2013-03-20?16:32??3D小車\Debug\AICar.exe
?????文件??????559944??2013-03-20?16:32??3D小車\Debug\AICar.ilk
?????文件???????23062??2013-03-20?16:32??3D小車\Debug\AICar.obj
?????文件?????5511180??2013-03-20?16:32??3D小車\Debug\AICar.pch
?????文件??????549888??2013-03-20?16:32??3D小車\Debug\AICar.pdb
?????文件????????5756??2013-03-20?16:32??3D小車\Debug\AICar.res
?????文件???????14440??2013-03-20?16:32??3D小車\Debug\AICarDoc.obj
?????文件???????82843??2013-03-20?16:32??3D小車\Debug\AICarView.obj
?????文件???????18372??2013-03-20?16:32??3D小車\Debug\MainFrm.obj
............此處省略14個文件信息

評論

共有 條評論

相關資源