Skip to content

Commit

Permalink
Merge branch 'gz-rendering7' into ogre_shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
iche033 authored Oct 5, 2023
2 parents 2068ae5 + 5892355 commit d82b0f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Ubuntu Focal CI
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@focal
Expand All @@ -22,7 +22,7 @@ jobs:
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@jammy
6 changes: 4 additions & 2 deletions ogre2/src/Ogre2Material.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,10 @@ void Ogre2Material::SetTextureMapDataImpl(const std::string& _name,
if (texture->getWidth() == 0)
{
auto data = _img->RGBAData();

texture->setPixelFormat(Ogre::PFG_RGBA8_UNORM_SRGB);
Ogre::PixelFormatGpu format = Ogre::PFG_RGBA8_UNORM;
if (this->ogreDatablock->suggestUsingSRGB(_type))
format = Ogre::PFG_RGBA8_UNORM_SRGB;
texture->setPixelFormat(format);
texture->setTextureType(Ogre::TextureTypes::Type2D);
texture->setNumMipmaps(1u);
texture->setResolution(_img->Width(), _img->Height());
Expand Down

0 comments on commit d82b0f2

Please sign in to comment.