summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGLSL/Compiler.h
blob: b4d4c4be367bfcafc6c750ff13cc4e39ab8570ef (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) 2022, Stephan Unverwerth <s.unverwerth@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <AK/Error.h>
#include <AK/NonnullOwnPtr.h>
#include <AK/String.h>
#include <AK/Vector.h>
#include <LibGLSL/ObjectFile.h>

namespace GLSL {

class Compiler final {
public:
    ErrorOr<NonnullOwnPtr<ObjectFile>> compile(Vector<String> const& sources);

    String messages() const { return m_messages; }

private:
    String m_messages;
};

}