Files
tyra-linux/engine/inc/loaders/3d/builder/mesh_builder_frame_data.hpp
T
2022-07-29 23:11:12 +02:00

40 lines
919 B
C++

/*
# ______ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
#pragma once
#include <tamtypes.h>
#include "math/vec4.hpp"
#include "renderer/models/color.hpp"
namespace Tyra {
/**
* Data is not deallocated here.
* Ownership is moved to Mesh class.
*/
class MeshBuilderFrameData {
public:
MeshBuilderFrameData();
~MeshBuilderFrameData();
Vec4 *vertices, *normals, *textureCoords;
Color* colors;
u32 verticesCount, textureCoordsCount, normalsCount, colorsCount;
void allocateTextureCoords(const u32& count);
void allocateVertices(const u32& count);
void allocateNormals(const u32& count);
void allocateColors(const u32& count);
};
} // namespace Tyra