Skylicht Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
Instancing
SShaderMesh.h
1
/*
2
!@
3
MIT License
4
5
Copyright (c) 2024 Skylicht Technology CO., LTD
6
7
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
8
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
9
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10
subject to the following conditions:
11
12
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13
14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20
This file is part of the "Skylicht Engine".
21
https://github.com/skylicht-lab/skylicht-engine
22
!#
23
*/
24
25
#pragma once
26
27
#include "
irrlicht.h
"
28
using namespace
irr::scene
;
29
30
namespace
Skylicht
31
{
32
struct
SShaderMesh
33
{
34
CShader
* Shader;
35
36
CMesh
* Mesh;
37
ITexture* Textures[MATERIAL_MAX_TEXTURES];
38
ITexture* IndirectLM;
39
ITexture* DirectLM;
40
41
SShaderMesh()
42
{
43
Shader = NULL;
44
Mesh = NULL;
45
IndirectLM = NULL;
46
DirectLM = NULL;
47
48
for
(
int
i = 0; i < MATERIAL_MAX_TEXTURES; i++)
49
Textures[i] = NULL;
50
}
51
52
bool
operator<(
const
SShaderMesh& other)
const
53
{
54
if
(Shader == other.Shader)
55
{
56
if
(Mesh == other.Mesh)
57
{
58
if
(IndirectLM == other.IndirectLM)
59
{
60
if
(DirectLM == other.DirectLM)
61
{
62
for
(
int
i = 0; i < _IRR_MATERIAL_MAX_TEXTURES_; i++)
63
{
64
if
(Textures[i] != other.Textures[i])
65
return
Textures[i] < other.Textures[i];
66
}
67
// all same
68
return
false
;
69
}
70
return
DirectLM < other.DirectLM;
71
}
72
return
IndirectLM < other.IndirectLM;
73
}
74
return
Mesh < other.Mesh;
75
}
76
return
Shader < other.Shader;
77
}
78
};
79
}
Skylicht::CMesh
Definition
CMesh.h:75
Skylicht::CShader
Represents a programmable shader, including uniforms, UI, resources, instancing and platform-specific...
Definition
CShader.h:198
irrlicht.h
Main header file of the irrlicht, the only file needed to include.
Skylicht
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition
AudioDebugLog.h:29
irr::scene
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition
CIndexBuffer.h:13
Generated by
1.17.0