GNU Radio's TEST Package
glfw_sink_c_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013-2021 Sylvain Munaut <tnt@246tNt.com>
4  *
5  * This file is part of gr-fosphor
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  */
9 
10 #pragma once
11 
13 
14 #include "base_sink_c_impl.h"
15 
16 struct GLFWwindow;
17 
18 namespace gr {
19  namespace fosphor {
20 
21  /*!
22  * \brief GLFW version of fosphor sink (implementation)
23  * \ingroup fosphor
24  */
26  {
27  private:
28  /* GLFW stuff */
29  GLFWwindow *d_window;
30 
31  void glfw_render(void);
32  void glfw_cb_reshape(int w, int h);
33  void glfw_cb_key(int key, int scancode, int action, int mods);
34  void glfw_cb_mouse(int btn, int action, int mods);
35 
36  static void _glfw_cb_reshape(GLFWwindow *wnd, int w, int h);
37  static void _glfw_cb_key(GLFWwindow *wnd, int key, int scancode, int action, int mods);
38  static void _glfw_cb_mouse(GLFWwindow *wnd, int btn, int action, int mods);
39 
40  protected:
41  /* Delegated implementation of GL context management */
42  void glctx_init();
43  void glctx_swap();
44  void glctx_poll();
45  void glctx_fini();
46  void glctx_update();
47 
48  public:
50  };
51 
52  } // namespace fosphor
53 } // namespace gr
Base class for fosphor sink implementation.
Definition: base_sink_c_impl.h:31
GLFW version of fosphor sink (implementation)
Definition: glfw_sink_c_impl.h:26
GLFW version of fosphor sink.
Definition: glfw_sink_c.h:25
Definition: base_sink_c.h:17
Definition: private.h:31