generated from RuiFPB/tyra-linux-template
Rendering minecraft Blocks using the MinecraftPipeline
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include <tyra>
|
||||
#include "block.hpp"
|
||||
|
||||
namespace Test {
|
||||
|
||||
class RenderTest : public Tyra::Game {
|
||||
public:
|
||||
RenderTest(Tyra::Engine* engine);
|
||||
~RenderTest();
|
||||
|
||||
void init();
|
||||
void loop();
|
||||
|
||||
private:
|
||||
Tyra::Engine* engine;
|
||||
Tyra::Texture* textureAtlas;
|
||||
|
||||
Tyra::MinecraftPipeline mcpip;
|
||||
Tyra::Vec4 cameraPosition, cameraLookAt;
|
||||
|
||||
void loadTexture();
|
||||
Block getBlock(const u8& atlasX, const u8& atlasY, const float& translationX);
|
||||
void rotateBlock(Block& block);
|
||||
std::vector<Block> blocks;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace Test
|
||||
Reference in New Issue
Block a user