blob: bfb95ce14cb9fabe9f4ee7f01c6134ef63c0531d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#pragma once
#include "Runtime/BaseClasses/GameManager.h"
#include "Runtime/Shaders/Shader.h"
#include <vector>
class GraphicsSettings : public GlobalGameManager
{
public:
typedef UNITY_VECTOR(kMemRenderer, PPtr<Shader>) ShaderArray;
REGISTER_DERIVED_CLASS (GraphicsSettings, GlobalGameManager)
DECLARE_OBJECT_SERIALIZE (GraphicsSettings)
GraphicsSettings (MemLabelId label, ObjectCreationMode mode);
// ~GraphicsSettings (); declared-by-macro
static void InitializeClass ();
static void CleanupClass ();
virtual void Reset ();
#if UNITY_EDITOR
bool DoesNeedToInitializeDefaultShaders() const { return m_NeedToInitializeDefaultShaders; }
#endif
void SetDefaultAlwaysIncludedShaders();
/// Return true if the given shader is in the list of shaders
/// that should always be included in builds.
bool IsAlwaysIncludedShader (PPtr<Shader> shader) const;
#if UNITY_EDITOR
const ShaderArray& GetAlwaysIncludedShaders () const { return m_AlwaysIncludedShaders; }
/// Add a shader to the list of shaders that are aways included in builds.
/// NOTE: Does not check whether the shader is already on the list.
void AddAlwaysIncludedShader (PPtr<Shader> shader);
#endif
private:
ShaderArray m_AlwaysIncludedShaders;
bool m_NeedToInitializeDefaultShaders;
};
GraphicsSettings& GetGraphicsSettings();
|