文件名称:DirectX
- 所属分类:
- DirextX编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2013-06-20
- 文件大小:
- 6.68mb
- 下载次数:
- 0次
- 提 供 者:
- 林*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
DirectX(模型导入拾取测试)bool Direct3D::InitDirect()
{
IDirect3D9 * d3d9
d3d9=Direct3DCreate9(D3D_SDK_VERSION)
D3DPRESENT_PARAMETERS d3dpp
ZeroMemory(&d3dpp,sizeof(d3dpp))
d3dpp.BackBufferHeight=m_fHeight
d3dpp.BackBufferWidth= m_fWidth
d3dpp.BackBufferCount=1
d3dpp.Windowed= m_bWindowed
d3dpp.hDeviceWindow=m_hWnd
d3dpp.BackBufferFormat= D3DFMT_A8R8G8B8
d3dpp.AutoDepthStencilFormat= D3DFMT_D24S8
d3dpp.MultiSampleType= D3DMULTISAMPLE_NONE
d3dpp.EnableAutoDepthStencil= true
d3dpp.Flags=0
d3dpp.SwapEffect=D3DSWAPEFFECT_DISCARD
if(d3d9)
{
HRESULT hr=d3d9->CreateDevice(D3DADAPTER_DEFAULT,m_d3dType,m_hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&m_d3dDevice)
if(FAILED(hr))
return false
}
return true
}-DirectXbool Direct3D::InitDirect()
{
IDirect3D9* d3d9
d3d9=Direct3DCreate9(D3D_SDK_VERSION)
D3DPRESENT_PARAMETERS d3dpp
ZeroMemory(&d3dpp,sizeof(d3dpp))
d3dpp.BackBufferHeight=m_fHeight
d3dpp.BackBufferWidth= m_fWidth
d3dpp.BackBufferCount=1
d3dpp.Windowed= m_bWindowed
d3dpp.hDeviceWindow=m_hWnd
d3dpp.BackBufferFormat= D3DFMT_A8R8G8B8
d3dpp.AutoDepthStencilFormat= D3DFMT_D24S8
d3dpp.MultiSampleType= D3DMULTISAMPLE_NONE
d3dpp.EnableAutoDepthStencil= true
d3dpp.Flags=0
d3dpp.SwapEffect=D3DSWAPEFFECT_DISCARD
if(d3d9)
{
HRESULT hr=d3d9->CreateDevice(D3DADAPTER_DEFAULT,m_d3dType,m_hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&m_d3dDevice)
if(FAILED(hr))
return false
}
return true
}
{
IDirect3D9 * d3d9
d3d9=Direct3DCreate9(D3D_SDK_VERSION)
D3DPRESENT_PARAMETERS d3dpp
ZeroMemory(&d3dpp,sizeof(d3dpp))
d3dpp.BackBufferHeight=m_fHeight
d3dpp.BackBufferWidth= m_fWidth
d3dpp.BackBufferCount=1
d3dpp.Windowed= m_bWindowed
d3dpp.hDeviceWindow=m_hWnd
d3dpp.BackBufferFormat= D3DFMT_A8R8G8B8
d3dpp.AutoDepthStencilFormat= D3DFMT_D24S8
d3dpp.MultiSampleType= D3DMULTISAMPLE_NONE
d3dpp.EnableAutoDepthStencil= true
d3dpp.Flags=0
d3dpp.SwapEffect=D3DSWAPEFFECT_DISCARD
if(d3d9)
{
HRESULT hr=d3d9->CreateDevice(D3DADAPTER_DEFAULT,m_d3dType,m_hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&m_d3dDevice)
if(FAILED(hr))
return false
}
return true
}-DirectXbool Direct3D::InitDirect()
{
IDirect3D9* d3d9
d3d9=Direct3DCreate9(D3D_SDK_VERSION)
D3DPRESENT_PARAMETERS d3dpp
ZeroMemory(&d3dpp,sizeof(d3dpp))
d3dpp.BackBufferHeight=m_fHeight
d3dpp.BackBufferWidth= m_fWidth
d3dpp.BackBufferCount=1
d3dpp.Windowed= m_bWindowed
d3dpp.hDeviceWindow=m_hWnd
d3dpp.BackBufferFormat= D3DFMT_A8R8G8B8
d3dpp.AutoDepthStencilFormat= D3DFMT_D24S8
d3dpp.MultiSampleType= D3DMULTISAMPLE_NONE
d3dpp.EnableAutoDepthStencil= true
d3dpp.Flags=0
d3dpp.SwapEffect=D3DSWAPEFFECT_DISCARD
if(d3d9)
{
HRESULT hr=d3d9->CreateDevice(D3DADAPTER_DEFAULT,m_d3dType,m_hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&m_d3dDevice)
if(FAILED(hr))
return false
}
return true
}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
DirectX(模型导入拾取测试)
..........................\Debug
..........................\.....\DirectX.exe
..........................\.....\DirectX.ilk
..........................\.....\DirectX.pdb
..........................\DirectX
..........................\.......\Camera.cpp
..........................\.......\Camera.h
..........................\.......\DXdevice.cpp
..........................\.......\DXdevice.h
..........................\.......\Debug
..........................\.......\.....\BuildLog.htm
..........................\.......\.....\Camera.obj
..........................\.......\.....\DXdevice.obj
..........................\.......\.....\DirectX.exe.embed.manifest
..........................\.......\.....\DirectX.exe.embed.manifest.res
..........................\.......\.....\DirectX.exe.intermediate.manifest
..........................\.......\.....\DirectX.obj
..........................\.......\.....\DirectX.pch
..........................\.......\.....\DirectX.res
..........................\.......\.....\mt.dep
..........................\.......\.....\stdafx.obj
..........................\.......\.....\vc90.idb
..........................\.......\.....\vc90.pdb
..........................\.......\DirectX.cpp
..........................\.......\DirectX.h
..........................\.......\DirectX.ico
..........................\.......\DirectX.rc
..........................\.......\DirectX.vcproj
..........................\.......\DirectX.vcproj.123-PC.123.user
..........................\.......\DirectX.vcproj.HL-20111118VONO.Administrator.user
..........................\.......\DirectX.vcproj.stu5585.Administrator.user
..........................\.......\DirectX.vcproj.stu76.Administrator.user
..........................\.......\ReadMe.txt
..........................\.......\Resource.h
..........................\.......\airplane 2.x
..........................\.......\bihull.bmp
..........................\.......\small.ico
..........................\.......\stdafx.cpp
..........................\.......\stdafx.h
..........................\.......\targetver.h
..........................\.......\wings.bmp
..........................\DirectX.ncb
..........................\DirectX.sln
..........................\DirectX.suo