本文整理汇总了C++中LPDIRECT3DDEVICE8::Begin方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECT3DDEVICE8::Begin方法的具体用法?C++ LPDIRECT3DDEVICE8::Begin怎么用?C++ LPDIRECT3DDEVICE8::Begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDIRECT3DDEVICE8
的用法示例。
在下文中一共展示了LPDIRECT3DDEVICE8::Begin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RenderAtRect
//---------------------------------------------------------------------
// RenderAsOffset
//---------------------------------------------------------------------
void CSkinHighlightBar::RenderAtRect( LPDIRECT3DDEVICE8 displayDevice,
FLOAT left,
FLOAT top,
FLOAT right,
FLOAT bottom ) const
{
displayDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
displayDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA );
displayDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
displayDevice->SetVertexShader( D3DFVF_XYZRHW | D3DFVF_DIFFUSE );
displayDevice->SetTexture( 0, NULL );
displayDevice->Begin( D3DPT_QUADLIST );
displayDevice->SetVertexDataColor( D3DVSDE_DIFFUSE, m_cornerColors[0] );
displayDevice->SetVertexData4f( D3DVSDE_VERTEX, left, top, 1.0f, 1.0f );
displayDevice->SetVertexDataColor( D3DVSDE_DIFFUSE, m_cornerColors[1] );
displayDevice->SetVertexData4f( D3DVSDE_VERTEX, right, top, 1.0f, 1.0f );
displayDevice->SetVertexDataColor( D3DVSDE_DIFFUSE, m_cornerColors[2] );
displayDevice->SetVertexData4f( D3DVSDE_VERTEX, right, bottom, 1.0f, 1.0f );
displayDevice->SetVertexDataColor( D3DVSDE_DIFFUSE, m_cornerColors[3] );
displayDevice->SetVertexData4f( D3DVSDE_VERTEX, left, bottom, 1.0f, 1.0f );
displayDevice->End();
}