1 // 2 // Copyright 2019 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 // gl_enum_utils.h: 7 // Utility functions for converting GLenums to string. 8 9 #ifndef LIBANGLE_GL_ENUM_UTILS_H_ 10 #define LIBANGLE_GL_ENUM_UTILS_H_ 11 12 #include <ostream> 13 #include <string> 14 15 #include "common/gl_enum_utils_autogen.h" 16 17 namespace gl 18 { 19 const char *GLbooleanToString(unsigned int value); 20 const char *GLenumToString(GLESEnum enumGroup, unsigned int value); 21 const char *GLenumToString(BigGLEnum enumGroup, unsigned int value); 22 std::string GLbitfieldToString(GLESEnum enumGroup, unsigned int value); 23 std::string GLbitfieldToString(BigGLEnum enumGroup, unsigned int value); 24 void OutputGLenumString(std::ostream &out, GLESEnum enumGroup, unsigned int value); 25 void OutputGLenumString(std::ostream &out, BigGLEnum enumGroup, unsigned int value); 26 void OutputGLbitfieldString(std::ostream &out, GLESEnum enumGroup, unsigned int value); 27 const char *GLinternalFormatToString(unsigned int format); 28 unsigned int StringToGLenum(const char *str); 29 unsigned int StringToGLbitfield(const char *str); 30 31 extern const char kUnknownGLenumString[]; 32 } // namespace gl 33 34 #endif // LIBANGLE_GL_ENUM_UTILS_H_ 35