¼öÁýµÈ ÀÚ·á
 FrontPage|FindPage|TitleIndex|RecentChanges|UserPreferences E D R S P I M H RSS

¹è´ÞÀDZâ¼öº¸´Ù Çö¸íÇÏ°Ô ÀÏÇϱâ¼Ò¼³Ã³·³ ÀÐÈ÷´Â ÇÁ·Î±×·¡¹Ö¼Õ½¬¿î ¹ö±× ÃßÀû¹ý¼Õ½¬¿î ¼ÒÇÁÆ®¿þ¾î ½ºÄÉÁÙ °ü¸®¹ý › ¼öÁýµÈ ÀÚ·á
Contents:
1 ¼öÁýµÈ ¸µÅ©
1.1 °ÔÀÓ °³¹ß °ü·Ã ¸µÅ©
1.2 Linux °ü·Ã ¸µÅ©
1.3 À¥ °ü·Ã ¸µÅ©
1.4 ´Ù¿î·Îµå
2 ³×Æ®¿öÅ© ÇÁ·Î±×·¡¹Ö
3 Ãë¹Ì
4 »õ·Î ¸¸µé ÆäÀÌÁö
5 Âü°í¼­Àû
6 ÇÁ·Î±×·¡¹Ö °ü·Ã Á¤º¸
6.1 MFC ÇÁ·Î±×·¡¹Ö
7 Direct3D ÇÁ·Î±×·¡¹Ö Á¤º¸
7.1 Direct3D ¿¡¼­ ÀåÄ¡¿Í ¸®¼Ò½º °ü¸®Çϱâ
7.2 D3D µð¹ÙÀ̽º ¼Ò½Ç ó¸®
7.3 µð¹ÙÀ̽ºÀÇ Reset() ó¸®
7.4 D3DPRESENT_PARAMETERS ±¸Á¶Ã¼ ä¿ì±â
7.5 Multiple Swap Chain »ç¿ëÇϱâ
8 °ÔÀÓ ÇÁ·Î±×·¡¹Ö Á¤º¸
8.1 ¹°¸® ¿£Áø
8.2 Ä«Å÷ ·»´õ¸µ
8.3 °ÔÀÓ¿¡¼­ ½Ã°£Ã³¸®
8.4 °ÔÀÓ ·çÇÁ


1 ¼öÁýµÈ ¸µÅ© #


1.1 °ÔÀÓ °³¹ß °ü·Ã ¸µÅ© #


1.2 Linux °ü·Ã ¸µÅ© #


1.3 À¥ °ü·Ã ¸µÅ© #


1.4 ´Ù¿î·Îµå #


2 ³×Æ®¿öÅ© ÇÁ·Î±×·¡¹Ö #


3 Ãë¹Ì #


  • [http]Á¾ÀÌõÇÏ
    • Á¾ÀÌ °øÀÛ »çÀÌÆ®, ½ºÅ¸Å©·¡ÇÁÆ® À¯´ÖÀ̳ª °Ç¹°µµ ÀÖ°í ¸¸µå´Â ¹æ¹ýµµ ¼Ò°³µÇ¾î ÀÖÀ½
    • ´Ù¾çÇÑ ¸ðµ¨ÀÇ Àü°³µµ¸¦ ´Ù¿î·Îµå ÇÒ ¼ö ÀÖµµ·Ï ÀÚ·á½ÇÀÌ Àß ¸¸µé¾îÁ® ÀÖÀ½
    • ÇÑ±ÛÆÇ ¸ÞŸ¼¼ÄâÀ̾î ( Àü°³µµ ¸¸µå´Â ÇÁ·Î±×·¥ ) ´Ù¿î·Îµå °¡´É
    • [http]Metasequoia
      • ÀϺ»ÀÇ [http]¹ÌÁî³ë·¦¿¡¼­ °³¹ßÇÑ 3D ¸ðµ¨¸µ ÇÁ·Î±×·¥
  • [http]MAX7 3D paper
    • C&C 2 ÀÇ GDI MLRS ( È£¹öÀüÂ÷ ) ¿Í Kodiak À¯´ÖÀÇ Á¾ÀÌ °øÀÛ È¨ÆäÀÌÁö
  • SD ÅÊÅ© ½Ã¸®Áî Àü°³µµ
  • [http]ALIENS Papercraft
    • ¿µÈ­ Alien ¿¡ µîÀåÇÏ´Â ¸ðµ¨ÀÇ Á¾ÀÌ °øÀÛ »çÀÌÆ®
    • ¼ö¼Û¼±, APC Àå°©Â÷, ÀÛ¾÷ Â÷·®, ÀÚµ¿¼ÒÃѵî
  • [http]3D Papermodel Net


4 »õ·Î ¸¸µé ÆäÀÌÁö #


  • MFC ¸¦ ÀÌ¿ëÇÑ Direct3D ÇÁ·Î±×·¡¹Ö 2
    • Direct3D ¸¦ À§ÇÑ MFC ÇÁ·¹ÀÓ¿öÅ© v1.0
    • D3D µð¹ÙÀ̽º Reset ó¸® Ãß°¡
    • À©µµ¿ìÅ©±âÀÇ ÃÖ´ë, ÃÖ¼ÒÈ­ ó¸® ( Pause ó¸® )
    • ´Ù¿î·Îµå - Uploads: MFC/MFC4D3D-v1.0.zip


5 Âü°í¼­Àû #


  • DirectX 9¸¦ ÀÌ¿ëÇÑ 3D °ÔÀÓ ÇÁ·Î±×·¡¹Ö ÀÔ¹®
    • Frank D. Luna Àú, ÃÖÇöÈ£ ¿ª, Á¤º¸¹®È­»ç
      [ISBN-8956741670]
  • °´Ã¼ÁöÇâ À̾߱â 2nd Edition
    • Àüº´¼± Àú, ¿µÁø.COM
      [ISBN-8931427158]
  • ¿­Ç÷°­ÀÇ Python(ÆÄÀ̽ã) (°³Á¤ÆÇ)
    • À̰­¼º Àú, ÇÁ¸®·º
      [ISBN-8989345588]


6 ÇÁ·Î±×·¡¹Ö °ü·Ã Á¤º¸ #


6.1 MFC ÇÁ·Î±×·¡¹Ö #


7 Direct3D ÇÁ·Î±×·¡¹Ö Á¤º¸ #


7.1 Direct3D ¿¡¼­ ÀåÄ¡¿Í ¸®¼Ò½º °ü¸®Çϱâ #


7.2 D3D µð¹ÙÀ̽º ¼Ò½Ç ó¸® #


7.3 µð¹ÙÀ̽ºÀÇ Reset() ó¸® #


 1  HRESULT rt = pD3Ddevice->TestCooperativeLevel();    // »óÅ Á¶»ç
 2  while( rt == D3DERR_DEVICELOST )
 3  {
 4      while( rt != D3DERR_DEVICENOTRESET )
 5      {
 6          Sleep( 1000 );      // 1Ãʰ£ ´ë±â
 7          rt = pD3Ddevice->TestCooperativeLevel();    // »óŸ¦ ´Ù½Ã Á¶»ç
 8      }
 9
10      if( FAILED( pD3Ddevice->Reset(&mPresentParameters) ) )
11      {
12          rt = D3DERR_DEVICELOST;     // Reset ÈÄ ¿¡·¯ ¹ß»ý½Ã ¿¡·¯ ÄÚµå·Î ¼³Á¤
13      }
14  }

7.4 D3DPRESENT_PARAMETERS ±¸Á¶Ã¼ ä¿ì±â #


  • SwapEffect - Çø®ÇΠüÀÎÀÇ ¹öÆÛ°¡ ±³È¯µÇ´Â ¹æ¹ýÀ» ÁöÁ¤ÇÏ´Â D3DSWAPEFFECT ¿­°ÅÇü ¸â¹ö. D3DSWAPEFFECT_DISCARD ¸¦ ÁöÁ¤ÇÏ´Â °ÍÀÌ °¡Àå È¿°úÀûÀÌ´Ù.
  • Flags - ¸î °¡Áö ºÎ°¡ÀûÀΠƯ¼ºµé. 0 ( Ç÷¡±× ¾øÀ½ ) À» ÁöÁ¤Çϰųª D3DPRESENTFLAG ÁýÇÕÀÇ ¸â¹ö Áß Çϳª¸¦ ÁöÁ¤ÇÑ´Ù. Àüü Ç÷¡±× ¸®½ºÆ®¸¦ ¿øÇÑ´Ù¸é SDK ¹®¼­¸¦ Âü°íÇÑ´Ù. ´ÙÀ½Àº °¡Àå ÀϹÝÀûÀÎ µÎ °¡Áö Ç÷¡±×ÀÌ´Ù.
    • D3DPRESENTFLAG_LOCKABLE_BACKBUFFER - ÈÄ¸é ¹öÆÛ¸¦ Àá±Û ¼ö ÀÖÀ½À» ÁöÁ¤ÇÑ´Ù. Àá±Û ¼ö ÀÖ´Â ÈÄ¸é ¹öÆÛ´Â ¼º´É ÀúÇÏÀÇ ¿øÀÎÀÌ µÉ ¼ö ÀÖ´Ù.
    • D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL - ´ÙÀ½ ÈÄ¸é ¹öÆÛ¸¦ ½Ã¿¬ÇÑ µÚ¿¡ ±íÀÌ / ½ºÅÙ½Ç ¹öÆÛ¸¦ ¹ö¸± °ÍÀÓÀ» ÁöÁ¤ÇÑ´Ù. ±íÀÌ / ½ºÅÙ½Ç ¹öÆÛ ¸Þ¸ð¸®´Â ¹ö·ÁÁö°Å³ª ¹«È¿È­µÉ ¼ö ÀÖ´Ù. ÀÌ Ç÷¡±×´Â ¼º´É Çâ»ó¿¡ µµ¿òÀÌ µÈ´Ù.

7.5 Multiple Swap Chain »ç¿ëÇϱâ #


  • MFC ¸¦ ÀÌ¿ëÇÏ¿© ´ÙÁߺ並 ±¸ÇöÇØ¾ß ÇÒ ¶§ »ç¿ëÇÑ´Ù.
  • [http]Swap chain->Present() performance - {gamedev}
     1  void CGraphView::OnInitialUpdate()
     2  {
     3      // this is my MFC View class OnInitialUpdate()
     4
     5      // Get the handle to the 1st render target.
     6      m_hwndRenderWindow  = GetDlgItem( IDC_RENDER_FRAME  )->GetSafeHwnd();
     7
     8      // Get the handle to the 2nd render target.
     9      m_hwndRenderWindow2 = GetDlgItem( IDC_RENDER_FRAME2 )->GetSafeHwnd();
    10
    11      // Create the device using the Example Framework class
    12      // CD3DApplication
    13      CD3DApplication::m_hWnd = m_hwndRenderWindow;
    14
    15      // Create the device passing it the HINSTANCE handle
    16      // of our main app.
    17      CD3DApplication::Create( AfxGetInstanceHandle() );
    18
    19      // The seperate D3DPRESENT_PARAMETERS for each swap chain.
    20      ZeroMemory( &m_d3dppSwapChain,  sizeof( D3DPRESENT_PARAMETERS ) );
    21      ZeroMemory( &m_d3dppSwapChain2, sizeof( D3DPRESENT_PARAMETERS ) );
    22
    23      // Get the current display mode for the desktop.
    24      D3DDISPLAYMODE mode;
    25      m_pD3D->GetAdapterDisplayMode( D3DADAPTER_DEFAULT, &mode );
    26
    27      // Setup the presentation paramaters for the first swapchain.
    28      m_d3dppSwapChain.Windowed   = TRUE;
    29      m_d3dppSwapChain.SwapEffect = D3DSWAPEFFECT_COPY;
    30      m_d3dppSwapChain.BackBufferFormat = mode.Format;
    31      m_d3dppSwapChain.hDeviceWindow    = m_hwndRenderWindow;
    32
    33      // Create the first swapchain
    34      m_pd3dDevice->CreateAdditionalSwapChain( &m_d3dppSwapChain, &m_pSwapChain );
    35
    36      // Setup the presentation parameters for second swapchain.
    37      m_d3dppSwapChain2.Windowed   = TRUE;
    38      m_d3dppSwapChain2.SwapEffect = D3DSWAPEFFECT_COPY;
    39      m_d3dppSwapChain2.BackBufferFormat = mode.Format;
    40      m_d3dppSwapChain.hDeviceWindow     = m_hwndRenderWindow2;
    41
    42      // Create the 2nd swap chain
    43      m_pd3dDevice->CreateAdditionalSwapChain( &m_d3dppSwapChain2, &m_pSwapChain2 );
    44  }
    45
    46  // The main render function called from the main apps
    47  // OnIdle() function.
    48  HRESULT CGraphView::Render()
    49  {
    50      // Create a temporary surface to hold the returned
    51      // suface from GetBackBuffer()
    52      LPDIRECT3DSURFACE9 pSurface = NULL;
    53
    54      if( SUCCEEDED( m_pd3dDevice->BeginScene() ) )
    55      {
    56          // Render the 1st viewport
    57          m_pSwapChain->GetBackBuffer( 0, D3DBACKBUFFER_TYPE_MONO, &pSurface );
    58          m_pd3dDevice->SetRenderTarget( 0, pSurface );
    59
    60          m_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR(0x000000), 1.0f, 0L );
    61
    62          // Reset the world matrix
    63          D3DXMATRIXA16 matWorld;
    64          D3DXMatrixIdentity( &matWorld );
    65          m_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
    66
    67          // Draw the grid
    68          m_pd3dDevice->SetFVF( D3DFVF_GRIDVERTEX );
    69          m_pd3dDevice->SetStreamSource( 0, m_pGridVB, 0, sizeof( GRIDVERTEX ) );
    70          m_pd3dDevice->DrawPrimitive( D3DPT_LINELIST, 0, m_dwNumGridVerts / 2 );
    71
    72          pSurface->Release();
    73
    74          // Render the 2nd viewport, For the purposes of this
    75          // example i am rendering the same scene as the other
    76          m_pSwapChain2->GetBackBuffer( 0, D3DBACKBUFFER_TYPE_MONO, &pSurface );
    77          m_pd3dDevice->SetRenderTarget( 0, pSurface );
    78
    79          m_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR(0x000000), 1.0f, 0L );
    80          // Reset the world matrix
    81          D3DXMATRIXA16 matWorld;
    82          D3DXMatrixIdentity( &matWorld );
    83          m_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
    84
    85          // Draw the grid
    86          m_pd3dDevice->SetFVF( D3DFVF_GRIDVERTEX );
    87          m_pd3dDevice->SetStreamSource( 0, m_pGridVB, 0, sizeof( GRIDVERTEX ) );
    88          m_pd3dDevice->DrawPrimitive( D3DPT_LINELIST, 0, m_dwNumGridVerts / 2 );
    89          pSurface->Release();
    90
    91          m_pd3dDevice->EndScene();
    92      }
    93
    94      m_pSwapChain->Present( NULL, NULL, NULL, NULL, NULL );
    95      m_pSwapChain2->Present( NULL, NULL, NULL, NULL, NULL );
    96
    97      return S_OK;
    98  }
    



8 °ÔÀÓ ÇÁ·Î±×·¡¹Ö Á¤º¸ #


8.1 ¹°¸® ¿£Áø #


8.2 Ä«Å÷ ·»´õ¸µ #


8.3 °ÔÀÓ¿¡¼­ ½Ã°£Ã³¸® #


8.4 °ÔÀÓ ·çÇÁ #


 1  int d3d::EnterMsgLoop( bool (*ptr_display) (float timeDelta) )
 2  {
 3      MSG msg;
 4      ::ZeroMemory( &msg, sizeof( MSG ) );
 5
 6      static float lastTime = (float) timeGetTime();
 7
 8      while( msg.message != WM_QUIT )
 9      {
10          if( ::PeekMessage( &msg, 0, 0, 0, PM_REMOVE ) )
11          {
12              ::TranslateMessage( &msg );
13              ::DispatchMessage( &msg );
14          }
15          else
16          {
17              float currTime = (float) timeGetTime();
18              float timeDelta = ( currTime - lastTime ) * 0.001f;
19
20              ptr_display( timeDelta );   //µð½ºÇ÷¹ÀÌ ÇÔ¼ö¸¦ È£ÃâÇÑ´Ù.
21
22              lastTime = currTime;
23          }
24      }
25      return msg.wParam;
26  }

EditText|FindPage|DeletePage|LikePages| Valid XHTML 1.0! Valid CSS! powered by MoniWiki