~sircmpwn/xrgears

092efb2c3987349e08b648475f03ec429883c597 — Lubosz Sarnecki 4 years ago 9a78836
add new class for text overlay renderer.
2 files changed, 16 insertions(+), 3 deletions(-)

A vitamin-k/render/vikRendererTextOverlay.hpp
M vitamin-k/system/vikApplicationVks.hpp
A vitamin-k/render/vikRendererTextOverlay.hpp => vitamin-k/render/vikRendererTextOverlay.hpp +12 -0
@@ 0,0 1,12 @@
#pragma once

#include "vikRendererVks.hpp"

namespace vik {

class RendererTextOverlay : public RendererVks {
public:
  RendererTextOverlay(Settings *s, Window *w) : RendererVks(s, w) {}
  ~RendererTextOverlay() {}
};
}

M vitamin-k/system/vikApplicationVks.hpp => vitamin-k/system/vikApplicationVks.hpp +4 -3
@@ 27,7 27,8 @@
#include "render/vikInitializers.hpp"

#include "scene/vikCameraBase.hpp"
#include "render/vikRendererVks.hpp"
#include "render/vikRendererTextOverlay.hpp"

#include "render/vikTimer.hpp"

#include "vikApplication.hpp"


@@ 38,7 39,7 @@ class Window;
class ApplicationVks : public Application {

public:
  RendererVks *renderer;
  RendererTextOverlay *renderer;
  CameraBase camera;

  bool prepared = false;


@@ 63,7 64,7 @@ public:

  ApplicationVks(int argc, char *argv[]) : Application(argc, argv) {
    init_window_from_settings();
    renderer = new RendererVks(&settings, window);
    renderer = new RendererTextOverlay(&settings, window);

    std::function<void()> set_window_resize_cb = [this]() { resize(); };
    renderer->set_window_resize_cb(set_window_resize_cb);