本文整理汇总了C++中LPDIRECT3DDEVICE7::DrawPrimitiveVB方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECT3DDEVICE7::DrawPrimitiveVB方法的具体用法?C++ LPDIRECT3DDEVICE7::DrawPrimitiveVB怎么用?C++ LPDIRECT3DDEVICE7::DrawPrimitiveVB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDIRECT3DDEVICE7
的用法示例。
在下文中一共展示了LPDIRECT3DDEVICE7::DrawPrimitiveVB方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: wDrawPrimitiveVB
/// <summary>
/// <c>wDrawPrimitiveVB</c>
/// </summary>
/// <remarks>
/// </remarks>
/// <param name="d3dDevice7"></param>
/// <param name="d3dptPrimitiveType"></param>
/// <param name="lpd3dVertexBuffer"></param>
/// <param name="dwStartVertex"></param>
/// <param name="dwNumVertices"></param>
/// <param name="dwFlags"></param>
/// <returns></returns>
HRESULT __stdcall wDrawPrimitiveVB(
LPDIRECT3DDEVICE7 d3dDevice7, D3DPRIMITIVETYPE d3dptPrimitiveType,
LPDIRECT3DVERTEXBUFFER7 lpd3dVertexBuffer, ULONG dwStartVertex,
ULONG dwNumVertices, ULONG dwFlags)
{
LPDIRECT3DVERTEXBUFFER7 pd3dVertexBufferUsed;
PSTR pszErrorMessage;
HRESULT hResult;
InternalFunctionSpew("GameOS_Direct3D", "DrawPrimitiveVB(0x%x)", lpd3dVertexBuffer);
if (g_pGetDXVB)
{
pd3dVertexBufferUsed = g_pGetDXVB(lpd3dVertexBuffer, d3dDevice7);
}
else
{
pd3dVertexBufferUsed = lpd3dVertexBuffer;
}
hResult = d3dDevice7->DrawPrimitiveVB(
d3dptPrimitiveType,
pd3dVertexBufferUsed,
dwStartVertex,
dwNumVertices,
dwFlags);
if (FAILED(hResult))
{
if (hResult != DDERR_SURFACELOST)
{
pszErrorMessage = ErrorNumberToMessage(hResult);
if ( InternalFunctionPause("FAILED (0x%x - %s) - DrawPrimitiveVB(0x%x)",
hResult, pszErrorMessage, lpd3dVertexBuffer) )
ENTER_DEBUGGER;
}
}
return hResult;
}