mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Merge branch 'namespace_naming' into 'master'
Some checks are pending
Build and test / Ubuntu (push) Waiting to run
Build and test / MacOS (push) Waiting to run
Build and test / Read .env file and expose it as output (push) Waiting to run
Build and test / Windows (2019) (push) Blocked by required conditions
Build and test / Windows (2022) (push) Blocked by required conditions
Some checks are pending
Build and test / Ubuntu (push) Waiting to run
Build and test / MacOS (push) Waiting to run
Build and test / Read .env file and expose it as output (push) Waiting to run
Build and test / Windows (2019) (push) Blocked by required conditions
Build and test / Windows (2022) (push) Blocked by required conditions
Draft: Fix and enforce namespace naming (#8424) See merge request OpenMW/openmw!4648
This commit is contained in:
commit
99ffd00b42
63 changed files with 171 additions and 162 deletions
|
@ -13,3 +13,7 @@ HeaderFilterRegex: '(apps|components)/'
|
|||
CheckOptions:
|
||||
- key: readability-identifier-naming.ConceptCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.NamespaceCase
|
||||
value: CamelCase
|
||||
- key: readability-identifier-naming.NamespaceIgnoredRegexp
|
||||
value: 'osg(DB|FX|Particle|Shadow|Viewer|Util)?'
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
namespace
|
||||
{
|
||||
using namespace testing;
|
||||
using namespace fx::Lexer;
|
||||
using namespace Fx::Lexer;
|
||||
|
||||
struct LexerTest : Test
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace
|
|||
)" };
|
||||
|
||||
using namespace testing;
|
||||
using namespace fx;
|
||||
using namespace Fx;
|
||||
|
||||
struct TechniqueTest : Test
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ you_have_arrows: "Arrows count: {count}"
|
|||
lua.protectedCall([&](LuaUtil::LuaView& view) {
|
||||
sol::state_view& l = view.sol();
|
||||
internal::CaptureStdout();
|
||||
l10n::Manager l10nManager(mVFS.get());
|
||||
L10n::Manager l10nManager(mVFS.get());
|
||||
l10nManager.setPreferredLocales({ "de", "en" });
|
||||
EXPECT_THAT(internal::GetCapturedStdout(), "Preferred locales: gmst de en\n");
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ int runLauncher(int argc, char* argv[])
|
|||
resourcesPath = Files::pathToQString(variables["resources"].as<Files::MaybeQuotedPath>().u8string());
|
||||
}
|
||||
|
||||
l10n::installQtTranslations(app, "launcher", resourcesPath);
|
||||
L10n::installQtTranslations(app, "launcher", resourcesPath);
|
||||
|
||||
Launcher::MainDialog mainWin(configurationManager);
|
||||
|
||||
|
|
|
@ -753,7 +753,7 @@ void OMW::Engine::prepareEngine()
|
|||
|
||||
mViewer->addEventHandler(mScreenCaptureHandler);
|
||||
|
||||
mL10nManager = std::make_unique<l10n::Manager>(mVFS.get());
|
||||
mL10nManager = std::make_unique<L10n::Manager>(mVFS.get());
|
||||
mL10nManager->setPreferredLocales(Settings::general().mPreferredLocales, Settings::general().mGmstOverridesL10n);
|
||||
mEnvironment.setL10nManager(*mL10nManager);
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace MWDialogue
|
|||
class Journal;
|
||||
}
|
||||
|
||||
namespace l10n
|
||||
namespace L10n
|
||||
{
|
||||
class Manager;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ namespace OMW
|
|||
std::unique_ptr<MWState::StateManager> mStateManager;
|
||||
std::unique_ptr<MWLua::LuaManager> mLuaManager;
|
||||
std::unique_ptr<MWLua::Worker> mLuaWorker;
|
||||
std::unique_ptr<l10n::Manager> mL10nManager;
|
||||
std::unique_ptr<L10n::Manager> mL10nManager;
|
||||
MWBase::Environment mEnvironment;
|
||||
ToUTF8::FromType mEncoding;
|
||||
std::unique_ptr<ToUTF8::Utf8Encoder> mEncoder;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace Resource
|
|||
class ResourceSystem;
|
||||
}
|
||||
|
||||
namespace l10n
|
||||
namespace L10n
|
||||
{
|
||||
class Manager;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ namespace MWBase
|
|||
StateManager* mStateManager = nullptr;
|
||||
LuaManager* mLuaManager = nullptr;
|
||||
Resource::ResourceSystem* mResourceSystem = nullptr;
|
||||
l10n::Manager* mL10nManager = nullptr;
|
||||
L10n::Manager* mL10nManager = nullptr;
|
||||
float mFrameRateLimit = 0;
|
||||
float mFrameDuration = 0;
|
||||
|
||||
|
@ -95,7 +95,7 @@ namespace MWBase
|
|||
|
||||
void setResourceSystem(Resource::ResourceSystem& value) { mResourceSystem = &value; }
|
||||
|
||||
void setL10nManager(l10n::Manager& value) { mL10nManager = &value; }
|
||||
void setL10nManager(L10n::Manager& value) { mL10nManager = &value; }
|
||||
|
||||
Misc::NotNullPtr<World> getWorld() const { return mWorld; }
|
||||
Misc::NotNullPtr<MWWorld::WorldModel> getWorldModel() const { return mWorldModel; }
|
||||
|
@ -122,7 +122,7 @@ namespace MWBase
|
|||
|
||||
Misc::NotNullPtr<Resource::ResourceSystem> getResourceSystem() const { return mResourceSystem; }
|
||||
|
||||
Misc::NotNullPtr<l10n::Manager> getL10nManager() const { return mL10nManager; }
|
||||
Misc::NotNullPtr<L10n::Manager> getL10nManager() const { return mL10nManager; }
|
||||
|
||||
float getFrameRateLimit() const { return mFrameRateLimit; }
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ namespace MWGui
|
|||
, mUpdateTimer(0.f)
|
||||
{
|
||||
mPreviewTexture
|
||||
= std::make_unique<osgMyGUI::OSGTexture>(mPreview->getTexture(), mPreview->getTextureStateSet());
|
||||
= std::make_unique<MyGUIPlatform::OSGTexture>(mPreview->getTexture(), mPreview->getTextureStateSet());
|
||||
mPreview->rebuild();
|
||||
|
||||
mMainWidget->castType<MyGUI::Window>()->eventWindowChangeCoord
|
||||
|
|
|
@ -294,7 +294,7 @@ namespace MWGui
|
|||
|
||||
if (!mGuiTexture.get())
|
||||
{
|
||||
mGuiTexture = std::make_unique<osgMyGUI::OSGTexture>(mTexture);
|
||||
mGuiTexture = std::make_unique<MyGUIPlatform::OSGTexture>(mTexture);
|
||||
}
|
||||
|
||||
if (!mCopyFramebufferToTextureCallback)
|
||||
|
|
|
@ -599,27 +599,27 @@ namespace MWGui
|
|||
osg::ref_ptr<osg::Texture2D> texture = mLocalMapRender->getMapTexture(entry.mCellX, entry.mCellY);
|
||||
if (texture)
|
||||
{
|
||||
entry.mMapTexture = std::make_unique<osgMyGUI::OSGTexture>(texture);
|
||||
entry.mMapTexture = std::make_unique<MyGUIPlatform::OSGTexture>(texture);
|
||||
entry.mMapWidget->setRenderItemTexture(entry.mMapTexture.get());
|
||||
entry.mMapWidget->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||
needRedraw = true;
|
||||
}
|
||||
else
|
||||
entry.mMapTexture = std::make_unique<osgMyGUI::OSGTexture>(std::string(), nullptr);
|
||||
entry.mMapTexture = std::make_unique<MyGUIPlatform::OSGTexture>(std::string(), nullptr);
|
||||
}
|
||||
if (!entry.mFogTexture && mFogOfWarToggled && mFogOfWarEnabled)
|
||||
{
|
||||
osg::ref_ptr<osg::Texture2D> tex = mLocalMapRender->getFogOfWarTexture(entry.mCellX, entry.mCellY);
|
||||
if (tex)
|
||||
{
|
||||
entry.mFogTexture = std::make_unique<osgMyGUI::OSGTexture>(tex);
|
||||
entry.mFogTexture = std::make_unique<MyGUIPlatform::OSGTexture>(tex);
|
||||
entry.mFogWidget->setRenderItemTexture(entry.mFogTexture.get());
|
||||
entry.mFogWidget->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 1.f, 1.f, 0.f));
|
||||
}
|
||||
else
|
||||
{
|
||||
entry.mFogWidget->setImageTexture("black");
|
||||
entry.mFogTexture = std::make_unique<osgMyGUI::OSGTexture>(std::string(), nullptr);
|
||||
entry.mFogTexture = std::make_unique<MyGUIPlatform::OSGTexture>(std::string(), nullptr);
|
||||
}
|
||||
needRedraw = true;
|
||||
}
|
||||
|
@ -1280,11 +1280,12 @@ namespace MWGui
|
|||
{
|
||||
if (!mGlobalMapTexture.get())
|
||||
{
|
||||
mGlobalMapTexture = std::make_unique<osgMyGUI::OSGTexture>(mGlobalMapRender->getBaseTexture());
|
||||
mGlobalMapTexture = std::make_unique<MyGUIPlatform::OSGTexture>(mGlobalMapRender->getBaseTexture());
|
||||
mGlobalMapImage->setRenderItemTexture(mGlobalMapTexture.get());
|
||||
mGlobalMapImage->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||
|
||||
mGlobalMapOverlayTexture = std::make_unique<osgMyGUI::OSGTexture>(mGlobalMapRender->getOverlayTexture());
|
||||
mGlobalMapOverlayTexture
|
||||
= std::make_unique<MyGUIPlatform::OSGTexture>(mGlobalMapRender->getOverlayTexture());
|
||||
mGlobalMapOverlay->setRenderItemTexture(mGlobalMapOverlayTexture.get());
|
||||
mGlobalMapOverlay->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace MWGui
|
|||
{
|
||||
for (size_t i = 1; i < mConfigArea->getChildCount(); ++i)
|
||||
{
|
||||
if (auto* child = dynamic_cast<fx::Widgets::UniformBase*>(mConfigArea->getChildAt(i)))
|
||||
if (auto* child = dynamic_cast<Fx::Widgets::UniformBase*>(mConfigArea->getChildAt(i)))
|
||||
child->toDefault();
|
||||
}
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ namespace MWGui
|
|||
auto* processor = MWBase::Environment::get().getWorld()->getPostProcessor();
|
||||
mOverrideHint = list->getItemNameAt(selected);
|
||||
|
||||
auto technique = *list->getItemDataAt<std::shared_ptr<fx::Technique>>(selected);
|
||||
auto technique = *list->getItemDataAt<std::shared_ptr<Fx::Technique>>(selected);
|
||||
if (technique->getDynamic())
|
||||
return;
|
||||
|
||||
|
@ -167,7 +167,7 @@ namespace MWGui
|
|||
|
||||
if (static_cast<size_t>(index) != selected)
|
||||
{
|
||||
auto technique = *mActiveList->getItemDataAt<std::shared_ptr<fx::Technique>>(selected);
|
||||
auto technique = *mActiveList->getItemDataAt<std::shared_ptr<Fx::Technique>>(selected);
|
||||
if (technique->getDynamic() || technique->getInternal())
|
||||
return;
|
||||
|
||||
|
@ -301,7 +301,7 @@ namespace MWGui
|
|||
|
||||
auto technique = processor->loadTechnique(name);
|
||||
|
||||
if (!technique || technique->getStatus() == fx::Technique::Status::File_Not_exists)
|
||||
if (!technique || technique->getStatus() == Fx::Technique::Status::File_Not_exists)
|
||||
return;
|
||||
|
||||
while (mConfigArea->getChildCount() > 0)
|
||||
|
@ -322,15 +322,15 @@ namespace MWGui
|
|||
|
||||
const auto flags = technique->getFlags();
|
||||
|
||||
const auto flag_interior = serializeBool(!(flags & fx::Technique::Flag_Disable_Interiors));
|
||||
const auto flag_exterior = serializeBool(!(flags & fx::Technique::Flag_Disable_Exteriors));
|
||||
const auto flag_underwater = serializeBool(!(flags & fx::Technique::Flag_Disable_Underwater));
|
||||
const auto flag_abovewater = serializeBool(!(flags & fx::Technique::Flag_Disable_Abovewater));
|
||||
const auto flag_interior = serializeBool(!(flags & Fx::Technique::Flag_Disable_Interiors));
|
||||
const auto flag_exterior = serializeBool(!(flags & Fx::Technique::Flag_Disable_Exteriors));
|
||||
const auto flag_underwater = serializeBool(!(flags & Fx::Technique::Flag_Disable_Underwater));
|
||||
const auto flag_abovewater = serializeBool(!(flags & Fx::Technique::Flag_Disable_Abovewater));
|
||||
|
||||
switch (technique->getStatus())
|
||||
{
|
||||
case fx::Technique::Status::Success:
|
||||
case fx::Technique::Status::Uncompiled:
|
||||
case Fx::Technique::Status::Success:
|
||||
case Fx::Technique::Status::Uncompiled:
|
||||
{
|
||||
if (technique->getDynamic())
|
||||
ss << "#{fontcolourhtml=header}#{OMWShaders:ShaderLocked}: #{fontcolourhtml=normal} "
|
||||
|
@ -352,13 +352,13 @@ namespace MWGui
|
|||
<< flag_abovewater;
|
||||
break;
|
||||
}
|
||||
case fx::Technique::Status::Parse_Error:
|
||||
case Fx::Technique::Status::Parse_Error:
|
||||
ss << "#{fontcolourhtml=negative}Shader Compile Error: #{fontcolourhtml=normal} <"
|
||||
<< std::string(technique->getName()) << "> failed to compile." << endl
|
||||
<< endl
|
||||
<< technique->getLastError();
|
||||
break;
|
||||
case fx::Technique::Status::File_Not_exists:
|
||||
case Fx::Technique::Status::File_Not_exists:
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -390,7 +390,7 @@ namespace MWGui
|
|||
divider->setCaptionWithReplacing(uniform->mHeader);
|
||||
}
|
||||
|
||||
fx::Widgets::UniformBase* uwidget = mConfigArea->createWidget<fx::Widgets::UniformBase>(
|
||||
Fx::Widgets::UniformBase* uwidget = mConfigArea->createWidget<Fx::Widgets::UniformBase>(
|
||||
"MW_UniformEdit", { 0, 0, 0, 22 }, MyGUI::Align::Default);
|
||||
uwidget->init(uniform);
|
||||
uwidget->getLabel()->eventMouseWheel += MyGUI::newDelegate(this, &PostProcessorHud::notifyMouseWheel);
|
||||
|
@ -484,14 +484,14 @@ namespace MWGui
|
|||
void PostProcessorHud::registerMyGUIComponents()
|
||||
{
|
||||
MyGUI::FactoryManager& factory = MyGUI::FactoryManager::getInstance();
|
||||
factory.registerFactory<fx::Widgets::UniformBase>("Widget");
|
||||
factory.registerFactory<fx::Widgets::EditNumberFloat4>("Widget");
|
||||
factory.registerFactory<fx::Widgets::EditNumberFloat3>("Widget");
|
||||
factory.registerFactory<fx::Widgets::EditNumberFloat2>("Widget");
|
||||
factory.registerFactory<fx::Widgets::EditNumberFloat>("Widget");
|
||||
factory.registerFactory<fx::Widgets::EditNumberInt>("Widget");
|
||||
factory.registerFactory<fx::Widgets::EditBool>("Widget");
|
||||
factory.registerFactory<fx::Widgets::EditChoice>("Widget");
|
||||
factory.registerFactory<Fx::Widgets::UniformBase>("Widget");
|
||||
factory.registerFactory<Fx::Widgets::EditNumberFloat4>("Widget");
|
||||
factory.registerFactory<Fx::Widgets::EditNumberFloat3>("Widget");
|
||||
factory.registerFactory<Fx::Widgets::EditNumberFloat2>("Widget");
|
||||
factory.registerFactory<Fx::Widgets::EditNumberFloat>("Widget");
|
||||
factory.registerFactory<Fx::Widgets::EditNumberInt>("Widget");
|
||||
factory.registerFactory<Fx::Widgets::EditBool>("Widget");
|
||||
factory.registerFactory<Fx::Widgets::EditChoice>("Widget");
|
||||
factory.registerFactory<ListWrapper>("Widget");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace MWGui
|
|||
mPreview->setAngle(mCurrentAngle);
|
||||
|
||||
mPreviewTexture
|
||||
= std::make_unique<osgMyGUI::OSGTexture>(mPreview->getTexture(), mPreview->getTextureStateSet());
|
||||
= std::make_unique<MyGUIPlatform::OSGTexture>(mPreview->getTexture(), mPreview->getTextureStateSet());
|
||||
mPreviewImage->setRenderItemTexture(mPreviewTexture.get());
|
||||
mPreviewImage->getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 0.f, 1.f, 1.f));
|
||||
|
||||
|
|
|
@ -484,7 +484,7 @@ namespace MWGui
|
|||
texture->setResizeNonPowerOfTwoHint(false);
|
||||
texture->setUnRefImageDataAfterApply(true);
|
||||
|
||||
mScreenshotTexture = std::make_unique<osgMyGUI::OSGTexture>(texture);
|
||||
mScreenshotTexture = std::make_unique<MyGUIPlatform::OSGTexture>(texture);
|
||||
mScreenshot->setRenderItemTexture(mScreenshotTexture.get());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace MWGui
|
|||
if (!texture)
|
||||
return;
|
||||
|
||||
mTexture = std::make_unique<osgMyGUI::OSGTexture>(texture);
|
||||
mTexture = std::make_unique<MyGUIPlatform::OSGTexture>(texture);
|
||||
|
||||
setRenderItemTexture(mTexture.get());
|
||||
getSubWidgetMain()->_setUVSet(MyGUI::FloatRect(0.f, 1.f, 1.f, 0.f));
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace MWGui
|
|||
SDL_GL_GetDrawableSize(window, &dw, &dh);
|
||||
|
||||
mScalingFactor = Settings::gui().mScalingFactor * (dw / w);
|
||||
mGuiPlatform = std::make_unique<osgMyGUI::Platform>(viewer, guiRoot, resourceSystem->getImageManager(),
|
||||
mGuiPlatform = std::make_unique<MyGUIPlatform::Platform>(viewer, guiRoot, resourceSystem->getImageManager(),
|
||||
resourceSystem->getVFS(), mScalingFactor, "mygui", logpath / "MyGUI.log");
|
||||
|
||||
mGui = std::make_unique<MyGUI::Gui>();
|
||||
|
@ -228,8 +228,8 @@ namespace MWGui
|
|||
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Window>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<VideoWidget>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<BackgroundImage>("Widget");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<osgMyGUI::AdditiveLayer>("Layer");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<osgMyGUI::ScalingLayer>("Layer");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<MyGUIPlatform::AdditiveLayer>("Layer");
|
||||
MyGUI::FactoryManager::getInstance().registerFactory<MyGUIPlatform::ScalingLayer>("Layer");
|
||||
BookPage::registerMyGUIComponents();
|
||||
PostProcessorHud::registerMyGUIComponents();
|
||||
ItemView::registerComponents();
|
||||
|
@ -1124,7 +1124,7 @@ namespace MWGui
|
|||
std::vector<std::string> split;
|
||||
Misc::StringUtils::split(tag, split, ":");
|
||||
|
||||
l10n::Manager& l10nManager = *MWBase::Environment::get().getL10nManager();
|
||||
L10n::Manager& l10nManager = *MWBase::Environment::get().getL10nManager();
|
||||
|
||||
// If a key has a "Context:KeyName" format, use YAML to translate data
|
||||
if (split.size() == 2)
|
||||
|
|
|
@ -401,7 +401,7 @@ namespace MWGui
|
|||
Resource::ResourceSystem* mResourceSystem;
|
||||
osg::ref_ptr<SceneUtil::WorkQueue> mWorkQueue;
|
||||
|
||||
std::unique_ptr<osgMyGUI::Platform> mGuiPlatform;
|
||||
std::unique_ptr<MyGUIPlatform::Platform> mGuiPlatform;
|
||||
osgViewer::Viewer* mViewer;
|
||||
|
||||
std::unique_ptr<Gui::FontLoader> mFontLoader;
|
||||
|
|
|
@ -25,9 +25,9 @@ namespace MWLua
|
|||
{
|
||||
struct Shader
|
||||
{
|
||||
std::shared_ptr<fx::Technique> mShader;
|
||||
std::shared_ptr<Fx::Technique> mShader;
|
||||
|
||||
Shader(std::shared_ptr<fx::Technique> shader)
|
||||
Shader(std::shared_ptr<Fx::Technique> shader)
|
||||
: mShader(std::move(shader))
|
||||
{
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace MWRender
|
|||
mMultiviewResolveStateSet->addUniform(new osg::Uniform("lastShader", 0));
|
||||
}
|
||||
|
||||
void PingPongCanvas::setPasses(fx::DispatchArray&& passes)
|
||||
void PingPongCanvas::setPasses(Fx::DispatchArray&& passes)
|
||||
{
|
||||
mPasses = std::move(passes);
|
||||
}
|
||||
|
@ -54,8 +54,8 @@ namespace MWRender
|
|||
void PingPongCanvas::setMask(bool underwater, bool exterior)
|
||||
{
|
||||
mMask = 0;
|
||||
mMask |= underwater ? fx::Technique::Flag_Disable_Underwater : fx::Technique::Flag_Disable_Abovewater;
|
||||
mMask |= exterior ? fx::Technique::Flag_Disable_Exteriors : fx::Technique::Flag_Disable_Interiors;
|
||||
mMask |= underwater ? Fx::Technique::Flag_Disable_Underwater : Fx::Technique::Flag_Disable_Abovewater;
|
||||
mMask |= exterior ? Fx::Technique::Flag_Disable_Exteriors : Fx::Technique::Flag_Disable_Interiors;
|
||||
}
|
||||
|
||||
void PingPongCanvas::drawGeometry(osg::RenderInfo& renderInfo) const
|
||||
|
|
|
@ -31,14 +31,14 @@ namespace MWRender
|
|||
|
||||
void dirty() { mDirty = true; }
|
||||
|
||||
void setDirtyAttachments(const std::vector<fx::Types::RenderTarget>& attachments)
|
||||
void setDirtyAttachments(const std::vector<Fx::Types::RenderTarget>& attachments)
|
||||
{
|
||||
mDirtyAttachments = attachments;
|
||||
}
|
||||
|
||||
const fx::DispatchArray& getPasses() { return mPasses; }
|
||||
const Fx::DispatchArray& getPasses() { return mPasses; }
|
||||
|
||||
void setPasses(fx::DispatchArray&& passes);
|
||||
void setPasses(Fx::DispatchArray&& passes);
|
||||
|
||||
void setMask(bool underwater, bool exterior);
|
||||
|
||||
|
@ -60,8 +60,8 @@ namespace MWRender
|
|||
bool mAvgLum = false;
|
||||
bool mPostprocessing = false;
|
||||
|
||||
fx::DispatchArray mPasses;
|
||||
fx::FlagsType mMask = 0;
|
||||
Fx::DispatchArray mPasses;
|
||||
Fx::FlagsType mMask = 0;
|
||||
|
||||
osg::ref_ptr<osg::Program> mFallbackProgram;
|
||||
osg::ref_ptr<osg::Program> mMultiviewResolveProgram;
|
||||
|
@ -74,7 +74,7 @@ namespace MWRender
|
|||
osg::ref_ptr<osg::Texture> mTextureDistortion;
|
||||
|
||||
mutable bool mDirty = false;
|
||||
mutable std::vector<fx::Types::RenderTarget> mDirtyAttachments;
|
||||
mutable std::vector<Fx::Types::RenderTarget> mDirtyAttachments;
|
||||
mutable osg::ref_ptr<osg::Viewport> mRenderViewport;
|
||||
mutable osg::ref_ptr<osg::FrameBufferObject> mMultiviewResolveFramebuffer;
|
||||
mutable osg::ref_ptr<osg::FrameBufferObject> mDestinationFBO;
|
||||
|
|
|
@ -206,7 +206,7 @@ namespace MWRender
|
|||
|
||||
mGLSLVersion = ext->glslLanguageVersion * 100;
|
||||
mUBO = ext->isUniformBufferObjectSupported && mGLSLVersion >= 330;
|
||||
mStateUpdater = new fx::StateUpdater(mUBO);
|
||||
mStateUpdater = new Fx::StateUpdater(mUBO);
|
||||
|
||||
addChild(mHUDCamera);
|
||||
addChild(mRootNode);
|
||||
|
@ -250,11 +250,11 @@ namespace MWRender
|
|||
|
||||
void PostProcessor::populateTechniqueFiles()
|
||||
{
|
||||
for (const auto& name : mVFS->getRecursiveDirectoryIterator(fx::Technique::sSubdir))
|
||||
for (const auto& name : mVFS->getRecursiveDirectoryIterator(Fx::Technique::sSubdir))
|
||||
{
|
||||
std::filesystem::path path = Files::pathFromUnicodeString(name);
|
||||
std::string fileExt = Misc::StringUtils::lowerCase(Files::pathToUnicodeString(path.extension()));
|
||||
if (!path.parent_path().has_parent_path() && fileExt == fx::Technique::sExt)
|
||||
if (!path.parent_path().has_parent_path() && fileExt == Fx::Technique::sExt)
|
||||
{
|
||||
const auto absolutePath = mVFS->getAbsoluteFileName(path);
|
||||
mTechniqueFileMap[Files::pathToUnicodeString(absolutePath.stem())] = absolutePath;
|
||||
|
@ -348,7 +348,7 @@ namespace MWRender
|
|||
|
||||
for (auto& technique : mTechniques)
|
||||
{
|
||||
if (!technique || technique->getStatus() == fx::Technique::Status::File_Not_exists)
|
||||
if (!technique || technique->getStatus() == Fx::Technique::Status::File_Not_exists)
|
||||
continue;
|
||||
|
||||
const auto lastWriteTime = std::filesystem::last_write_time(mTechniqueFileMap[technique->getName()]);
|
||||
|
@ -401,7 +401,7 @@ namespace MWRender
|
|||
createObjectsForFrame(frameId);
|
||||
|
||||
mDirty = false;
|
||||
mCanvases[frameId]->setPasses(fx::DispatchArray(mTemplateData));
|
||||
mCanvases[frameId]->setPasses(Fx::DispatchArray(mTemplateData));
|
||||
}
|
||||
|
||||
if ((mNormalsSupported && mNormals != mPrevNormals) || (mPassLights != mPrevPassLights))
|
||||
|
@ -566,7 +566,7 @@ namespace MWRender
|
|||
mNormals = false;
|
||||
mPassLights = false;
|
||||
|
||||
std::vector<fx::Types::RenderTarget> attachmentsToDirty;
|
||||
std::vector<Fx::Types::RenderTarget> attachmentsToDirty;
|
||||
|
||||
for (const auto& technique : mTechniques)
|
||||
{
|
||||
|
@ -580,7 +580,7 @@ namespace MWRender
|
|||
continue;
|
||||
}
|
||||
|
||||
fx::DispatchNode node;
|
||||
Fx::DispatchNode node;
|
||||
|
||||
node.mFlags = technique->getFlags();
|
||||
|
||||
|
@ -593,7 +593,7 @@ namespace MWRender
|
|||
if (technique->getLights())
|
||||
mPassLights = true;
|
||||
|
||||
if (node.mFlags & fx::Technique::Flag_Disable_SunGlare)
|
||||
if (node.mFlags & Fx::Technique::Flag_Disable_SunGlare)
|
||||
sunglare = false;
|
||||
|
||||
// required default samplers available to every shader pass
|
||||
|
@ -639,7 +639,7 @@ namespace MWRender
|
|||
for (const auto& pass : technique->getPasses())
|
||||
{
|
||||
int subTexUnit = texUnit;
|
||||
fx::DispatchNode::SubPass subPass;
|
||||
Fx::DispatchNode::SubPass subPass;
|
||||
|
||||
pass->prepareStateSet(subPass.mStateSet, technique->getName());
|
||||
|
||||
|
@ -666,7 +666,7 @@ namespace MWRender
|
|||
[renderTarget](const auto& rt) { return renderTarget.mTarget == rt.mTarget; })
|
||||
== attachmentsToDirty.cend())
|
||||
{
|
||||
attachmentsToDirty.push_back(fx::Types::RenderTarget(renderTarget));
|
||||
attachmentsToDirty.push_back(Fx::Types::RenderTarget(renderTarget));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -685,7 +685,7 @@ namespace MWRender
|
|||
[renderTarget](const auto& rt) { return renderTarget.mTarget == rt.mTarget; })
|
||||
== attachmentsToDirty.cend())
|
||||
{
|
||||
attachmentsToDirty.push_back(fx::Types::RenderTarget(renderTarget));
|
||||
attachmentsToDirty.push_back(Fx::Types::RenderTarget(renderTarget));
|
||||
}
|
||||
subTexUnit++;
|
||||
}
|
||||
|
@ -698,7 +698,7 @@ namespace MWRender
|
|||
mTemplateData.emplace_back(std::move(node));
|
||||
}
|
||||
|
||||
mCanvases[frameId]->setPasses(fx::DispatchArray(mTemplateData));
|
||||
mCanvases[frameId]->setPasses(Fx::DispatchArray(mTemplateData));
|
||||
|
||||
if (auto hud = MWBase::Environment::get().getWindowManager()->getPostProcessorHud())
|
||||
hud->updateTechniques();
|
||||
|
@ -710,7 +710,7 @@ namespace MWRender
|
|||
}
|
||||
|
||||
PostProcessor::Status PostProcessor::enableTechnique(
|
||||
std::shared_ptr<fx::Technique> technique, std::optional<int> location)
|
||||
std::shared_ptr<Fx::Technique> technique, std::optional<int> location)
|
||||
{
|
||||
if (!technique || technique->getLocked() || (location.has_value() && location.value() < 0))
|
||||
return Status_Error;
|
||||
|
@ -725,7 +725,7 @@ namespace MWRender
|
|||
return Status_Toggled;
|
||||
}
|
||||
|
||||
PostProcessor::Status PostProcessor::disableTechnique(std::shared_ptr<fx::Technique> technique, bool dirty)
|
||||
PostProcessor::Status PostProcessor::disableTechnique(std::shared_ptr<Fx::Technique> technique, bool dirty)
|
||||
{
|
||||
if (!technique || technique->getLocked())
|
||||
return Status_Error;
|
||||
|
@ -741,7 +741,7 @@ namespace MWRender
|
|||
return Status_Toggled;
|
||||
}
|
||||
|
||||
bool PostProcessor::isTechniqueEnabled(const std::shared_ptr<fx::Technique>& technique) const
|
||||
bool PostProcessor::isTechniqueEnabled(const std::shared_ptr<Fx::Technique>& technique) const
|
||||
{
|
||||
if (!technique)
|
||||
return false;
|
||||
|
@ -752,7 +752,7 @@ namespace MWRender
|
|||
return technique->isValid();
|
||||
}
|
||||
|
||||
std::shared_ptr<fx::Technique> PostProcessor::loadTechnique(const std::string& name, bool loadNextFrame)
|
||||
std::shared_ptr<Fx::Technique> PostProcessor::loadTechnique(const std::string& name, bool loadNextFrame)
|
||||
{
|
||||
for (const auto& technique : mTemplates)
|
||||
if (Misc::StringUtils::ciEqual(technique->getName(), name))
|
||||
|
@ -767,12 +767,12 @@ namespace MWRender
|
|||
if (fileIter != mTechniqueFileMap.end())
|
||||
realName = fileIter->first;
|
||||
|
||||
auto technique = std::make_shared<fx::Technique>(*mVFS, *mRendering.getResourceSystem()->getImageManager(),
|
||||
auto technique = std::make_shared<Fx::Technique>(*mVFS, *mRendering.getResourceSystem()->getImageManager(),
|
||||
std::move(realName), renderWidth(), renderHeight(), mUBO, mNormalsSupported);
|
||||
|
||||
technique->compile();
|
||||
|
||||
if (technique->getStatus() != fx::Technique::Status::File_Not_exists)
|
||||
if (technique->getStatus() != Fx::Technique::Status::File_Not_exists)
|
||||
technique->setLastModificationTime(std::filesystem::last_write_time(fileIter->second));
|
||||
|
||||
if (loadNextFrame)
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace MWRender
|
|||
public:
|
||||
using FBOArray = std::array<osg::ref_ptr<osg::FrameBufferObject>, 6>;
|
||||
using TextureArray = std::array<osg::ref_ptr<osg::Texture>, 6>;
|
||||
using TechniqueList = std::vector<std::shared_ptr<fx::Technique>>;
|
||||
using TechniqueList = std::vector<std::shared_ptr<Fx::Technique>>;
|
||||
|
||||
enum TextureIndex
|
||||
{
|
||||
|
@ -122,7 +122,7 @@ namespace MWRender
|
|||
|
||||
osg::ref_ptr<osg::Camera> getHUDCamera() { return mHUDCamera; }
|
||||
|
||||
osg::ref_ptr<fx::StateUpdater> getStateUpdater() { return mStateUpdater; }
|
||||
osg::ref_ptr<Fx::StateUpdater> getStateUpdater() { return mStateUpdater; }
|
||||
|
||||
const TechniqueList& getTechniques() { return mTechniques; }
|
||||
|
||||
|
@ -132,14 +132,14 @@ namespace MWRender
|
|||
|
||||
void resize();
|
||||
|
||||
Status enableTechnique(std::shared_ptr<fx::Technique> technique, std::optional<int> location = std::nullopt);
|
||||
Status enableTechnique(std::shared_ptr<Fx::Technique> technique, std::optional<int> location = std::nullopt);
|
||||
|
||||
Status disableTechnique(std::shared_ptr<fx::Technique> technique, bool dirty = true);
|
||||
Status disableTechnique(std::shared_ptr<Fx::Technique> technique, bool dirty = true);
|
||||
|
||||
bool getSupportsNormalsRT() const { return mNormalsSupported; }
|
||||
|
||||
template <class T>
|
||||
void setUniform(std::shared_ptr<fx::Technique> technique, const std::string& name, const T& value)
|
||||
void setUniform(std::shared_ptr<Fx::Technique> technique, const std::string& name, const T& value)
|
||||
{
|
||||
if (!isEnabled())
|
||||
return;
|
||||
|
@ -158,7 +158,7 @@ namespace MWRender
|
|||
(*it)->setValue(value);
|
||||
}
|
||||
|
||||
std::optional<size_t> getUniformSize(std::shared_ptr<fx::Technique> technique, const std::string& name)
|
||||
std::optional<size_t> getUniformSize(std::shared_ptr<Fx::Technique> technique, const std::string& name)
|
||||
{
|
||||
auto it = technique->findUniform(name);
|
||||
|
||||
|
@ -168,7 +168,7 @@ namespace MWRender
|
|||
return (*it)->getNumElements();
|
||||
}
|
||||
|
||||
bool isTechniqueEnabled(const std::shared_ptr<fx::Technique>& technique) const;
|
||||
bool isTechniqueEnabled(const std::shared_ptr<Fx::Technique>& technique) const;
|
||||
|
||||
void setExteriorFlag(bool exterior) { mExteriorFlag = exterior; }
|
||||
|
||||
|
@ -176,7 +176,7 @@ namespace MWRender
|
|||
|
||||
void toggleMode();
|
||||
|
||||
std::shared_ptr<fx::Technique> loadTechnique(const std::string& name, bool loadNextFrame = false);
|
||||
std::shared_ptr<Fx::Technique> loadTechnique(const std::string& name, bool loadNextFrame = false);
|
||||
|
||||
bool isEnabled() const { return mUsePostProcessing; }
|
||||
|
||||
|
@ -261,13 +261,13 @@ namespace MWRender
|
|||
int mHeight;
|
||||
int mSamples;
|
||||
|
||||
osg::ref_ptr<fx::StateUpdater> mStateUpdater;
|
||||
osg::ref_ptr<Fx::StateUpdater> mStateUpdater;
|
||||
osg::ref_ptr<PingPongCull> mPingPongCull;
|
||||
std::array<osg::ref_ptr<PingPongCanvas>, 2> mCanvases;
|
||||
osg::ref_ptr<TransparentDepthBinCallback> mTransparentDepthPostPass;
|
||||
osg::ref_ptr<DistortionCallback> mDistortionCallback;
|
||||
|
||||
fx::DispatchArray mTemplateData;
|
||||
Fx::DispatchArray mTemplateData;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ int main(int argc, char* argv[])
|
|||
resourcesPath = Files::pathToQString(variables["resources"].as<Files::MaybeQuotedPath>().u8string());
|
||||
}
|
||||
|
||||
l10n::installQtTranslations(app, "wizard", resourcesPath);
|
||||
L10n::installQtTranslations(app, "wizard", resourcesPath);
|
||||
|
||||
Wizard::MainWizard wizard(std::move(configurationManager));
|
||||
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
// NOLINTBEGIN(readability-identifier-naming)
|
||||
namespace boost
|
||||
{
|
||||
class any;
|
||||
}
|
||||
// NOLINTEND(readability-identifier-naming)
|
||||
|
||||
namespace Fallback
|
||||
{
|
||||
|
|
|
@ -9,11 +9,13 @@
|
|||
#include <components/files/collections.hpp>
|
||||
#include <components/files/fixedpath.hpp>
|
||||
|
||||
// NOLINTBEGIN(readability-identifier-naming)
|
||||
namespace boost::program_options
|
||||
{
|
||||
class options_description;
|
||||
class variables_map;
|
||||
}
|
||||
// NOLINTEND(readability-identifier-naming)
|
||||
|
||||
/**
|
||||
* \namespace Files
|
||||
|
|
|
@ -276,8 +276,8 @@ namespace Gui
|
|||
{
|
||||
Log(Debug::Info) << "Loading font file " << fileName;
|
||||
|
||||
osgMyGUI::DataManager* dataManager
|
||||
= dynamic_cast<osgMyGUI::DataManager*>(&osgMyGUI::DataManager::getInstance());
|
||||
MyGUIPlatform::DataManager* dataManager
|
||||
= dynamic_cast<MyGUIPlatform::DataManager*>(&MyGUIPlatform::DataManager::getInstance());
|
||||
if (!dataManager)
|
||||
{
|
||||
Log(Debug::Error) << "Can not load TrueType font " << fontId << ": osgMyGUI::DataManager is not available.";
|
||||
|
@ -287,7 +287,7 @@ namespace Gui
|
|||
// TODO: it may be worth to take in account resolution change, but it is not safe to replace used assets
|
||||
std::unique_ptr<MyGUI::IDataStream> layersStream(dataManager->getData("openmw_layers.xml"));
|
||||
MyGUI::IntSize bookSize = getBookSize(layersStream.get());
|
||||
float bookScale = osgMyGUI::ScalingLayer::getScaleFactor(bookSize);
|
||||
float bookScale = MyGUIPlatform::ScalingLayer::getScaleFactor(bookSize);
|
||||
|
||||
const auto oldDataPath = dataManager->getDataPath({});
|
||||
dataManager->setResourcePath("fonts");
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <components/fx/lexer_types.hpp>
|
||||
#include <components/misc/strings/format.hpp>
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
namespace Lexer
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "lexer_types.hpp"
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
namespace Lexer
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <string_view>
|
||||
#include <variant>
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
namespace Lexer
|
||||
{
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
|
||||
#include "technique.hpp"
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
namespace constants
|
||||
namespace Constants
|
||||
{
|
||||
constexpr std::array<std::pair<std::string_view, fx::FlagsType>, 6> TechniqueFlag = { {
|
||||
constexpr std::array<std::pair<std::string_view, Fx::FlagsType>, 6> TechniqueFlag = { {
|
||||
{ "disable_interiors", Technique::Flag_Disable_Interiors },
|
||||
{ "disable_exteriors", Technique::Flag_Disable_Exteriors },
|
||||
{ "disable_underwater", Technique::Flag_Disable_Underwater },
|
||||
|
|
|
@ -49,7 +49,7 @@ void main()
|
|||
|
||||
}
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
Pass::Pass(Pass::Type type, Pass::Order order, bool ubo)
|
||||
: mCompiled(false)
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace osg
|
|||
class StateSet;
|
||||
}
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
class Technique;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <components/resource/scenemanager.hpp>
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
std::string StateUpdater::sDefinition = UniformData::getDefinition("_omw_data");
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <components/sceneutil/statesetupdater.hpp>
|
||||
#include <components/std140/ubo.hpp>
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
class StateUpdater : public SceneUtil::StateSetUpdater
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace
|
|||
};
|
||||
}
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
namespace
|
||||
{
|
||||
|
@ -286,7 +286,7 @@ namespace fx
|
|||
if (mRenderTargets.count(mBlockName))
|
||||
error(Misc::StringUtils::format("redeclaration of render target '%s'", std::string(mBlockName)));
|
||||
|
||||
fx::Types::RenderTarget rt;
|
||||
Fx::Types::RenderTarget rt;
|
||||
rt.mTarget->setTextureSize(mWidth, mHeight);
|
||||
rt.mTarget->setSourceFormat(GL_RGB);
|
||||
rt.mTarget->setInternalFormat(GL_RGB);
|
||||
|
@ -347,7 +347,7 @@ namespace fx
|
|||
auto& pass = mPassMap[mBlockName];
|
||||
|
||||
if (!pass)
|
||||
pass = std::make_shared<fx::Pass>();
|
||||
pass = std::make_shared<Fx::Pass>();
|
||||
|
||||
pass->mName = mBlockName;
|
||||
|
||||
|
@ -370,7 +370,7 @@ namespace fx
|
|||
auto& pass = mPassMap[mBlockName];
|
||||
|
||||
if (!pass)
|
||||
pass = std::make_shared<fx::Pass>();
|
||||
pass = std::make_shared<Fx::Pass>();
|
||||
|
||||
pass->mUBO = mUBO;
|
||||
pass->mName = mBlockName;
|
||||
|
@ -394,7 +394,7 @@ namespace fx
|
|||
auto& pass = mPassMap[mBlockName];
|
||||
|
||||
if (!pass)
|
||||
pass = std::make_shared<fx::Pass>();
|
||||
pass = std::make_shared<Fx::Pass>();
|
||||
|
||||
pass->mName = mBlockName;
|
||||
|
||||
|
@ -816,7 +816,7 @@ namespace fx
|
|||
auto& pass = mPassMap[mBlockName];
|
||||
|
||||
if (!pass)
|
||||
pass = std::make_shared<fx::Pass>();
|
||||
pass = std::make_shared<Fx::Pass>();
|
||||
|
||||
while (!isNext<Lexer::Eof>())
|
||||
{
|
||||
|
@ -889,7 +889,7 @@ namespace fx
|
|||
FlagsType Technique::parseFlags()
|
||||
{
|
||||
auto parseBit = [this](std::string_view term) {
|
||||
for (const auto& [identifer, bit] : constants::TechniqueFlag)
|
||||
for (const auto& [identifer, bit] : Constants::TechniqueFlag)
|
||||
{
|
||||
if (Misc::StringUtils::ciEqual(term, identifer))
|
||||
return bit;
|
||||
|
@ -908,7 +908,7 @@ namespace fx
|
|||
{
|
||||
expect<Lexer::Literal>();
|
||||
|
||||
for (const auto& [identifer, mode] : constants::FilterMode)
|
||||
for (const auto& [identifer, mode] : Constants::FilterMode)
|
||||
{
|
||||
if (asLiteral() == identifer)
|
||||
return mode;
|
||||
|
@ -921,7 +921,7 @@ namespace fx
|
|||
{
|
||||
expect<Lexer::Literal>();
|
||||
|
||||
for (const auto& [identifer, mode] : constants::WrapMode)
|
||||
for (const auto& [identifer, mode] : Constants::WrapMode)
|
||||
{
|
||||
if (asLiteral() == identifer)
|
||||
return mode;
|
||||
|
@ -939,7 +939,7 @@ namespace fx
|
|||
{
|
||||
expect<Lexer::Literal>();
|
||||
|
||||
for (const auto& [identifer, mode] : constants::Compression)
|
||||
for (const auto& [identifer, mode] : Constants::Compression)
|
||||
{
|
||||
if (asLiteral() == identifer)
|
||||
return mode;
|
||||
|
@ -952,7 +952,7 @@ namespace fx
|
|||
{
|
||||
expect<Lexer::Literal>();
|
||||
|
||||
for (const auto& [identifer, mode] : constants::InternalFormat)
|
||||
for (const auto& [identifer, mode] : Constants::InternalFormat)
|
||||
{
|
||||
if (asLiteral() == identifer)
|
||||
return mode;
|
||||
|
@ -965,7 +965,7 @@ namespace fx
|
|||
{
|
||||
expect<Lexer::Literal>();
|
||||
|
||||
for (const auto& [identifer, mode] : constants::SourceType)
|
||||
for (const auto& [identifer, mode] : Constants::SourceType)
|
||||
{
|
||||
if (asLiteral() == identifer)
|
||||
return mode;
|
||||
|
@ -978,7 +978,7 @@ namespace fx
|
|||
{
|
||||
expect<Lexer::Literal>();
|
||||
|
||||
for (const auto& [identifer, mode] : constants::SourceFormat)
|
||||
for (const auto& [identifer, mode] : Constants::SourceFormat)
|
||||
{
|
||||
if (asLiteral() == identifer)
|
||||
return mode;
|
||||
|
@ -991,7 +991,7 @@ namespace fx
|
|||
{
|
||||
expect<Lexer::Literal>();
|
||||
|
||||
for (const auto& [identifer, mode] : constants::BlendEquation)
|
||||
for (const auto& [identifer, mode] : Constants::BlendEquation)
|
||||
{
|
||||
if (asLiteral() == identifer)
|
||||
return mode;
|
||||
|
@ -1004,7 +1004,7 @@ namespace fx
|
|||
{
|
||||
expect<Lexer::Literal>();
|
||||
|
||||
for (const auto& [identifer, mode] : constants::BlendFunc)
|
||||
for (const auto& [identifer, mode] : Constants::BlendFunc)
|
||||
{
|
||||
if (asLiteral() == identifer)
|
||||
return mode;
|
||||
|
@ -1031,11 +1031,11 @@ namespace fx
|
|||
*/
|
||||
expect<Lexer::Open_Parenthesis>();
|
||||
|
||||
std::vector<fx::Types::Choice<SrcT>> choices;
|
||||
std::vector<Fx::Types::Choice<SrcT>> choices;
|
||||
|
||||
while (!isNext<Lexer::Eof>())
|
||||
{
|
||||
fx::Types::Choice<SrcT> choice;
|
||||
Fx::Types::Choice<SrcT> choice;
|
||||
choice.mLabel = parseString();
|
||||
expect<Lexer::Equal>();
|
||||
choice.mValue = getUniformValue<SrcT, T>();
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace VFS
|
|||
class Manager;
|
||||
}
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
using FlagsType = size_t;
|
||||
|
||||
|
@ -85,7 +85,7 @@ namespace fx
|
|||
}
|
||||
|
||||
// not safe to read/write in draw thread
|
||||
std::shared_ptr<fx::Technique> mHandle = nullptr;
|
||||
std::shared_ptr<Fx::Technique> mHandle = nullptr;
|
||||
|
||||
FlagsType mFlags = 0;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <components/sceneutil/depth.hpp>
|
||||
#include <components/settings/shadermanager.hpp>
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
namespace Types
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace
|
|||
{
|
||||
template <class T, class WidgetT>
|
||||
void createVectorWidget(
|
||||
const std::shared_ptr<fx::Types::UniformBase>& uniform, MyGUI::Widget* client, fx::Widgets::UniformBase* base)
|
||||
const std::shared_ptr<Fx::Types::UniformBase>& uniform, MyGUI::Widget* client, Fx::Widgets::UniformBase* base)
|
||||
{
|
||||
int height = client->getHeight();
|
||||
base->setSize(base->getSize().width, (base->getSize().height - height) + (height * T::num_components));
|
||||
|
@ -16,13 +16,13 @@ namespace
|
|||
{
|
||||
auto* widget = client->createWidget<WidgetT>(
|
||||
"MW_ValueEditNumber", { 0, height * i, client->getWidth(), height }, MyGUI::Align::Default);
|
||||
widget->setData(uniform, static_cast<fx::Widgets::Index>(i));
|
||||
widget->setData(uniform, static_cast<Fx::Widgets::Index>(i));
|
||||
base->addItem(widget);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
namespace Widgets
|
||||
{
|
||||
|
@ -127,7 +127,7 @@ namespace fx
|
|||
mChoices->eventComboChangePosition += MyGUI::newDelegate(this, &EditChoice::notifyComboBoxChanged);
|
||||
}
|
||||
|
||||
void UniformBase::init(const std::shared_ptr<fx::Types::UniformBase>& uniform)
|
||||
void UniformBase::init(const std::shared_ptr<Fx::Types::UniformBase>& uniform)
|
||||
{
|
||||
if (uniform->mDisplayName.empty())
|
||||
mLabel->setCaption(uniform->mName);
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Gui
|
|||
class AutoSizedButton;
|
||||
}
|
||||
|
||||
namespace fx
|
||||
namespace Fx
|
||||
{
|
||||
namespace Widgets
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ namespace fx
|
|||
public:
|
||||
virtual ~EditBase() = default;
|
||||
|
||||
void setData(const std::shared_ptr<fx::Types::UniformBase>& uniform, Index index = None)
|
||||
void setData(const std::shared_ptr<Fx::Types::UniformBase>& uniform, Index index = None)
|
||||
{
|
||||
mUniform = uniform;
|
||||
mIndex = index;
|
||||
|
@ -57,7 +57,7 @@ namespace fx
|
|||
virtual void toDefault() = 0;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<fx::Types::UniformBase> mUniform;
|
||||
std::shared_ptr<Fx::Types::UniformBase> mUniform;
|
||||
Index mIndex;
|
||||
};
|
||||
|
||||
|
@ -268,7 +268,7 @@ namespace fx
|
|||
MYGUI_RTTI_DERIVED(UniformBase)
|
||||
|
||||
public:
|
||||
void init(const std::shared_ptr<fx::Types::UniformBase>& uniform);
|
||||
void init(const std::shared_ptr<Fx::Types::UniformBase>& uniform);
|
||||
|
||||
void toDefault();
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/vfs/manager.hpp>
|
||||
|
||||
namespace l10n
|
||||
namespace L10n
|
||||
{
|
||||
|
||||
void Manager::setPreferredLocales(const std::vector<std::string>& langs, bool gmstHasPriority)
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace VFS
|
|||
class Manager;
|
||||
}
|
||||
|
||||
namespace l10n
|
||||
namespace L10n
|
||||
{
|
||||
|
||||
class Manager
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
|
||||
namespace l10n
|
||||
namespace L10n
|
||||
{
|
||||
MessageBundles::MessageBundles(const std::vector<icu::Locale>& preferredLocales, icu::Locale& fallbackLocale)
|
||||
: mFallbackLocale(fallbackLocale)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <unicode/locid.h>
|
||||
#include <unicode/msgfmt.h>
|
||||
|
||||
namespace l10n
|
||||
namespace L10n
|
||||
{
|
||||
/**
|
||||
* @brief A collection of Message Bundles
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <QLibraryInfo>
|
||||
#include <QLocale>
|
||||
|
||||
namespace l10n
|
||||
namespace L10n
|
||||
{
|
||||
QTranslator AppTranslator{};
|
||||
QTranslator ComponentsTranslator{};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <QApplication>
|
||||
#include <QTranslator>
|
||||
|
||||
namespace l10n
|
||||
namespace L10n
|
||||
{
|
||||
extern QTranslator AppTranslator;
|
||||
extern QTranslator ComponentsTranslator;
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace
|
|||
{
|
||||
struct L10nContext
|
||||
{
|
||||
std::shared_ptr<const l10n::MessageBundles> mData;
|
||||
std::shared_ptr<const L10n::MessageBundles> mData;
|
||||
};
|
||||
|
||||
void getICUArgs(std::string_view messageId, const sol::table& table, std::vector<icu::UnicodeString>& argNames,
|
||||
|
@ -48,7 +48,7 @@ namespace sol
|
|||
|
||||
namespace LuaUtil
|
||||
{
|
||||
sol::function initL10nLoader(lua_State* L, l10n::Manager* manager)
|
||||
sol::function initL10nLoader(lua_State* L, L10n::Manager* manager)
|
||||
{
|
||||
sol::state_view lua(L);
|
||||
sol::usertype<L10nContext> ctxDef = lua.new_usertype<L10nContext>("L10nContext");
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
#include <sol/sol.hpp>
|
||||
|
||||
namespace l10n
|
||||
namespace L10n
|
||||
{
|
||||
class Manager;
|
||||
}
|
||||
|
||||
namespace LuaUtil
|
||||
{
|
||||
sol::function initL10nLoader(lua_State*, l10n::Manager* manager);
|
||||
sol::function initL10nLoader(lua_State*, L10n::Manager* manager);
|
||||
}
|
||||
|
||||
#endif // COMPONENTS_LUA_L10N_H
|
||||
|
|
|
@ -453,7 +453,7 @@ namespace LuaUtil
|
|||
return call(sol::state_view(obj.lua_state())["tostring"], obj);
|
||||
}
|
||||
|
||||
std::string internal::formatCastingError(const sol::object& obj, const std::type_info& t)
|
||||
std::string Internal::formatCastingError(const sol::object& obj, const std::type_info& t)
|
||||
{
|
||||
const char* typeName = t.name();
|
||||
if (t == typeid(int))
|
||||
|
|
|
@ -325,7 +325,7 @@ namespace LuaUtil
|
|||
// String representation of a Lua object. Should be used for debugging/logging purposes only.
|
||||
std::string toString(const sol::object&);
|
||||
|
||||
namespace internal
|
||||
namespace Internal
|
||||
{
|
||||
std::string formatCastingError(const sol::object& obj, const std::type_info&);
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ namespace LuaUtil
|
|||
decltype(auto) cast(const sol::object& obj)
|
||||
{
|
||||
if (!obj.is<T>())
|
||||
throw std::runtime_error(internal::formatCastingError(obj, typeid(T)));
|
||||
throw std::runtime_error(Internal::formatCastingError(obj, typeid(T)));
|
||||
return obj.as<T>();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "myguirendermanager.hpp"
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
AdditiveLayer::AdditiveLayer()
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace osg
|
|||
class StateSet;
|
||||
}
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
/// @brief A Layer rendering with additive blend mode.
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace
|
|||
};
|
||||
}
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
void DataManager::setResourcePath(const std::filesystem::path& path)
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace VFS
|
|||
class Manager;
|
||||
}
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
class DataManager : public MyGUI::DataManager
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
void CustomLogListener::open()
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <MyGUI_LevelLogFilter.h>
|
||||
#include <MyGUI_LogSource.h>
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
/// \brief Custom MyGUI::ILogListener interface implementation
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "components/files/conversion.hpp"
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
Platform::Platform(osgViewer::Viewer* viewer, osg::Group* guiRoot, Resource::ImageManager* imageManager,
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace VFS
|
|||
class Manager;
|
||||
}
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
class RenderManager;
|
||||
|
|
|
@ -40,12 +40,12 @@
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
class Drawable : public osg::Drawable
|
||||
{
|
||||
osgMyGUI::RenderManager* mParent;
|
||||
MyGUIPlatform::RenderManager* mParent;
|
||||
osg::ref_ptr<osg::StateSet> mStateSet;
|
||||
|
||||
public:
|
||||
|
@ -58,12 +58,12 @@ namespace osgMyGUI
|
|||
{
|
||||
}
|
||||
|
||||
void setRenderManager(osgMyGUI::RenderManager* renderManager) { mRenderManager = renderManager; }
|
||||
void setRenderManager(MyGUIPlatform::RenderManager* renderManager) { mRenderManager = renderManager; }
|
||||
|
||||
void operator()(osg::Node*, osg::NodeVisitor*) { mRenderManager->update(); }
|
||||
|
||||
private:
|
||||
osgMyGUI::RenderManager* mRenderManager;
|
||||
MyGUIPlatform::RenderManager* mRenderManager;
|
||||
};
|
||||
|
||||
// Stage 1: collect draw calls. Run during the Cull traversal.
|
||||
|
@ -75,12 +75,12 @@ namespace osgMyGUI
|
|||
{
|
||||
}
|
||||
|
||||
void setRenderManager(osgMyGUI::RenderManager* renderManager) { mRenderManager = renderManager; }
|
||||
void setRenderManager(MyGUIPlatform::RenderManager* renderManager) { mRenderManager = renderManager; }
|
||||
|
||||
void operator()(osg::Node*, osg::NodeVisitor*) { mRenderManager->collectDrawCalls(); }
|
||||
|
||||
private:
|
||||
osgMyGUI::RenderManager* mRenderManager;
|
||||
MyGUIPlatform::RenderManager* mRenderManager;
|
||||
};
|
||||
|
||||
// Stage 2: execute the draw calls. Run during the Draw traversal. May run in parallel with the update traversal
|
||||
|
@ -162,7 +162,7 @@ namespace osgMyGUI
|
|||
}
|
||||
|
||||
public:
|
||||
Drawable(osgMyGUI::RenderManager* parent = nullptr)
|
||||
Drawable(MyGUIPlatform::RenderManager* parent = nullptr)
|
||||
: mParent(parent)
|
||||
, mWriteTo(0)
|
||||
, mReadFrom(0)
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace osg
|
|||
class StateSet;
|
||||
}
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
class Drawable;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/resource/imagemanager.hpp>
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
OSGTexture::OSGTexture(const std::string& name, Resource::ImageManager* imageManager)
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Resource
|
|||
class ImageManager;
|
||||
}
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
class OSGTexture final : public MyGUI::ITexture
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <MyGUI_RenderManager.h>
|
||||
#include <algorithm>
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
/// @brief the ProxyRenderTarget allows to adjust the pixel scale and offset for a "source" render target.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <MyGUI_OverlappedLayer.h>
|
||||
|
||||
namespace osgMyGUI
|
||||
namespace MyGUIPlatform
|
||||
{
|
||||
|
||||
///@brief A Layer that lays out and renders widgets in screen-relative coordinates. The "Size" property determines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue