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
|
|
|
|
|
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-07-26 03:13:11 +02:00
|
|
|
enum Attributes {
|
2015-10-21 06:03:22 +02:00
|
|
|
ATTRIBUTE_POSITION,
|
|
|
|
ATTRIBUTE_COLOR,
|
|
|
|
ATTRIBUTE_TEXCOORD0,
|
|
|
|
ATTRIBUTE_TEXCOORD1,
|
|
|
|
ATTRIBUTE_TEXCOORD2,
|
2016-04-19 00:53:42 +02:00
|
|
|
ATTRIBUTE_TEXCOORD0_W,
|
2015-11-12 23:33:21 +01:00
|
|
|
ATTRIBUTE_NORMQUAT,
|
|
|
|
ATTRIBUTE_VIEW,
|
2015-07-26 03:13:11 +02:00
|
|
|
};
|
|
|
|
|
2015-10-07 00:10:32 +02:00
|
|
|
/**
|
|
|
|
* Utility function to create and compile an OpenGL GLSL shader program (vertex + fragment shader)
|
|
|
|
* @param vertex_shader String of the GLSL vertex shader program
|
|
|
|
* @param fragment_shader String of the GLSL fragment shader program
|
|
|
|
* @returns Handle of the newly created OpenGL shader object
|
|
|
|
*/
|
|
|
|
GLuint LoadProgram(const char* vertex_shader, const char* fragment_shader);
|
2014-08-21 09:27:53 +02:00
|
|
|
|
2015-10-06 04:33:47 +02:00
|
|
|
} // namespace
|