z test patch

This commit is contained in:
h4570
2022-08-14 18:05:57 +02:00
parent a9c91db594
commit 15391a81e0
51 changed files with 197 additions and 163 deletions
@@ -16,6 +16,7 @@
#include "../pipeline_shading_type.hpp"
#include "../pipeline_texture_mapping_type.hpp"
#include "../pipeline_transformation_type.hpp"
#include "../pipeline_z_test.hpp"
#include "./pipeline_info_bag_frustum_culling.hpp"
namespace Tyra {
@@ -30,6 +31,7 @@ class PipelineInfoBag {
antiAliasingEnabled = false;
model = nullptr;
frustumCulling = PipelineInfoBagFrustumCulling_None;
zTestType = PipelineZTest_Standard;
}
~PipelineInfoBag() {}
@@ -51,6 +53,9 @@ class PipelineInfoBag {
/** Anti-aliasing */
bool antiAliasingEnabled;
/** Type of z buffer testing. */
PipelineZTest zTestType;
/** Type of frustum culling */
PipelineInfoBagFrustumCulling frustumCulling;
};
@@ -14,6 +14,7 @@
#include "../shared/pipeline_lighting_options.hpp"
#include "../shared/pipeline_texture_mapping_type.hpp"
#include "../shared/pipeline_transformation_type.hpp"
#include "../shared/pipeline_z_test.hpp"
#include "./pipeline_frustum_culling.hpp"
namespace Tyra {
@@ -27,6 +28,7 @@ class PipelineOptions {
shadingType = TyraShadingFlat;
textureMappingType = TyraLinear;
transformationType = TyraMVP;
zTestType = PipelineZTest_Standard;
}
~PipelineOptions() {}
@@ -45,6 +47,9 @@ class PipelineOptions {
/** Anti-aliasing */
bool antiAliasingEnabled;
/** Type of z-buffer testing. */
PipelineZTest zTestType;
/** Multiply by model matrix by view-projection or projection matrix */
PipelineTransformationType transformationType;
@@ -0,0 +1,20 @@
/*
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
#pragma once
namespace Tyra {
enum PipelineZTest {
PipelineZTest_Standard = 0,
PipelineZTest_AllPass = 1,
};
} // namespace Tyra