summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-02-13 17:38:13 -0500
committerJonathan Bradley <jcb@pikum.xyz>2025-02-13 17:38:13 -0500
commit5f77c5f905d2a3063230bde1176372ebd074bc99 (patch)
tree223e8e1443972a8829c5b92f0b00cc6236ebc0d6 /src/window.cpp
parent570498ee77505d44654fdbc97d094ae429323379 (diff)
pke: add FontRenderSettings + first pass advance
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index f356221..55fafff 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -225,6 +225,7 @@ VkCommandBuffer GetCommandBuffer_Transfer() {
return pkvk_shared.command_buffer.transfer;
}
+// TODO fence
void PKVK_BeginBuffer(unsigned int family_index, VkDeviceSize requestedMemorySize, PKVK_TmpBufferDetails &tmpBufferDetails, PKVK_TmpBufferFlags flags) {
if (family_index == graphicsFamilyIndex) {
tmpBufferDetails.queue = pkvk_shared.queue.graphics;
@@ -1753,7 +1754,7 @@ void CreateGraphicsPipelines() {
long offset = 0;
const long vertexBindingCount_glyph = 4;
VkVertexInputBindingDescription vertInputBD_glyph[vertexBindingCount_glyph];
- const long vertexAttrDescCount_glyph = 8;
+ const long vertexAttrDescCount_glyph = 12;
VkVertexInputAttributeDescription vertAttrDesc_glyph[vertexAttrDescCount_glyph];
VkPipelineVertexInputStateCreateInfo vkPipelineVertexInputStateCreateInfo_glyph{vkPipelineVertexInputStateCreateInfo_txtr};
{
@@ -1778,11 +1779,14 @@ void CreateGraphicsPipelines() {
// instance - total
vertInputBD_glyph[index].binding = index;
vertInputBD_glyph[index].stride = 0
+ + sizeof(glm::mat4)
+ sizeof(glm::vec4)
+ sizeof(glm::vec4)
+ sizeof(glm::vec2)
+ sizeof(glm::vec2)
- + sizeof(float);
+ + sizeof(float)
+ + (sizeof(float) * 3) // padding
+ + 0;
vertInputBD_glyph[index].inputRate = VK_VERTEX_INPUT_RATE_INSTANCE;
// index += 1;
@@ -1809,6 +1813,15 @@ void CreateGraphicsPipelines() {
vertAttrDesc_glyph[index].offset = 0;
index += 1;
+ // instance - pos_scale
+ for (long i = 0; i < 4; ++i) {
+ vertAttrDesc_glyph[index].binding = 3;
+ vertAttrDesc_glyph[index].format = VK_FORMAT_R32G32B32A32_SFLOAT;
+ vertAttrDesc_glyph[index].offset = offset;
+ offset += sizeof(glm::vec4);
+ index += 1;
+ }
+
// instance - in_fg_color
vertAttrDesc_glyph[index].binding = 3;
vertAttrDesc_glyph[index].format = VK_FORMAT_R32G32B32A32_SFLOAT;