โก I love zig, c, go, rust, Graphics, SIMD and data oriented programming!
๐ฎ Playing and making video games is my main hobby
This code does not work:
try staging_buffer.scheduleTransfer(vkd, device, vertex_buffer, Vertex, &vertices);
try staging_buffer.scheduleTransfer(vkd, device, vertex_buffer, Vertex, &vertices);
try staging_buffer.flushAndCopyToDestination(vkd, device);
Camera should be part of the scene hierarchy and be a entity with components
Imgui currently flickers on high frame rate. I suspect this is "racy" behavior caused by having multiple frames in flight which the backend does not communicate with imgui.
Should investigate how the official backends handle this at some point.
This would remove duplicate data between ecez and renderer
This is only an idea, not sure I will go this route
To integrate with ecez RenderContext should be a generated type like so:
// each component must have one mat4 and nothing else in them?
const RenderTags = [_]type{BoxMesh, CoolHelmet, Sword, Other}
const RenderContext = CreateRenderContext(RenderTags);
var renderer = RenderContext.init(allocator, window, &[_]RenderContext.MesInstancehInitializeContex{
.{
.cgltf_path = "models/BoxTextured/BoxTextured.gltf",
.instance_count = 1,
},
.{
.cgltf_path = "models/ScifiHelmet/SciFiHelmet.gltf",
.instance_count = 2,
},
// ... (mismatched init count compared to types is an compile time error
});
renderer.updateState(BoxMesh, first_component, box_components);
API:
var context = try RenderContext.init(allocator, window, &[_]PipelineInitialize{
.{
.update_rate = .{ .time_seconds = 0.01 },
.vertex_path = "some/path/shader.vert",
.fragment_path = "some/path/shader.frag",
.mesh_instances = &[_]RenderContext.MesInstancehInitializeContex{
.{
.cgltf_path = "models/ScifiHelmet/SciFiHelmet.gltf",
.instance_count = 1,
},
.{
.cgltf_path = "models/BoxTextured/BoxTextured.gltf",
.instance_count = 2,
},
},
},
.{
.update_rate = .{ .time_seconds = 0.05 },
.vertex_path = "some_different/path/shader.vert",
.fragment_path = "some_different/path/shader.frag",
.mesh_instances = &[_]RenderContext.MesInstancehInitializeContex{
.{
.cgltf_path = "models/ScifiHelmet/SciFiHelmet.gltf",
.instance_count = 3,
},
.{
.cgltf_path = "models/BoxTextured/BoxTextured.gltf",
.instance_count = 4,
},
},
},
});
Of course mesh and instance handles would need to be updated as well.
Should be possible to return instance handles no longer needed back to the renderer
The transfer should take the full slice of data with a offset argument and count argument so that the schedule function can handle non atomic internally
Images for imgui to use for icons
This might be as simple as renaming StagingBuffer and taking usage flags in init ...
abstraction for device buffer memory allocation
Try removing the src mask bits
Currently the only memory used that requires growing is the DrawInstance buffer. If this buffer was growable instance count could be dynamic
Validation layer issues when scaling down windows:
validation layer: Validation Error: [ VUID-VkViewport-width-01770 ] Object 0: handle = 0x207d9fa99d0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xa4164ba5 | vkCmdSetViewport: pViewports[0].width (=0.000000) is not greater than 0.0. The Vulkan spec states: width must be greater than 0.0 (https://vulkan.lunarg.com/doc/view/1.3.239.0/windows/1.3-extensions/vkspec.html#VUID-VkViewport-width-01770)
validation layer: Validation Error: [ VUID-VkViewport-width-01770 ] Object 0: handle = 0x207d9fb2c30, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xa4164ba5 | vkCmdSetViewport: pViewports[0].width (=0.000000) is not greater than 0.0. The Vulkan spec states: width must be greater than 0.0 (https://vulkan.lunarg.com/doc/view/1.3.239.0/windows/1.3-extensions/vkspec.html#VUID-VkViewport-width-01770)
validation layer: Validation Error: [ VUID-VkViewport-width-01770 ] Object 0: handle = 0x207d9fb2c30, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xa4164ba5 | vkCmdSetViewport: pViewports[0].width (=0.000000) is not greater than 0.0. The Vulkan spec states: width must be greater than 0.0 (https://vulkan.lunarg.com/doc/view/1.3.239.0/windows/1.3-extensions/vkspec.html#VUID-VkViewport-width-01770)
validation layer: Validation Error: [ VUID-VkViewport-width-01770 ] Object 0: handle = 0x207d9fa99d0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xa4164ba5 | vkCmdSetViewport: pViewports[0].width (=0.000000) is not greater than 0.0. The Vulkan spec states: width must be greater than 0.0 (https://vulkan.lunarg.com/doc/view/1.3.239.0/windows/1.3-extensions/vkspec.html#VUID-VkViewport-width-01770)
validation layer: Validation Error: [ VUID-VkViewport-width-01770 ] Object 0: handle = 0x207d9fa99d0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xa4164ba5 | vkCmdSetViewport: pViewports[0].width (=0.000000) is not greater than 0.0. The Vulkan spec states: width must be greater than 0.0 (https://vulkan.lunarg.com/doc/view/1.3.239.0/windows/1.3-extensions/vkspec.html#VUID-VkViewport-width-01770)
validation layer: Validation Error: [ VUID-VkViewport-width-01770 ] Object 0: handle = 0x207d9fb2c30, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xa4164ba5 | vkCmdSetViewport: pViewports[0].width (=0.000000) is not greater than 0.0. The Vulkan spec states: width must be greater than 0.0 (https://vulkan.lunarg.com/doc/view/1.3.239.0/windows/1.3-extensions/vkspec.html#VUID-VkViewport-width-01770)
validation layer: Validation Error: [ VUID-VkViewport-width-01770 ] Object 0: handle = 0x207d9fb2c30, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xa4164ba5 | vkCmdSetViewport: pViewports[0].width (=0.000000) is not greater than 0.0. The Vulkan spec states: width must be greater than 0.0 (https://vulkan.lunarg.com/doc/view/1.3.239.0/windows/1.3-extensions/vkspec.html#VUID-VkViewport-width-01770)
This would make it easier to integrate Editor stuff and improve integration with ecez
This will solve lifetime issues with plain index and array:
https://github.com/michal-z/zig-gamedev/tree/main/libs/zpool
MeshInstancehInitializeContex should have default transforms for when they are created in the editor
The new API seems like objectively an improvement over the core descriptor API
This feature seems to over complicate a lot of other features related to memory coherency between device and host and I am not convinced it helps with framerate for real applications
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.