// // Copyright 2002 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 COMPILER_TRANSLATOR_GLSL_VERSIONGLSL_H_ #define COMPILER_TRANSLATOR_GLSL_VERSIONGLSL_H_ #include "compiler/translator/tree_util/IntermTraverse.h" #include "compiler/translator/Pragma.h" namespace sh { static const int GLSL_VERSION_110 = …; static const int GLSL_VERSION_120 = …; static const int GLSL_VERSION_130 = …; static const int GLSL_VERSION_140 = …; static const int GLSL_VERSION_150 = …; static const int GLSL_VERSION_330 = …; static const int GLSL_VERSION_400 = …; static const int GLSL_VERSION_410 = …; static const int GLSL_VERSION_420 = …; static const int GLSL_VERSION_430 = …; static const int GLSL_VERSION_440 = …; static const int GLSL_VERSION_450 = …; int ShaderOutputTypeToGLSLVersion(ShShaderOutput output); // Traverses the intermediate tree to return the minimum GLSL version // required to legally access all built-in features used in the shader. // GLSL 1.1 which is mandated by OpenGL 2.0 provides: // - #version and #extension to declare version and extensions. // - built-in functions refract, exp, and log. // - updated step() to compare x < edge instead of x <= edge. // GLSL 1.2 which is mandated by OpenGL 2.1 provides: // - many changes to reduce differences when compared to the ES specification. // - invariant keyword and its support. // - c++ style name hiding rules. // - built-in variable gl_PointCoord for fragment shaders. // - matrix constructors taking matrix as argument. // - array as "out" function parameters // // TODO: ES3 equivalent versions of GLSL class TVersionGLSL : public TIntermTraverser { … }; } // namespace sh #endif // COMPILER_TRANSLATOR_GLSL_VERSIONGLSL_H_