sdl_gpu_test/private/sdl_gpu_test/glsl_compiler.hpp

32 lines
635 B
C++

#pragma once
#if !defined(SDL_GPU_TEST_PRIVATE_SDL_GPU_TEST_GLSL_COMPILER_HPP_INCLUDED)
#define SDL_GPU_TEST_PRIVATE_SDL_GPU_TEST_GLSL_COMPILER_HPP_INCLUDED 1
#include <cstdint>
#include <string_view>
#include <vector>
namespace sdl_gpu_test
{
enum class ShaderStage
{
VERTEX,
FRAGMENT
};
struct CompileGLSLArgs
{
ShaderStage stage;
};
void initGLSLCompiler();
void cleanupGLSLCompiler() noexcept;
[[nodiscard]]
std::vector<std::uint32_t> compileGLSL(std::string_view source, const CompileGLSLArgs& args);
} // namespace sdl_gpu_test
#endif // !defined(SDL_GPU_TEST_PRIVATE_SDL_GPU_TEST_GLSL_COMPILER_HPP_INCLUDED)