Commit 8f747276 authored by Nghia Truong's avatar Nghia Truong

COMP: Fix uncrustify bug that mistakenly remove proper semicolons

parent 137d2d48
......@@ -36,13 +36,13 @@ RenderParticleEmitter::RenderParticleEmitter(std::shared_ptr<Geometry> geometr
RenderParticleKeyFrame startFrame;
startFrame.m_color = Color::White;
startFrame.m_time = 0.0f;
startFrame.m_time = 0.0f;
startFrame.m_acceleration = Vec3f(0, 0, 0);
startFrame.m_rotationalAcceleration = 0.0f;
RenderParticleKeyFrame endFrame;
endFrame.m_color = startFrame.m_color;
endFrame.m_time = m_time;
endFrame.m_time = m_time;
endFrame.m_acceleration = Vec3f(0, 0, 0);
endFrame.m_rotationalAcceleration = 0.0f;
......
......@@ -41,7 +41,7 @@ namespace imstk
///
struct RenderParticleKeyFrame
{
float m_time = 0;
float m_time = 0;
Color m_color = Color::White;
Vec3f m_acceleration = Vec3f(0, 0, 0);
float m_rotationalAcceleration = 0;
......
......@@ -55,7 +55,7 @@ public:
///
/// \brief Constructor
///
StopWatch() {}
StopWatch() {};
///
/// \brief Destructor
......@@ -125,7 +125,7 @@ public:
///
/// \brief Constructor
///
CpuTimer() : StopWatch() {}
CpuTimer() : StopWatch() {};
///
/// \brief Destructor
......@@ -135,7 +135,7 @@ public:
///
/// \brief Start the appropriate timer
///
virtual void start() override { cpuTimeKeeper = std::clock(); }
virtual void start() override { cpuTimeKeeper = std::clock(); };
///
/// \brief Returns the CPU time elapsed since calling start
......
......@@ -51,7 +51,7 @@ protected:
{
m_buttons[i] = false;
}
}
};
void run() = delete;
void cleanUp() = delete;
......@@ -60,17 +60,17 @@ public:
///
/// \brief Set position
///
void setPosition(const Vec3d& pos) { m_position = pos; }
void setPosition(const Vec3d& pos) { m_position = pos; };
///
/// \brief Set velocity
///
void setVelocity(const Vec3d& vel) { m_velocity = vel; }
void setVelocity(const Vec3d& vel) { m_velocity = vel; };
///
/// \brief Set orientation
///
void setOrientation(const Quatd& orient) { m_orientation = orient; }
void setOrientation(const Quatd& orient) { m_orientation = orient; };
///
/// \brief Set orientation from 4x4 transform
......@@ -78,7 +78,7 @@ public:
void setOrientation(double* transform)
{
m_orientation = (Eigen::Affine3d(Eigen::Matrix4d(transform))).rotation();
}
};
///
/// \brief Set the button status if it exists
......
......@@ -33,7 +33,7 @@ namespace imstk
void
HDAPIDeviceClient::init()
{
m_buttons = std::map<size_t, bool>{ { 0, false }, { 1, false }, { 2, false }, { 3, false } }
m_buttons = std::map<size_t, bool>{ { 0, false }, { 1, false }, { 2, false }, { 3, false } };
//flush error stack
HDErrorInfo errorFlush;
......
......@@ -35,7 +35,7 @@ ForceModelConfig::ForceModelConfig(const std::string& configFileName) : m_loadSu
{
this->parseConfig(configFileName);
}
}
};
bool
ForceModelConfig::parseConfig(const std::string& configFileName)
......
......@@ -42,7 +42,7 @@ public:
///
/// \brief Constructor
///
InternalForceModel() {}
InternalForceModel() {};
///
/// \brief Destructor
......
......@@ -66,7 +66,7 @@ public:
double* zero = (double*)calloc(m_stiffnessMatrix->GetNumRows(), sizeof(double));
stVKStiffnessMatrix->ComputeStiffnessMatrix(zero, m_stiffnessMatrix.get());
free(zero);
}
};
///
/// \brief Destructor
......@@ -77,7 +77,7 @@ public:
{
delete m_stiffnessMatrixRawPtr;
}
}
};
///
/// \brief Get the internal force
......
......@@ -609,35 +609,33 @@ NonLinearSystem::VectorFunctionType
FEMDeformableBodyModel::getFunction()
{
// Function to evaluate the nonlinear objective function given the current state
const auto func = [&, this](const Vectord& q, const bool semiImplicit) -> const Vectord&
{
(semiImplicit) ?
this->computeSemiImplicitSystemRHS(*m_previousState.get(), *m_currentState.get(), m_updateType) :
this->computeImplicitSystemRHS(*m_previousState.get(), *m_currentState.get(), m_updateType);
if (this->m_implementFixedBC)
{
applyBoundaryConditions(m_Feff);
}
return m_Feff;
};
return func;
return [&, this](const Vectord &q, const bool semiImplicit)->const Vectord &
{
(semiImplicit) ?
this->computeSemiImplicitSystemRHS(*m_previousState.get(), *m_currentState.get(), m_updateType) :
this->computeImplicitSystemRHS(*m_previousState.get(), *m_currentState.get(), m_updateType);
if (this->m_implementFixedBC)
{
applyBoundaryConditions(m_Feff);
}
return m_Feff;
};
}
NonLinearSystem::MatrixFunctionType
FEMDeformableBodyModel::getFunctionGradient()
{
// Gradient of the nonlinear objective function given the current state
const auto func = [&, this](const Vectord& q) -> const SparseMatrixd&
{
this->computeImplicitSystemLHS(*m_previousState.get(), *m_currentState.get(), m_updateType);
return [&, this](const Vectord &q)->const SparseMatrixd &
{
this->computeImplicitSystemLHS(*m_previousState.get(), *m_currentState.get(), m_updateType);
if (this->m_implementFixedBC)
{
applyBoundaryConditions(m_Keff);
}
return m_Keff;
};
return func;
if (this->m_implementFixedBC)
{
applyBoundaryConditions(m_Keff);
}
return m_Keff;
};
}
NonLinearSystem::UpdateFunctionType
......@@ -696,4 +694,4 @@ FEMDeformableBodyModel::setFixedSizeTimeStepping()
m_timeStepSizeType = TimeSteppingType::fixed;
m_timeIntegrator->setTimestepSizeToDefault();
}
} // imstk
} // imstk
\ No newline at end of file
......@@ -235,12 +235,12 @@ public:
///
/// \brief Set the time step size
///
virtual void setTimeStep(const double timeStep) { m_timeIntegrator->setTimestepSize(timeStep); }
virtual void setTimeStep(const double timeStep) { m_timeIntegrator->setTimestepSize(timeStep); };
///
/// \brief Returns the time step size
///
virtual double getTimeStep() const { return m_timeIntegrator->getTimestepSize(); }
virtual double getTimeStep() const { return m_timeIntegrator->getTimestepSize(); };
///
/// \brief Set the time step size to fixed size
......@@ -250,9 +250,9 @@ public:
///
/// \brief Set the fixed BC implementation state
///
void enableFixedBC() { m_implementFixedBC = true; }
void disableFixedBC() { m_implementFixedBC = false; }
bool isFixedBCImplemented() const { return m_implementFixedBC; }
void enableFixedBC() { m_implementFixedBC = true; };
void disableFixedBC() { m_implementFixedBC = false; };
bool isFixedBCImplemented() const { return m_implementFixedBC; };
protected:
std::shared_ptr<InternalForceModel> m_internalForceModel; ///> Mathematical model for intenal forces
......
......@@ -33,7 +33,7 @@ VectorizedState::initialize(const size_t numDof)
m_q.setZero();
m_qDot.setZero();
m_qDotDot.setZero();
}
};
void
VectorizedState::setState(const Vectord& u, const Vectord& v, const Vectord& a)
......
......@@ -46,7 +46,7 @@ public:
///
/// \brief Protected constructor
///
Canvas() {}
Canvas() {};
///
/// \brief Destructor
......
......@@ -50,7 +50,7 @@ public:
///
/// \brief Returns the volume of the cube
///
double getVolume() const override { return 0; }
double getVolume() const override { return 0; };
protected:
friend class VulkanDecalRenderDelegate;
......@@ -58,10 +58,10 @@ protected:
std::deque<std::shared_ptr<Decal>> m_orderedDecals;
std::deque<std::shared_ptr<Decal>> m_freeDecals;
void applyTranslation(const Vec3d t) override {}
void applyRotation(const Mat3d r) override {}
void applyScaling(const double s) override {}
virtual void updatePostTransformData() override {}
void applyTranslation(const Vec3d t) override {};
void applyRotation(const Mat3d r) override {};
void applyScaling(const double s) override {};
virtual void updatePostTransformData() override {};
unsigned int m_maxNumDecals;
unsigned int m_numDecals = 0;
......
......@@ -72,7 +72,7 @@ public:
inline bool isValid() const override
{
return true;
}
};
///
/// \brief Set the transform
......
......@@ -64,7 +64,7 @@ public:
///
/// \brief Returns the volume of the geometry (if valid)
///
virtual double getVolume() const { return 0; }
virtual double getVolume() const { return 0; };
///
/// \brief Compute the bounding box for the entire mesh
......@@ -158,7 +158,7 @@ public:
/// \brief Set the topologyChanged flag
///
void setTopologyChangedFlag(const bool flag) { m_topologyChanged = flag; }
bool getTopologyChangedFlag() const { return m_topologyChanged; }
bool getTopologyChangedFlag() const { return m_topologyChanged; };
///
/// \brief Set load factor
......
......@@ -107,7 +107,7 @@ public:
/// \brief Get volume
/// As these are particles, the volume is 0
///
double getVolume() const override { return 0; }
double getVolume() const override { return 0; };
protected:
friend class VulkanParticleRenderDelegate;
......@@ -125,9 +125,9 @@ protected:
unsigned int m_numParticles = 0;
void applyTranslation(const Vec3d t) override {}
void applyRotation(const Mat3d r) override {}
void applyScaling(const double s) override {}
virtual void updatePostTransformData() override {}
void applyTranslation(const Vec3d t) override {};
void applyRotation(const Mat3d r) override {};
void applyScaling(const double s) override {};
virtual void updatePostTransformData() override {};
};
}
......@@ -76,7 +76,7 @@ public:
///
/// \brief Let the polydata mapper know if it is for the surface mesh
///
void setIsSurfaceMapper(const bool val) { m_isSurfaceMapper = val; }
void setIsSurfaceMapper(const bool val) { m_isSurfaceMapper = val; };
protected:
///
......
......@@ -69,7 +69,7 @@ public:
/// in that memory is directly mapped from the VisualModel to the
/// RenderDelegate.
///
virtual void update(const uint32_t frameIndex) {}
virtual void update(const uint32_t frameIndex) {};
///
/// \brief Get vertex buffer
......@@ -105,7 +105,7 @@ protected:
///
/// \brief Default constructor (protected)
///
VulkanRenderDelegate() {}
VulkanRenderDelegate() {};
std::shared_ptr<VulkanVertexBuffer> m_vertexBuffer;
......
......@@ -40,7 +40,7 @@ public:
///
/// \brief Binds the buffer to memory
///
virtual void bind() {}
virtual void bind() {};
protected:
uint32_t m_buffering = 1;
......
......@@ -61,7 +61,7 @@ public:
void initializeFramebuffer(VkRenderPass* renderPass);
~VulkanFramebuffer() {}
~VulkanFramebuffer() {};
void changeImageLayout(VkCommandBuffer& commandBuffer,
VkImage& image,
......
......@@ -152,8 +152,8 @@ VulkanMaterialDelegate::buildMaterial(VulkanRenderer* renderer)
&& !m_material->isLineMesh()
&& !m_depthPrePass
&& !m_material->isParticle();
m_constants.diffuseTexture = (m_material->getTexture(Texture::Type::DIFFUSE)->getPath() != "") && !m_depthOnlyPass;
m_constants.normalTexture = (m_material->getTexture(Texture::Type::NORMAL)->getPath() != "") && !m_depthOnlyPass;
m_constants.diffuseTexture = (m_material->getTexture(Texture::Type::DIFFUSE)->getPath() != "") && !m_depthOnlyPass;
m_constants.normalTexture = (m_material->getTexture(Texture::Type::NORMAL)->getPath() != "") && !m_depthOnlyPass;
m_constants.roughnessTexture = (m_material->getTexture(Texture::Type::ROUGHNESS)->getPath() != "") && !m_depthOnlyPass;
m_constants.metalnessTexture = (m_material->getTexture(Texture::Type::METALNESS)->getPath() != "") && !m_depthOnlyPass;
m_constants.ambientOcclusionTexture = (m_material->getTexture(Texture::Type::AMBIENT_OCCLUSION)->getPath() != "") && !m_depthOnlyPass;
......@@ -936,7 +936,7 @@ VulkanMaterialDelegate::createDescriptorSets(VulkanRenderer* renderer)
// Global buffers
std::vector<VkDescriptorBufferInfo> fragmentBufferInfo(2);
fragmentBufferInfo[0].offset = renderer->m_globalFragmentUniformBuffer->getUniformBuffer()->getOffset();
fragmentBufferInfo[0].offset = renderer->m_globalFragmentUniformBuffer->getUniformBuffer()->getOffset();;
fragmentBufferInfo[0].range = renderer->m_globalFragmentUniformBuffer->getUniformBuffer()->getSize();
fragmentBufferInfo[0].buffer = *(renderer->m_globalFragmentUniformBuffer->getUniformBuffer()->getBuffer());
......
......@@ -250,4 +250,4 @@ VulkanMemoryManager::getAlignedSize(VkDeviceSize size, VkDeviceSize alignment)
return newSize;
}
}
\ No newline at end of file
};
\ No newline at end of file
......@@ -96,4 +96,4 @@ protected:
std::vector<VulkanInternalBufferGroup*> m_buffers;
std::vector<VulkanInternalImage*> m_images;
};
}
};
......@@ -560,16 +560,16 @@ VulkanRenderer::initializeFramebufferImages(VkSwapchainKHR* swapchain)
}
VkSamplerCreateInfo samplerInfo;
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = nullptr;
samplerInfo.flags = 0;
samplerInfo.magFilter = VK_FILTER_LINEAR;
samplerInfo.minFilter = VK_FILTER_LINEAR;
samplerInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR; // Trilinear interpolation
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = nullptr;
samplerInfo.flags = 0;
samplerInfo.magFilter = VK_FILTER_LINEAR;
samplerInfo.minFilter = VK_FILTER_LINEAR;
samplerInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR; // Trilinear interpolation
samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER;
samplerInfo.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER;
samplerInfo.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER;
samplerInfo.mipLodBias = 0.0;
samplerInfo.mipLodBias = 0.0;
samplerInfo.anisotropyEnable = VK_FALSE;
samplerInfo.maxAnisotropy = 1.0;
samplerInfo.compareEnable = VK_FALSE;
......@@ -646,16 +646,16 @@ VulkanRenderer::initializeFramebuffers(VkSwapchainKHR* swapchain)
{
VkSamplerCreateInfo samplerInfo;
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = nullptr;
samplerInfo.flags = 0;
samplerInfo.magFilter = VK_FILTER_LINEAR;
samplerInfo.minFilter = VK_FILTER_LINEAR;
samplerInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR; // Trilinear interpolation
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = nullptr;
samplerInfo.flags = 0;
samplerInfo.magFilter = VK_FILTER_LINEAR;
samplerInfo.minFilter = VK_FILTER_LINEAR;
samplerInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR; // Trilinear interpolation
samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT;
samplerInfo.addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT;
samplerInfo.addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT;
samplerInfo.mipLodBias = 0.0;
samplerInfo.mipLodBias = 0.0;
samplerInfo.anisotropyEnable = VK_FALSE; // TODO:: add option to enable
samplerInfo.maxAnisotropy = 1.0;
samplerInfo.compareEnable = VK_FALSE;
......
......@@ -178,7 +178,7 @@ protected:
/// \brief Update background colors
///
void updateBackground(const Vec3d color1, const Vec3d color2 = Vec3d::Zero(), const bool gradientBackground = false) {}
void updateBackground(const Vec3d color1, const Vec3d color2 = Vec3d::Zero(), const bool gradientBackground = false) {};
protected:
friend class VulkanViewer;
......
......@@ -93,7 +93,7 @@ public:
{
m_image = new VkImage();
}
}
};
VkImage* getImage()
{
......@@ -130,7 +130,7 @@ public:
{
m_type = type;
m_buffer = new VkBuffer();
}
};
VkBuffer* getBuffer()
{
......@@ -158,7 +158,7 @@ public:
VulkanInternalBuffer(VulkanInternalBufferGroup* bufferGroup)
{
m_bufferGroup = bufferGroup;
}
};
VkBuffer* getBuffer()
{
......
......@@ -67,11 +67,11 @@ VulkanTextureDelegate::VulkanTextureDelegate(
m_imageOffsetAlignment = this->getStride(m_format);
m_imageInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
m_imageInfo.pNext = nullptr;
m_imageInfo.format = m_format;
m_imageInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
m_imageInfo.pNext = nullptr;
m_imageInfo.format = m_format;
m_imageInfo.imageType = VK_IMAGE_TYPE_2D;
m_imageInfo.extent = { m_width, m_height, 1 };
m_imageInfo.extent = { m_width, m_height, 1 };
m_imageInfo.mipLevels = m_mipLevels;
m_imageInfo.arrayLayers = m_arrayLayers;
m_imageInfo.samples = VK_SAMPLE_COUNT_1_BIT;
......@@ -127,16 +127,16 @@ VulkanTextureDelegate::VulkanTextureDelegate(
vkCreateImageView(memoryManager.m_device, &imageViewInfo, nullptr, &m_imageView);
VkSamplerCreateInfo samplerInfo;
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = nullptr;
samplerInfo.flags = 0;
samplerInfo.magFilter = VK_FILTER_LINEAR;
samplerInfo.minFilter = VK_FILTER_LINEAR;
samplerInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR; // Trilinear interpolation
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = nullptr;
samplerInfo.flags = 0;
samplerInfo.magFilter = VK_FILTER_LINEAR;
samplerInfo.minFilter = VK_FILTER_LINEAR;
samplerInfo.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR; // Trilinear interpolation
samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT;
samplerInfo.addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT;
samplerInfo.addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT;
samplerInfo.mipLodBias = 0.0;
samplerInfo.mipLodBias = 0.0;
samplerInfo.anisotropyEnable = anisotropyAmount == 0.0f ? VK_FALSE : VK_TRUE; // TODO:: add option to enable
samplerInfo.maxAnisotropy = anisotropyAmount;
samplerInfo.compareEnable = VK_FALSE;
......@@ -310,7 +310,7 @@ VulkanTextureDelegate::uploadTexture(VulkanMemoryManager& memoryManager)
stagingBufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
stagingBufferInfo.pNext = nullptr;
stagingBufferInfo.flags = 0;
stagingBufferInfo.size = imageSize;
stagingBufferInfo.size = imageSize;
stagingBufferInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;
stagingBufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
stagingBufferInfo.queueFamilyIndexCount = 0;
......@@ -465,7 +465,7 @@ VulkanTextureDelegate::uploadCubemapTexture(VulkanMemoryManager& memoryManager)
stagingBufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
stagingBufferInfo.pNext = nullptr;
stagingBufferInfo.flags = 0;
stagingBufferInfo.size = imageSize;
stagingBufferInfo.size = imageSize;
stagingBufferInfo.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;
stagingBufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
stagingBufferInfo.queueFamilyIndexCount = 0;
......
......@@ -32,7 +32,7 @@ VulkanUniformBuffer::VulkanUniformBuffer(VulkanMemoryManager& memoryManager, uin
uniformBufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
uniformBufferInfo.pNext = nullptr;
uniformBufferInfo.flags = 0;
uniformBufferInfo.size = uniformSize * memoryManager.m_buffering;
uniformBufferInfo.size = uniformSize * memoryManager.m_buffering;
uniformBufferInfo.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
uniformBufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
uniformBufferInfo.queueFamilyIndexCount = 0;
......
......@@ -61,11 +61,11 @@ public:
{
LOG(FATAL) << "Unable to build vertex shader : " << filename;
}
}
};
uint32_t getShaderLength() { return (uint32_t)m_data->size(); }
uint32_t getShaderLength() { return (uint32_t)m_data->size(); };
uint32_t* getShaderData() { return (uint32_t*)m_data->data(); }
uint32_t* getShaderData() { return (uint32_t*)m_data->data(); };
protected:
std::shared_ptr<std::vector<char>> m_data;
......@@ -125,7 +125,7 @@ public:
// For keeping track
image->setImageLayout(newLayout);
}
};
static const VkAccessFlags getAccessFlags(VkImageLayout imageLayout)
{
......@@ -147,6 +147,7 @@ public:
LOG(WARNING) << "Unsupported image layout";
return VK_ACCESS_SHADER_READ_BIT; // This might not be a great default
}
;
}
static const VkPipelineStageFlags getPipelineStageFlags(VkImageLayout imageLayout)
......@@ -169,6 +170,7 @@ public:
LOG(WARNING) << "Unsupported image layout";
return VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT; // This might not be a great default
}
;
}
static void addDepthAttachmentBarrier(VkCommandBuffer* commandBuffer, uint32_t queueFamilyIndex, VkImage* image)
......@@ -199,7 +201,7 @@ public:
0, nullptr, // general memory barriers
0, nullptr, // buffer barriers
1, &barrier); // image barriers
}
};
static void addShadowAttachmentBarrier(VkCommandBuffer* commandBuffer, uint32_t queueFamilyIndex, VkImage* image)
{
......@@ -229,7 +231,7 @@ public:
0, nullptr, // general memory barriers
0, nullptr, // buffer barriers
1, &barrier); // image barriers
}
};
};
class VulkanDefaults
......@@ -255,5 +257,5 @@ static const VkFormat AO_FORMAT = VK_FORMAT_R8_UNORM; // AO f
static const VkFormat DEPTH_FORMAT = VK_FORMAT_D32_SFLOAT; // Depth buffer
static const VkFormat SHADOW_FORMAT = VK_FORMAT_D32_SFLOAT; // Format for shadow maps
static const VkFormat DEPTH_MIP_FORMAT = VK_FORMAT_R32_SFLOAT; // Depth mip buffer
}
};
}
......@@ -31,12 +31,12 @@ public:
static char* getValidationLayer()
{
return "VK_LAYER_LUNARG_standard_validation";
}
};
static char* getValidationExtension()
{
return "VK_EXT_debug_report";
}
};
static VKAPI_ATTR VkBool32 VKAPI_CALL debugReportCallback(VkDebugReportFlagsEXT debugReportFlags,
VkDebugReportObjectTypeEXT debugReportObjectType,
......@@ -49,6 +49,6 @@ public:
{
LOG(WARNING) << prefix << ": " << message;
return VK_FALSE;
}
};
};
}
......@@ -43,7 +43,7 @@ VulkanVertexBuffer::VulkanVertexBuffer(VulkanMemoryManager& memoryManager,
vertexBufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
vertexBufferInfo.pNext = nullptr;
vertexBufferInfo.flags = 0;
vertexBufferInfo.size = m_vertexBufferSize;
vertexBufferInfo.size = m_vertexBufferSize;
vertexBufferInfo.usage = VK_BUFFER_USAGE_VERTEX_BUFFER_BIT;
vertexBufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
vertexBufferInfo.queueFamilyIndexCount = 0;
......@@ -80,7 +80,7 @@ VulkanVertexBuffer::VulkanVertexBuffer(VulkanMemoryManager& memoryManager,
indexBufferInfo.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
indexBufferInfo.pNext = nullptr;
indexBufferInfo.flags = 0;
indexBufferInfo.size = m_indexBufferSize;
indexBufferInfo.size = m_indexBufferSize;
indexBufferInfo.usage = VK_BUFFER_USAGE_INDEX_BUFFER_BIT;
indexBufferInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
indexBufferInfo.queueFamilyIndexCount = 0;
......
......@@ -73,7 +73,7 @@ protected:
///
/// \brief
///
virtual void initModule() override {}
virtual void initModule() override {};
///
/// \brief
......@@ -83,7 +83,7 @@ protected:
///
/// \brief
///
void cleanUpModule() override {}
void cleanUpModule() override {};
Camera& m_camera; ///< Camera controlled by the external device
......
......@@ -108,12 +108,12 @@ public:
///
/// \brief Get the latest position
///
const Vec3d& getPosition() { return m_currentPos; }