Skylicht Engine
Loading...
Searching...
No Matches
IMaterialRenderer.h
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_MATERIAL_RENDERER_H_INCLUDED__
6#define __I_MATERIAL_RENDERER_H_INCLUDED__
7
8#include "IReferenceCounted.h"
9#include "SMaterial.h"
10#include "S3DVertex.h"
11
12#include "EShaderTypes.h"
13
14namespace irr
15{
16namespace video
17{
18
19class IVideoDriver;
21
23
27{
28public:
29
31
52 virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial,
53 bool resetAllRenderstates, IMaterialRendererServices* services) {}
54
56
73 virtual bool OnRender(IMaterialRendererServices* service, bool updateConstant) { return true; }
74
76
78 virtual void OnUnsetMaterial() {}
79
81
83 virtual bool isTransparent() const { return false; }
84
86
95 virtual s32 getRenderCapability() const { return 0; }
96
98 virtual s32 getShaderVariableID(const c8* name, E_SHADER_TYPE shaderType) { return -1; }
99
100 virtual void setShaderVariable(s32 id, const f32 *value, int count, E_SHADER_TYPE shaderType) {}
101
102};
103
104
105} // end namespace video
106} // end namespace irr
107
108#endif
109
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:50
Interface for material rendering.
Definition IMaterialRenderer.h:27
virtual bool OnRender(IMaterialRendererServices *service, bool updateConstant)
Called every time before a new bunch of geometry is being drawn using this material with for example ...
Definition IMaterialRenderer.h:73
virtual s32 getRenderCapability() const
Returns the render capability of the material.
Definition IMaterialRenderer.h:95
virtual void OnUnsetMaterial()
Called by the IVideoDriver to unset this material.
Definition IMaterialRenderer.h:78
virtual s32 getShaderVariableID(const c8 *name, E_SHADER_TYPE shaderType)
Shader variable function.
Definition IMaterialRenderer.h:98
virtual bool isTransparent() const
Returns if the material is transparent.
Definition IMaterialRenderer.h:83
virtual void OnSetMaterial(const SMaterial &material, const SMaterial &lastMaterial, bool resetAllRenderstates, IMaterialRendererServices *services)
Called by the IVideoDriver implementation the let the renderer set its needed render states.
Definition IMaterialRenderer.h:52
Interface providing some methods for changing advanced, internal states of a IVideoDriver.
Definition IMaterialRendererServices.h:21
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.h:388
Struct for holding parameters for a material renderer.
Definition SMaterial.h:255
The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done ...
Definition EDriverFeatures.h:11
Everything in the Irrlicht Engine can be found in this namespace.
Definition Skylicht.h:33
float f32
32 bit floating point variable.
Definition irrTypes.h:104
char c8
8 bit character variable.
Definition irrTypes.h:31
signed int s32
32 bit signed variable.
Definition irrTypes.h:66