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

优化GPU高占用问题 #54

Open
wardenfeng opened this issue Jun 9, 2018 · 0 comments
Open

优化GPU高占用问题 #54

wardenfeng opened this issue Jun 9, 2018 · 0 comments
Labels

Comments

@wardenfeng
Copy link
Member

wardenfeng commented Jun 9, 2018

gpu_high_bug

在什么都没有渲染的情况下。
只执行以下代码

gl.clearColor(scene3D.background.r, scene3D.background.g, scene3D.background.b, scene3D.background.a);
gl.clear(gl.COLOR_BUFFER_BIT);

如果将画布从分辨率(1130,744) ->(400,300),gpu占用率 %30->7.5%

可能原因

  1. Engine.ts gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);

结论

属于正常情况

优化方案

使用脏标记进行清理。

@wardenfeng wardenfeng added bug Something isn't working 优化 and removed bug Something isn't working labels Jun 9, 2018
@wardenfeng wardenfeng changed the title 修复GPU高占用bug 优化GPU高占用问题 Jun 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant