mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
feat: allow passing rgba color to entity skeletons and block wraps
This commit is contained in:
parent
85cc55c63b
commit
ae082abaa2
12 changed files with 55 additions and 40 deletions
|
|
@ -61,8 +61,8 @@ void ModelBatch::draw(
|
|||
const model::Mesh& mesh,
|
||||
const glm::mat4& matrix,
|
||||
const glm::mat3& rotation,
|
||||
glm::vec3 tint,
|
||||
const texture_names_map* varTextures,
|
||||
const glm::vec4& tint,
|
||||
const TextureNamesMap* varTextures,
|
||||
bool backlight
|
||||
) {
|
||||
setTexture(mesh.texture, varTextures);
|
||||
|
|
@ -97,10 +97,12 @@ void ModelBatch::draw(
|
|||
}
|
||||
}
|
||||
|
||||
void ModelBatch::draw(glm::mat4 matrix,
|
||||
glm::vec3 tint,
|
||||
const model::Model* model,
|
||||
const texture_names_map* varTextures) {
|
||||
void ModelBatch::draw(
|
||||
const glm::mat4& matrix,
|
||||
const glm::vec4& tint,
|
||||
const model::Model* model,
|
||||
const TextureNamesMap* varTextures
|
||||
) {
|
||||
for (const auto& mesh : model->meshes) {
|
||||
entries.push_back({
|
||||
matrix, extract_rotation(matrix), tint, &mesh, varTextures
|
||||
|
|
@ -134,7 +136,7 @@ void ModelBatch::setLightsOffset(const glm::vec3& offset) {
|
|||
}
|
||||
|
||||
void ModelBatch::setTexture(const std::string& name,
|
||||
const texture_names_map* varTextures) {
|
||||
const TextureNamesMap* varTextures) {
|
||||
if (varTextures && !name.empty() && name.at(0) == '$') {
|
||||
const auto& found = varTextures->find(name);
|
||||
if (found == varTextures->end()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue