- A few Vulkan wrapper structs

- Framework for Vulkan context
 - Fixed a bug with dynarray where if `resize()` shrinks the array, destructors are not called.
 - Fixed grammar issues with the containers library and added property tables to existing data structures.
This commit is contained in:
2026-01-02 15:38:03 -05:00
parent c1be5385d3
commit 7c2f89b331
53 changed files with 825 additions and 415 deletions

View File

@@ -42,7 +42,7 @@ path path::current() {
if (getcwd(cstr, sizeof(cstr)) == nullptr) {
return path("");
}
return path(cstring(cstr, strlen(cstr) + 1));
return path(cstring(cstr, strlen(cstr)));
}
path path::current(const path& path) {

View File

@@ -30,7 +30,7 @@ void _assert_impl(const char* expr, size_t expr_l,
fennec::cstring(expr, expr_l),
fennec::cstring(file, file_l), line,
fennec::cstring(func, func_l),
fennec::cstring(desc, ::strlen(desc) + 1)
fennec::cstring(desc, ::strlen(desc))
);
if (halt) {

View File

@@ -112,7 +112,7 @@ void wayland_server::connect() {
#endif
auto contexts = ctx_registry::get_type_list();
while (not contexts.empty()) {
while (not contexts.is_empty()) {
const auto& ctx = contexts.front();
gfx_context = unique_ptr(ctx.ctor(this));
@@ -125,7 +125,7 @@ void wayland_server::connect() {
}
}
assertf(not gfx_context.empty(), "Failed to create graphics context.");
assertf(not gfx_context.is_empty(), "Failed to create graphics context.");
}
void wayland_server::disconnect() {
@@ -191,7 +191,7 @@ void wayland_server::_wl_registry_listen_global(void* data, wl_registry* reg, ui
};
wayland_server* server = static_cast<wayland_server*>(data);
const cstring interface = cstring(name, strlen(name) + 1);
const cstring interface = cstring(name, strlen(name));
if (interface == "wl_compositor") {
server->compositor = static_cast<wl_compositor*>(wl_registry_bind(reg, id, &wl_compositor_interface, version));

View File

@@ -44,7 +44,7 @@ void window_manager::initialize() {
display_server::entrylist_t display_servers = display_server::get_type_list();
// Find first valid server
while (not display_servers.empty()) {
while (not display_servers.is_empty()) {
display_server::entry it = display_servers.front();
display_servers.pop();

View File

@@ -21,8 +21,5 @@
namespace fennec
{
gfxpass* glcontext::create_pass() {
return nullptr;
}
}

View File

@@ -37,7 +37,7 @@ namespace fennec
scene_node* scene::operator[](const cstring& name) const {
list<size_t> parse;
parse.push_back(table_t::root);
while (not parse.empty()) {
while (not parse.is_empty()) {
size_t n = parse.front();
if (_table[n]->name == name) {
return _table[n].get();
@@ -54,7 +54,7 @@ scene_node* scene::operator[](const cstring& name) const {
scene_node* scene::operator[](const string& name) const {
list<size_t> parse;
parse.push_back(table_t::root);
while (not parse.empty()) {
while (not parse.is_empty()) {
size_t n = parse.front();
if (_table[n]->name == name) {
return _table[n].get();