1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:47:45 +00:00

LibGL: Add depth buffer class

This commit is contained in:
Stephan Unverwerth 2021-05-08 22:18:34 +02:00 committed by Andreas Kling
parent a8fc4be47a
commit 608f81e6c2
3 changed files with 64 additions and 0 deletions

View file

@ -0,0 +1,27 @@
/*
* Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@gmx.de>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGfx/Size.h>
namespace GL {
class DepthBuffer final {
public:
DepthBuffer(Gfx::IntSize const&);
~DepthBuffer();
float* scanline(int y);
void clear(float depth);
private:
Gfx::IntSize m_size;
float* m_data { nullptr };
};
}