Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/robot_dart/gui/magnum/base_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ namespace robot_dart {
// _lights.push_back(light);

/* Initialize 3D axis visualization mesh */
_3D_axis_shader.reset(new Magnum::Shaders::VertexColor3D);
_3D_axis_shader.reset(new Magnum::Shaders::VertexColorGL3D);
_3D_axis_mesh.reset(new Magnum::GL::Mesh);

_background_shader.reset(new Magnum::Shaders::Flat2D);
_background_shader.reset(new Magnum::Shaders::FlatGL2D);
_background_mesh.reset(new Magnum::GL::Mesh{Magnum::MeshTools::compile(Magnum::Primitives::squareSolid())});

Magnum::Trade::MeshData axis_data = Magnum::Primitives::axis3D();
Expand All @@ -174,7 +174,7 @@ namespace robot_dart {

_3D_axis_mesh->setPrimitive(Magnum::GL::MeshPrimitive::Lines)
.setCount(axis_data.indexCount())
.addVertexBuffer(std::move(axis_vertices), 0, Magnum::Shaders::VertexColor3D::Position{}, Magnum::Shaders::VertexColor3D::Color4{})
.addVertexBuffer(std::move(axis_vertices), 0, Magnum::Shaders::VertexColorGL3D::Position{}, Magnum::Shaders::VertexColorGL3D::Color4{})
.setIndexBuffer(std::move(axis_indices), 0, compressed.second);

/* Initialize text visualization */
Expand All @@ -197,7 +197,7 @@ namespace robot_dart {
_text_indices.reset(new Magnum::GL::Buffer);

/* Initialize text shader */
_text_shader.reset(new Magnum::Shaders::DistanceFieldVector2D);
_text_shader.reset(new Magnum::Shaders::DistanceFieldVectorGL2D);
_text_shader->bindVectorTexture(_glyph_cache->texture());
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/robot_dart/gui/magnum/base_application.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ namespace robot_dart {
};

struct DebugDrawData {
Magnum::Shaders::VertexColor3D* axes_shader;
Magnum::Shaders::VertexColorGL3D* axes_shader;
Magnum::GL::Mesh* axes_mesh;
Magnum::Shaders::Flat2D* background_shader;
Magnum::Shaders::FlatGL2D* background_shader;
Magnum::GL::Mesh* background_mesh;

Magnum::Shaders::DistanceFieldVector2D* text_shader;
Magnum::Shaders::DistanceFieldVectorGL2D* text_shader;
Magnum::GL::Buffer* text_vertices;
Magnum::GL::Buffer* text_indices;
Magnum::Text::AbstractFont* font;
Expand Down Expand Up @@ -227,12 +227,12 @@ namespace robot_dart {

/* Debug visualization */
std::unique_ptr<Magnum::GL::Mesh> _3D_axis_mesh;
std::unique_ptr<Magnum::Shaders::VertexColor3D> _3D_axis_shader;
std::unique_ptr<Magnum::Shaders::VertexColorGL3D> _3D_axis_shader;
std::unique_ptr<Magnum::GL::Mesh> _background_mesh;
std::unique_ptr<Magnum::Shaders::Flat2D> _background_shader;
std::unique_ptr<Magnum::Shaders::FlatGL2D> _background_shader;

/* Text visualization */
std::unique_ptr<Magnum::Shaders::DistanceFieldVector2D> _text_shader;
std::unique_ptr<Magnum::Shaders::DistanceFieldVectorGL2D> _text_shader;
Corrade::PluginManager::Manager<Magnum::Text::AbstractFont> _font_manager;
Corrade::Containers::Pointer<Magnum::Text::DistanceFieldGlyphCache> _glyph_cache;
Corrade::Containers::Pointer<Magnum::Text::AbstractFont> _font;
Expand Down