Edit

kc3-lang/angle/util/shader_utils.h

Branch :

  • Show log

    Commit

  • Author : Geoff Lang
    Date : 2015-09-15 13:12:07
    Hash : ee48376c
    Message : Update to the latest versions of the GL and EGL headers. Add GLES 3.1 and 3.2 headers. Remove GLES 3.0 extension headers and entry point files. Re-land fixes double define from different style defines in libGLESv2.gypi and other projects. Re-land fixes missing defines in angle_util project in gn. Change-Id: I1952413cd4390e6f5450df809f8f5867bf6f49e2 Reviewed-on: https://chromium-review.googlesource.com/299771 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>

  • util/shader_utils.h
  • //
    // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style license that can be
    // found in the LICENSE file.
    //
    
    #ifndef SAMPLE_UTIL_SHADER_UTILS_H
    #define SAMPLE_UTIL_SHADER_UTILS_H
    
    #include <GLES3/gl3.h>
    #include <GLES2/gl2.h>
    #include <GLES2/gl2ext.h>
    #include <EGL/egl.h>
    #include <EGL/eglext.h>
    
    #include <string>
    #include <vector>
    
    #define SHADER_SOURCE(...) #__VA_ARGS__
    
    GLuint CompileShader(GLenum type, const std::string &source);
    GLuint CompileShaderFromFile(GLenum type, const std::string &sourcePath);
    
    GLuint CompileProgramWithTransformFeedback(
        const std::string &vsSource,
        const std::string &fsSource,
        const std::vector<std::string> &transformFeedbackVaryings,
        GLenum bufferMode);
    GLuint CompileProgram(const std::string &vsSource, const std::string &fsSource);
    GLuint CompileProgramFromFiles(const std::string &vsPath, const std::string &fsPath);
    
    #endif // SAMPLE_UTIL_SHADER_UTILS_H