Re: noesisGUI v1.2 BETA 5
Posted: 13 Nov 2014, 00:13
That would be very fantastic!Please, give me a few days and I will publish the DX11 integration sample in github.
Welcome to our official discussion site. You’ll find topics on features, bugs, development, and general support here
https://www.noesisengine.com/forums/
That would be very fantastic!Please, give me a few days and I will publish the DX11 integration sample in github.
//--------------------------------------------------------------------------------------
// Render a frame
//--------------------------------------------------------------------------------------
void Render()
{
// Update our time
static float t = 0.0f;
if( g_driverType == D3D_DRIVER_TYPE_REFERENCE )
{
t += ( float )XM_PI * 0.0125f;
}
else
{
static ULONGLONG timeStart = 0;
ULONGLONG timeCur = GetTickCount64();
if( timeStart == 0 )
timeStart = timeCur;
t = ( timeCur - timeStart ) / 1000.0f;
}
#ifdef NOESIS_GUI
NsGetKernel()->Tick();
xamlRenderer->Update(t);
#endif
}
#ifdef NOESIS_GUI
NsGetKernel()->Tick();
xamlRenderer->Update(t);
const RenderCommands& commands = xamlRenderer->WaitForUpdate();
xamlRenderer->Render(commands.offscreenCommands.GetPtr());
g_pImmediateContext->OMSetRenderTargets( 1, &g_pRenderTargetView, g_pDepthStencilView );
g_pImmediateContext->IASetInputLayout( g_pVertexLayout );
UINT stride = sizeof( SimpleVertex );
UINT offset = 0;
g_pImmediateContext->IASetVertexBuffers( 0, 1, &g_pVertexBuffer, &stride, &offset );
g_pImmediateContext->IASetIndexBuffer( g_pIndexBuffer, DXGI_FORMAT_R16_UINT, 0 );
g_pImmediateContext->IASetPrimitiveTopology( D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST );
g_pImmediateContext->OMSetDepthStencilState(0, 0);
g_pImmediateContext->RSSetState(0);
g_pImmediateContext->OMSetBlendState(0, 0, 0xffffffff);
#endif