Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
grassofsky opened this issue Dec 31, 2020 · 1 comment
Open

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

grassofsky opened this issue Dec 31, 2020 · 1 comment

Comments

@grassofsky
Copy link

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.

@charlietsao
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants