2014-08-21 09:27:53 +02:00
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-17 06:38:14 +01:00
|
|
|
// Licensed under GPLv2 or any later version
|
2014-08-21 09:27:53 +02:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-04-09 23:24:37 +02:00
|
|
|
#include <vector>
|
2015-08-30 08:37:42 +02:00
|
|
|
#include <glad/glad.h>
|
2014-08-21 09:27:53 +02:00
|
|
|
|
2015-10-06 04:33:47 +02:00
|
|
|
namespace GLShader {
|
2014-08-21 09:27:53 +02:00
|
|
|
|
2015-10-07 00:10:32 +02:00
|
|
|
/**
|
2018-04-09 23:24:37 +02:00
|
|
|
* Utility function to create and compile an OpenGL GLSL shader
|
|
|
|
* @param source String of the GLSL shader program
|
|
|
|
* @param type Type of the shader (GL_VERTEX_SHADER, GL_GEOMETRY_SHADER or GL_FRAGMENT_SHADER)
|
2015-10-07 00:10:32 +02:00
|
|
|
*/
|
2018-04-09 23:24:37 +02:00
|
|
|
GLuint LoadShader(const char* source, GLenum type);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Utility function to create and link an OpenGL GLSL shader program
|
|
|
|
* @param separable_program whether to create a separable program
|
|
|
|
* @param shaders ID of shaders to attach to the program
|
|
|
|
* @returns Handle of the newly created OpenGL program object
|
|
|
|
*/
|
|
|
|
GLuint LoadProgram(bool separable_program, const std::vector<GLuint>& shaders);
|
2014-08-21 09:27:53 +02:00
|
|
|
|
2018-03-09 18:54:43 +01:00
|
|
|
} // namespace GLShader
|