![]() |
||
? - . DirectX 9c C++ MSVS 2005 . |
||
[] [] [ 3] [] | ||
2d- - D3DApp - d3d- | ||
, - <> < >, . | ||
, , . - e-mail (. ) | ||
, , . - - 200 . | ||
, , , . , StartD3DApp. |
||
, Fle, . . - , Fle . | ||
DirectX-. DirectX. | ||
1) - Project > Fle Properties Configuration Properties > C/C++ > General Additional Include Directories -
|
||
..\..\..\..\..\Include\; common\DXUT\Core; common\DXUT\Optional; common; common\DMusic; game_common; fmod4_api\inc; fmod4_api\src; common\DSound |
||
, , . . Include DirectX SDK Fle. Fle. , . | ||
Configuration Properties > Linker > General Additional Library Directories ..\..\..\..\..\Lib\x86; fmod4_api\lib |
||
Configuration Properties > Linker > Input Additional Dependencies Debug dxerr.lib dxguid.lib d3dx9d.lib d3d9.lib comctl32.lib dsound.lib shlwapi.lib dinput8.lib winmm.lib fmodexL_vc.lib Release dxerr.lib dxguid.lib d3dx9.lib d3d9.lib comctl32.lib winmm.lib dsound.lib shlwapi.lib dinput8.lib fmodex_vc.lib |
||
Save All . | ||
2) , , , . | ||
, , . . <> DirectX, . | ||
Fle.h - #include
<d3d9.h> //
INT StartD3DApp();
|
||
Fle.pp - #include
"DXUT.h" void
RenderText(); BOOL CFleApp::InitInstance()
CWinApp::InitInstance(); - SetRegistryKey(_T("Fle game")); -
CFleDlg dlg; -
InitD3DApp(); return FALSE; - |
||
void
InitD3DApp() { GetModuleFileName(NULL, AppRootDir, AppRootDirSize); } void
FreeD3DApp() } void
RenderText() //
,
//
txtHelper.End(); |
||
//-------------------------------------------------------------------------------------- // D3D9
// false
// A8R8G8B8
return true; |
||
//-------------------------------------------------------------------------------------- // d3d device - true //-------------------------------------------------------------------------------------- bool CALLBACK ModifyDeviceSettings( DXUTDeviceSettings* pDeviceSettings, void* pUserContext ) { return true; } |
||
//-------------------------------------------------------------------------------------- // D3D9 , // // (D3DPOOL_MANAGED) // //-------------------------------------------------------------------------------------- HRESULT CALLBACK OnD3D9CreateDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext ) { HRESULT hr;
V_RETURN( D3DXCreateFont( DXUTGetD3D9Device(), 12, 0, 0, 1, FALSE, DEFAULT_CHARSET,
return S_OK; |
||
//-------------------------------------------------------------------------------------- // D3D9 // // // (D3DPOOL_DEFAULT) // //-------------------------------------------------------------------------------------- HRESULT CALLBACK OnD3D9ResetDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext ) { HRESULT hr;
if( g_pFont ) V_RETURN( D3DXCreateSprite( pd3dDevice, &g_pTextSprite ) );
// reset the timer
return S_OK; |
||
//-------------------------------------------------------------------------------------- // . D3D API // // // // // //-------------------------------------------------------------------------------------- void CALLBACK OnFrameMove( double fTime, float fElapsedTime, void* pUserContext ) { } |
||
//-------------------------------------------------------------------------------------- // D3D9 //-------------------------------------------------------------------------------------- void CALLBACK OnD3D9FrameRender( IDirect3DDevice9* pd3dDevice, double fTime, float fElapsedTime, void* pUserContext ) { HRESULT hr;
// RenderText();
V( pd3dDevice->EndScene() ); |
||
//-------------------------------------------------------------------------------------- //
return 0; |
||
//-------------------------------------------------------------------------------------- // D3D9 OnD3D9ResetDevice //-------------------------------------------------------------------------------------- void CALLBACK OnD3D9LostDevice( void* pUserContext ) {
if( g_pFont )
SAFE_RELEASE( g_pTextSprite ); |
||
//-------------------------------------------------------------------------------------- // D3D9 OnD3D9CreateDevice //-------------------------------------------------------------------------------------- void CALLBACK OnD3D9DestroyDevice( void* pUserContext ) { SAFE_RELEASE( g_pFont ); |
||
//-------------------------------------------------------------------------------------- // //-------------------------------------------------------------------------------------- INT StartD3DApp() { // . #if defined(DEBUG) | defined(_DEBUG) _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); #endif
// // :
// DXUT Win32
Direct3D // // //
HRESULT hr;
SetWindowLong( DXUTGetHWND(), GWL_STYLE, hr = DXUTCreateDevice( true, 800, 600 ); // d3d-, , // // 800600
// // : return DXUTGetExitCode(); } |
||
, , . . - //--------------------------------------------------------------------------------------
if( g_pFont )
SAFE_RELEASE( g_pTextSprite ); |
||
- | ||
![]() |
||
, . , - 2) DXUT - , openwebpage.h .cpp common - . 2
|
||
3) - Fle.cpp #ifdef
_DEBUG - ID3DXFont*
g_pFont = NULL; // |
||
4) FleDlg.cpp void CFle2Dlg::OnLButtonUp(UINT nFlags, CPoint point)
//StartD3DApp();
StartD3DApp(); |
||
<> , 804622, FPS. | ||
![]() |
||
, . - . | ||
- . | ||
[] [] [ 3] [] | ||
,
|
||||||||||
,
|
||||||||||
, , 2020 - ,
|
||||||||||
, , , .
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
(3), (1)
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
(3), (1)
|
||||||||||
|
||||||||||
,
|
||||||||||
|
||||||||||
|
||||||||||
,
|
||||||||||
,
|
||||||||||
,
|
||||||||||
, ,
|
||||||||||
, ,
|
||||||||||
, , cms,
|
||||||||||
,
|
||||||||||
, , ria xxl , fly snow 3d , . -
|
||||||||||
fle game engine -
|
||||||||||
- / megainformatic cms express files -
|
||||||||||
Flash, Flash - .
|
||||||||||
(multi lang), , . - (megainformatic cms social), megainformatic cms groupon, keywords gen + , .
megainformatic.ru/webjob/ - - |
||||||||||
megainformatic.ru/webjob/ - - |
||||||||||
,
megainformatic cms admin - |
||||||||||
|
||||||||||
|
||||||||||
megainformatic cms free - Photoshop
, Adobe Photoshop. , - GIMP, Corel Photo Paint .
|
||||||||||
2d 3d, , !
. , , !!! ( , ! ). |
||||||||||
, : -
- , , , . - - : - |
||||||||||
, 3ds max, photoshop, c++, directx, delphi php.
, . . |
||||||||||
Photoshop free, delphi directx - , !, mp3 - , megainformatic cms express - php + my sql. |
||||||||||
,
, delphi directx 8.1 ( 3d ), 3d studio max, - Fruity Loops Studio |
||||||||||
|