View Issue Details

IDProjectCategoryView StatusLast Update
0001425NoesisGUIC++ SDKpublic2019-03-19 08:25
Reporterrealesmedia Assigned Tojsantos  
PrioritynormalSeverityfeature 
Status assignedResolutionopen 
Summary0001425: Multi-window interface. Add Initializing a RenderContext associated with the new window from an existing D3D11RenderContext
Description

class RenderContext(D3D11RenderContext). Our implementation:

void D3D11RenderContext::Init(void window, void context, Noesis::RenderDevice* device, uint32_t& samples, bool vsync, bool sRGB) override
{
NS_ASSERT(Validate());
NS_LOG_DEBUG("Creating D3D11 render context");

mContext = (ID3D11DeviceContext*)context;
mContext->AddRef();

mContext->GetDevice(&mDevice);

CreateSwapChain(window, samples, sRGB);
CreateQueries();

mVSync = vsync;
mRenderer.Reset(device);

#if defined(NS_PLATFORM_WINDOWS_DESKTOP) || defined(NS_PLATFORM_WINRT)
NS_LOG_DEBUG(" Adapter: %s", [this]()
{
IDXGIDevice* dxgiDevice;
V(mDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&dxgiDevice));

    IDXGIAdapter* dxgiAdapter;
    V(dxgiDevice->GetAdapter(&dxgiAdapter));

    DXGI_ADAPTER_DESC desc;
    V(dxgiAdapter->GetDesc(&desc));

    static char description[128];
    uint32_t numChars = UTF8::UTF16To8((uint16_t*)desc.Description, description, 128);
    NS_ASSERT(numChars <= 128);

    DX_RELEASE(dxgiAdapter);
    DX_RELEASE(dxgiDevice);

    return description;
}());

#endif
}

D3D11RenderContext::~D3D11RenderContext()
{
. . .
DX_RELEASE(mContext);
DX_RELEASE(mDevice);
. . .
}

It is possible to add the interface ISwapChain for NoesisApp :: Window?

PlatformWindows

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-03-14 16:11 realesmedia New Issue
2019-03-14 16:17 realesmedia Summary Multi-window interface. Add Initializing a RenderContext from an existing D3D11RenderContext => Multi-window interface. Add Initializing a RenderContext associated with the new window from an existing D3D11RenderContext
2019-03-14 16:17 realesmedia Description Updated
2019-03-14 16:24 realesmedia Description Updated
2019-03-14 16:25 realesmedia Description Updated
2019-03-18 09:21 realesmedia Description Updated
2019-03-19 08:25 sfernandez Assigned To => jsantos
2019-03-19 08:25 sfernandez Status new => assigned