
This introduces a new library, LibSoftGPU, that incorporates all rendering related features that formerly resided within LibGL itself. Going forward we will make both libraries completely independent from each other allowing LibGL to load different, possibly accelerated, rendering backends.
29 lines
483 B
C++
29 lines
483 B
C++
/*
|
|
* Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibGfx/Rect.h>
|
|
#include <LibGfx/Size.h>
|
|
|
|
namespace SoftGPU {
|
|
|
|
class DepthBuffer final {
|
|
public:
|
|
DepthBuffer(Gfx::IntSize const&);
|
|
~DepthBuffer();
|
|
|
|
float* scanline(int y);
|
|
|
|
void clear(float depth);
|
|
void clear(Gfx::IntRect bounds, float depth);
|
|
|
|
private:
|
|
Gfx::IntSize m_size;
|
|
float* m_data { nullptr };
|
|
};
|
|
|
|
}
|