2023-04-11 19:26:26 +02:00
|
|
|
#pragma once
|
2023-04-07 19:13:52 +02:00
|
|
|
#define GL_GLEXT_PROTOTYPES
|
2023-04-11 19:26:26 +02:00
|
|
|
|
|
|
|
#include "grab_component.h"
|
2023-04-07 01:10:11 +02:00
|
|
|
#include "util.h"
|
|
|
|
#include <GLFW/glfw3.h>
|
|
|
|
|
|
|
|
const vr::HmdMatrix34_t DEFAULT_POSE = {{{1, 0, 0, 0}, {0, 1, 0, 1}, {0, 0, 1, 0}}};
|
2023-04-07 13:26:42 +02:00
|
|
|
|
2023-04-07 01:10:11 +02:00
|
|
|
class App;
|
|
|
|
|
|
|
|
class Panel
|
|
|
|
{
|
|
|
|
public:
|
2023-04-07 20:32:52 +02:00
|
|
|
Panel(App *app, vr::HmdMatrix34_t start_pose, int index, int xmin, int xmax, int ymin, int ymax);
|
2023-04-07 01:10:11 +02:00
|
|
|
|
|
|
|
void Update();
|
2023-04-11 18:03:03 +02:00
|
|
|
void SetHidden(bool state);
|
2023-04-07 01:10:11 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void Render();
|
|
|
|
void UpdateCursor();
|
|
|
|
|
|
|
|
App *_app;
|
|
|
|
OverlayID _id;
|
|
|
|
int _index;
|
|
|
|
std::string _name;
|
|
|
|
|
2023-04-07 19:27:35 +02:00
|
|
|
int _x, _y;
|
|
|
|
int _width, _height;
|
2023-04-07 20:49:09 +02:00
|
|
|
float _meters;
|
2023-04-07 01:10:11 +02:00
|
|
|
float _alpha;
|
2023-04-11 18:03:03 +02:00
|
|
|
bool _hidden;
|
2023-04-07 01:10:11 +02:00
|
|
|
|
2023-04-11 19:26:26 +02:00
|
|
|
GrabComponent _grab_component;
|
|
|
|
|
2023-04-07 01:10:11 +02:00
|
|
|
vr::Texture_t _texture;
|
|
|
|
GLuint _gl_texture;
|
|
|
|
};
|