Geoff Lang | 49be2ad | 2014-02-28 13:05:51 -0500 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. |
| 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | |
| 7 | #ifndef SAMPLE_UTIL_SHADER_UTILS_H |
| 8 | #define SAMPLE_UTIL_SHADER_UTILS_H |
| 9 | |
Yuly Novikov | e3352f9 | 2016-08-12 20:40:14 -0400 | [diff] [blame^] | 10 | #include <export.h> |
Martin Radev | 4c4c8e7 | 2016-08-04 12:25:34 +0300 | [diff] [blame] | 11 | #include <GLES3/gl31.h> |
Geoff Lang | 49be2ad | 2014-02-28 13:05:51 -0500 | [diff] [blame] | 12 | #include <GLES3/gl3.h> |
Geoff Lang | 49be2ad | 2014-02-28 13:05:51 -0500 | [diff] [blame] | 13 | #include <GLES2/gl2.h> |
| 14 | #include <GLES2/gl2ext.h> |
| 15 | #include <EGL/egl.h> |
| 16 | #include <EGL/eglext.h> |
| 17 | |
| 18 | #include <string> |
Jamie Madill | ca03b35 | 2015-09-02 12:38:13 -0400 | [diff] [blame] | 19 | #include <vector> |
Geoff Lang | 49be2ad | 2014-02-28 13:05:51 -0500 | [diff] [blame] | 20 | |
| 21 | #define SHADER_SOURCE(...) #__VA_ARGS__ |
| 22 | |
Yuly Novikov | e3352f9 | 2016-08-12 20:40:14 -0400 | [diff] [blame^] | 23 | ANGLE_EXPORT GLuint CompileShader(GLenum type, const std::string &source); |
| 24 | ANGLE_EXPORT GLuint CompileShaderFromFile(GLenum type, const std::string &sourcePath); |
Geoff Lang | 712e3f4 | 2014-03-03 11:14:15 -0500 | [diff] [blame] | 25 | |
Yuly Novikov | e3352f9 | 2016-08-12 20:40:14 -0400 | [diff] [blame^] | 26 | ANGLE_EXPORT GLuint |
| 27 | CompileProgramWithTransformFeedback(const std::string &vsSource, |
| 28 | const std::string &fsSource, |
| 29 | const std::vector<std::string> &transformFeedbackVaryings, |
| 30 | GLenum bufferMode); |
| 31 | ANGLE_EXPORT GLuint CompileProgram(const std::string &vsSource, const std::string &fsSource); |
| 32 | ANGLE_EXPORT GLuint CompileProgramFromFiles(const std::string &vsPath, const std::string &fsPath); |
| 33 | ANGLE_EXPORT GLuint CompileComputeProgram(const std::string &csSource, |
| 34 | bool outputErrorMessages = true); |
| 35 | |
Geoff Lang | 49be2ad | 2014-02-28 13:05:51 -0500 | [diff] [blame] | 36 | #endif // SAMPLE_UTIL_SHADER_UTILS_H |