1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.ide.eclipse.gltrace.state; 18 19 /** The type for each OpenGL State Property {@link IGLProperty}. */ 20 public enum GLStateType { 21 // Note: the indentation reflects the state hierarchy. 22 23 GL_STATE("OpenGL State Variables"), 24 GL_STATE_ES1("OpenGL ES 1.1 State"), 25 GL_STATE_ES2("OpenGL ES 2.0 State"), 26 27 VERTEX_ARRAY_DATA("Vertex Array Data"), 28 GENERIC_VERTEX_ATTRIBUTES("Generic Vertex Attributes"), 29 GENERIC_VERTEX_ATTRIBUTE_DATA_COMPOSITE("Generic Vertex Attribute Data"), 30 GENERIC_VERTEX_ATTRIB_V0("x"), 31 GENERIC_VERTEX_ATTRIB_V1("y"), 32 GENERIC_VERTEX_ATTRIB_V2("z"), 33 GENERIC_VERTEX_ATTRIB_V3("w"), 34 35 VERTEX_ATTRIB_ARRAY("Vertex Attrib Array Properties"), 36 VERTEX_ATTRIB_ARRAY_COMPOSITE("Vertex Attrib Array #n Properties"), 37 VERTEX_ATTRIB_ARRAY_ENABLED("Vertex Attrib Array Enable"), 38 VERTEX_ATTRIB_ARRAY_SIZE("Vertex Attrib Array Size"), 39 VERTEX_ATTRIB_ARRAY_STRIDE("Vertex Attrib Array Stride"), 40 VERTEX_ATTRIB_ARRAY_TYPE("Vertex Attrib Array Type"), 41 VERTEX_ATTRIB_ARRAY_NORMALIZED("Vertex Attrib Array Normalized"), 42 VERTEX_ATTRIB_ARRAY_POINTER("Vertex Attrib Array Pointer"), 43 44 BUFFER_BINDINGS("Buffer Bindings"), 45 ARRAY_BUFFER_BINDING("Current Buffer Binding"), 46 ELEMENT_ARRAY_BUFFER_BINDING("Element Array Buffer Binding"), 47 VERTEX_ATTRIB_ARRAY_BUFFER_BINDINGS("Attribute Array Buffer Bindings"), 48 VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_PER_INDEX("Attribute Array Buffer Binding"), 49 50 VBO("Vertex Buffer Objects"), 51 VBO_COMPOSITE("Per VBO State"), 52 BUFFER_SIZE("Size"), 53 BUFFER_USAGE("Usage"), 54 BUFFER_DATA("Data"), 55 BUFFER_TYPE("Type"), 56 57 TRANSFORMATION_STATE("Transformation State"), 58 VIEWPORT("Viewport"), 59 VIEWPORT_X("Lower Left X"), 60 VIEWPORT_Y("Lower Left Y"), 61 VIEWPORT_WIDTH("Width"), 62 VIEWPORT_HEIGHT("Height"), 63 DEPTH_RANGE("Depth Range"), 64 DEPTH_RANGE_NEAR("Near Clipping Plane"), 65 DEPTH_RANGE_FAR("Far Clipping Plane"), 66 67 RASTERIZATION_STATE("Rasterization State"), 68 LINE_WIDTH("Line Width"), 69 CULL_FACE("Polygon Culling Enabled"), 70 CULL_FACE_MODE("Cull front/back facing polygons"), 71 FRONT_FACE("Polygon frontface CW/CCW indicator"), 72 POLYGON_OFFSET_FACTOR("Polygon Offset Factor"), 73 POLYGON_OFFSET_UNITS("Polygon Offset Units"), 74 POLYGON_OFFSET_FILL("Polygon Offset Enable"), 75 76 PIXEL_OPERATIONS("Pixel Operations"), 77 SCISSOR_TEST("Scissoring enabled"), 78 SCISSOR_BOX("Scissor Box"), 79 SCISSOR_BOX_X("Lower Left X"), 80 SCISSOR_BOX_Y("Lower Left Y"), 81 SCISSOR_BOX_WIDTH("Width"), 82 SCISSOR_BOX_HEIGHT("Height"), 83 STENCIL("Stencil"), 84 STENCIL_TEST("Stenciling enabled"), 85 STENCIL_FUNC("Front Stencil Function"), 86 STENCIL_VALUE_MASK("Front Stencil Mask"), 87 STENCIL_REF("Front Stencil Reference Value"), 88 STENCIL_FAIL("Front Stencil Fail Action"), 89 STENCIL_PASS_DEPTH_FAIL("Front stencil depth buffer fail action"), 90 STENCIL_PASS_DEPTH_PASS("Front stencil depth buffer pass action"), 91 STENCIL_BACK_FUNC("Back stencil function"), 92 STENCIL_BACK_VALUE_MASK("Back stencil mask"), 93 STENCIL_BACK_REF("Back stencil reference value"), 94 STENCIL_BACK_FAIL("Back stencil fail action"), 95 STENCIL_BACK_PASS_DEPTH_FAIL("Back stencil depth buffer fail action"), 96 STENCIL_BACK_PASS_DEPTH_PASS("Back stencil depth buffer pass action"), 97 DEPTH_TEST("Depth buffer enabled"), 98 DEPTH_FUNC("Depth buffer test function"), 99 BLEND("Blending"), 100 BLEND_ENABLED("Enabled"), 101 BLEND_SRC_RGB("Source RGB function"), 102 BLEND_SRC_ALPHA("Source A function"), 103 BLEND_DST_RGB("Dest. RGB function"), 104 BLEND_DST_ALPHA("Dest. A function"), 105 BLEND_EQUATION_RGB("RGB Equation"), 106 BLEND_EQUATION_ALPHA("Alpha Equation"), 107 DITHER("Dithering enabled"), 108 109 PIXEL_PACKING("Pixel Packing"), 110 PACK_ALIGNMENT("Pack Alignment"), 111 UNPACK_ALIGNMENT("Unpack Alignment"), 112 113 TEXTURE_STATE("Texture State"), 114 ACTIVE_TEXTURE_UNIT("Active Texture Unit"), 115 TEXTURE_UNITS("Texture Units"), 116 PER_TEXTURE_UNIT_STATE("Texture Unit Properties"), 117 TEXTURE_BINDING_2D("TEXTURE_2D Binding"), 118 TEXTURE_BINDING_CUBE_MAP("TEXTURE_CUBE_MAP Binding"), 119 TEXTURE_BINDING_EXTERNAL("TEXTURE_EXTERNAL Binding"), 120 TEXTURES("Textures"), 121 PER_TEXTURE_STATE("Per Texture State"), 122 TEXTURE_MIN_FILTER("Minification Function"), 123 TEXTURE_MAG_FILTER("Magnification Function"), 124 TEXTURE_WRAP_S("Texcoord s Wrap Mode"), 125 TEXTURE_WRAP_T("Texcoord t Wrap Mode"), 126 TEXTURE_MIPMAPS("Texture Mipmap State"), 127 PER_TEXTURE_LEVEL_STATE("Per Texture Level State"), 128 TEXTURE_FORMAT("Format"), 129 TEXTURE_WIDTH("Width"), 130 TEXTURE_HEIGHT("Height"), 131 TEXTURE_IMAGE_TYPE("Image Type"), 132 TEXTURE_IMAGE("Image"), 133 134 PROGRAM_STATE("Program Object State"), 135 CURRENT_PROGRAM("Current Program"), 136 PROGRAMS("Programs"), 137 PER_PROGRAM_STATE("Per Program State"), 138 ATTACHED_SHADERS("Attached Shaders"), 139 ATTACHED_SHADER_ID("Attached Shader ID"), 140 ACTIVE_ATTRIBUTES("Attributes"), 141 PER_ATTRIBUTE_STATE("Per Attribute State"), 142 ATTRIBUTE_NAME("Name"), 143 ATTRIBUTE_TYPE("Type"), 144 ATTRIBUTE_SIZE("Size"), 145 ATTRIBUTE_VALUE("Value"), 146 ACTIVE_UNIFORMS("Uniforms"), 147 PER_UNIFORM_STATE("Per Uniform State"), 148 UNIFORM_NAME("Name"), 149 UNIFORM_TYPE("Type"), 150 UNIFORM_SIZE("Size"), 151 UNIFORM_VALUE("Value"), 152 153 SHADERS("Shader Objects"), 154 PER_SHADER_STATE("Per Shader State"), 155 SHADER_TYPE("Shader Type"), 156 SHADER_SOURCE("Source"), 157 158 FRAMEBUFFER_STATE("Framebuffer State"), 159 FRAMEBUFFER_BINDING("Framebuffer Binding"), 160 FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE("Framebuffer object type"), 161 FRAMEBUFFER_ATTACHMENT_OBJECT_NAME("Framebuffer object name"), 162 FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL("Framebuffer texture level"), 163 FRAMEBUFFER_ATTACHEMENT_TEXTURE_CUBE_MAP_FACE("Framebuffer texture cubemap face"); 164 165 private final String mDescription; 166 167 GLStateType(String description) { 168 mDescription = description; 169 } 170 171 public String getDescription() { 172 return mDescription; 173 } 174 } 175