1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
\r
2 // This file is part of the "Irrlicht Engine".
\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
\r
5 #ifndef __C_TRIANGLE_RENDERER_TEXTURE_GOURAUD_H_INCLUDED__
\r
6 #define __C_TRIANGLE_RENDERER_TEXTURE_GOURAUD_H_INCLUDED__
\r
8 #include "IrrCompileConfig.h"
\r
10 #ifndef _IRR_COMPILE_WITH_SOFTWARE_
\r
11 // forward declarations for create methods
\r
16 class ITriangleRenderer;
\r
18 } // end namespace video
\r
19 } // end namespace irr
\r
23 #include "ITriangleRenderer.h"
\r
30 //! CTRTextureGouraud class
\r
31 class CTRTextureGouraud : public ITriangleRenderer
\r
36 CTRTextureGouraud(IZBuffer* zbuffer);
\r
39 virtual ~CTRTextureGouraud();
\r
41 //! sets a render target
\r
42 virtual void setRenderTarget(video::IImage* surface, const core::rect<s32>& viewPort) _IRR_OVERRIDE_;
\r
44 //! draws an indexed triangle list
\r
45 virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_;
\r
47 //! en or disables the backface culling
\r
48 virtual void setBackfaceCulling(bool enabled = true) _IRR_OVERRIDE_;
\r
50 //! sets the Texture
\r
51 virtual void setTexture(video::IImage* texture) _IRR_OVERRIDE_;
\r
55 //! vertauscht zwei vertizen
\r
56 inline void swapVertices(const S2DVertex** v1, const S2DVertex** v2)
\r
58 const S2DVertex* b = *v1;
\r
63 video::IImage* RenderTarget;
\r
64 core::rect<s32> ViewPortRect;
\r
70 bool BackFaceCullingEnabled;
\r
71 TZBufferType* lockedZBuffer;
\r
74 s32 lockedTextureWidth;
\r
75 s32 textureXMask, textureYMask;
\r
76 video::IImage* Texture;
\r
79 } // end namespace video
\r
80 } // end namespace irr
\r