spamming with multiple buffers to vu1
This commit is contained in:
@@ -23,18 +23,9 @@ class MeshFrame {
|
||||
~MeshFrame();
|
||||
|
||||
const u32& getId() const { return id; }
|
||||
const u32& getVertexCount() const { return vertexCount; }
|
||||
const u32& getTextureCoordsCount() const { return textureCoordsCount; }
|
||||
const u32& getNormalsCount() const { return normalsCount; }
|
||||
const u32& getColorsCount() const { return colorsCount; }
|
||||
const u8& isMother() const { return _isMother; }
|
||||
const BBox& getBBox() const { return *bbox; }
|
||||
|
||||
Vec4* getVertices() const { return vertices; }
|
||||
Vec4* getNormals() const { return normals; }
|
||||
Vec4* getTextureCoords() const { return textureCoords; }
|
||||
Color* getColors() const { return colors; }
|
||||
|
||||
void print() const;
|
||||
void print(const char* name) const;
|
||||
void print(const std::string& name) const { print(name.c_str()); }
|
||||
@@ -43,9 +34,7 @@ class MeshFrame {
|
||||
private:
|
||||
u8 _isMother;
|
||||
BBox* bbox;
|
||||
u32 id, vertexCount, textureCoordsCount, normalsCount, colorsCount;
|
||||
Vec4 *vertices, *textureCoords, *normals;
|
||||
Color* colors;
|
||||
u32 id;
|
||||
};
|
||||
|
||||
} // namespace Tyra
|
||||
|
||||
@@ -22,18 +22,18 @@ class MeshMaterial {
|
||||
explicit MeshMaterial(const MeshMaterial& material);
|
||||
~MeshMaterial();
|
||||
|
||||
Color singleColor;
|
||||
Color color;
|
||||
|
||||
const u32& getId() const { return id; }
|
||||
const std::string& getName() const { return _name; }
|
||||
const u32& getFacesCount() const { return facesCount; }
|
||||
const u8& isMother() const { return _isMother; }
|
||||
const u8& isSingleColorActivated() const { return singleColorFlag; }
|
||||
u32* getVertexFaces() const { return vertexFaces; }
|
||||
u32* getTextureCoordFaces() const { return textureCoordFaces; }
|
||||
u32* getNormalFaces() const { return normalFaces; }
|
||||
u32* getColorFaces() const { return normalFaces; }
|
||||
MeshMaterialFrame* getFrames() const { return *frames; }
|
||||
const u32& getFramesCount() const { return framesCount; }
|
||||
const u8& isSingleColorActivated() const {
|
||||
return singleColorFlag;
|
||||
} // TODO: colormode -> color / lightmap
|
||||
|
||||
MeshMaterialFrame** getFrames() const { return frames; }
|
||||
MeshMaterialFrame* getFrame(const u32& i) const { return frames[i]; }
|
||||
|
||||
const BBox& getBBox(const u32& frame) const;
|
||||
void setSingleColorFlag(const u8& flag);
|
||||
@@ -48,8 +48,7 @@ class MeshMaterial {
|
||||
|
||||
std::string _name;
|
||||
u8 _isMother, singleColorFlag;
|
||||
u32 id, facesCount, framesCount;
|
||||
u32 *vertexFaces, *textureCoordFaces, *normalFaces, *colorFaces;
|
||||
u32 id, framesCount;
|
||||
};
|
||||
|
||||
} // namespace Tyra
|
||||
|
||||
@@ -26,11 +26,33 @@ class MeshMaterialFrame {
|
||||
const u8& isMother() const { return _isMother; }
|
||||
const BBox& getBBox() const { return *bbox; }
|
||||
|
||||
const u32& getVertexCount() const { return vertexCount; }
|
||||
Vec4* getVertices() const { return vertices; }
|
||||
Vec4* getNormals() const { return normals; }
|
||||
Vec4* getTextureCoords() const { return textureCoords; }
|
||||
Color* getColors() const { return colors; }
|
||||
|
||||
void print() const;
|
||||
void print(const char* name) const;
|
||||
void print(const std::string& name) const { print(name.c_str()); }
|
||||
std::string getPrint(const char* name = nullptr) const;
|
||||
|
||||
private:
|
||||
void allocateVertices(const MeshBuilderData& data, const u32& frameIndex,
|
||||
const u32& materialIndex);
|
||||
void allocateTextureCoords(const MeshBuilderData& data, const u32& frameIndex,
|
||||
const u32& materialIndex);
|
||||
void allocateNormals(const MeshBuilderData& data, const u32& frameIndex,
|
||||
const u32& materialIndex);
|
||||
void allocateColors(const MeshBuilderData& data, const u32& frameIndex,
|
||||
const u32& materialIndex);
|
||||
|
||||
BBox* bbox;
|
||||
|
||||
u8 _isMother;
|
||||
u32 id;
|
||||
u32 id, vertexCount;
|
||||
Vec4 *vertices, *textureCoords, *normals;
|
||||
Color* colors;
|
||||
};
|
||||
|
||||
} // namespace Tyra
|
||||
|
||||
Reference in New Issue
Block a user