Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Toggle main menu visibility
Loading...
Searching...
No Matches
imgui_widget_flamegraph.h
1
// https://github.com/bwrsandman/imgui-flame-graph
2
// v 1.00
3
//
4
// The MIT License(MIT)
5
//
6
// Copyright(c) 2019 Sandy Carter
7
//
8
// Permission is hereby granted, free of charge, to any person obtaining a copy
9
// of this software and associated documentation files(the "Software"), to deal
10
// in the Software without restriction, including without limitation the rights
11
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12
// copies of the Software, and to permit persons to whom the Software is
13
// furnished to do so, subject to the following conditions :
14
//
15
// The above copyright notice and this permission notice shall be included in all
16
// copies or substantial portions of the Software.
17
//
18
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
// SOFTWARE.
25
26
// History :
27
// 2019-10-22 First version
28
29
#pragma once
30
31
#include <climits>
32
33
#include <imgui.h>
34
35
namespace
ImGuiWidgetFlameGraph {
36
IMGUI_API
void
PlotFlame(
const
char
* label,
void
(*values_getter)(
float
* start,
float
* end, ImU8* level,
const
char
** caption,
const
void
* data,
int
idx),
const
void
* data,
int
values_count,
int
values_offset = 0,
const
char
* overlay_text = NULL,
float
scale_min = FLT_MAX,
float
scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0));
37
}
sources
code
Editor
ImguiEditor
imgui_widget_flamegraph.h
Generated by
1.17.0