, cursor(1.0f)
, chunk_prog()
, entity_prog()
+, sky_prog()
, sprite_prog()
, active_prog(NONE) {
glClearColor(0.0, 0.0, 0.0, 1.0);
glDepthFunc(GL_LESS);
}
+void Viewport::EqualDepthTest() noexcept {
+ glEnable(GL_DEPTH_TEST);
+ glDepthFunc(GL_LEQUAL);
+}
+
void Viewport::DisableDepthTest() noexcept {
glDisable(GL_DEPTH_TEST);
}
return outline_prog;
}
+SkyBoxShader &Viewport::SkyBoxProgram() noexcept {
+ if (active_prog != SKY_BOX) {
+ sky_prog.Activate();
+ DisableBlending();
+ EqualDepthTest();
+ active_prog = SKY_BOX;
+ }
+ return sky_prog;
+}
+
BlendedSprite &Viewport::SpriteProgram() noexcept {
if (active_prog != SPRITE) {
sprite_prog.Activate();