demo skybox
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "./player/player.hpp"
|
||||
#include "./renderer/game_renderer.hpp"
|
||||
#include "./terrain/terrain.hpp"
|
||||
#include "./skybox/skybox.hpp"
|
||||
#include "./debug_object.hpp"
|
||||
|
||||
namespace Demo {
|
||||
@@ -44,6 +45,7 @@ class GameState : public State<GlobalStateType> {
|
||||
GameRenderer renderer;
|
||||
Player* player;
|
||||
Terrain* terrain;
|
||||
Skybox* skybox;
|
||||
DebugObject* dbgObj;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
# ______ ____ ___
|
||||
# | \/ ____| |___|
|
||||
# | | | \ | |
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright 2022, tyra - https://github.com/h4570/tyra
|
||||
# Licenced under Apache License 2.0
|
||||
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <renderer/3d/mesh/static/static_mesh.hpp>
|
||||
#include <renderer/3d/pipeline/static/stapip_options.hpp>
|
||||
#include "states/game/renderer/renderer_static_pair.hpp"
|
||||
#include <renderer/renderer.hpp>
|
||||
|
||||
using Tyra::Renderer;
|
||||
using Tyra::StaPipOptions;
|
||||
using Tyra::StaticMesh;
|
||||
using Tyra::TextureRepository;
|
||||
using Tyra::Vec4;
|
||||
|
||||
namespace Demo {
|
||||
|
||||
class Skybox {
|
||||
public:
|
||||
Skybox(TextureRepository* repo);
|
||||
~Skybox();
|
||||
|
||||
StaticMesh* mesh;
|
||||
StaPipOptions* options;
|
||||
RendererStaticPair* pair;
|
||||
|
||||
void update(const Vec4& playerPosition);
|
||||
|
||||
private:
|
||||
void allocateOptions();
|
||||
};
|
||||
|
||||
} // namespace Demo
|
||||
Reference in New Issue
Block a user