A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using osu.Framework.Graphics.OpenGL.Buffers;
5using osuTK;
6using osuTK.Graphics;
7
8namespace osu.Framework.Graphics
9{
10 /// <summary>
11 /// Interface for <see cref="Drawable"/>s which can be drawn by a <see cref="BufferedDrawNode"/>.
12 /// </summary>
13 public interface IBufferedDrawable : ITexturedShaderDrawable
14 {
15 /// <summary>
16 /// The background colour of the <see cref="FrameBuffer"/>s.
17 /// Visually changes the colour which rendered alpha is blended against.
18 /// </summary>
19 /// <remarks>
20 /// This should generally be transparent-black or transparent-white, but can also be used to
21 /// colourise the background colour of the <see cref="FrameBuffer"/> with non-transparent colours.
22 /// </remarks>
23 Color4 BackgroundColour { get; }
24
25 /// <summary>
26 /// The colour with which the <see cref="FrameBuffer"/>s are rendered to the screen.
27 /// A null value implies the <see cref="FrameBuffer"/>s should be drawn as they are.
28 /// </summary>
29 DrawColourInfo? FrameBufferDrawColour { get; }
30
31 /// <summary>
32 /// The scale of the <see cref="FrameBuffer"/>s drawn relative to the size of this <see cref="IBufferedDrawable"/>.
33 /// </summary>
34 /// <remarks>
35 /// The contents of the <see cref="FrameBuffer"/>s are populated at this scale, however the scale of <see cref="Drawable"/>s remains unaffected.
36 /// </remarks>
37 Vector2 FrameBufferScale { get; }
38 }
39}