mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 13:41:06 +03:00
Adds the platform layer for building whoa as a WebAssembly application: Working: - CMake configuration for WHOA_SYSTEM_WEB with pthreads and ASYNCIFY - Web entry point and HTML shell template - Event loop adapted for emscripten_set_main_loop callback model - WebSocket-based networking (WowConnection over JS WebSocket API) - Sound system stubs (audio not yet implemented) - FetchFS for async file loading from web server - Freetype fixes for WASM compatibility (type mismatches) - Input handling for web canvas Missing (in separate commits): - WebGPU graphics backend (CGxDeviceWebGPU) - WGSL shaders - API selection in Device.cpp
39 lines
1020 B
C++
39 lines
1020 B
C++
#ifndef GX_BUFFER_C_GX_POOL_HPP
|
|
#define GX_BUFFER_C_GX_POOL_HPP
|
|
|
|
#include "gx/buffer/CGxBuf.hpp"
|
|
#include "gx/buffer/Types.hpp"
|
|
#include <cstdint>
|
|
#include <storm/List.hpp>
|
|
|
|
class CGxPool : public TSLinkedNode<CGxPool> {
|
|
public:
|
|
// Member variables
|
|
EGxPoolTarget m_target;
|
|
EGxPoolUsage m_usage;
|
|
int32_t m_size;
|
|
void* m_apiSpecific;
|
|
void* m_mem;
|
|
int32_t unk1C; // TODO
|
|
TSList<CGxBuf, TSGetLink<CGxBuf>> m_bufList;
|
|
EGxPoolHintBits m_hint;
|
|
const char* m_name;
|
|
|
|
// Member functions
|
|
CGxPool() = default;
|
|
CGxPool(EGxPoolTarget target, EGxPoolUsage usage, uint32_t size, EGxPoolHintBits hint, const char* name)
|
|
: m_target(target)
|
|
, m_usage(usage)
|
|
, m_size(size)
|
|
, m_apiSpecific(nullptr)
|
|
, m_mem(nullptr)
|
|
, unk1C(0)
|
|
, m_hint(hint)
|
|
, m_name(name)
|
|
{};
|
|
void Discard();
|
|
void Invalidate();
|
|
};
|
|
|
|
#endif
|