1
0
Fork 0
Univerxel/src/client/render/gl/pass/SkyProgram.hpp

34 lines
728 B
C++
Raw Normal View History

2020-07-13 16:45:08 +00:00
#pragma once
#include "Program.hpp"
2020-07-25 16:45:03 +00:00
#include "../buffer/Vertex.hpp"
2020-07-13 16:45:08 +00:00
2020-07-25 16:45:03 +00:00
namespace pass {
/// Skybox pass
class SkyProgram: public Program {
public:
SkyProgram();
~SkyProgram();
2020-07-13 16:45:08 +00:00
2020-09-26 22:05:43 +00:00
void start(render::gl::Renderer *);
2020-08-30 16:35:45 +00:00
buffer::params setup();
2020-07-13 16:45:08 +00:00
2020-07-25 16:45:03 +00:00
/// Direct draw using internal buffer
2020-09-26 22:05:43 +00:00
void draw(render::gl::Renderer *);
2020-07-13 16:45:08 +00:00
2020-08-30 16:35:45 +00:00
protected:
std::string getName() const override;
2020-07-25 16:45:03 +00:00
void setView(const GLfloat *matrix);
void setProjection(const GLfloat *matrix);
2020-07-13 16:45:08 +00:00
2020-07-25 16:45:03 +00:00
void bindTexture(const GLuint textureID);
2020-07-13 16:45:08 +00:00
2020-07-25 16:45:03 +00:00
private:
GLuint ViewMatrixID;
GLuint ProjectionMatrixID;
GLuint TextureID;
2020-07-13 16:45:08 +00:00
2020-07-25 16:45:03 +00:00
buffer::Vertex CubeBuffer;
};
}