• Direct3D学习_绘制


    运行了示例,重要步骤记录如下:

      1:创建顶点和索引缓存

        IDirect3DDevice9::CreateVertexBuffer

        IDirect3DDevice9::CreateIndexBuffer

      2:填充数据

        lock

          ........

         unlock

      3:设置摄像机

        D3DXVECTOR3 position(x,y,z);
        D3DXVECTOR3 target(x,y,z);
        D3DXVECTOR3 up(x,y,z);
        D3DXMATRIX V;
        D3DXMatrixLookAtLH(&V, &position, &target, &up);
        Device->SetTransform(D3DTS_VIEW, &V);

      4:设置绘制状态

        IDirect3DDevice9::SetRenderState

      5:绘制   

        IDirect3DDevice9::BeginScene
        IDirect3DDevice9::SetStreamSource
        IDirect3DDevice9::DrawPrimitive
        IDirect3DDevice9::EndScene

      6:释放资源

        Release

  • 相关阅读:
    2017ICPC南宁补题
    H. The Game of Life
    I
    Twice Equation
    (贪心+队列)String
    Marcin and Training Camp
    莫比乌斯函数模版
    HDU-1695 莫比乌斯反演
    Steps to One DP+莫比乌斯反演
    Educational Codeforces Round 62 (Rated for Div. 2)
  • 原文地址:https://www.cnblogs.com/tankw/p/2352775.html
Copyright © 2020-2023  润新知