mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
add gfx.blockwraps.set_tints
This commit is contained in:
parent
e423c74628
commit
c47432c979
5 changed files with 54 additions and 22 deletions
|
|
@ -1,15 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include "assets/assets_util.hpp"
|
||||
#include "voxels/Block.hpp"
|
||||
#include "MainBatch.hpp"
|
||||
#include "typedefs.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
|
||||
#include "assets/assets_util.hpp"
|
||||
#include "voxels/Block.hpp"
|
||||
#include "MainBatch.hpp"
|
||||
#include "typedefs.hpp"
|
||||
#include <glm/vec4.hpp>
|
||||
|
||||
class Assets;
|
||||
class Player;
|
||||
|
|
@ -22,6 +23,7 @@ class DrawContext;
|
|||
struct BlockWrapper {
|
||||
glm::ivec3 position;
|
||||
std::array<std::string, 6> textureFaces {};
|
||||
std::array<glm::vec3, 6> tints {};
|
||||
float emission = 0.0f;
|
||||
|
||||
// --- render cache ---
|
||||
|
|
@ -54,7 +56,10 @@ public:
|
|||
void draw(const DrawContext& ctx, const Player& player);
|
||||
|
||||
u64id_t add(
|
||||
const glm::ivec3& position, const std::string& texture, float emission
|
||||
const glm::ivec3& position,
|
||||
const std::string& texture,
|
||||
const glm::vec3& tint,
|
||||
float emission
|
||||
);
|
||||
|
||||
BlockWrapper* get(u64id_t id) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue