mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
LibGL: Add Shader and Program class stubs
This commit is contained in:
parent
cd7d2c3446
commit
b975569a40
5 changed files with 126 additions and 0 deletions
28
Userland/Libraries/LibGL/Shaders/Program.h
Normal file
28
Userland/Libraries/LibGL/Shaders/Program.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Stephan Unverwerth <s.unverwerth@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#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();
|
||||
|
||||
ErrorOr<void> attach_shader(Shader&);
|
||||
ErrorOr<void> link();
|
||||
|
||||
private:
|
||||
Vector<NonnullRefPtr<Shader>> m_vertex_shaders;
|
||||
Vector<NonnullRefPtr<Shader>> m_fragment_shaders;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue