Big Graphics update

Separated LightManager
Added Sprite class
Added View class
Camera is no longer a SceneNode
Fixed Material not invalidating programs
Renamed CameraPosition uniform to EyePosition
Renamed VisibilityTest to FrustumCull


Former-commit-id: ff7fbe4d9b31a3c269baab0b48c6faa347a12161
This commit is contained in:
Lynix
2013-08-21 20:05:33 +02:00
parent 09e3027129
commit c8414a39d8
39 changed files with 1772 additions and 556 deletions

View File

@@ -0,0 +1,45 @@
// Copyright (C) 2013 Jérôme Leclercq
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_SPRITE_HPP
#define NAZARA_SPRITE_HPP
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Graphics/SceneNode.hpp>
#include <Nazara/Renderer/Material.hpp>
class NAZARA_API NzSprite : public NzSceneNode
{
public:
NzSprite();
NzSprite(const NzSprite& sprite);
NzSprite(NzSprite&& sprite);
~NzSprite();
void AddToRenderQueue(NzAbstractRenderQueue* renderQueue) const override;
const NzBoundingVolumef& GetBoundingVolume() const override;
NzMaterial* GetMaterial() const;
nzSceneNodeType GetSceneNodeType() const override;
const NzVector2f& GetSize() const;
const NzRectf& GetTextureCoords() const;
void SetMaterial(NzMaterial* material);
void SetSize(const NzVector2f& size);
void SetTextureCoords(const NzRectf& coords);
void SetTextureRect(const NzRectui& rect);
private:
bool FrustumCull(const NzFrustumf& frustum) override;
void Register() override;
void Unregister() override;
NzRectf m_textureCoords;
NzVector2f m_size;
NzMaterialRef m_material;
};
#endif // NAZARA_SPRITE_HPP