webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
shader_utils.h
Go to the documentation of this file.
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 
10 #include <export.h>
11 #include <GLES3/gl31.h>
12 #include <GLES3/gl3.h>
13 #include <GLES2/gl2.h>
14 #include <GLES2/gl2ext.h>
15 #include <EGL/egl.h>
16 #include <EGL/eglext.h>
17 
18 #include <string>
19 #include <vector>
20 
21 #define SHADER_SOURCE(...) #__VA_ARGS__
22 
25 
28  const std::string &fsSource,
29  const std::vector<std::string> &transformFeedbackVaryings,
31 ANGLE_EXPORT GLuint CompileProgram(const std::string &vsSource, const std::string &fsSource);
34  bool outputErrorMessages = true);
35 
36 #endif // SAMPLE_UTIL_SHADER_UTILS_H
ANGLE_EXPORT GLuint CompileProgramWithTransformFeedback(const std::string &vsSource, const std::string &fsSource, const std::vector< std::string > &transformFeedbackVaryings, GLenum bufferMode)
Definition: shader_utils.cpp:114
GLsizei GLsizei GLchar * source
Definition: gl2.h:451
ANGLE_EXPORT GLuint CompileComputeProgram(const std::string &csSource, bool outputErrorMessages=true)
Definition: shader_utils.cpp:175
ANGLE_EXPORT GLuint CompileShaderFromFile(GLenum type, const std::string &sourcePath)
Definition: shader_utils.cpp:69
unsigned int GLenum
Definition: gl2.h:69
#define ANGLE_EXPORT
Definition: export.h:27
ANGLE_EXPORT GLuint CompileShader(GLenum type, const std::string &source)
Definition: shader_utils.cpp:33
GLsizei const GLchar *const GLenum bufferMode
Definition: gl3.h:1030
unsigned int GLuint
Definition: gl2.h:70
ANGLE_EXPORT GLuint CompileProgramFromFiles(const std::string &vsPath, const std::string &fsPath)
Definition: shader_utils.cpp:163
EGLenum type
Definition: eglext.h:63
GLsizei const GLchar *const * string
Definition: gl2.h:479
ANGLE_EXPORT GLuint CompileProgram(const std::string &vsSource, const std::string &fsSource)
Definition: shader_utils.cpp:157