40 lines
940 B
C++
40 lines
940 B
C++
#pragma once
|
|
|
|
#include "imgui.h"
|
|
#include <GL/glew.h>
|
|
#include <GLFW/glfw3.h>
|
|
#include "../state.h"
|
|
|
|
namespace UI {
|
|
/// Retro actions to state
|
|
enum class Actions {
|
|
None = 0,
|
|
FPS = 1 << 0,
|
|
FullScreen = 1 << 1,
|
|
ClearColor = 1 << 2,
|
|
RendererSharders = 1 << 3,
|
|
RendererTextures = 1 << 4,
|
|
World = 1 << 5,
|
|
Camera = 1 << 6,
|
|
ChangeContouring = 1 << 7,
|
|
};
|
|
inline Actions operator|(Actions a, Actions b) {
|
|
return static_cast<Actions>(static_cast<int>(a) | static_cast<int>(b));
|
|
}
|
|
inline bool operator&&(Actions a, Actions b) {
|
|
return static_cast<int>(a) & static_cast<int>(b);
|
|
}
|
|
|
|
/// Prepare UI
|
|
void setup(GLFWwindow*);
|
|
/// Release UI
|
|
void unload();
|
|
/// Compute UI
|
|
Actions draw(options&, state&, const reports&, GLuint aim);
|
|
|
|
/// Is UI in focus
|
|
bool isFocus();
|
|
/// Display UI
|
|
void render();
|
|
};
|