Added Texture backgrounds
Former-commit-id: 8aa98a9b8bee5fbf1b5eefa958a7b9095b784cf5
This commit is contained in:
30
include/Nazara/2D/TextureBackground.hpp
Normal file
30
include/Nazara/2D/TextureBackground.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// Copyright (C) 2013 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - 2D Module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_TEXTUREBACKGROUND_HPP
|
||||
#define NAZARA_TEXTUREBACKGROUND_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/2D/Background.hpp>
|
||||
#include <Nazara/Renderer/Texture.hpp>
|
||||
|
||||
class NAZARA_API NzTextureBackground : public NzBackground
|
||||
{
|
||||
public:
|
||||
NzTextureBackground(NzTexture* texture);
|
||||
|
||||
void Draw() const;
|
||||
|
||||
nzBackgroundType GetBackgroundType() const;
|
||||
NzTexture* GetTexture() const;
|
||||
|
||||
void SetTexture(NzTexture* texture);
|
||||
|
||||
private:
|
||||
NzTextureRef m_texture;
|
||||
};
|
||||
|
||||
#endif // NAZARA_TEXTUREBACKGROUND_HPP
|
||||
@@ -40,6 +40,7 @@ class NAZARA_API NzRenderer
|
||||
static void DrawIndexedPrimitivesInstanced(unsigned int instanceCount, nzPrimitiveType primitive, unsigned int firstIndex, unsigned int indexCount);
|
||||
static void DrawPrimitives(nzPrimitiveType primitive, unsigned int firstVertex, unsigned int vertexCount);
|
||||
static void DrawPrimitivesInstanced(unsigned int instanceCount, nzPrimitiveType primitive, unsigned int firstVertex, unsigned int vertexCount);
|
||||
NAZARA_DEPRECATED("Don't use this or you will have cancer") static void DrawTexture(unsigned int unit, const NzRectf& rect, const NzVector2f& uv0, const NzVector2f& uv1, float z = 0.f);
|
||||
|
||||
static void Enable(nzRendererParameter parameter, bool enable);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user