ladybird/Userland/Libraries/LibGL/Shaders/Program.h

31 lines
635 B
C
Raw Normal View History

/*
* Copyright (c) 2022, Stephan Unverwerth <s.unverwerth@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
2022-08-28 11:47:58 +02:00
#include <AK/Error.h>
#include <AK/NonnullRefPtr.h>
#include <AK/RefCounted.h>
#include <AK/Vector.h>
#include <LibGL/Shaders/Shader.h>
namespace GL {
class Program final : public RefCounted<Program> {
public:
static NonnullRefPtr<Program> create();
2022-08-28 11:47:58 +02:00
bool is_shader_attached(Shader const&) const;
ErrorOr<void> attach_shader(Shader&);
ErrorOr<void> link();
private:
Vector<NonnullRefPtr<Shader>> m_vertex_shaders;
Vector<NonnullRefPtr<Shader>> m_fragment_shaders;
};
}