Renamed Background to AbstractBackground
Former-commit-id: c99ed2e48c4d82fb1100f412a85468c698142815
This commit is contained in:
@@ -4,23 +4,23 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_BACKGROUND_HPP
|
||||
#define NAZARA_BACKGROUND_HPP
|
||||
#ifndef NAZARA_ABSTRACTBACKGROUND_HPP
|
||||
#define NAZARA_ABSTRACTBACKGROUND_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Graphics/Enums.hpp>
|
||||
|
||||
class NzScene;
|
||||
|
||||
class NAZARA_API NzBackground
|
||||
class NAZARA_API NzAbstractBackground
|
||||
{
|
||||
public:
|
||||
NzBackground() = default;
|
||||
virtual ~NzBackground();
|
||||
NzAbstractBackground() = default;
|
||||
virtual ~NzAbstractBackground();
|
||||
|
||||
virtual void Draw(const NzScene* scene) const = 0;
|
||||
|
||||
virtual nzBackgroundType GetBackgroundType() const = 0;
|
||||
};
|
||||
|
||||
#endif // NAZARA_BACKGROUND_HPP
|
||||
#endif // NAZARA_ABSTRACTBACKGROUND_HPP
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/Color.hpp>
|
||||
#include <Nazara/Graphics/Background.hpp>
|
||||
#include <Nazara/Graphics/AbstractBackground.hpp>
|
||||
|
||||
class NAZARA_API NzColorBackground : public NzBackground
|
||||
class NAZARA_API NzColorBackground : public NzAbstractBackground
|
||||
{
|
||||
public:
|
||||
NzColorBackground(const NzColor& color = NzColor::Black);
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/Color.hpp>
|
||||
#include <Nazara/Core/Updatable.hpp>
|
||||
#include <Nazara/Graphics/AbstractBackground.hpp>
|
||||
#include <Nazara/Graphics/AbstractRenderTechnique.hpp>
|
||||
#include <Nazara/Graphics/Background.hpp>
|
||||
#include <Nazara/Math/Frustum.hpp>
|
||||
|
||||
class NzAbstractRenderQueue;
|
||||
@@ -38,7 +38,7 @@ class NAZARA_API NzScene
|
||||
|
||||
NzCamera* GetActiveCamera() const;
|
||||
NzColor GetAmbientColor() const;
|
||||
NzBackground* GetBackground() const;
|
||||
NzAbstractBackground* GetBackground() const;
|
||||
NzAbstractRenderTechnique* GetRenderTechnique() const;
|
||||
NzSceneNode& GetRoot() const;
|
||||
float GetUpdateTime() const;
|
||||
@@ -47,7 +47,7 @@ class NAZARA_API NzScene
|
||||
void RegisterForUpdate(NzUpdatable* object);
|
||||
|
||||
void SetAmbientColor(const NzColor& color);
|
||||
void SetBackground(NzBackground* background);
|
||||
void SetBackground(NzAbstractBackground* background);
|
||||
void SetRenderTechnique(NzAbstractRenderTechnique* renderTechnique);
|
||||
void SetUpdatePerSecond(unsigned int updatePerSecond);
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
#define NAZARA_SKYBOXBACKGROUND_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Graphics/Background.hpp>
|
||||
#include <Nazara/Graphics/AbstractBackground.hpp>
|
||||
#include <Nazara/Renderer/Shader.hpp>
|
||||
#include <Nazara/Renderer/Texture.hpp>
|
||||
#include <Nazara/Renderer/TextureSampler.hpp>
|
||||
#include <Nazara/Utility/IndexBuffer.hpp>
|
||||
#include <Nazara/Utility/VertexBuffer.hpp>
|
||||
|
||||
class NAZARA_API NzSkyboxBackground : public NzBackground
|
||||
class NAZARA_API NzSkyboxBackground : public NzAbstractBackground
|
||||
{
|
||||
public:
|
||||
NzSkyboxBackground();
|
||||
|
||||
@@ -8,13 +8,16 @@
|
||||
#define NAZARA_TEXTUREBACKGROUND_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Graphics/Background.hpp>
|
||||
#include <Nazara/Graphics/AbstractBackground.hpp>
|
||||
#include <Nazara/Renderer/Shader.hpp>
|
||||
#include <Nazara/Renderer/Texture.hpp>
|
||||
|
||||
class NAZARA_API NzTextureBackground : public NzBackground
|
||||
class NAZARA_API NzTextureBackground : public NzAbstractBackground
|
||||
{
|
||||
public:
|
||||
NzTextureBackground();
|
||||
NzTextureBackground(NzTexture* texture);
|
||||
~NzTextureBackground();
|
||||
|
||||
void Draw(const NzScene* scene) const;
|
||||
|
||||
@@ -24,6 +27,7 @@ class NAZARA_API NzTextureBackground : public NzBackground
|
||||
void SetTexture(NzTexture* texture);
|
||||
|
||||
private:
|
||||
NzShaderRef m_shader;
|
||||
NzTextureRef m_texture;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user