implement shading modes switch for heightmap

This commit is contained in:
2018-12-24 23:47:00 +01:00
parent 52c87d9ec6
commit f823451546
5 changed files with 44 additions and 17 deletions

View File

@@ -37,6 +37,10 @@ void NodePanelGrid::init_controls()
m_hm_height = find<NodeSliderH>("grid-heightmap-height");
m_hm_lyaw = find<NodeSliderH>("grid-heightmap-lyaw");
m_hm_lpitch = find<NodeSliderH>("grid-heightmap-lpitch");
m_hm_shading = find<NodeComboBox>("grid-heightmap-shading");
m_hm_preview->SetHeight(0);
m_hm_plane.create(1, 1, 100);
//m_hm_height->on_value_changed = update_hm;
m_groud_resolution->on_value_changed = [this](Node* target, float v) {
@@ -46,9 +50,10 @@ void NodePanelGrid::init_controls()
m_hm_plane.create(1, 1, 100 * v * 5.f);
LOG("resolution value %f", v);
};
m_hm_preview->SetHeight(0);
m_hm_plane.create(1, 1, 100);
m_hm_shading->on_select = [this](Node*, int index) {
m_shade_mode = (ShadeMode)index;
};
m_hm_load->on_click = [this](Node*) {
App::I.pick_image([this](std::string path) {