From 1cdc3631941d6eb3e426d0c687c8b3cbde8763eb Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Tue, 19 May 2020 12:44:33 +0200 Subject: [PATCH] OSX compilation fix. --- GarbageVisitor.cpp | 4 ++-- Mesh.cpp | 3 ++- Mixer.cpp | 4 ++++ Primitives.cpp | 4 ++-- RenderingManager.cpp | 15 +++++++-------- Source.h | 2 +- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/GarbageVisitor.cpp b/GarbageVisitor.cpp index 7d58d6f..9d71d5e 100644 --- a/GarbageVisitor.cpp +++ b/GarbageVisitor.cpp @@ -9,7 +9,7 @@ GarbageVisitor::GarbageVisitor(Node *nodetocollect) : Visitor() { targets_.push_front(nodetocollect); current_ = nullptr; - found_ == false; + found_ = false; } GarbageVisitor::GarbageVisitor(Source *sourcetocollect) : Visitor() @@ -18,7 +18,7 @@ GarbageVisitor::GarbageVisitor(Source *sourcetocollect) : Visitor() targets_.push_front(sourcetocollect->group(View::GEOMETRY)); targets_.push_front(sourcetocollect->group(View::RENDERING)); current_ = nullptr; - found_ == false; + found_ = false; } diff --git a/Mesh.cpp b/Mesh.cpp index a062426..338665a 100644 --- a/Mesh.cpp +++ b/Mesh.cpp @@ -10,6 +10,7 @@ #include +#include "RenderingManager.h" #include "Primitives.h" #include "Resource.h" #include "ImageShader.h" @@ -472,7 +473,7 @@ Handles::Handles(Type type) : Node(), type_(type) handle_ = new Mesh("mesh/border_handles_rotation.ply"); } else { - handle_ = new LineSquare(color, 2); + handle_ = new LineSquare(color, int ( 8.1f /** Rendering::manager().DPIScale()*/) ); handle_->scale_ = glm::vec3( 0.05f, 0.05f, 1.f); } diff --git a/Mixer.cpp b/Mixer.cpp index 4458707..89e7980 100644 --- a/Mixer.cpp +++ b/Mixer.cpp @@ -200,6 +200,7 @@ void Mixer::insertSource(Source *s) mixing_.scene.fg()->attach(s->group(View::MIXING)); geometry_.scene.fg()->attach(s->group(View::GEOMETRY)); layer_.scene.fg()->attach(s->group(View::LAYER)); + } void Mixer::deleteCurrentSource() @@ -423,6 +424,9 @@ void Mixer::swap() // set resolution session_->setResolution( session_->config(View::RENDERING)->scale_ ); + // request reordering in depth for views + View::need_reordering_ = true; + // no current source current_source_ = session_->end(); current_source_index_ = -1; diff --git a/Primitives.cpp b/Primitives.cpp index aaafb7f..afb93df 100644 --- a/Primitives.cpp +++ b/Primitives.cpp @@ -251,7 +251,7 @@ void LineStrip::draw(glm::mat4 modelview, glm::mat4 projection) init(); glLineWidth(linewidth_); -// glEnable(GL_LINE_SMOOTH); + // enable antialiasing glEnable(GL_MULTISAMPLE_ARB); @@ -259,7 +259,7 @@ void LineStrip::draw(glm::mat4 modelview, glm::mat4 projection) glLineWidth(1); glDisable(GL_MULTISAMPLE_ARB); -// glDisable(GL_LINE_SMOOTH); + } void LineStrip::accept(Visitor& v) diff --git a/RenderingManager.cpp b/RenderingManager.cpp index 3fc1196..19bda29 100644 --- a/RenderingManager.cpp +++ b/RenderingManager.cpp @@ -143,7 +143,6 @@ bool Rendering::Init() gst_init (NULL, NULL); // Antialiasing - glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); glHint(GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST); // This hint can improve the speed of texturing when perspective-correct texture coordinate interpolation isn't needed glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); @@ -158,12 +157,12 @@ bool Rendering::Init() #elif GST_GL_HAVE_PLATFORM_CGL -// global_display = GST_GL_DISPLAY ( glfwGetCocoaMonitor(window) ); -// global_display = GST_GL_DISPLAY (gst_gl_display_cocoa_new ()); +// global_display = GST_GL_DISPLAY ( glfwGetCocoaMonitor(main_window_) ); + global_display = GST_GL_DISPLAY (gst_gl_display_cocoa_new ()); -// global_gl_context = gst_gl_context_new_wrapped (global_display, -// (guintptr) 0, -// GST_GL_PLATFORM_CGL, GST_GL_API_OPENGL); + global_gl_context = gst_gl_context_new_wrapped (global_display, + (guintptr) 0, + GST_GL_PLATFORM_CGL, GST_GL_API_OPENGL); #elif GST_GL_HAVE_PLATFORM_GLX @@ -433,7 +432,7 @@ float Rendering::AspectRatio() return static_cast(main_window_attributes_.viewport.x) / static_cast(main_window_attributes_.viewport.y); } -void Rendering::FileDropped(GLFWwindow* window, int path_count, const char* paths[]) +void Rendering::FileDropped(GLFWwindow *, int path_count, const char* paths[]) { for (int i = 0; i < path_count; ++i) { std::string filename(paths[i]); @@ -475,7 +474,7 @@ void Rendering::RequestScreenshot() // static GstBusSyncReply -bus_sync_handler (GstBus * bus, GstMessage * msg, gpointer user_data) +bus_sync_handler (GstBus *, GstMessage * msg, gpointer ) { if (GST_MESSAGE_TYPE(msg) == GST_MESSAGE_NEED_CONTEXT) { const gchar* contextType; diff --git a/Source.h b/Source.h index 4622311..02f52f5 100644 --- a/Source.h +++ b/Source.h @@ -141,7 +141,7 @@ public: protected: - void init(); + void init() override; Surface *mediasurface_; std::string path_;