/* * Copyright (c) 2022, Stephan Unverwerth * * SPDX-License-Identifier: BSD-2-Clause */ #include #include namespace GL { NonnullRefPtr Shader::create(GLenum shader_type) { return adopt_ref(*new Shader(shader_type)); } ErrorOr Shader::add_source(StringView source_code) { auto source_code_content = TRY(String::from_utf8(source_code)); TRY(m_sources.try_append(move(source_code_content))); return {}; } ErrorOr Shader::compile() { // FIXME: Implement actual shader compilation m_compile_status = true; return {}; } }