mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
nothing actually done
This commit is contained in:
parent
051f0b8c6a
commit
1ecc608ead
19 changed files with 44 additions and 48 deletions
|
|
@ -1,58 +0,0 @@
|
|||
#ifndef GRAPHICS_RENDER_SKYBOX_H_
|
||||
#define GRAPHICS_RENDER_SKYBOX_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../../typedefs.h"
|
||||
#include "../../maths/fastmaths.h"
|
||||
|
||||
class Mesh;
|
||||
class Shader;
|
||||
class Assets;
|
||||
class Camera;
|
||||
class Batch3D;
|
||||
class Framebuffer;
|
||||
class GfxContext;
|
||||
|
||||
struct skysprite {
|
||||
std::string texture;
|
||||
float phase;
|
||||
float distance;
|
||||
bool emissive;
|
||||
};
|
||||
|
||||
class Skybox {
|
||||
std::unique_ptr<Framebuffer> fbo;
|
||||
uint size;
|
||||
Shader* shader;
|
||||
bool ready = false;
|
||||
FastRandom random;
|
||||
|
||||
std::unique_ptr<Mesh> mesh;
|
||||
std::unique_ptr<Batch3D> batch3d;
|
||||
std::vector<skysprite> sprites;
|
||||
|
||||
void drawStars(float angle, float opacity);
|
||||
void drawBackground(Camera* camera, Assets* assets, int width, int height);
|
||||
public:
|
||||
Skybox(uint size, Shader* shader);
|
||||
~Skybox();
|
||||
|
||||
void draw(
|
||||
const GfxContext& pctx,
|
||||
Camera* camera,
|
||||
Assets* assets,
|
||||
float daytime,
|
||||
float fog
|
||||
);
|
||||
|
||||
void refresh(const GfxContext& pctx, float t, float mie, uint quality);
|
||||
void bind() const;
|
||||
void unbind() const;
|
||||
bool isReady() const {
|
||||
return ready;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // GRAPHICS_RENDER_SKYBOX_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue