Added Renderer::DrawFullscreenQuad

Made [Color|Texture]Background use a new shader-based algorithm


Former-commit-id: cfd319b33712c270726eb697e258d61db2ca6835
This commit is contained in:
Lynix
2013-06-27 12:54:20 +02:00
parent 1a6e55881b
commit 984ade783a
5 changed files with 232 additions and 143 deletions

View File

@@ -10,11 +10,13 @@
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Color.hpp>
#include <Nazara/Graphics/AbstractBackground.hpp>
#include <Nazara/Renderer/Shader.hpp>
class NAZARA_API NzColorBackground : public NzAbstractBackground
{
public:
NzColorBackground(const NzColor& color = NzColor::Black);
~NzColorBackground();
void Draw(const NzScene* scene) const;
@@ -25,6 +27,7 @@ class NAZARA_API NzColorBackground : public NzAbstractBackground
private:
NzColor m_color;
NzShaderRef m_shader;
};
#endif // NAZARA_COLORBACKGROUND_HPP

View File

@@ -41,7 +41,7 @@ class NAZARA_API NzRenderer
static void DrawIndexedPrimitivesInstanced(unsigned int instanceCount, nzPrimitiveMode mode, unsigned int firstIndex, unsigned int indexCount);
static void DrawPrimitives(nzPrimitiveMode mode, unsigned int firstVertex, unsigned int vertexCount);
static void DrawPrimitivesInstanced(unsigned int instanceCount, nzPrimitiveMode mode, 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 DrawFullscreenQuad();
static void Enable(nzRendererParameter parameter, bool enable);