16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09:18 +02:00

display train names on map

This commit is contained in:
milek7
2019-02-18 00:06:58 +01:00
parent d391851c66
commit 52ff1ecb98
14 changed files with 248 additions and 238 deletions

37
widgets/map.h Normal file
View File

@@ -0,0 +1,37 @@
#pragma once
#include "gl/shader.h"
#include "renderer.h"
#include "Texture.h"
#include "uilayer.h"
namespace ui {
class map_panel : public ui_panel {
std::unique_ptr<gl::program> m_shader;
std::unique_ptr<gl::framebuffer> m_msaa_fb;
std::unique_ptr<gl::renderbuffer> m_msaa_rb;
std::unique_ptr<gl::framebuffer> m_fb;
std::unique_ptr<opengl_texture> m_tex;
std::unique_ptr<gl::ubo> scene_ubo;
gl::scene_ubs scene_ubs;
std::vector<gfx::geometrybank_handle> m_section_handles;
const int fb_size = 1024;
glm::vec2 translate;
float zoom = 1.0f / 1000.0f;
float get_vehicle_rotation();
cFrustum frustum;
bool init_done = false;
public:
map_panel();
void render_contents() override;
};
}