-
-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add shader variables that point to object properties
- Loading branch information
Showing
10 changed files
with
256 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,35 @@ | ||
#pragma once | ||
#include <SHADERed/Objects/ShaderVariable.h> | ||
#include <SHADERed/Objects/PipelineManager.h> | ||
#include <vector> | ||
|
||
namespace ed { | ||
class FunctionVariableManager { | ||
public: | ||
static size_t GetArgumentCount(ed::FunctionShaderVariable func); | ||
FunctionVariableManager(); | ||
|
||
void Initialize(PipelineManager* pipe); | ||
|
||
void AddToList(ed::ShaderVariable* var); | ||
void Update(ed::ShaderVariable* var); | ||
|
||
static void AllocateArgumentSpace(ed::ShaderVariable* var, ed::FunctionShaderVariable func); | ||
static size_t GetArgumentCount(ed::FunctionShaderVariable func); | ||
static bool HasValidReturnType(ShaderVariable::ValueType ret, ed::FunctionShaderVariable func); | ||
static void AddToList(ed::ShaderVariable* var); | ||
static void Update(ed::ShaderVariable* var); | ||
static float* LoadFloat(char* data, int index); | ||
|
||
static void ClearVariableList(); | ||
void ClearVariableList(); | ||
|
||
std::vector<ed::ShaderVariable*> VariableList; | ||
|
||
static inline FunctionVariableManager& Instance() | ||
{ | ||
static FunctionVariableManager ret; | ||
return ret; | ||
} | ||
|
||
static int CurrentIndex; | ||
static std::vector<ed::ShaderVariable*> VariableList; | ||
private: | ||
int m_currentIndex; | ||
PipelineManager* m_pipeline; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.