Renderer: Improve null renderer performance (#646)

* Renderer: Improve null renderer performance

* Update frontend_sdl.cpp
This commit is contained in:
wheremyfoodat 2024-11-24 17:55:31 +02:00 committed by GitHub
parent 1a40deccb1
commit 4df171abfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 5 deletions

View file

@ -17,6 +17,10 @@ class RendererNull final : public Renderer {
void screenshot(const std::string& name) override;
void deinitGraphicsContext() override;
// Tell the GPU core that we'll handle vertex fetch & shader execution in the renderer in order to speed up execution.
// Of course, we don't do this and geometry is never actually processed, since this is the null renderer.
virtual bool prepareForDraw(ShaderUnit& shaderUnit, PICA::DrawAcceleration* accel) override { return true; };
#ifdef PANDA3DS_FRONTEND_QT
virtual void initGraphicsContext([[maybe_unused]] GL::Context* context) override {}
#endif