Skip to content

Commit

Permalink
[render] Rename Renderer to RenderApp
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Jan 10, 2025
1 parent 0c5392a commit b7b22e5
Show file tree
Hide file tree
Showing 33 changed files with 419 additions and 405 deletions.
4 changes: 2 additions & 2 deletions examples/render/00-hello-triangle/bgfx/glfw/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

#include <vclib/render/canvas.h>
#include <vclib/glfw/window_manager.h>
#include <vclib/render/renderer.h>
#include <vclib/render/render_app.h>

int main(int argc, char** argv)
{
using WindowGLFW = vcl::
Renderer<vcl::glfw::WindowManager, vcl::Canvas, HelloTriangleDrawer>;
RenderApp<vcl::glfw::WindowManager, vcl::Canvas, HelloTriangleDrawer>;

WindowGLFW tw("Hello Triangle with GLFW");

Expand Down
4 changes: 2 additions & 2 deletions examples/render/00-hello-triangle/bgfx/qt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <vclib/render/canvas.h>
#include <vclib/qt/widget_manager.h>
#include <vclib/render/renderer.h>
#include <vclib/render/render_app.h>

#include <QApplication>

Expand All @@ -33,7 +33,7 @@ int main(int argc, char** argv)
QApplication app(argc, argv);

using WidgetQt = vcl::
Renderer<vcl::qt::WidgetManager, vcl::Canvas, HelloTriangleDrawer>;
RenderApp<vcl::qt::WidgetManager, vcl::Canvas, HelloTriangleDrawer>;

WidgetQt tw("Hello Triangle with Qt");

Expand Down
4 changes: 2 additions & 2 deletions examples/render/00-hello-triangle/opengl2/glfw/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

#include <vclib/render/canvas.h>
#include <vclib/glfw/window_manager.h>
#include <vclib/render/renderer.h>
#include <vclib/render/render_app.h>

int main(int argc, char** argv)
{
using WindowGLFW = vcl::
Renderer<vcl::glfw::WindowManager, vcl::Canvas, HelloTriangleDrawer>;
RenderApp<vcl::glfw::WindowManager, vcl::Canvas, HelloTriangleDrawer>;

WindowGLFW tw("Hello Triangle with GLFW");

Expand Down
4 changes: 2 additions & 2 deletions examples/render/00-hello-triangle/opengl2/qt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <vclib/render/canvas.h>
#include <vclib/qt/widget_manager.h>
#include <vclib/render/renderer.h>
#include <vclib/render/render_app.h>

#include <QApplication>

Expand All @@ -33,7 +33,7 @@ int main(int argc, char** argv)
QApplication app(argc, argv);

using WidgetQt = vcl::
Renderer<vcl::qt::WidgetManager, vcl::Canvas, HelloTriangleDrawer>;
RenderApp<vcl::qt::WidgetManager, vcl::Canvas, HelloTriangleDrawer>;

WidgetQt tw("Hello Triangle with Qt");

Expand Down
4 changes: 2 additions & 2 deletions examples/render/03-viewer-with-text/glfw/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
#include <vclib/render/drawers/viewer_drawer.h>
#include <vclib/render/canvas.h>
#include <vclib/glfw/window_manager.h>
#include <vclib/render/renderer.h>
#include <vclib/render/render_app.h>

int main(int argc, char** argv)
{
using ViewerWindow = vcl::Renderer<
using ViewerWindow = vcl::RenderApp<
vcl::glfw::WindowManager,
vcl::Canvas,
vcl::ViewerDrawer,
Expand Down
4 changes: 2 additions & 2 deletions examples/render/03-viewer-with-text/qt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
#include <vclib/render/drawers/viewer_drawer.h>
#include <vclib/render/canvas.h>
#include <vclib/qt/widget_manager.h>
#include <vclib/render/renderer.h>
#include <vclib/render/render_app.h>

#include <QApplication>

int main(int argc, char** argv)
{
using ViewerWidget = vcl::Renderer<
using ViewerWidget = vcl::RenderApp<
vcl::qt::WidgetManager,
vcl::Canvas,
vcl::ViewerDrawer,
Expand Down
10 changes: 5 additions & 5 deletions examples/render/910-viewer-imgui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
#include <vclib/render/drawers/viewer_drawer.h>
#include <vclib/render/canvas.h>
#include <vclib/glfw/window_manager.h>
#include <vclib/render/renderer.h>
#include <vclib/render/render_app.h>

#include <imgui.h>

template<typename DerivedRenderer>
class DemoImGuiDrawer : public vcl::imgui::ImGuiDrawer<DerivedRenderer>
template<typename DerivedRenderApp>
class DemoImGuiDrawer : public vcl::imgui::ImGuiDrawer<DerivedRenderApp>
{
using ParentDrawer = vcl::imgui::ImGuiDrawer<DerivedRenderer>;
using ParentDrawer = vcl::imgui::ImGuiDrawer<DerivedRenderApp>;

public:
using ParentDrawer::ParentDrawer;
Expand All @@ -52,7 +52,7 @@ class DemoImGuiDrawer : public vcl::imgui::ImGuiDrawer<DerivedRenderer>

int main(int argc, char** argv)
{
using ImGuiDemo = vcl::Renderer<
using ImGuiDemo = vcl::RenderApp<
vcl::glfw::WindowManager,
vcl::Canvas,
DemoImGuiDrawer,
Expand Down
2 changes: 1 addition & 1 deletion tests/render/000-static-asserts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ project(vclib-test-${TEST_NAME})
set(HEADERS
canvas.h
drawers.h
renderer.h
render_app.h
window_manager.h
)

Expand Down
14 changes: 7 additions & 7 deletions tests/render/000-static-asserts/canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define CANVAS_H

#include <vclib/render/canvas.h>
#include <vclib/render/renderer.h>
#include <vclib/render/render_app.h>

#ifdef VCLIB_WITH_QT
#include <vclib/qt/widget_manager.h>
Expand All @@ -44,22 +44,22 @@ void canvasStaticAsserts()
{
using namespace vcl;

using RendererType = Renderer<WM, Canvas>;
using RenderAppType = RenderApp<WM, Canvas>;

static_assert(
CanvasConcept<Canvas<RendererType>>,
CanvasConcept<Canvas<RenderAppType>>,
"Canvas does not satisfy the CanvasConcept");
static_assert(
CanvasConcept<const Canvas<RendererType>>,
CanvasConcept<const Canvas<RenderAppType>>,
"const Canvas does not satisfy the CanvasConcept");
static_assert(
CanvasConcept<Canvas<RendererType>&>,
CanvasConcept<Canvas<RenderAppType>&>,
"Canvas& does not satisfy the CanvasConcept");
static_assert(
CanvasConcept<const Canvas<RendererType>&>,
CanvasConcept<const Canvas<RenderAppType>&>,
"const Canvas& does not satisfy the CanvasConcept");
static_assert(
CanvasConcept<Canvas<RendererType>&&>,
CanvasConcept<Canvas<RenderAppType>&&>,
"Canvas&& does not satisfy the CanvasConcept");
}

Expand Down
Loading

0 comments on commit b7b22e5

Please sign in to comment.