45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
|
#pragma once
|
||
|
|
||
|
#include "gl/pass/VoxelProgram.hpp"
|
||
|
|
||
|
struct GLFWwindow;
|
||
|
class Camera;
|
||
|
|
||
|
namespace render {
|
||
|
|
||
|
/// Handle rendering passes and params
|
||
|
class Pipeline {
|
||
|
public:
|
||
|
/// Rendering options
|
||
|
struct options {
|
||
|
/// Voxel passes
|
||
|
pass::VoxelProgram::options voxel;
|
||
|
/// Display skybox
|
||
|
bool skybox = true;
|
||
|
/// Display only wires
|
||
|
bool wireframe = false;
|
||
|
/// Texture pack name
|
||
|
std::string textures = "1024-realistic";
|
||
|
/// Textures quality
|
||
|
float mipMapLOD = -.5;
|
||
|
/// Textures anisotropic mapping
|
||
|
int anisotropy = 0;
|
||
|
/// Depth color
|
||
|
glm::vec4 clear_color;
|
||
|
};
|
||
|
|
||
|
virtual ~Pipeline() { }
|
||
|
|
||
|
/// Start new frame and setup
|
||
|
virtual void beginFrame() = 0;
|
||
|
/// Apply postprocessing
|
||
|
virtual void endPass() = 0;
|
||
|
/// Swap displayed image
|
||
|
virtual void swapBuffer(GLFWwindow*) = 0;
|
||
|
|
||
|
/// Apply camera matrices
|
||
|
virtual void lookFrom(const Camera&) = 0;
|
||
|
|
||
|
virtual void setClearColor(glm::vec4) = 0;
|
||
|
};
|
||
|
}
|