Rename PixelBuffer to Pixmap

This commit is contained in:
Elias Batek 2023-12-27 17:06:29 +01:00
parent c9b6c20220
commit 604d806c1e
1 changed files with 8 additions and 5 deletions

View File

@ -166,7 +166,7 @@ import arsd.simpledisplay;
- Additional renderer implementations: - Additional renderer implementations:
- a `ScreenPainter`-based renderer - a `ScreenPainter`-based renderer
- a legacy OpenGL renderer (maybe) - a legacy OpenGL renderer (maybe)
- Is there something in arsd that serves a similar purpose to `PixelBuffer`? - Is there something in arsd that serves a similar purpose to `Pixmap`?
- Minimum window size - Minimum window size
- or something similar - or something similar
- to ensure `Scaling.integer` doesnt break unexpectedly - to ensure `Scaling.integer` doesnt break unexpectedly
@ -210,7 +210,7 @@ auto ref T typeCast(T, S)(auto ref S v) {
/++ /++
Pixel data container Pixel data container
+/ +/
struct PixelBuffer { struct Pixmap {
/// Pixel data /// Pixel data
Pixel[] data; Pixel[] data;
@ -428,7 +428,7 @@ struct PresenterConfig {
// undocumented // undocumented
struct PresenterObjects { struct PresenterObjects {
PixelBuffer framebuffer; Pixmap framebuffer;
SimpleWindow window; SimpleWindow window;
PresenterConfig config; PresenterConfig config;
} }
@ -772,7 +772,7 @@ final class PixmapPresenter {
_renderer = renderer; _renderer = renderer;
// create software framebuffer // create software framebuffer
auto framebuffer = PixelBuffer(config.renderer.resolution); auto framebuffer = Pixmap(config.renderer.resolution);
// OpenGL? // OpenGL?
auto openGlOptions = OpenGlOptions.no; auto openGlOptions = OpenGlOptions.no;
@ -904,10 +904,13 @@ final class PixmapPresenter {
} }
/// ///
PixelBuffer framebuffer() @safe pure nothrow @nogc { Pixmap pixmap() @safe pure nothrow @nogc {
return _pro.framebuffer; return _pro.framebuffer;
} }
/// ditto
alias framebuffer = pixmap;
/// ///
void reconfigure(const PresenterConfig config) { void reconfigure(const PresenterConfig config) {
assert(false, "Not implemented"); assert(false, "Not implemented");