summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/DepthBuffer.h
blob: 3ce1b6acc5f5e5829f33f81f7d30fa6a704d8ccc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org>
 *
 * 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 };
};

}