@@ -123,9 +123,9 @@ void makeWindowVisible(const char* window_name) {
123
123
}
124
124
}
125
125
126
- void hoverableImage (ImTextureID texture , const ImVec2 &size) {
126
+ void hoverableImage (ImTextureRef tex_ref , const ImVec2 &size) {
127
127
const ImVec2 texturePosition = ImGui::GetCursorScreenPos ();
128
- ImGui::Image (texture , size);
128
+ ImGui::Image (tex_ref , size);
129
129
130
130
if (ImGui::BeginItemTooltip ()) {
131
131
const ImGuiIO &io = ImGui::GetIO ();
@@ -136,16 +136,16 @@ void hoverableImage(ImTextureID texture, const ImVec2 &size) {
136
136
region.y = std::clamp (region.y , 0 .f , size.y - zoomedPortionSize.y );
137
137
138
138
constexpr float zoomScale = 4 .0f ;
139
- ImGui::Image (texture , zoomedPortionSize * zoomScale, region / size, (region + zoomedPortionSize) / size);
139
+ ImGui::Image (tex_ref , zoomedPortionSize * zoomScale, region / size, (region + zoomedPortionSize) / size);
140
140
ImGui::TextUnformatted (tempStringBuffer.write (" Showing: [{:.0f}, {:.0f}]x[{:.0f}, {:.0f}]" , region.x , region.y , region.x + zoomedPortionSize.y , region.y + zoomedPortionSize.y ));
141
141
142
142
ImGui::EndTooltip ();
143
143
}
144
144
}
145
145
146
- void hoverableImageCheckerboardBackground (ImTextureID texture , const ImVec2 &size) {
146
+ void hoverableImageCheckerboardBackground (ImTextureRef texture_ref , const ImVec2 &size) {
147
147
const ImVec2 texturePosition = ImGui::GetCursorScreenPos ();
148
- ImGui::ImageCheckerboardBackground (texture , size);
148
+ ImGui::ImageCheckerboardBackground (texture_ref , size);
149
149
150
150
if (ImGui::BeginItemTooltip ()) {
151
151
const ImGuiIO &io = ImGui::GetIO ();
@@ -156,7 +156,7 @@ void hoverableImageCheckerboardBackground(ImTextureID texture, const ImVec2 &siz
156
156
region.y = std::clamp (region.y , 0 .f , size.y - zoomedPortionSize.y );
157
157
158
158
constexpr float zoomScale = 4 .0f ;
159
- ImGui::ImageCheckerboardBackground (texture , zoomedPortionSize * zoomScale, region / size, (region + zoomedPortionSize) / size);
159
+ ImGui::ImageCheckerboardBackground (texture_ref , zoomedPortionSize * zoomScale, region / size, (region + zoomedPortionSize) / size);
160
160
ImGui::TextUnformatted (tempStringBuffer.write (" Showing: [{:.0f}, {:.0f}]x[{:.0f}, {:.0f}]" , region.x , region.y , region.x + zoomedPortionSize.y , region.y + zoomedPortionSize.y ));
161
161
162
162
ImGui::EndTooltip ();
@@ -301,7 +301,7 @@ vk_gltf_viewer::control::ImGuiTaskCollector::ImGuiTaskCollector(std::queue<Task>
301
301
ImGui::NewFrame ();
302
302
303
303
// Enable global docking.
304
- ImGuiID dockSpace = ImGui::DockSpaceOverViewport (0 , nullptr , ImGuiDockNodeFlags_NoDockingInCentralNode | ImGuiDockNodeFlags_PassthruCentralNode);
304
+ ImGuiID dockSpace = ImGui::DockSpaceOverViewport (0 , nullptr , ImGuiDockNodeFlags_NoDockingOverCentralNode | ImGuiDockNodeFlags_PassthruCentralNode);
305
305
if (shouldMakeDefaultDockState) {
306
306
dockSpace = makeDefaultDockState (dockSpace);
307
307
}
@@ -1069,7 +1069,7 @@ void vk_gltf_viewer::control::ImGuiTaskCollector::sceneHierarchy(gltf::AssetExte
1069
1069
1070
1070
bool isNodeSelected = std::ranges::all_of (ancestorNodeIndices, LIFT (assetExtended.selectedNodes .contains )) && assetExtended.selectedNodes .contains (nodeIndex);
1071
1071
const bool isTreeNodeOpen = ImGui::WithStyleColor (ImGuiCol_Header, ImGui::GetStyleColorVec4 (ImGuiCol_HeaderActive), [&]() {
1072
- ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_DefaultOpen | ImGuiTreeNodeFlags_SpanAvailWidth | ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_AllowOverlap;
1072
+ ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_DefaultOpen | ImGuiTreeNodeFlags_SpanAvailWidth | ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_AllowOverlap | ImGuiTreeNodeFlags_DrawLinesToNodes ;
1073
1073
if (nodeIndex == assetExtended.hoveringNode ) flags |= ImGuiTreeNodeFlags_Framed;
1074
1074
if (isNodeSelected) flags |= ImGuiTreeNodeFlags_Selected;
1075
1075
if (node.children .empty ()) flags |= ImGuiTreeNodeFlags_Bullet | ImGuiTreeNodeFlags_Leaf;
@@ -1540,13 +1540,13 @@ void vk_gltf_viewer::control::ImGuiTaskCollector::nodeInspector(gltf::AssetExten
1540
1540
1541
1541
void vk_gltf_viewer::control::ImGuiTaskCollector::imageBasedLighting (
1542
1542
const AppState::ImageBasedLighting &info,
1543
- ImTextureID eqmapTextureImGuiDescriptorSet
1543
+ ImTextureRef eqmapTextureRef
1544
1544
) {
1545
1545
if (ImGui::Begin (" IBL" )) {
1546
1546
if (ImGui::CollapsingHeader (" Equirectangular map" )) {
1547
1547
const float eqmapAspectRatio = static_cast <float >(info.eqmap .dimension .y ) / info.eqmap .dimension .x ;
1548
1548
const ImVec2 eqmapTextureSize = ImVec2 { 1 .f , eqmapAspectRatio } * ImGui::GetContentRegionAvail ().x ;
1549
- hoverableImage (eqmapTextureImGuiDescriptorSet , eqmapTextureSize);
1549
+ hoverableImage (eqmapTextureRef , eqmapTextureSize);
1550
1550
1551
1551
ImGui::WithLabel (" File" sv, [&]() {
1552
1552
ImGui::TextLinkOpenURL (PATH_C_STR (info.eqmap .path .filename ()), PATH_C_STR (info.eqmap .path ));
0 commit comments