Commit Graph

  • c87271d2f5 Expanded basic program to use a vertex buffer via the new basalt::Buffer Updated vertex function get_attribute_descriptions to conform to new standard for template-based binding Moved definition of triangle verticies inside of the application function Maps, copies into and unmaps the vertex buffer from the darray<Vertex> Uses a reference to refer to the current frames command buffer to not repeat the ugly indexing render area and viewport extent is updated every frame with the swapchain extent No longer directly recreate the framebuffers, now using the recreate function with the renderpass passed as a paramater main Riley King-Saunders 2025-07-10 22:00:35 +10:00
  • 8858c89f30 Created a buffer object. Use the new pipeline bind_vertex to use for verticies Riley King-Saunders 2025-07-10 21:56:39 +10:00
  • 4ad064578d Renamed argument when providing array of vertex binding attributes to reflect that they are, in fact attributes and not the binding description Extended pipeline to support adding vertex bindings Vertex bindings can now be added via a template function that assumes that the type implements the following; - A function matching the signature of PFN_GetVertexInputBindingDescription and with the name get_binding_description - A function matching the signature of PFN_GetVertexAttributeDescriptions and with the name get_attribute_descriptions GetVertexAttributeDescriptions should set the num_attachments to the number of attachments if and only if the attachment output pointer is nullptr. If the output pointer is not nullptr, num_attachments should be treated as a size. Return VK_SUCCESS on success, or a different value otherwise. Riley King-Saunders 2025-07-10 21:56:14 +10:00
  • aa752bc208 Extended SwapchainSupportDetails API to force it to requery values, use darray's rather than initializer lists and extended the get_framebuffer_extent function to allow disabling the final clamping step at the end of the function. This is used by the swapchain to avoid repeatedly requerying when minimised. Riley King-Saunders 2025-07-10 21:50:26 +10:00
  • 8ccafddb64 Updated swapchain to recreate swapchain with the proper extent required and re-poll the window features on resize. Swapchain will no longer trigger a resize (internally) if the previous (non-zero) size is equal to the current size Riley King-Saunders 2025-07-10 21:48:12 +10:00
  • 42e6285977 Updated main program to create and register vertex structure with graphics pipeline Riley King-Saunders 2025-07-10 00:48:23 +10:00
  • fb2067e7f8 BASALT_ENABLE_ALLOC_RECORDS is now an optional define that is controllable by the end-user. If not defined before including a basalt header, it will be defined as 0 (disabled) Riley King-Saunders 2025-07-10 00:47:58 +10:00
  • d550307011 Updated PipelineBuilder to now allow adding vertex bindings Riley King-Saunders 2025-07-10 00:46:33 +10:00
  • f719c5875b Updated shader to now require a vertex buffer to be bound Riley King-Saunders 2025-07-10 00:46:00 +10:00
  • d9fb50c1a4 Updated build system to now download and include glm library Riley King-Saunders 2025-07-10 00:45:35 +10:00
  • e4258318ee Disabled framebuffer caching by physical device Swapchain is now capable of being recreated in a partially automatic manner (some effort is still required on the developer's side still) Windows are now allowed to be resizeable Updated main program to support resizable windows Riley King-Saunders 2025-07-08 23:35:27 +10:00
  • 5e04281094 Updated shaders to produce RGB triangle Riley King-Saunders 2025-07-08 23:32:23 +10:00
  • 86851edf50 Test program has been expanded to draw a RGB triangle Riley King-Saunders 2025-07-07 22:57:13 +10:00
  • c65d7fd4e3 Created a command buffer and command pool object for managing and tracking as well as wrapping vulkan functions to reduce boilerplate Riley King-Saunders 2025-07-07 22:56:53 +10:00
  • b687d74e32 Created pipeline builder and wrapper basalt::Pipeline is mainly just a wrapper around VkPipeline however there is no cast operator provided (yet) Riley King-Saunders 2025-07-07 22:56:00 +10:00
  • 4d797e1170 Created render_pass object Some TODO's to handle regarding exposing access to vulkan functionallity Riley King-Saunders 2025-07-07 22:54:59 +10:00
  • 0598a89d0c Created swapchain object. Manages most of the present-related stuff. Still need to move some queue submits inside of it though Riley King-Saunders 2025-07-07 22:54:19 +10:00
  • 425c226793 Contains convenient function to design a device based on the requirements for the physical device it is based around NOTE: To get the appropriate index into the basalt::Device queue list, track the order of request_queue(s) calls in the designer Riley King-Saunders 2025-07-07 22:52:25 +10:00
  • a0ef896d1e Created a paper-thin wrapper around a VkQueue mainly so it manages its own lifecycle so long as its associated device is alive Riley King-Saunders 2025-07-07 22:50:12 +10:00
  • 42c45bbeb2 Updated the window to hold the vulkan context and a vulkan surface as well as providing a cast operator for the surface Riley King-Saunders 2025-07-07 22:48:59 +10:00
  • 78a5421021 Created physical device object Contains helper functions for picking the most suitable device in a rust/java factory-like way Has cast operator for underlying vulkan object Riley King-Saunders 2025-07-07 22:48:07 +10:00
  • 175897e7d9 Added cast operator for VkInstance Now maintains a list of enabled extensions Riley King-Saunders 2025-07-07 22:46:21 +10:00
  • cb21dc7ede Added support via a macro (BASALT_ENABLE_ALLOC_RECORDS 1) to enable tracking all allocations pointer value and their size. Naturally this is slow and should be disabled for any non-debug build. Riley King-Saunders 2025-07-07 22:45:35 +10:00
  • b1c0b714cd Added function implementations for modifying the global logging mask as well as the mask for each stream (local mask) Riley King-Saunders 2025-07-07 22:44:29 +10:00
  • ab95363f51 Made some of the if statements constexpr to dodge compiler errors for non-copyable or non-movable objects Riley King-Saunders 2025-07-07 22:43:13 +10:00
  • 1668d74934 Added debug output to output compilation command being ran Riley King-Saunders 2025-07-07 22:42:35 +10:00
  • 609cbbcb64 Added basic iterator functions Riley King-Saunders 2025-06-26 16:24:18 +10:00
  • c0d7d4e2e0 Added functionallity to modify the global and stream-local logging masks as well as a function to retrieve a reference to the stream instance Riley King-Saunders 2025-06-26 13:15:56 +10:00
  • 18062cd3eb Added tracing logs to darray when creating/destroying/copying/moving/(re)allocating Riley King-Saunders 2025-06-26 13:14:55 +10:00
  • 2cd9844d07 Created basalt::context class and its implementation. Creates an underlying VkInstance, and if debug layers are present, creates a VkDebugUtilsMessengerEXT. There are two flags, should_free that controls whether the destructor will do anything, and using_validation_layers that states whether validation layers and debug utils have been setup. This is primarilly done to free them later and signify a runtime debug configuration. Riley King-Saunders 2025-06-24 15:59:40 +10:00
  • 105edea0f3 Updated memory interface for get_memory_usage_string. It now takes a pointer to a uint and optionally a char* to write the output buffers size to and the buffer pointer. It still returns the buffer pointer. Fixed bug in dealloc where it would add to the memory used rather than subtract. Added a zero-check to source-private get_eng_unit function to prevent dropping the unit to the minimum for a value of 0 Changed padding calculation to happen on every call to get_memory_usage_string rather than on the first call. As a result, it will now use minimum padding and ignore zero components. Merged zone and class name alignment values into one. Fixed bug where the length of a user class/zone was not accounting for the prefix "USER_" by adding 5 to the result. Made formatting change where by zone/class is tab indented and the values are double tab indented Riley King-Saunders 2025-06-24 15:43:06 +10:00
  • 7c2d6db2e7 Added VK_ASSERT macro to save some boilerplate when checking 'VkResult err;' sections Riley King-Saunders 2025-06-24 15:35:45 +10:00
  • cd1430d258 Added initializer list constructor Added array push back functions for iterator-style, base-length style and other darrays Added check to constructors to ensure that allocation of the memory succeeded before setting values Added changetag function and a default tag for initializer list constructor Riley King-Saunders 2025-06-24 15:34:26 +10:00
  • 6f1373f223 Updated include path to correspond to new structure of the engine Riley King-Saunders 2025-06-23 00:48:18 +10:00
  • 351dba6b70 Added .CppProperties.json back. Visual studio won't use it if it is in .gitignore, but it also shouldn't be added to the project so it will need to exist a permanant limbo for now Riley King-Saunders 2025-06-23 00:47:37 +10:00
  • ce74ea138e Added a definition file that contains some typedefs and platform-specific aliasing (debug_break, static assert, and verifies that the C macro NULL is defined) Riley King-Saunders 2025-06-23 00:46:26 +10:00
  • e4eb380ff1 Updated allocT implementation to cast the returned void* to a T*. Moved builtin memory tag names to top of source file because it didn't like being forward declared. TODO: Revisit this later Fixed compilation error where the source-local function get_eng_unit did not return the modified value. Shuffled include order around to fix compilation issues. Riley King-Saunders 2025-06-23 00:44:49 +10:00
  • 87f66e291b Fixed compilation error in basalt_logger where it whined about or'ing together two enum values for the log level. Fixed a compilation error where the log level mask was being shadowed by log level index in basalt_log and basalt_write. Fixed a bug where logger_add_stream was checking the lower 48-bits of the FILE* rather than the upper 16 were zero. Fixed a bug where logger_add_stream did not mark a stream as allocated in its flags. Fixed a bug where logger_remove_stream did not check if a stream was allocated. Addressed warnings of potential saftey issues when logging the prefixes as if they were format strings by having them be format-specified. I suspect this is marginally slower and realistically had no security risk in the first place but was fixed anyway. Riley King-Saunders 2025-06-23 00:41:41 +10:00
  • f07977ff06 Implemented a dynamic array object that uses 24 bytes on the stack versus std::vector's 32. It uses basalt_memory module to allocate and free itself, thus requiring a tag. It is not atomic or thread-safe. Riley King-Saunders 2025-06-23 00:35:18 +10:00
  • bff17a13b6 Fixed bugs in basalt memory tag name generation. Centralised alignment values to basalt::mem::get_memory_tag_alignment_bytes. Riley King-Saunders 2025-06-22 14:58:20 +10:00
  • b5ef8e4ab5 Library: Added a very basic window object that essentially just wraps an GLFW window object. TODO: Set the window userdata pointer to point to its wrapping object Riley King-Saunders 2025-06-22 03:04:28 +10:00
  • 8d7bfe0bc9 Buildsystem: Removed include/basalt_window.h. See prior commit #cac50b01 Riley King-Saunders 2025-06-22 03:02:42 +10:00
  • cac50b0134 Restructured library source files Riley King-Saunders 2025-06-22 02:54:15 +10:00
  • c992634e8e buildsystem: Added debug build flags to linker Riley King-Saunders 2025-06-22 02:51:52 +10:00
  • 62b1e79ec5 Initial commit - https://www.youtube.com/watch?v=_riranMmtvI&list=PL8327DO66nu9qYVKLDmdLW_84-yE4auCR&index=3 Riley King-Saunders 2025-06-20 15:10:02 +10:00
  • 912d5cb768 Initial commit Riley King-Saunders 2025-06-19 16:27:58 +10:00