blob: 90035c3bdc9693eb23ca7e31aae27c0897b8b193 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#include "renderable.h"
#include "gl_traits.h"
#include "location.h"
#include "maths.h"
#include "util.h"
std::weak_ptr<Renderable::CommonLocationData> Renderable::commonLocationData;
Renderable::CommonLocation::CommonLocation(Location const & location) :
position {location.pos, 0}, rotation {location.rot, 0}, rotationMatrix {location.getRotationTransform()}
{
}
Renderable::CommonLocation &
Renderable::CommonLocation ::operator=(Location const & location)
{
position = location.pos || 0;
rotation = location.rot || 0.F;
rotationMatrix = location.getRotationTransform();
return *this;
}
Renderable::Renderable()
{
createIfRequired(locationData, commonLocationData);
}
GLuint
gl_traits<InstanceVertices<Renderable::CommonLocation>::InstanceProxy>::vertexArrayAttribFormat(
GLuint vao, GLuint index, GLuint offset)
{
return gl_traits<
decltype(InstanceVertices<Renderable::CommonLocation>::InstanceProxy::index)>::vertexArrayAttribFormat(vao,
index, offset + offsetof(InstanceVertices<Renderable::CommonLocation>::InstanceProxy, index));
};
void
Renderable::preFrame(const Frustum &, const Frustum &)
{
}
void
Renderable::lights(const SceneShader &) const
{
}
void
Renderable::shadows(const ShadowMapper &, const Frustum &) const
{
}
void
Renderable::updateStencil(const ShadowStenciller &) const
{
}
void
Renderable::updateBillboard(const BillboardPainter &) const
{
}
|