LDRenderer.hh 1003 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef LDRENDERER_HH
  2. #define LDRENDERER_HH
  3. #include "EmuTime.hh"
  4. namespace openmsx {
  5. class RawFrame;
  6. /** Abstract base class for LDRenderers.
  7. * A LDRenderer is a class that converts VDP state to visual
  8. * information (for example, pixels on a screen).
  9. *
  10. * The update methods are called exactly before the change occurs in
  11. * the VDP, so that the renderer can update itself to the specified
  12. * time using the old settings.
  13. */
  14. class LDRenderer
  15. {
  16. public:
  17. virtual ~LDRenderer() = default;
  18. /** Signals the start of a new frame.
  19. * The LDRenderer can use this to get fixed-per-frame settings from
  20. * the VDP, such as PAL/NTSC timing.
  21. * @param time The moment in emulated time the frame starts.
  22. */
  23. virtual void frameStart(EmuTime::param time) = 0;
  24. /** Signals the end of a frame.
  25. */
  26. virtual void frameEnd() = 0;
  27. virtual void drawBlank(int r, int g, int b) = 0;
  28. virtual RawFrame* getRawFrame() = 0;
  29. protected:
  30. LDRenderer() = default;
  31. };
  32. } // namespace openmsx
  33. #endif