two
two copied to clipboard
What bgfx::render type does **two** choose?
I found the following code:
// File: two/src/bgfx/BgfxSystem.cpp
// Function: BgfxSystem::init
info("gfx - bgfx::init");
bgfx::Init params = {};
params.type = bgfx::RendererType::OpenGL;
params.type = bgfx::RendererType::Direct3D11;
//params.type = bgfx::RendererType::Direct3D12;
params.type = bgfx::RendererType::WebGPU;
params.resolution.width = uint32_t(context.m_size.x);
params.resolution.height = uint32_t(context.m_size.y);
params.resolution.reset = BGFX_RESET_NONE;
the value of params.type is repeated assigned with OpenGL, Direct3D11, WebGPU, this is confusing me. Can you explain this?
Thank you very much.
In this way, the previous type is overwroten by the last type. The funnally type is WebGPU.