blob: 3fdb74706f7a987eedc254319b874cd81ada4513 [file] [log] [blame]
Geoff Lang49be2ad2014-02-28 13:05:51 -05001//
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#define GL_GLEXT_PROTOTYPES
11
12#include <GLES3/gl3.h>
13#include <GLES3/gl3ext.h>
14#include <GLES2/gl2.h>
15#include <GLES2/gl2ext.h>
16#include <EGL/egl.h>
17#include <EGL/eglext.h>
18
19#include <string>
Jamie Madillca03b352015-09-02 12:38:13 -040020#include <vector>
Geoff Lang49be2ad2014-02-28 13:05:51 -050021
22#define SHADER_SOURCE(...) #__VA_ARGS__
23
24GLuint CompileShader(GLenum type, const std::string &source);
Geoff Lang712e3f42014-03-03 11:14:15 -050025GLuint CompileShaderFromFile(GLenum type, const std::string &sourcePath);
26
Jamie Madillca03b352015-09-02 12:38:13 -040027GLuint CompileProgramWithTransformFeedback(
28 const std::string &vsSource,
29 const std::string &fsSource,
30 const std::vector<std::string> &transformFeedbackVaryings,
31 GLenum bufferMode);
Geoff Lang49be2ad2014-02-28 13:05:51 -050032GLuint CompileProgram(const std::string &vsSource, const std::string &fsSource);
Geoff Lang712e3f42014-03-03 11:14:15 -050033GLuint CompileProgramFromFiles(const std::string &vsPath, const std::string &fsPath);
Geoff Lang49be2ad2014-02-28 13:05:51 -050034
35#endif // SAMPLE_UTIL_SHADER_UTILS_H