MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / Draw

Method Draw

Source/Objects/navmeshhintobject.cpp:80–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void NavmeshHintObject::Draw() {
81 if (g_debug_runtime_disable_navmesh_hint_object_draw) {
82 return;
83 }
84
85 // Check if we should be drawn.
86 if (scenegraph_->map_editor->state_ == MapEditor::kInGame || Graphics::Instance()->media_mode() || ActiveCameras::Instance()->Get()->GetFlags() == Camera::kPreviewCamera) {
87 } else if (this->editor_visible) {
88 if (!unit_box_vbo->valid()) {
89 unit_box_vbo->Fill(
90 kVBOStatic | kVBOFloat,
91 cross_marking.size() * sizeof(vec3),
92 &cross_marking[0]);
93 }
94 vec4 draw_color(box_color);
95 draw_color[3] *= selected_ ? 1.0f : 0.2f;
96 DebugDraw::Instance()->AddLineObject(unit_box_vbo, GetTransform(), draw_color, _delete_on_draw);
97 }
98}
99
100void NavmeshHintObject::GetDesc(EntityDescription& desc) const {
101 Object::GetDesc(desc);

Callers

nothing calls this directly

Calls 7

media_modeMethod · 0.80
AddLineObjectMethod · 0.80
GetFlagsMethod · 0.45
GetMethod · 0.45
validMethod · 0.45
FillMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected