forked from pthom/hello_imgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello_imgui.h
46 lines (39 loc) · 1.25 KB
/
hello_imgui.h
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
#pragma once
#include "hello_imgui/hello_imgui_assets.h"
#include "hello_imgui/hello_imgui_error.h"
#include "hello_imgui/icons_font_awesome.h"
#include "hello_imgui/image_gl.h"
#include "hello_imgui/runner_params.h"
#include <string>
/**
@@md#HelloImGui::Run
__HelloImGui::Run()__ will run an application with a single call.
Two signatures are provided:
* `HelloImGui::Run(RunnerParams &)`: full signature, the most customizable version.
Runs an application whose params and Gui are provided
by runnerParams.
* `HelloImGui::Run(guiFunction, windowSize, windowTitle)`: simple signature
in order to start a simple application with ease.
@@md
*/
namespace HelloImGui
{
void Run(RunnerParams & runnerParams);
void Run(VoidFunction guiFonction,
ImVec2 windowSize = {800.f, 600.f},
std::string windowTitle = ""
);
}
/**
@@md#SDLMain
Warning for SDL apps under iOS and Android:
SDL uses a dirty hack in order to _replace your main() function by its own main() function_,
which will then call your own main !
Please make sure that the signature of your main() function is *exactly*
`int main(int argc, char **argv)`
and that your main() function returns an int.
@@md
*/
#if defined(HELLOIMGUI_USE_SDL_OPENGL3)
#include <SDL_main.h>
#endif