Skip to content

Commit

Permalink
6 -> main (#513)
Browse files Browse the repository at this point in the history
* Check for OpenGL backend before calling GL APIs (#509)

Signed-off-by: Louise Poubel <[email protected]>

* Enable selection buffer based ray query and fix test (#510)

Signed-off-by: Ian Chen <[email protected]>

* 🎈 6.1.0 (#511)

Signed-off-by: Louise Poubel <[email protected]>

Co-authored-by: Louise Poubel <[email protected]>
  • Loading branch information
iche033 and chapulina authored Dec 14, 2021
1 parent 2e00afb commit dad0561
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 10 deletions.
71 changes: 71 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,77 @@

### Ignition Rendering 6.X

### Ignition Rendering 6.1.0 (2021-12-09)

1. Check for OpenGL backend before calling GL APIs
* [Pull request #509](https://github.com/ignitionrobotics/ign-rendering/pull/509)

1. Fix loading grayscale emissive map
* [Pull request #503](https://github.com/ignitionrobotics/ign-rendering/pull/503)
* [Pull request #501](https://github.com/ignitionrobotics/ign-rendering/pull/501)

1. Fixes to selection buffer
* [Pull request #446](https://github.com/ignitionrobotics/ign-rendering/pull/446)
* [Pull request #510](https://github.com/ignitionrobotics/ign-rendering/pull/510)
* [Pull request #498](https://github.com/ignitionrobotics/ign-rendering/pull/498)

1. Add Metal support for the Ogre2 Render Engine
* [Pull request #463](https://github.com/ignitionrobotics/ign-rendering/pull/463)

1. Add a depth camera example
* [Pull request #467](https://github.com/ignitionrobotics/ign-rendering/pull/467)

1. More nullptr checking on visuals and base axis
* [Pull request #486](https://github.com/ignitionrobotics/ign-rendering/pull/486)

1. Fix Utils unit test
* [Pull request #481](https://github.com/ignitionrobotics/ign-rendering/pull/481)

1. Fix context attributes of glXCreateContextAttribsARB.
* [Pull request #460](https://github.com/ignitionrobotics/ign-rendering/pull/460)

1. [Ogre2] fix invalid anti-aliasing level warning
* [Pull request #470](https://github.com/ignitionrobotics/ign-rendering/pull/470)

1. Avoid symbol redefinition to fix armel builds
* [Pull request #457](https://github.com/ignitionrobotics/ign-rendering/pull/457)

1. fix grayscale albedo map
* [Pull request #466](https://github.com/ignitionrobotics/ign-rendering/pull/466)

1. Fix selection buffer material script
* [Pull request #456](https://github.com/ignitionrobotics/ign-rendering/pull/456)

1. [macOS] modify definition of bufferFetch1 to work when GL_ARB_texture_buffer_range is not available
* [Pull request #462](https://github.com/ignitionrobotics/ign-rendering/pull/462)

1. Fix compilation against Ogre 1.10.12
* [Pull request #390](https://github.com/ignitionrobotics/ign-rendering/pull/390)

1. Fix logic on warning for ogre versions different than 1.9.x
* [Pull request #465](https://github.com/ignitionrobotics/ign-rendering/pull/465)

1. Fix point cloud material syntax error
* [Pull request #433](https://github.com/ignitionrobotics/ign-rendering/pull/433)

1. Run ogre2 particles by default
* [Pull request #430](https://github.com/ignitionrobotics/ign-rendering/pull/430)

1. Ogre: Do not assume that ogre plugins have lib prefix on macOS
* [Pull request #454](https://github.com/ignitionrobotics/ign-rendering/pull/454)

1. Fix heightmap crash if only shadow casting spotlights are one scene
* [Pull request #451](https://github.com/ignitionrobotics/ign-rendering/pull/451)

1. Added macOS instructions
* [Pull request #448](https://github.com/ignitionrobotics/ign-rendering/pull/448)

1. Ogre: Add missing required Paging component
* [Pull request #452](https://github.com/ignitionrobotics/ign-rendering/pull/452)

1. Fix ray query distance calculation
* [Pull request #438](https://github.com/ignitionrobotics/ign-rendering/pull/438)

### Ignition Rendering 6.0.1 (2021-10-01)

1. Disable using selection buffer for ray queries
Expand Down
10 changes: 8 additions & 2 deletions ogre2/src/Ogre2DepthCamera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,13 @@ void Ogre2DepthCamera::Render()
{
// GL_DEPTH_CLAMP was disabled in later version of ogre2.2
// however our shaders rely on clamped values so enable it for this sensor
auto engine = Ogre2RenderEngine::Instance();
std::string renderSystemName =
engine->OgreRoot()->getRenderSystem()->getFriendlyName();
bool useGL = renderSystemName.find("OpenGL") != std::string::npos;
#ifndef _WIN32
glEnable(GL_DEPTH_CLAMP);
if (useGL)
glEnable(GL_DEPTH_CLAMP);
#endif

this->scene->StartRendering(this->ogreCamera);
Expand All @@ -995,7 +1000,8 @@ void Ogre2DepthCamera::Render()
this->scene->FlushGpuCommandsAndStartNewFrame(1u, false);

#ifndef _WIN32
glDisable(GL_DEPTH_CLAMP);
if (useGL)
glDisable(GL_DEPTH_CLAMP);
#endif
}

Expand Down
12 changes: 10 additions & 2 deletions ogre2/src/Ogre2LidarVisual.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "ignition/rendering/ogre2/Ogre2Conversions.hh"
#include "ignition/rendering/ogre2/Ogre2DynamicRenderable.hh"
#include "ignition/rendering/ogre2/Ogre2LidarVisual.hh"
#include "ignition/rendering/ogre2/Ogre2RenderEngine.hh"
#include "ignition/rendering/ogre2/Ogre2Scene.hh"
#include "ignition/rendering/ogre2/Ogre2Marker.hh"
#include "ignition/rendering/ogre2/Ogre2Geometry.hh"
Expand All @@ -39,6 +40,7 @@
#endif
#include <OgreItem.h>
#include <OgreMaterialManager.h>
#include <OgreRoot.h>
#include <OgreSceneNode.h>
#include <OgreTechnique.h>
#ifdef _MSC_VER
Expand Down Expand Up @@ -153,13 +155,19 @@ void Ogre2LidarVisual::Init()
void Ogre2LidarVisual::Create()
{
// enable GL_PROGRAM_POINT_SIZE so we can set gl_PointSize in vertex shader
auto engine = Ogre2RenderEngine::Instance();
std::string renderSystemName =
engine->OgreRoot()->getRenderSystem()->getFriendlyName();
if (renderSystemName.find("OpenGL") != std::string::npos)
{
#ifdef __APPLE__
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
#else
#ifndef _WIN32
glEnable(GL_PROGRAM_POINT_SIZE);
glEnable(GL_PROGRAM_POINT_SIZE);
#endif
#endif
}
this->dataPtr->pointsMat =
Ogre::MaterialManager::getSingleton().getByName(
"PointCloudPoint");
Expand Down
8 changes: 8 additions & 0 deletions ogre2/src/Ogre2Marker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "ignition/rendering/ogre2/Ogre2Marker.hh"
#include "ignition/rendering/ogre2/Ogre2Material.hh"
#include "ignition/rendering/ogre2/Ogre2Mesh.hh"
#include "ignition/rendering/ogre2/Ogre2RenderEngine.hh"
#include "ignition/rendering/ogre2/Ogre2Scene.hh"
#include "ignition/rendering/ogre2/Ogre2Visual.hh"

Expand All @@ -44,6 +45,7 @@
#endif
#include <OgreItem.h>
#include <OgreMaterialManager.h>
#include <OgreRoot.h>
#include <OgreTechnique.h>
#ifdef _MSC_VER
#pragma warning(pop)
Expand Down Expand Up @@ -94,13 +96,19 @@ void Ogre2Marker::PreRender()
{
// enable GL_PROGRAM_POINT_SIZE so we can set gl_PointSize in vertex
// shader
auto engine = Ogre2RenderEngine::Instance();
std::string renderSystemName =
engine->OgreRoot()->getRenderSystem()->getFriendlyName();
if (renderSystemName.find("OpenGL") != std::string::npos)
{
#ifdef __APPLE__
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
#else
#ifndef _WIN32
glEnable(GL_PROGRAM_POINT_SIZE);
#endif
#endif
}
Ogre::MaterialPtr pointsMat =
Ogre::MaterialManager::getSingleton().getByName(
"PointCloudPoint");
Expand Down
4 changes: 0 additions & 4 deletions ogre2/src/Ogre2RayQuery.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ RayQueryResult Ogre2RayQuery::ClosestPoint(bool _forceSceneUpdate)
{
RayQueryResult result;

// ray query using selection buffer does not seem to work on some machines
// using cpu based ray-triangle intersection method
// \todo remove this line if selection buffer is working again
return this->ClosestPointByIntersection(_forceSceneUpdate);

#ifdef __APPLE__
return this->ClosestPointByIntersection(_forceSceneUpdate);
Expand Down
10 changes: 8 additions & 2 deletions ogre2/src/Ogre2ThermalCamera.cc
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,13 @@ void Ogre2ThermalCamera::Render()
{
// GL_DEPTH_CLAMP is disabled in later version of ogre2.2
// however our shaders rely on clamped values so enable it for this sensor
auto engine = Ogre2RenderEngine::Instance();
std::string renderSystemName =
engine->OgreRoot()->getRenderSystem()->getFriendlyName();
bool useGL = renderSystemName.find("OpenGL") != std::string::npos;
#ifndef _WIN32
glEnable(GL_DEPTH_CLAMP);
if (useGL)
glEnable(GL_DEPTH_CLAMP);
#endif

// update the compositors
Expand All @@ -855,7 +860,8 @@ void Ogre2ThermalCamera::Render()
this->scene->FlushGpuCommandsAndStartNewFrame(1u, false);

#ifndef _WIN32
glDisable(GL_DEPTH_CLAMP);
if (useGL)
glDisable(GL_DEPTH_CLAMP);
#endif
}

Expand Down
10 changes: 10 additions & 0 deletions src/Utils_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ void UtilTest::ClickToScene(const std::string &_renderEngine)
root->AddChild(camera);
camera->Update();

// \todo(anyone)
// the centerClick var above is set to a screen pos of (width/2, height/2).
// This is off-by-1. The actual center pos should be at
// (width/2 - 1, height/2 - 1) so the result.X() and result.Y() is a bit off
// from the expected position. However, fixing the centerClick above caused
// the screenToPlane tests to fail so only modifying the pos here, and the
// cause of test failure need to be investigated.
if (_renderEngine == "ogre2")
centerClick = ignition::math::Vector2i(halfWidth-1, halfHeight-1);

// API without RayQueryResult and default max distance
result = screenToScene(centerClick, camera, rayQuery, rayResult);

Expand Down

0 comments on commit dad0561

Please sign in to comment.