Skip to content

Commit

Permalink
Ran clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Sep 26, 2023
1 parent 6e03d7e commit e2f843d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions include/vsg/state/ViewDependentState.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

#include <vsg/app/CommandGraph.h>
#include <vsg/app/RenderGraph.h>
#include <vsg/io/Logger.h>
#include <vsg/nodes/Light.h>
#include <vsg/nodes/Switch.h>
#include <vsg/state/BindDescriptorSet.h>
#include <vsg/state/DescriptorBuffer.h>
#include <vsg/state/DescriptorImage.h>
#include <vsg/io/Logger.h>

namespace vsg
{
Expand Down Expand Up @@ -110,7 +110,7 @@ namespace vsg
static void t_traverse(N& node, V& visitor)
{
node.descriptorSet->accept(visitor);
if (node.preRenderCommandGraph) node.preRenderCommandGraph->accept(visitor );
if (node.preRenderCommandGraph) node.preRenderCommandGraph->accept(visitor);
}

void traverse(Visitor& visitor) override { t_traverse(*this, visitor); }
Expand Down
3 changes: 1 addition & 2 deletions include/vsg/utils/ShaderSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ namespace vsg
/// add an uniform binding. Not thread safe, should only be called when initially setting up the ShaderSet
void addDescriptorBinding(const std::string& name, const std::string& define, uint32_t set, uint32_t binding, VkDescriptorType descriptorType, uint32_t descriptorCount, VkShaderStageFlags stageFlags, ref_ptr<Data> data);

[[deprecated("use addDescriptorBinding(..)")]]
void addUniformBinding(const std::string& name, const std::string& define, uint32_t set, uint32_t binding, VkDescriptorType descriptorType, uint32_t descriptorCount, VkShaderStageFlags stageFlags, ref_ptr<Data> data) { addDescriptorBinding(name, define, set, binding, descriptorType, descriptorCount, stageFlags, data); }
[[deprecated("use addDescriptorBinding(..)")]] void addUniformBinding(const std::string& name, const std::string& define, uint32_t set, uint32_t binding, VkDescriptorType descriptorType, uint32_t descriptorCount, VkShaderStageFlags stageFlags, ref_ptr<Data> data) { addDescriptorBinding(name, define, set, binding, descriptorType, descriptorCount, stageFlags, data); }

/// add a push constant range. Not thread safe, should only be called when initially setting up the ShaderSet
void addPushConstantRange(const std::string& name, const std::string& define, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size);
Expand Down
1 change: 0 additions & 1 deletion src/vsg/app/View.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ View::View(const View& view) :
camera->viewportState = view.camera->viewportState;
}


viewDependentState = ViewDependentState::create(this, view.viewDependentState->active);

// info("View::View(const View&) ", this, ", ", viewDependentState, ", ", viewID);
Expand Down
10 changes: 4 additions & 6 deletions src/vsg/state/ViewDependentState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void ViewDependentState::init(ResourceRequirements& requirements)
uint32_t shadowHeight = 2048;
uint32_t maxShadowMaps = 8;

uint32_t lightDataSize = 4 + maxNumberLights * 16 + maxShadowMaps * 16;
uint32_t lightDataSize = 4 + maxNumberLights * 16 + maxShadowMaps * 16;

// info("ViewDependentState::init() ", lightDataSize, ", ", maxViewports, ", this = ", this, ", active = ", active);

Expand Down Expand Up @@ -280,7 +280,6 @@ void ViewDependentState::init(ResourceRequirements& requirements)
//write(shadowMapData, "test.vsgt");
}


void ViewDependentState::compile(Context& context)
{
descriptorSet->compile(context);
Expand All @@ -301,7 +300,7 @@ void ViewDependentState::compile(Context& context)
shadowDepthImage->compile(context);

uint32_t layer = 0;
for(auto& shadowMap : shadowMaps)
for (auto& shadowMap : shadowMaps)
{
// create depth buffer
auto depthImageView = ImageView::create(shadowDepthImage, VK_IMAGE_ASPECT_DEPTH_BIT);
Expand Down Expand Up @@ -485,7 +484,6 @@ void ViewDependentState::traverse(RecordTraversal& rt) const
auto light_z = light_direction;

auto updateCamera = [&](double clip_near_z, double clip_far_z, const dmat4& clipToWorld) -> void {

auto& shadowMap = shadowMaps[shadowMapIndex];
preRenderSwitch->children[shadowMapIndex].mask = MASK_ALL;

Expand Down Expand Up @@ -516,8 +514,8 @@ void ViewDependentState::traverse(RecordTraversal& rt) const
if (!ortho)
{
ortho = Orthographic::create(ls_bounds.min.x, ls_bounds.max.x,
ls_bounds.min.y, ls_bounds.max.y,
ls_bounds.min.z, ls_bounds.max.z);
ls_bounds.min.y, ls_bounds.max.y,
ls_bounds.min.z, ls_bounds.max.z);
camera->projectionMatrix = ortho;
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/vsg/utils/AnimationPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void AnimationPath::read(Input& input)

if (input.version_greater_equal(1, 0, 10))
input.readValue<uint32_t>("mode", mode);

auto numLocations = input.readValue<uint32_t>("NumLocations");

locations.clear();
Expand Down
2 changes: 1 addition & 1 deletion src/vsg/utils/ShaderSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
</editor-fold> */

#include <vsg/app/View.h>
#include <vsg/io/Input.h>
#include <vsg/io/Options.h>
#include <vsg/io/Output.h>
Expand All @@ -25,7 +26,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#include <vsg/state/ViewDependentState.h>
#include <vsg/state/material.h>
#include <vsg/utils/ShaderSet.h>
#include <vsg/app/View.h>
#include <vsg/vk/Context.h>

#include "shaders/flat_ShaderSet.cpp"
Expand Down

0 comments on commit e2f843d

Please sign in to comment.