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

@@ -10,12 +10,17 @@
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Graphics/AbstractRenderTechnique.hpp>
#include <Nazara/Graphics/ForwardRenderQueue.hpp>
#include <Nazara/Graphics/LightManager.hpp>
#include <Nazara/Utility/IndexBuffer.hpp>
#include <Nazara/Utility/VertexBuffer.hpp>
class NzLightManager;
class NAZARA_API NzForwardRenderTechnique : public NzAbstractRenderTechnique
{
public:
NzForwardRenderTechnique();
~NzForwardRenderTechnique() = default;
~NzForwardRenderTechnique();
void Clear(const NzScene* scene);
void Draw(const NzScene* scene);
@@ -26,7 +31,15 @@ class NAZARA_API NzForwardRenderTechnique : public NzAbstractRenderTechnique
void SetMaxLightsPerObject(unsigned int lightCount);
private:
void DrawOpaqueModels(const NzScene* scene, NzForwardRenderQueue::BatchedModelContainer& opaqueModels);
void DrawSprites(const NzScene* scene, NzForwardRenderQueue::BatchedSpriteContainer& sprites);
void DrawTransparentModels(const NzScene* scene, NzForwardRenderQueue::TransparentModelContainer& transparentModels);
NzForwardRenderQueue m_renderQueue;
NzIndexBufferRef m_indexBuffer;
NzLightManager m_directionnalLights;
NzLightManager m_lights;
NzVertexBuffer m_spriteBuffer;
unsigned int m_maxLightsPerObject;
};