vilbeyli / VQEngine-Legacy

DirectX 11 Renderer written in C++11
GNU General Public License v3.0
287 stars 37 forks source link

UI Part is too much use CPU and GPU Time. #99

Open ffdd270 opened 6 years ago

ffdd270 commented 6 years ago

When i use ';' key Press for Displaying CPU/GPU Performance Numbers. Frame Rate is too fall. Just Some Text rendering.

My Computer System is Window 10, Ver 1709 . Build by Visual Studio 2017, Window SDK 10.0.16229.0.

first secn

CPU and GPU Time in increase 9ms.

vilbeyli commented 6 years ago

@nhy3795 Text rendering is in its most basic form right now and is highly inefficient in its current state. I have it listed in my optimization task list so I'll optimize it in the future (#95 ), which would be in version 0.5.0 release.

I would suggest using the engine in release mode as the text rendering makes a big impact on the frame time in debug mode.

If the performance numbers you show are already in release mode, you can comment out the CPUProfiler::BeginEntry()/EndEntry() and GPUProfiler::BeginQuery()/EndQuery() function pairs in the Engine::Render() function located in in Engine.cpp file to reduce the text rendering or change it to your liking.

ffdd270 commented 6 years ago

Thank you for your supporting. I was very helpful your answer.

And, I want help increase performance for 'Render SubTree' function. Can I propose pull request?

Sorry for My english skill.

ffdd270 commented 6 years ago

@vilbeyli Rather than drawing on the screen immediately, I think we can improve performance by calling up the next Apply() the program draw on the texture.

Renderer::AddRenderTarget to create a Texture Render Target, then draw it there and draw it on Window Render Target?

vilbeyli commented 6 years ago

@nhy3795 I'm currently re-designing the whole scene/material/gameobject data layout and data flow. I did not want to do any optimizations before restructuring the rendering pipeline of the engine.

Feel free to experiment yourself with forking the project in the meantime if you want to tweak the engine.