diff --git a/apps/openmw/mwrender/map.cpp b/apps/openmw/mwrender/map.cpp index 4025509add4..e1da3f78f22 100644 --- a/apps/openmw/mwrender/map.cpp +++ b/apps/openmw/mwrender/map.cpp @@ -206,7 +206,7 @@ namespace MWRender for (auto& r : requests) { mData->at(0) = r.rect; - mData->at(1) = { r.center.x, r.center.y, 0, 0 }; + mData->at(1) = vsg::vec4(r.center.x, r.center.y, 0, 0); visitor.apply(*r.bds); #include @@ -427,8 +427,8 @@ namespace MWRender return d; } auto sceneData = std::make_unique(); - sceneData->value().lightDiffuse = {0.7, 0.7, 0.7, 1}; - sceneData->value().ambient = {0.3, 0.3, 0.3, 1}; + sceneData->value().lightDiffuse = vsg::vec4(0.7, 0.7, 0.7, 1); + sceneData->value().ambient = vsg::vec4(0.3, 0.3, 0.3, 1); auto descriptors = View::createLightingDescriptors(mLightData, false); descriptors.emplace_back(View::dummyEnvMap()); diff --git a/apps/openmw/mwrender/preview.cpp b/apps/openmw/mwrender/preview.cpp index b4dd50df95d..ad9a606ee48 100644 --- a/apps/openmw/mwrender/preview.cpp +++ b/apps/openmw/mwrender/preview.cpp @@ -104,12 +104,12 @@ namespace MWRender }; auto& sceneData = mSceneData->value(); - sceneData.lightDiffuse = { Fallback::Map::getFloat("Inventory_DirectionalDiffuseR"), + sceneData.lightDiffuse = vsg::vec4(Fallback::Map::getFloat("Inventory_DirectionalDiffuseR"), Fallback::Map::getFloat("Inventory_DirectionalDiffuseG"), - Fallback::Map::getFloat("Inventory_DirectionalDiffuseB"), 1 }; - sceneData.ambient = { Fallback::Map::getFloat("Inventory_DirectionalAmbientR"), + Fallback::Map::getFloat("Inventory_DirectionalDiffuseB"), 1 ); + sceneData.ambient = vsg::vec4(Fallback::Map::getFloat("Inventory_DirectionalAmbientR"), Fallback::Map::getFloat("Inventory_DirectionalAmbientG"), - Fallback::Map::getFloat("Inventory_DirectionalAmbientB"), 1 }; + Fallback::Map::getFloat("Inventory_DirectionalAmbientB"), 1 ); vsg::ref_ptr renderGraph; std::tie(renderGraph, mTexture) = Render::createRenderTexture(ctx, samples, extent); diff --git a/apps/openmw/mwrender/weather.cpp b/apps/openmw/mwrender/weather.cpp index 0b1010fca48..1bdabb67d6c 100644 --- a/apps/openmw/mwrender/weather.cpp +++ b/apps/openmw/mwrender/weather.cpp @@ -258,7 +258,7 @@ namespace MWRender share(sampler, textureOptions); auto descriptorImage = vsg::DescriptorImage::create(sampler, flashTex); - sunFlashMaterial.value().emissive = { 1, 1, 1, 1 }; + sunFlashMaterial.value().emissive = vsg::vec4(1, 1, 1, 1 ); auto bds = vsg::BindDescriptorSet::create(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline->pipeline->layout, Pipeline::TEXTURE_SET, vsg::Descriptors{ descriptorImage, sunFlashMaterial.descriptor() }); sg->stateCommands = { pipeline, bds }; diff --git a/components/esm3terrain/storage.cpp b/components/esm3terrain/storage.cpp index 61211ca5dbf..2865a529f1f 100644 --- a/components/esm3terrain/storage.cpp +++ b/components/esm3terrain/storage.cpp @@ -96,13 +96,13 @@ namespace ESMTerrain const ESM::Land::LandData* data = land ? land->getData(ESM::Land::DATA_VCLR) : nullptr; if (data) { - color = { data->mColours[col * ESM::Land::LAND_SIZE * 3 + row * 3], + color = vsg::ubvec4(data->mColours[col * ESM::Land::LAND_SIZE * 3 + row * 3], data->mColours[col * ESM::Land::LAND_SIZE * 3 + row * 3 + 1], - data->mColours[col * ESM::Land::LAND_SIZE * 3 + row * 3 + 2], 0xff }; + data->mColours[col * ESM::Land::LAND_SIZE * 3 + row * 3 + 2], 0xff ); } else { - color = { 0xff, 0xff, 0xff, 0xff }; + color = vsg::ubvec4(0xff, 0xff, 0xff, 0xff); } } @@ -210,11 +210,11 @@ namespace ESMTerrain if (colourData) { - color = { colourData->mColours[srcArrayIndex], colourData->mColours[srcArrayIndex + 1], - colourData->mColours[srcArrayIndex + 2], 0xff }; + color = vsg::ubvec4(colourData->mColours[srcArrayIndex], colourData->mColours[srcArrayIndex + 1], + colourData->mColours[srcArrayIndex + 2], 0xff); } else - color = { 0xff, 0xff, 0xff, 0xff }; + color = vsg::ubvec4(0xff, 0xff, 0xff, 0xff); //if (alteration) //adjustColor(col, row, heightData, color); // Does nothing by default, override in OpenMW-CS diff --git a/components/mwanimation/color.cpp b/components/mwanimation/color.cpp index f2244fc31fa..750ad853fa3 100644 --- a/components/mwanimation/color.cpp +++ b/components/mwanimation/color.cpp @@ -16,7 +16,7 @@ namespace MWAnim // we can float targetBrightnessIncreaseFactor = minLuminance / relativeLuminance; if (col.r == 0.f && col.g == 0.f && col.b == 0.f) - col = { minLuminance, minLuminance, minLuminance, col.a }; + col = vsg::vec4(minLuminance, minLuminance, minLuminance, col.a); else col *= targetBrightnessIncreaseFactor; } diff --git a/components/render/engine.cpp b/components/render/engine.cpp index 5a07bde73e3..e625123f962 100644 --- a/components/render/engine.cpp +++ b/components/render/engine.cpp @@ -182,7 +182,7 @@ namespace Render graph = vsg::CommandGraph::create(mHeadless->getOrCreateDevice(), mHeadless->getQueueFamily()); //int maxSlot = 1 + maxDescriptorSet; int maxSlot = 4; // At the moment, reducing maxSlot won't help because vsg::updateViewer will update the maxSlot for all command graphs. - graph->recordTraversal = vsg::RecordTraversal::create(nullptr, maxSlot); + graph->recordTraversal = new vsg::RecordTraversal; graph->maxSlot = maxSlot; return graph; } @@ -199,7 +199,8 @@ namespace Render graph = vsg::SecondaryCommandGraph::create(mHeadless->getOrCreateDevice(), mHeadless->getQueueFamily()); graph->framebuffer = inherit_framebuffer->framebuffer; } - graph->recordTraversal = vsg::RecordTraversal::create(nullptr, maxDescriptorSet + 1); + graph->recordTraversal = new vsg::RecordTraversal; + graph->maxSlot = maxDescriptorSet + 1; return graph; } diff --git a/components/view/collectlights.hpp b/components/view/collectlights.hpp index 79b498aacbb..2d129538a6d 100644 --- a/components/view/collectlights.hpp +++ b/components/view/collectlights.hpp @@ -18,7 +18,7 @@ namespace View void traverse(vsg::ConstVisitor& visitor) const override {} void compile(vsg::Context&) override {} - void pack() override; + void pack(); }; } diff --git a/components/vsgadapters/nif/particle.cpp b/components/vsgadapters/nif/particle.cpp index 0e65c90ef70..6e3e10ec845 100644 --- a/components/vsgadapters/nif/particle.cpp +++ b/components/vsgadapters/nif/particle.cpp @@ -258,10 +258,10 @@ namespace vsgAdapters if (active->value(time) && emitterVisible()) { data.emitMatrix = calculateEmitMatrix(); - data.emitCount = { calculateEmitCount(dt), 0, 0, 0 }; + data.emitCount = vsg::ivec4(calculateEmitCount(dt), 0, 0, 0 ); } else - data.emitCount = {}; + data.emitCount = vsg::ivec4(); } void ParticleSystem::link(Anim::Context& ctx, vsg::Object&) diff --git a/components/vsgutil/projection.hpp b/components/vsgutil/projection.hpp index e5c744c2c32..e816477970f 100644 --- a/components/vsgutil/projection.hpp +++ b/components/vsgutil/projection.hpp @@ -18,9 +18,9 @@ namespace vsgUtil auto state = record.getState(); auto prev_projection = state->projectionMatrixStack.top(); auto modelviewMatrix = state->modelviewMatrixStack.top(); - record.setProjectionAndViewMatrix(projection->transform(), modelviewMatrix); + state->setProjectionAndViewMatrix(projection->transform(), modelviewMatrix); traverse(record); - record.setProjectionAndViewMatrix(prev_projection, modelviewMatrix); + state->setProjectionAndViewMatrix(prev_projection, modelviewMatrix); } };