Skip to content

Commit

Permalink
Merge branch 'main' into mjcarroll/qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
caguero committed Jul 12, 2024
2 parents bcf1e09 + 12b4dd0 commit e2f1eae
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ gz_find_package (Qt${QT_MAJOR_VERSION}
Widgets
Test
REQUIRED
PKGCONFIG_VER_COMPARISON >=
PKGCONFIG "Qt${QT_MAJOR_VERSION}Core Qt${QT_MAJOR_VERSION}Quick Qt${QT_MAJOR_VERSION}QuickControls2 Qt${QT_MAJOR_VERSION}Widgets")

add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)
Expand Down
1 change: 1 addition & 0 deletions include/gz/gui/config.hh.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#define GZ_GUI_VERSION "${PROJECT_VERSION}"
#define GZ_GUI_VERSION_FULL "${PROJECT_VERSION_FULL}"
#define GZ_GUI_VERSION_NAMESPACE v${PROJECT_VERSION_MAJOR}

#define GZ_GUI_VERSION_HEADER "Gazebo GUI, version ${PROJECT_VERSION_FULL}\nCopyright (C) 2017 Open Source Robotics Foundation.\nReleased under the Apache 2.0 License.\n\n"

Expand Down
6 changes: 3 additions & 3 deletions src/plugins/ImageDisplay/ImageDisplay_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ TEST(ImageDisplayTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(ReceiveImage))

// red image
int bufferSize = msg.width() * msg.height() * bpp;
std::shared_ptr<unsigned char> buffer(new unsigned char[bufferSize]);
std::shared_ptr<unsigned char[]> buffer(new unsigned char[bufferSize]);
for (int i = 0; i < bufferSize; i += bpp)
{
buffer.get()[i] = 255u;
Expand Down Expand Up @@ -371,7 +371,7 @@ TEST(ImageDisplayTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(ReceiveImageFloat32))

// first half is gray, second half is black
int bufferSize = msg.width() * msg.height() * bpp;
std::shared_ptr<float> buffer(new float[bufferSize]);
std::shared_ptr<float[]> buffer(new float[bufferSize]);
for (unsigned int y = 0; y < msg.width(); ++y)
{
float v = 0.5f * static_cast<int>(y / (msg.height() / 2.0) + 1);
Expand Down Expand Up @@ -485,7 +485,7 @@ TEST(ImageDisplayTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(ReceiveImageInt16))

// first half is black, second half is white
int bufferSize = msg.width() * msg.height() * bpp;
std::shared_ptr<uint16_t> buffer(new uint16_t[bufferSize]);
std::shared_ptr<uint16_t[]> buffer(new uint16_t[bufferSize]);
for (unsigned int y = 0; y < msg.width(); ++y)
{
uint16_t v = 100 * static_cast<int>(y / (msg.height() / 2.0) + 1);
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/MarkerManager/MarkerManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,8 @@ MarkerManager::Implementation::MsgToType(const gz::msgs::Marker &_msg)
return gz::rendering::MarkerType::MT_BOX;
case gz::msgs::Marker::CAPSULE:
return gz::rendering::MarkerType::MT_CAPSULE;
case gz::msgs::Marker::CONE:
return gz::rendering::MarkerType::MT_CONE;
case gz::msgs::Marker::CYLINDER:
return gz::rendering::MarkerType::MT_CYLINDER;
case gz::msgs::Marker::LINE_STRIP:
Expand Down
1 change: 1 addition & 0 deletions src/plugins/MinimalScene/MinimalScene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ TextureNode::TextureNode(QQuickWindow *_window, RenderSync &_renderSync,
renderSync(_renderSync),
window(_window)
{
(void) _camera;
if (_graphicsAPI == rendering::GraphicsAPI::OPENGL)
{
gzdbg << "Creating texture node render interface for OpenGL" << std::endl;
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/TransportSceneManager/TransportSceneManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,13 @@ rendering::GeometryPtr TransportSceneManager::Implementation::LoadGeometry(
if (_msg.box().has_size())
scale = msgs::Convert(_msg.box().size());
}
else if (_msg.has_cone())
{
geom = this->scene->CreateCone();
scale.X() = _msg.cone().radius() * 2;
scale.Y() = scale.X();
scale.Z() = _msg.cone().length();
}
else if (_msg.has_cylinder())
{
geom = this->scene->CreateCylinder();
Expand Down

0 comments on commit e2f1eae

Please sign in to comment.