group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Asset.hpp File Reference

GPU asset types and global registries for the new renderer. More...

#include "glm/glm.hpp"
#include <unordered_map>
#include <vector>
Include dependency graph for Asset.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Asset::GeoBufferInfo
 References a CPU-side source pointer and its corresponding GPU buffer. More...
struct  Asset::Vertex
 Per-vertex attributes: position, normal, and texture coordinates. More...
struct  Asset::Mesh
 A single mesh: CPU-side vertex/index data plus GPU buffer info. More...
struct  Asset::Material
struct  Asset::ModelElement
struct  Asset::ModelNode
struct  Asset::Model

Namespaces

namespace  Asset

Macros

#define TEX_CHANNELS   1

Typedefs

using MeshIdInt = uint32_t
using ModelIdInt = uint32_t
using TexIdInt = uint32_t
using MaterialIdInt = uint32_t

Functions

uint32_t Asset::fnv1a32 (const std::string &str)
 Compute a 32-bit FNV-1a hash of the given string.
uint32_t Asset::getIdFromString (const std::string &strId)
 Convert a string identifier to a generic 32-bit hash ID.
MeshIdInt Asset::getMeshIdFromString (const std::string &strId)
 Convert a string identifier to a MeshIdInt hash.
ModelIdInt Asset::getModelIdFromString (const std::string &strId)
 Convert a string identifier to a ModelIdInt hash.
TexIdInt Asset::getTexIdFromString (const std::string &strId)
 Convert a string identifier to a TexIdInt hash.
MaterialIdInt Asset::getMaterialIdFromString (const std::string &strId)

Variables

std::unordered_map< MeshIdInt, MeshAsset::meshes_
std::unordered_map< ModelIdInt, ModelAsset::models_
std::unordered_map< TexIdInt, uint32_t > Asset::textures_
std::unordered_map< MaterialIdInt, MaterialAsset::materials_

Detailed Description

GPU asset types and global registries for the new renderer.

Defines vertex, mesh, model, and scene-instance data structures used by NewRenderer and AssetLoader. Global hash-map registries (meshes_, models_, textures_) store loaded assets keyed by FNV-1a string hashes.

Macro Definition Documentation

◆ TEX_CHANNELS

#define TEX_CHANNELS   1

Typedef Documentation

◆ MaterialIdInt

using MaterialIdInt = uint32_t

◆ MeshIdInt

using MeshIdInt = uint32_t

◆ ModelIdInt

using ModelIdInt = uint32_t

◆ TexIdInt

using TexIdInt = uint32_t