This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,11 @@ namespace Tkge::Graphics
24
24
.vertices = this ->GetVertices (),
25
25
.indices = this ->GetIndices (),
26
26
.topology = this ->GetTopology (),
27
+ .texture = texture,
27
28
};
28
29
}
30
+
31
+ const Texture* texture{nullptr };
29
32
};
30
33
31
34
template <std::derived_from<IGeometry> TGeometry>
Original file line number Diff line number Diff line change 1
1
#pragma once
2
+ #include < Tkge/Graphics/Texture.hpp>
2
3
#include < Tkge/Graphics/Vertex.hpp>
3
4
#include < span>
4
5
@@ -10,5 +11,6 @@ namespace Tkge::Graphics
10
11
std::span<const std::uint32_t > indices{};
11
12
12
13
vk::PrimitiveTopology topology{vk::PrimitiveTopology::eTriangleList};
14
+ const Texture* texture{nullptr };
13
15
};
14
16
} // namespace Tkge::Graphics
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ namespace Tkge::Graphics
57
57
}
58
58
59
59
UpdateInstances (instances);
60
- if (!WriteSets (nullptr )) { return ; }
60
+ if (!WriteSets (primitive. texture )) { return ; }
61
61
62
62
_renderPass->get_command_buffer ().setViewport (0 , _viewport);
63
63
@@ -106,6 +106,7 @@ namespace Tkge::Graphics
106
106
.setSampler (_resourcePool->GetSampler (texture.sampler ));
107
107
auto wds = vk::WriteDescriptorSet{};
108
108
wds.setImageInfo (dii).setDescriptorCount (1 ).setDescriptorType (vk::DescriptorType::eCombinedImageSampler).setDstSet (set).setDstBinding (binding);
109
+ descriptorWrites.push_back (wds);
109
110
};
110
111
111
112
auto & ubo00 = _resourcePool->AllocateBuffer (vk::BufferUsageFlagBits::eUniformBuffer, sizeof (glm::mat4));
You can’t perform that action at this time.
0 commit comments