OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
inventoryrenderer.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <Tempest/Device>
4
#include <Tempest/Matrix4x4>
5
6
#include "
meshobjects.h
"
7
#include "
sceneglobals.h
"
8
#include "
visualobjects.h
"
9
10
class
Item
;
11
12
class
InventoryRenderer
{
13
public
:
14
InventoryRenderer
();
15
16
void
draw
(Tempest::Encoder<Tempest::CommandBuffer>& cmd);
17
18
void
reset
(
bool
full=
false
);
19
void
drawItem
(
int
x,
int
y,
int
w,
int
h,
const
Item
&item);
20
21
private
:
22
struct
PerFrame {
23
Tempest::Matrix4x4 mvp;
24
};
25
26
struct
Itm {
27
MeshObjects::Mesh
mesh;
28
Tempest::Matrix4x4 viewMat;
29
int
x=0, y=0, w=0, h=0;
30
};
31
32
SceneGlobals
scene;
33
VisualObjects
visual;
34
MeshObjects
itmGroup;
35
std::vector<Itm> items;
36
};
37
InventoryRenderer
Definition
inventoryrenderer.h:12
InventoryRenderer::reset
void reset(bool full=false)
Definition
inventoryrenderer.cpp:48
InventoryRenderer::InventoryRenderer
InventoryRenderer()
Definition
inventoryrenderer.cpp:10
InventoryRenderer::draw
void draw(Tempest::Encoder< Tempest::CommandBuffer > &cmd)
Definition
inventoryrenderer.cpp:19
InventoryRenderer::drawItem
void drawItem(int x, int y, int w, int h, const Item &item)
Definition
inventoryrenderer.cpp:52
Item
Definition
item.h:14
MeshObjects::Mesh
Definition
meshobjects.h:44
MeshObjects
Definition
meshobjects.h:15
SceneGlobals
Definition
sceneglobals.h:13
VisualObjects
Definition
visualobjects.h:17
meshobjects.h
sceneglobals.h
visualobjects.h
game
graphics
inventoryrenderer.h
Generated by
1.9.8