当前位置: 首页>>代码示例>>C++>>正文


C++ IDirect3DQuery9::Issue方法代码示例

本文整理汇总了C++中IDirect3DQuery9::Issue方法的典型用法代码示例。如果您正苦于以下问题:C++ IDirect3DQuery9::Issue方法的具体用法?C++ IDirect3DQuery9::Issue怎么用?C++ IDirect3DQuery9::Issue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDirect3DQuery9的用法示例。


在下文中一共展示了IDirect3DQuery9::Issue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetupDraw

int
D3DOverdrawWindow::
Loop(void)
{
    int nOverdraw = 0;
    IDirect3DQuery9* pOcclusionQuery;
    DWORD numberOfPixelsDrawn;
    d3d->CreateQuery(D3DQUERYTYPE_OCCLUSION, &pOcclusionQuery);

    for (unsigned int iViewpoint = 0; iViewpoint < m_nViewpointCount;
         iViewpoint++)
    {
        // Add an end marker to the command buffer queue.
        pOcclusionQuery->Issue(D3DISSUE_BEGIN);
        // Draw scene
        SetupDraw(iViewpoint);
        DrawModel();
        d3d->EndScene();
        d3d->Present(NULL, NULL, NULL, NULL);
        // Add an end marker to the command buffer queue.
        pOcclusionQuery->Issue(D3DISSUE_END);

        // Force the driver to execute the commands from the command buffer.
        // Empty the command buffer and wait until the GPU is idle.
        while (S_FALSE == pOcclusionQuery->GetData(&numberOfPixelsDrawn,
                                                   sizeof(DWORD), D3DGETDATA_FLUSH))
            ;

        nOverdraw += numberOfPixelsDrawn;
    }

    pOcclusionQuery->Release();
    return nOverdraw;
}
开发者ID:TalanSoft,项目名称:amd-tootle,代码行数:34,代码来源:d3doverdrawwindow.cpp

示例2: renderOcclusionQuery

void Graphics::renderOcclusionQuery(uint occlusionQuery, int triangles) {
	IDirect3DQuery9* pQuery = queryPool[occlusionQuery];
	if (pQuery != nullptr) {
		pQuery->Issue(D3DISSUE_BEGIN);
		device->DrawPrimitive(D3DPT_TRIANGLELIST, 0, triangles);
		pQuery->Issue(D3DISSUE_END);
	}
}
开发者ID:romamik,项目名称:Kore,代码行数:8,代码来源:Direct3D9.cpp

示例3: onBeginFrame

      void onBeginFrame()
      {
         if(!frequencyQuery)
         {
            static_cast<GFXPCD3D9Device*>(GFX)->getDevice()->CreateQuery(D3DQUERYTYPE_TIMESTAMPDISJOINT, &disjointQuery);
            static_cast<GFXPCD3D9Device*>(GFX)->getDevice()->CreateQuery(D3DQUERYTYPE_TIMESTAMPFREQ, &frequencyQuery);
         }

         disjointQuery->Issue(D3DISSUE_BEGIN);
         frequencyQuery->Issue(D3DISSUE_END);
      }
开发者ID:mray,项目名称:terminal-overload,代码行数:11,代码来源:gfxD3D9PCDeviceProfiler.cpp

示例4: FlushGPU

void CRenderSystemDX::FlushGPU()
{
  IDirect3DQuery9* pEvent = NULL;

  m_pD3DDevice->CreateQuery(D3DQUERYTYPE_EVENT, &pEvent);
  if (pEvent != NULL)
  {
    pEvent->Issue(D3DISSUE_END);
    while (S_FALSE == pEvent->GetData(NULL, 0, D3DGETDATA_FLUSH))
      Sleep(1);
  }
}
开发者ID:7orlum,项目名称:xbmc,代码行数:12,代码来源:RenderSystemDX.cpp

示例5:

	void D3D9HardwareOcclusionQuery::endOcclusionQuery() 
	{ 
		IDirect3DDevice9* pCurDevice  = D3D9RenderSystem::getActiveD3D9Device();				
		DeviceToQueryIterator it      = mMapDeviceToQuery.find(pCurDevice);
		
		if (it == mMapDeviceToQuery.end())
		{
			OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, 
				"End occlusion called without matching begin call !!", 
				"D3D9HardwareOcclusionQuery::endOcclusionQuery" );
		}

		IDirect3DQuery9* pOccQuery = mMapDeviceToQuery[pCurDevice];

		if (pOccQuery != NULL)
			pOccQuery->Issue(D3DISSUE_END); 
	}	
开发者ID:MrLobo,项目名称:El-Rayo-de-Zeus,代码行数:17,代码来源:OgreD3D9HardwareOcclusionQuery.cpp

示例6: sync

void Display::sync(bool block)
{
    HRESULT result;

    IDirect3DQuery9* query = allocateEventQuery();
    if (!query)
    {
        return;
    }

    result = query->Issue(D3DISSUE_END);
    ASSERT(SUCCEEDED(result));

    do
    {
        result = query->GetData(NULL, 0, D3DGETDATA_FLUSH);

        if(block && result == S_FALSE)
        {
            // Keep polling, but allow other threads to do something useful first
            Sleep(0);
            // explicitly check for device loss
            // some drivers seem to return S_FALSE even if the device is lost
            // instead of D3DERR_DEVICELOST like they should
            if (testDeviceLost())
            {
                result = D3DERR_DEVICELOST;
            }
        }
    }
    while(block && result == S_FALSE);

    freeEventQuery(query);

    if (isDeviceLostError(result))
    {
        notifyDeviceLost();
    }
}
开发者ID:RickEyre,项目名称:mozilla-central,代码行数:39,代码来源:Display.cpp

示例7: onEndFrame

 void onEndFrame()
 {
    disjointQuery->Issue(D3DISSUE_END);
 }
开发者ID:mray,项目名称:terminal-overload,代码行数:4,代码来源:gfxD3D9PCDeviceProfiler.cpp


注:本文中的IDirect3DQuery9::Issue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。