Shkyera Engine
Easy to use, game engine for Python
Loading...
Searching...
No Matches
WireframeComponent.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
AssetManager/Asset.hpp
>
4
#include <
AssetManager/Wireframe.hpp
>
5
#include <
Components/BaseComponent.hpp
>
6
#include <memory>
7
8
namespace
shkyera
{
9
10
struct
WireframeComponent
{
11
HandleAndAsset<Wireframe>
wireframe
{};
12
13
void
updateImpl
()
const
{
14
const
auto
&
wireframeAsset
= std::get<AssetRef<Wireframe>>(
wireframe
);
15
if
(
wireframeAsset
) {
16
wireframeAsset
->bind();
17
glDrawArrays
(
GL_LINES
, 0,
wireframeAsset
->getEdgeCount());
18
wireframeAsset
->unbind();
19
}
20
}
21
};
22
23
}
// namespace shkyera
Asset.hpp
BaseComponent.hpp
Wireframe.hpp
shkyera
Definition
Asset.hpp:6
shkyera::Clock
Definition
Clock.hpp:9
shkyera::WireframeComponent
Definition
WireframeComponent.hpp:10
shkyera::WireframeComponent::updateImpl
void updateImpl() const
Definition
WireframeComponent.hpp:13
shkyera::WireframeComponent::wireframe
HandleAndAsset< Wireframe > wireframe
Definition
WireframeComponent.hpp:11
src
Components
WireframeComponent.hpp
Generated by
1.9.8
Franciszek Szewczyk © 2023