摘要:mSceneMgr->setSkyBox(true, "Examples/SpaceSkyBox"); //设置天空盒mSceneMgr->setSkyDome(true, "Examples/CloudySky", 5.0f, 8.0f); //设置天空穹Plane plane;plane.d = 1000.0f;plane.normal = Vector3::NEGATIVE_UNIT_Y;mSceneMgr->setSkyPlane(true, plane, "Examples/CloudySky", 1500
阅读全文
摘要:开启阴影技术:mSceneMgr->setShadowTechnique(SHADOWTYPE_STENCIL_ADDITIVE);某个实体开启和关闭阴影:ent->setCastShadows(false);创建灯光:每个灯光产生一个阴影Light* light = mSceneMgr->createLight("Light1");light->setType(Light::LT_POINT);light->setPosition(Vector3(0.0f, 150.0f, 250.0f));light->setDiffuseColou
阅读全文
摘要:#include <ExampleApplication.h>#include <vector>#include <stdlib.h>#include <stdio.h>using namespace std;class MoveDemoListener : public ExampleFrameListener{protected:Vector3 mDirection;Vector3 mPosition;Real mMove;Real mDistance;Real mTime;AnimationState* mAnimationState;En
阅读全文
摘要:#include <stdio.h>#include <ogre.h>using namespace Ogre;class MyLogListener:public LogListener{public:void messageLogged( const String& message, LogMessageLevel lml, bool maskDebug, const String &logName ){}};class MyFrameListener:public FrameListener{public:bool frameStarted(con
阅读全文
摘要:#ifndef __MP3H__#define __MP3H__#define _AFXDLL#include <afx.h>#include <mmsystem.h>#include <mixerocx.h>class CSound {long m_device;MIXERCONTROL m_volCtrl;private:bool CSound::GetDevice(int dev,HMIXER &hmixer);public:CSound();virtual ~CSound();bool GetVolumeControl(HMIXER hmix
阅读全文
摘要:#include <stdio.h>#include <stdlib.h>#include <string.h>#include <Windows.h>#include <ShellAPI.h>#include <ShlObj.h>#include <ShTypes.h>#define WM_USERDEF_FILECHANGED 0x1000LRESULT CALLBACK WindowProc(HWND hWnd, int uMsg, WPARAM wParam, LPARAM lParam){switch
阅读全文
摘要:#ifndef __SoundH__#define __SoundH__#include <dsound.h>#include "SDKwavefile.h"#include <vector>using namespace std;struct SSound{IDirectSoundBuffer8* pSoundBuffer;bool bLooping;SSound() { pSoundBuffer = 0; bLooping = false; }};class CSound{private:IDirectSound8* m_pSound;vecto
阅读全文
摘要:HWND g_hWnd;IDirectSound8* g_pSound;IDirectSoundBuffer8* g_pSBuffer;CWaveFile* g_pWaveFile;DirectSoundCreate8(0, &g_pSound, 0);g_pSound->SetCooperativeLevel(g_hWnd, DSSCL_PRIORITY);g_pWaveFile = new CWaveFile;ZeroMemory(g_pWaveFile, sizeof(CWaveFile));HRESULT hr;hr = g_pWaveFile->Open(L&qu
阅读全文
摘要:播放一次 PlaySoundA("test.wav", NULL, SND_FILENAME | SND_ASYNC);连续播放 PlaySoundA("test.wav", NULL, SND_FILENAME | SND_ASYNC | SND_LOOP);PlaySound的使用需要<mmsystem.h>和"winmm.lib"
阅读全文
摘要:------------------------------Animation.h--------------------------------------没有Animation.cpp-----------#ifndef __AnimationH__#define __AnimationH__#include <d3d9.h>#include <d3dx9.h>//struct D3DXFRAME_DERIVED & D3DXMESHCONTAINER_DERIVEDstruct D3DXFRAME_DERIVED : public D3DXFRAME{D3
阅读全文
摘要:1366X768 2048x1536 1024x768 1280x800
阅读全文
摘要:顶点渲染管线(Vertex Shader)与像素渲染管线(Pixel Shader)是决定显卡性能的决定性因素,由于这两个渲染管线的设计都被标准化,nVIDIA和ATI只能通过增加其数量来达到快速提升性能的目的。顶点渲染单元(Vertex Shader)负责生成3D图像的骨架,三角形的每个顶点信息都是由它计算完成。相对像素渲染,顶点渲染的工作量要轻得多,但它承担了3D运算的基础工作,对GPU的最终效能有着决定性的影响。像素渲染(Pixel Shader)是3D处理中最关键的工作,大家在游戏中看到的大量水面波纹、反光、凹凸质感、旗帜飘扬之类的特效都是由它处理,任务量最为繁重、对性能的影响也最大。
阅读全文
摘要:version.lib;imm32.lib;comctl32.lib;d3dx10d.lib;d3dx9d.lib;dxerr.lib;dxguid.lib;winmm.lib;dsound.lib不一定全部要,但加了这些可以用
阅读全文
摘要:BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency);BOOL QueryPerformanceCounter (LARGE_INTEGER *lpCount);
阅读全文