two icon indicating copy to clipboard operation
two copied to clipboard

What bgfx::render type does **two** choose?

Open grassofsky opened this issue 4 years ago • 1 comments

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.

grassofsky avatar Dec 31 '20 03:12 grassofsky

In this way, the previous type is overwroten by the last type. The funnally type is WebGPU.

charlietsao avatar Feb 02 '21 07:02 charlietsao