zoukankan      html  css  js  c++  java
  • Live Writer 测试

    尝试下图片

    cute_panda

    尝试下代码,好像要装插件才行,用了这个CodeFormatterPlugin2.0.0.1

    //--------------------------------------------------------------------------------------
    // This callback function is called by OnFrameRender
    // It performs HW Instancing
    //--------------------------------------------------------------------------------------
    void OnRenderHWInstancing( IDirect3DDevice9* pd3dDevice, double fTime, float fElapsedTime )
    {
    HRESULT hr;
    UINT iPass, cPasses;
    V( pd3dDevice->SetVertexDeclaration( g_pVertexDeclHardware ) );
    // Stream zero is our model, and its frequency is how we communicate the number of instances required,
    // which in this case is the total number of boxes
        V( pd3dDevice->SetStreamSource( 0, g_pVBBox, 0, sizeof( BOX_VERTEX ) ) );
    V( pd3dDevice->SetStreamSourceFreq( 0, D3DSTREAMSOURCE_INDEXEDDATA | g_NumBoxes ) );
    // Stream one is the Instancing buffer, so this advances to the next value
    // after each box instance has been drawn, so the divider is 1.
        V( pd3dDevice->SetStreamSource( 1, g_pVBInstanceData, 0, sizeof( BOX_INSTANCEDATA_POS ) ) );
    V( pd3dDevice->SetStreamSourceFreq( 1, D3DSTREAMSOURCE_INSTANCEDATA | 1ul ) );
    V( pd3dDevice->SetIndices( g_pIBBox ) );
    // Render the scene with this technique
    // as defined in the .fx file
        V( g_pEffect->SetTechnique( g_HandleTechnique ) );
    V( g_pEffect->Begin( &cPasses, 0 ) );
    for( iPass = 0; iPass < cPasses; iPass++ )
    {
    V( g_pEffect->BeginPass( iPass ) );
    // Render the boxes with the applied technique
            V( g_pEffect->SetTexture( g_HandleTexture, g_pBoxTexture ) );
    // The effect interface queues up the changes and performs them
    // with the CommitChanges call. You do not need to call CommitChanges if
    // you are not setting any parameters between the BeginPass and EndPass.
            V( g_pEffect->CommitChanges() );
    V( pd3dDevice->DrawIndexedPrimitive( D3DPT_TRIANGLELIST, 0, 0, 4 * 6, 0, 6 * 2 ) );
    V( g_pEffect->EndPass() );
    }
    V( g_pEffect->End() );
    V( pd3dDevice->SetStreamSourceFreq( 0, 1 ) );
    V( pd3dDevice->SetStreamSourceFreq( 1, 1 ) );
    }


  • 相关阅读:
    mysql常用基本命令
    mysql8.0.13下载与安装图文教程
    k8s ingress 增加跨域配置
    Jenkins 备份恢复插件 thinBackup 使用
    k8s HA master 节点宕机修复
    nginx 跨域问题解决
    mongodb 3.4.24 主从复制
    k8s 线上安装 jenkins并结合 jenkinsfile 实现 helm 自动化部署
    k8s helm 运用与自建helm仓库chartmuseum
    centos6 源码安装 unzip
  • 原文地址:https://www.cnblogs.com/lai3d/p/1574177.html
Copyright © 2011-2022 走看看