33#include "VulkanDefines.h"
34#include "VulkanBuffer.h"
35#include "VulkanImage.h"
36#include "VulkanShader.h"
37#include "VulkanBitflagObject.h"
38#include <NDEVR/Model.h>
39#include <NDEVR/Material.h>
40struct VkWriteDescriptorSet;
41struct VkDescriptorImageInfo;
42struct VkPipelineShaderStageCreateInfo;
43DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool);
44DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet);
45DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout);
46DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler);
91 uint04 layer_number = Constant<uint04>::Invalid;
115 class VulkanMaterialManager
119 VulkanMaterialManager(
const VulkanMaterialManager& m_pipeline) =
delete;
120 ~VulkanMaterialManager();
125 bool hasGrid()
const {
return m_has_grid; }
132 void addMaterial(
const Material& material);
133 void clearMaterials();
134 bool hasOpacity()
const {
return m_has_opacity; }
135 bool ignoreDepth()
const {
return m_ignore_depth; }
136 bool writeToDepth()
const {
return m_write_to_depth; }
137 bool usesModelColor()
const {
return m_use_model_color; }
138 bool usesLayerColor()
const {
return m_use_layer_color; }
139 bool needsPipelineUpdate()
const {
return m_needs_pipeline_update; }
140 fltp04 fadeDistance()
const;
141 fltp04 depthBias()
const {
return m_depth_bias; }
142 bool hasImage()
const;
151 StringView getExtraPropertyChannel()
const {
return m_extra_channel; }
158 VkDescriptorSet descriptorSet()
const
160 return m_descriptor_set;
164 Time lastDependencyUpdate()
const {
return m_last_push_update_time; }
165 UUID material()
const;
166 bool isTwoSided()
const {
return m_is_two_sided; }
167 bool isWireframe()
const {
return m_is_wireframe; }
168 bool overrideCamera()
const {
return m_override_camera; }
169 bool useNormalForTexture()
const {
return m_use_normal_for_texture; }
170 bool useLighting()
const;
171 bool smoothNormals()
const;
173 bool simpleAllowed()
const;
174 void resetPool() { m_descriptor_pool = vk_null; }
185 bool needsToUpdateImage(
const Material& material);
186 bool needsToUpdateShader(
const Material& material);
197 VkDescriptorPool m_descriptor_pool;
210 uint04 m_number_of_uniforms;
211 Time m_last_updated_time;
213 Time m_last_push_update_time;
218 VkDescriptorSet m_descriptor_set;
227 mutable bool m_needs_to_commit_frag_buffer =
true;
228 mutable bool m_needs_to_commit_vert_buffer =
true;
229 bool m_needs_pipeline_update =
true;
230 bool m_has_opacity =
false;
231 bool m_has_image =
false;
232 bool m_has_image_opacity =
false;
233 bool m_is_two_sided =
false;
234 bool m_override_camera =
false;
235 bool m_smooth_normals =
false;
236 bool m_is_wireframe =
false;
237 bool m_has_grid =
false;
238 bool m_use_normal_for_texture =
false;
239 bool m_use_model_color =
false;
240 bool m_use_layer_color =
false;
241 bool m_ignore_depth =
false;
242 bool m_write_to_depth =
true;
243 bool m_needs_buffer_update =
false;
The equivelent of std::vector but with a bit more control.
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Options that are used for performing an update on a Graphics Engine call.
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
ShadingModel
Enumerates the available shading models for material rendering.
TextureCoordMode
Defines how texture coordinates are generated or interpreted for a material.
Represents a color in the RGB space with optional alpha transparency.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Represents a timestamp with utilities for manipulation and conversion.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
ShaderType
The types of shaders available for rendering different primitives.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
@ e_uv_size
The number of UV types. Used for sizing arrays.
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Stores bools to be sent to both the Vertex and Fragment shaders in the Vulkan space.