@@ -775,7 +775,7 @@ std::string GzRenderer::Initialize(RenderThreadRhi &_rhi)
775775 this ->dataPtr ->camera ->SetImageHeight (this ->textureSize .height ());
776776 this ->dataPtr ->camera ->SetImageFormat (this ->dataPtr ->camera ->ImageFormat (),
777777 true );
778- this ->dataPtr ->camera ->SetAntiAliasing (8 );
778+ this ->dataPtr ->camera ->SetAntiAliasing (this -> cameraAntiAliasing );
779779 this ->dataPtr ->camera ->SetHFOV (this ->cameraHFOV );
780780 // setting the size and calling PreRender should cause the render texture to
781781 // be rebuilt
@@ -1346,6 +1346,12 @@ void RenderWindowItem::SetCameraFarClip(double _far)
13461346 this ->dataPtr ->renderThread ->gzRenderer .cameraFarClip = _far;
13471347}
13481348
1349+ // ///////////////////////////////////////////////
1350+ void RenderWindowItem::SetAntiAliasing (unsigned int _aa)
1351+ {
1352+ this ->dataPtr ->renderThread ->gzRenderer .cameraAntiAliasing = _aa;
1353+ }
1354+
13491355// ///////////////////////////////////////////////
13501356void RenderWindowItem::SetSkyEnabled (const bool &_sky)
13511357{
@@ -1486,6 +1492,24 @@ void MinimalScene::LoadConfig(const tinyxml2::XMLElement *_pluginElem)
14861492 }
14871493 }
14881494
1495+ elem = _pluginElem->FirstChildElement (" anti_aliasing" );
1496+ if (nullptr != elem && nullptr != elem->GetText ())
1497+ {
1498+ unsigned int aa{};
1499+ std::stringstream aaStr (std::string (elem->GetText ()));
1500+ aaStr >> aa;
1501+ if (aaStr.fail ())
1502+ {
1503+ gzerr << " Unable to set anti-aliasing <anti_aliasing> to '"
1504+ << elem->GetText ()
1505+ << " ' using default value" << std::endl;
1506+ }
1507+ else
1508+ {
1509+ renderWindow->SetAntiAliasing (aa);
1510+ }
1511+ }
1512+
14891513 elem = _pluginElem->FirstChildElement (" sky" );
14901514 if (nullptr != elem && nullptr != elem->GetText ())
14911515 {
0 commit comments