mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
pick buffer debug
This commit is contained in:
@@ -4199,7 +4199,12 @@ void opengl33_renderer::Update_Pick_Control()
|
||||
unsigned char pickreadout[4];
|
||||
if (m_picking_pbo->read_data(1, 1, pickreadout))
|
||||
{
|
||||
auto const controlindex = pick_index(glm::ivec3{pickreadout[0], pickreadout[1], pickreadout[2]});
|
||||
glm::ivec3 readout{pickreadout[0], pickreadout[1], pickreadout[2]};
|
||||
|
||||
if (DebugModeFlag)
|
||||
WriteLog("cab pick pixel: " + glm::to_string(readout));
|
||||
|
||||
auto const controlindex = pick_index(readout);
|
||||
TSubModel const *control{nullptr};
|
||||
glm::vec2 position(0.0f);
|
||||
if ((controlindex > 0) && (controlindex <= m_pickcontrolsitems.size())) {
|
||||
@@ -4244,7 +4249,12 @@ void opengl33_renderer::Update_Pick_Node()
|
||||
unsigned char pickreadout[4];
|
||||
if (m_picking_node_pbo->read_data(1, 1, pickreadout))
|
||||
{
|
||||
auto const nodeindex = pick_index(glm::ivec3{pickreadout[0], pickreadout[1], pickreadout[2]});
|
||||
glm::ivec3 readout{pickreadout[0], pickreadout[1], pickreadout[2]};
|
||||
|
||||
if (DebugModeFlag)
|
||||
WriteLog("node pick pixel: " + glm::to_string(readout));
|
||||
|
||||
auto const nodeindex = pick_index(readout);
|
||||
scene::basic_node *node{nullptr};
|
||||
if ((nodeindex > 0) && (nodeindex <= m_picksceneryitems.size()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user