You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.8KB

  1. --- ../Rack/src/widget/OpenGlWidget.cpp 2022-04-11 20:05:02.023283713 +0100
  2. +++ OpenGlWidget.cpp 2022-07-14 01:14:57.028367786 +0100
  3. @@ -1,3 +1,30 @@
  4. +/*
  5. + * DISTRHO Cardinal Plugin
  6. + * Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
  7. + *
  8. + * This program is free software; you can redistribute it and/or
  9. + * modify it under the terms of the GNU General Public License as
  10. + * published by the Free Software Foundation; either version 3 of
  11. + * the License, or any later version.
  12. + *
  13. + * This program is distributed in the hope that it will be useful,
  14. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. + * GNU General Public License for more details.
  17. + *
  18. + * For a full copy of the GNU General Public License see the LICENSE file.
  19. + */
  20. +
  21. +/**
  22. + * This file is an edited version of VCVRack's OpenGlWidget.cpp
  23. + * Copyright (C) 2016-2021 VCV.
  24. + *
  25. + * This program is free software: you can redistribute it and/or
  26. + * modify it under the terms of the GNU General Public License as
  27. + * published by the Free Software Foundation; either version 3 of
  28. + * the License, or (at your option) any later version.
  29. + */
  30. +
  31. #include <widget/OpenGlWidget.hpp>
  32. #include <context.hpp>
  33. @@ -14,23 +41,6 @@
  34. void OpenGlWidget::drawFramebuffer() {
  35. - math::Vec fbSize = getFramebufferSize();
  36. - glViewport(0.0, 0.0, fbSize.x, fbSize.y);
  37. - glClearColor(0.0, 0.0, 0.0, 1.0);
  38. - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
  39. -
  40. - glMatrixMode(GL_PROJECTION);
  41. - glLoadIdentity();
  42. - glOrtho(0.0, fbSize.x, 0.0, fbSize.y, -1.0, 1.0);
  43. -
  44. - glBegin(GL_TRIANGLES);
  45. - glColor3f(1, 0, 0);
  46. - glVertex3f(0, 0, 0);
  47. - glColor3f(0, 1, 0);
  48. - glVertex3f(fbSize.x, 0, 0);
  49. - glColor3f(0, 0, 1);
  50. - glVertex3f(0, fbSize.y, 0);
  51. - glEnd();
  52. }