mesh_texture -> texture

This commit is contained in:
h4570
2020-12-01 19:27:55 +01:00
parent ade89bbdd1
commit 389a5ee608
17 changed files with 48 additions and 48 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
#include "math/vector3.hpp"
#include "math/plane.hpp"
#include "./mesh_texture.hpp"
#include "./texture.hpp"
#include "./mesh_frame.hpp"
#include <tamtypes.h>
#include <draw_types.h>
@@ -8,8 +8,8 @@
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
#ifndef _TYRA_MESH_TEXTURE_
#define _TYRA_MESH_TEXTURE_
#ifndef _TYRA_TEXTURE_
#define _TYRA_TEXTURE_
#include <tamtypes.h>
#include <draw_sampling.h>
@@ -27,15 +27,15 @@ enum TextureType
/**
* Class which contains texture data.
* Textures are paired with meshes via addLink() and
* removeLink() functions which use meshId and materialId.
* Textures are paired with meshes/sprites via addLink() and
* removeLink() functions which use meshId/spriteId and materialId (for mesh).
*/
class MeshTexture
class Texture
{
public:
MeshTexture();
~MeshTexture();
Texture();
~Texture();
// ----
// Getters
@@ -87,7 +87,7 @@ public:
const s32 getIndexOfLink(const u32 &t_meshId, const u32 &t_materialId) const
{
for (u32 i = 0; i < texLinks.size(); i++)
if (texLinks[i].materialId == t_materialId && texLinks[i].meshId == t_meshId)
if (texLinks[i].materialId == t_materialId && texLinks[i].meshOrSpriteId == t_meshId)
return i;
return -1;
};
+1 -1
View File
@@ -16,7 +16,7 @@
struct TextureLink
{
/** Mesh id or sprite id */
u32 meshId;
u32 meshOrSpriteId;
/** Mesh material id or 0 if is sprite */
u32 materialId;
};