Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IMaterialRenderer.hpp
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 nirtcpp/nirtcpp.hpp
4
5#ifndef NIRT_I_MATERIAL_RENDERER_HPP_INCLUDED
6#define NIRT_I_MATERIAL_RENDERER_HPP_INCLUDED
7
8#include <nirtcpp/core/engine/IReferenceCounted.hpp>
9#include <nirtcpp/core/engine/SMaterial.hpp>
10#include <nirtcpp/core/engine/S3DVertex.hpp>
11
12namespace nirt
13{
14namespace video
15{
16
17class IVideoDriver;
18class IMaterialRendererServices;
19class IShaderConstantSetCallBack;
20
22
26{
27public:
28
30
51 virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial,
52 bool resetAllRenderstates, IMaterialRendererServices* services) {}
53
55
72 virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) { return true; }
73
75
77 virtual void OnUnsetMaterial() {}
78
80
82 virtual bool isTransparent() const { return false; }
83
85
94 virtual s32 getRenderCapability() const { return 0; }
95
97
100};
101
102
103} // end namespace video
104} // end namespace nirt
105
106#endif
Base class of most objects of the Nirtcpp Engine.
Definition IReferenceCounted.hpp:46
Interface providing some methods for changing advanced, internal states of a IVideoDriver.
Definition IMaterialRendererServices.hpp:21
Interface for material rendering.
Definition IMaterialRenderer.hpp:26
virtual bool OnRender(IMaterialRendererServices *service, E_VERTEX_TYPE vtxtype)
Called every time before a new bunch of geometry is being drawn using this material with for example ...
Definition IMaterialRenderer.hpp:72
virtual IShaderConstantSetCallBack * getShaderConstantSetCallBack() const
Access the callback provided by the users when creating shader materials.
Definition IMaterialRenderer.hpp:99
virtual s32 getRenderCapability() const
Returns the render capability of the material.
Definition IMaterialRenderer.hpp:94
virtual bool isTransparent() const
Returns if the material is transparent.
Definition IMaterialRenderer.hpp:82
virtual void OnUnsetMaterial()
Called by the IVideoDriver to unset this material.
Definition IMaterialRenderer.hpp:77
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.hpp:51
Interface making it possible to set constants for gpu programs every frame.
Definition IShaderConstantSetCallBack.hpp:22
Struct for holding parameters for a material renderer.
Definition SMaterial.hpp:304
E_VERTEX_TYPE
Enumeration for all vertex types there are.
Definition S3DVertex.hpp:19
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72

Nirtcpp    @cppfx.xyz

Utxcpp    utx::print