1
// Copyright (C) 2002-2011 Nikolaus Gebhardt
2
// This file is part of the "Irrlicht Engine".
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
5
#ifndef __C_D3D8_PARALLAX_MAPMATERIAL_RENDERER_H_INCLUDED__
6
#define __C_D3D8_PARALLAX_MAPMATERIAL_RENDERER_H_INCLUDED__
8
#include "IrrCompileConfig.h"
9
#ifdef _IRR_WINDOWS_API_
11
#ifdef _IRR_COMPILE_WITH_DIRECT3D_8_
14
#include "CD3D8ShaderMaterialRenderer.h"
15
#include "IShaderConstantSetCallBack.h"
22
//! Renderer for parallax maps
23
class CD3D8ParallaxMapRenderer : public CD3D8ShaderMaterialRenderer, IShaderConstantSetCallBack
27
CD3D8ParallaxMapRenderer(
28
IDirect3DDevice8* d3ddev, video::IVideoDriver* driver,
29
s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial);
30
~CD3D8ParallaxMapRenderer();
32
//! Called by the engine when the vertex and/or pixel shader constants for an
33
//! material renderer should be set.
34
virtual void OnSetConstants(IMaterialRendererServices* services, s32 userData);
36
virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype);
38
virtual void OnSetMaterial(const SMaterial& material) { }
39
virtual void OnSetMaterial(const video::SMaterial& material,
40
const video::SMaterial& lastMaterial,
41
bool resetAllRenderstates, video::IMaterialRendererServices* services);
43
//! Returns the render capability of the material.
44
virtual s32 getRenderCapability() const;
48
//! stores if this shader compiled the shaders and is
49
//! allowed to delete them again. D3D8 lacks reference counting
50
//! support for shaders.
56
} // end namespace video
57
} // end namespace irr