-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.h
38 lines (31 loc) · 1.37 KB
/
Program.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef FAGL_PROGRAM_H
#define FAGL_PROGRAM_H
#include "FAGL.h"
namespace fagl {
/// <summary>
/// Reads the contents of a shader file.
/// </summary>
/// <param name="fileName"></param>
/// <param name="data"></param>
/// <returns> Whether reading was successful or not.</returns>
bool ReadDataFromFile(const std::string& fileName, std::string& data);
/// <summary>
/// Reads shader file.
/// </summary>
/// <param name="shaderName"> Name of the shader file.</param>
/// <param name="shaderType"> Type of the shader file.</param>
/// <returns> Pointer to the read shader.</returns>
GLuint CreateShader(const std::string shaderName, CREATE_SHADER_TYPE shaderType);
/// <summary>
/// Creates a program and binds given shaders to it.
/// </summary>
/// <param name="vs"> Path of the vertex shader.</param>
/// <param name="tcs"> Path of the tessellation control shader.</param>
/// <param name="tes"> Path of the tessellation evaluation shader.</param>
/// <param name="gs"> Path of the geometry shader.</param>
/// <param name="fs"> Path of the fragment shader.</param>
/// <returns> Pointer to the program.</returns>
GLuint CreateProgram(const std::string vs = std::string(""), const std::string tcs = std::string(""), const std::string tes = std::string(""), const std::string gs = std::string(""), const std::string fs = std::string(""));
}
#include "Program.inl"
#endif