Home | History | Annotate | Download | only in state
      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_SWIZZLE_R("Red Component Swizzle"),
    123                 TEXTURE_SWIZZLE_G("Green Component Swizzle"),
    124                 TEXTURE_SWIZZLE_B("Blue Component Swizzle"),
    125                 TEXTURE_SWIZZLE_A("Alpha Component Swizzle"),
    126                 TEXTURE_MIN_FILTER("Minification Function"),
    127                 TEXTURE_MAG_FILTER("Magnification Function"),
    128                 TEXTURE_WRAP_S("Texcoord s Wrap Mode"),
    129                 TEXTURE_WRAP_T("Texcoord t Wrap Mode"),
    130                 TEXTURE_WRAP_R("Texcoord r Wrap Mode"),
    131                 TEXTURE_MIN_LOD("Min Level of Detail"),
    132                 TEXTURE_MAX_LOD("Max Level of Detail"),
    133                 TEXTURE_BASE_LEVEL("Base Texture Array"),
    134                 TEXTURE_MAX_LEVEL("Max Texture Array Level"),
    135                 TEXTURE_COMPARE_MODE("Comparison Mode"),
    136                 TEXTURE_COMPARE_FUNC("Comparison Function"),
    137                 TEXTURE_IMMUTABLE_FORMAT("Size and format immutable?"),
    138                 TEXTURE_IMMUTABLE_LEVELS("# of levels in immutable textures"),
    139                 TEXTURE_MIPMAPS("Texture Mipmap State"),
    140                     PER_TEXTURE_LEVEL_STATE("Per Texture Level State"),
    141                         TEXTURE_FORMAT("Format"),
    142                         TEXTURE_WIDTH("Width"),
    143                         TEXTURE_HEIGHT("Height"),
    144                         TEXTURE_IMAGE_TYPE("Image Type"),
    145                         TEXTURE_IMAGE("Image"),
    146 
    147     PROGRAM_STATE("Program Object State"),
    148         CURRENT_PROGRAM("Current Program"),
    149         PROGRAMS("Programs"),
    150             PER_PROGRAM_STATE("Per Program State"),
    151                 ATTACHED_SHADERS("Attached Shaders"),
    152                     ATTACHED_SHADER_ID("Attached Shader ID"),
    153                 ACTIVE_ATTRIBUTES("Attributes"),
    154                     PER_ATTRIBUTE_STATE("Per Attribute State"),
    155                         ATTRIBUTE_NAME("Name"),
    156                         ATTRIBUTE_TYPE("Type"),
    157                         ATTRIBUTE_SIZE("Size"),
    158                         ATTRIBUTE_VALUE("Value"),
    159                 ACTIVE_UNIFORMS("Uniforms"),
    160                     PER_UNIFORM_STATE("Per Uniform State"),
    161                         UNIFORM_NAME("Name"),
    162                         UNIFORM_TYPE("Type"),
    163                         UNIFORM_SIZE("Size"),
    164                         UNIFORM_VALUE("Value"),
    165 
    166     SHADERS("Shader Objects"),
    167         PER_SHADER_STATE("Per Shader State"),
    168             SHADER_TYPE("Shader Type"),
    169             SHADER_SOURCE("Source"),
    170 
    171     FRAMEBUFFER_STATE("Framebuffer State"),
    172         FRAMEBUFFER_BINDING("Framebuffer Binding"),
    173         FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE("Framebuffer object type"),
    174         FRAMEBUFFER_ATTACHMENT_OBJECT_NAME("Framebuffer object name"),
    175         FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL("Framebuffer texture level"),
    176         FRAMEBUFFER_ATTACHEMENT_TEXTURE_CUBE_MAP_FACE("Framebuffer texture cubemap face");
    177 
    178     private final String mDescription;
    179 
    180     GLStateType(String description) {
    181         mDescription = description;
    182     }
    183 
    184     public String getDescription() {
    185         return mDescription;
    186     }
    187 }
    188