mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-15 11:47:07 +12:00
Renderer: Add prepareForDraw callback
This commit is contained in:
parent
156c3031a2
commit
90f411889b
7 changed files with 81 additions and 71 deletions
|
@ -21,9 +21,11 @@ enum class RendererType : s8 {
|
|||
};
|
||||
|
||||
struct EmulatorConfig;
|
||||
class GPU;
|
||||
struct SDL_Window;
|
||||
|
||||
class GPU;
|
||||
class ShaderUnit;
|
||||
|
||||
class Renderer {
|
||||
protected:
|
||||
GPU& gpu;
|
||||
|
@ -77,7 +79,10 @@ class Renderer {
|
|||
virtual std::string getUbershader() { return ""; }
|
||||
virtual void setUbershader(const std::string& shader) {}
|
||||
|
||||
virtual void setUbershaderSetting(bool value) {}
|
||||
// This function is called on every draw call before parsing vertex data.
|
||||
// It is responsible for things like looking up which vertex/fragment shaders to use, recompiling them if they don't exist, choosing between
|
||||
// ubershaders and shadergen, and so on.
|
||||
virtual void prepareForDraw(ShaderUnit& shaderUnit, bool isImmediateMode) {}
|
||||
|
||||
// Functions for initializing the graphics context for the Qt frontend, where we don't have the convenience of SDL_Window
|
||||
#ifdef PANDA3DS_FRONTEND_QT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue