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 ) );
    }


  • 相关阅读:
    redis 安装报错
    eclipse 启动后,闪退
    java 读取文件路径空格和中文的处理
    阿里云里面的Linux 系统挂载数据盘
    云服务器 ECS Linux 系统盘数据转移方法
    Redis批量删除Key
    快速搭建 SpringCloud 微服务开发环境的脚手架
    用这个库 3 分钟实现让你满意的表格功能:Bootstrap-Table
    Python 命令行之旅:深入 click 之选项篇
    Python 命令行之旅:深入 click 之参数篇
  • 原文地址:https://www.cnblogs.com/lai3d/p/1574177.html
Copyright © 2011-2022 走看看