[feat] (buffer): using ankerl unordered_dense as hash map impl

This commit is contained in:
Swung0x48 2025-04-04 22:26:02 +08:00
parent d609b8ceab
commit 29349374ca
2 changed files with 2110 additions and 4 deletions

View File

@ -4,19 +4,24 @@
#include "buffer.h"
#include <unordered_map>
#include "ankerl/unordered_dense.h"
template <typename K, typename V>
using unordered_map = ankerl::unordered_dense::map<K, V>;
//using unordered_map = std::unordered_map<K, V>;
#define DEBUG 0
GLint maxBufferId = 0;
GLint maxArrayId = 0;
std::unordered_map<GLuint, GLuint> g_gen_buffers;
std::unordered_map<GLuint, GLuint> g_gen_arrays;
unordered_map<GLuint, GLuint> g_gen_buffers;
unordered_map<GLuint, GLuint> g_gen_arrays;
std::unordered_map<GLenum, GLuint> g_bound_buffers;
unordered_map<GLenum, GLuint> g_bound_buffers;
GLuint bound_array = 0;
std::unordered_map<GLuint, BufferMapping> g_active_mappings;
unordered_map<GLuint, BufferMapping> g_active_mappings;
GLuint gen_buffer() {
maxBufferId++;

File diff suppressed because it is too large Load Diff