Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
TextureBackground.hpp
1 // Copyright (C) 2017 Jérôme Leclercq
2 // This file is part of the "Nazara Engine - Graphics module"
3 // For conditions of distribution and use, see copyright notice in Config.hpp
4 
5 #pragma once
6 
7 #ifndef NAZARA_TEXTUREBACKGROUND_HPP
8 #define NAZARA_TEXTUREBACKGROUND_HPP
9 
10 #include <Nazara/Prerequesites.hpp>
11 #include <Nazara/Graphics/AbstractBackground.hpp>
12 #include <Nazara/Renderer/UberShader.hpp>
13 #include <Nazara/Renderer/Texture.hpp>
14 
15 namespace Nz
16 {
17  class TextureBackground;
18 
19  using TextureBackgroundConstRef = ObjectRef<const TextureBackground>;
20  using TextureBackgroundRef = ObjectRef<TextureBackground>;
21 
22  class NAZARA_GRAPHICS_API TextureBackground : public AbstractBackground
23  {
24  public:
26 
27  void Draw(const AbstractViewer* viewer) const override;
28 
29  BackgroundType GetBackgroundType() const override;
30  inline const TextureRef& GetTexture() const;
31 
32  inline void SetTexture(TextureRef texture);
33 
34  template<typename... Args> static TextureBackgroundRef New(Args&&... args);
35 
36  private:
37  TextureRef m_texture;
38  UberShaderConstRef m_uberShader;
39  const UberShaderInstance* m_uberShaderInstance;
40  int m_materialDiffuseUniform;
41  int m_materialDiffuseMapUniform;
42  int m_vertexDepthUniform;
43  };
44 }
45 
46 #include <Nazara/Graphics/TextureBackground.inl>
47 
48 #endif // NAZARA_TEXTUREBACKGROUND_HPP
TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Graphics class that represents the viewer for our scene.
Definition: AbstractViewer.hpp:21
Graphics class that represents a background with a texture.
Definition: TextureBackground.hpp:22
Graphics class that represents the background for our scene.
Definition: AbstractBackground.hpp:25