1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "GLDebugUtils.h"
13 GLenumToStr(GLenum e
) {
15 #define HANDLE_GL_ENUM(x) case LOCAL_##x: return #x
16 HANDLE_GL_ENUM(GL_TRIANGLES
);
17 HANDLE_GL_ENUM(GL_TRIANGLE_STRIP
);
18 HANDLE_GL_ENUM(GL_TRIANGLE_FAN
);
19 HANDLE_GL_ENUM(GL_FRAMEBUFFER
);
20 HANDLE_GL_ENUM(GL_RENDERBUFFER
);
21 HANDLE_GL_ENUM(GL_DEPTH_ATTACHMENT
);
22 HANDLE_GL_ENUM(GL_STENCIL_ATTACHMENT
);
23 HANDLE_GL_ENUM(GL_DEPTH_STENCIL_ATTACHMENT
);
24 HANDLE_GL_ENUM(GL_TEXTURE_2D
);
25 HANDLE_GL_ENUM(GL_TEXTURE_CUBE_MAP_NEGATIVE_X
);
26 HANDLE_GL_ENUM(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
);
27 HANDLE_GL_ENUM(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
);
28 HANDLE_GL_ENUM(GL_TEXTURE_CUBE_MAP_POSITIVE_X
);
29 HANDLE_GL_ENUM(GL_TEXTURE_CUBE_MAP_POSITIVE_Y
);
30 HANDLE_GL_ENUM(GL_TEXTURE_CUBE_MAP_POSITIVE_Z
);
31 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT0
);
32 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT1
);
33 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT2
);
34 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT3
);
35 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT4
);
36 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT5
);
37 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT6
);
38 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT7
);
39 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT8
);
40 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT9
);
41 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT10
);
42 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT11
);
43 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT12
);
44 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT13
);
45 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT14
);
46 HANDLE_GL_ENUM(GL_COLOR_ATTACHMENT15
);
47 HANDLE_GL_ENUM(GL_UNSIGNED_BYTE
);
48 HANDLE_GL_ENUM(GL_UNSIGNED_SHORT
);
49 HANDLE_GL_ENUM(GL_UNSIGNED_INT
);
50 HANDLE_GL_ENUM(GL_RGBA
);
51 HANDLE_GL_ENUM(GL_DEPTH_COMPONENT
);
59 } // namespace mozilla