Hash :
dbb9c534
Author :
Date :
2018-02-25T19:58:24
GLES1: state: Define / initialize GLES1-specific states Contains definitions of GLES1-specific states such as material / lighting. Tweaked the Color class for easier copying to uniforms / reading as a float array. This CL also adds the GLES1-specific state in GLES1State, which is then part of the State class and is initialized to the spec's values if the context major version is ES 1. + Some clang-format BUG=angleproject:2306 Change-Id: I7fc3bd9a22ebf0ffcd98d931d0176f21e17b1c5c Reviewed-on: https://chromium-review.googlesource.com/936424 Commit-Queue: Lingfeng Yang <lfy@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
{
"AlphaTestFunc":
{
"Never": "GL_NEVER",
"AlwaysPass": "GL_ALWAYS",
"Less": "GL_LESS",
"Lequal": "GL_LEQUAL",
"Equal": "GL_EQUAL",
"Gequal": "GL_GEQUAL",
"Greater": "GL_GREATER",
"NotEqual": "GL_NOTEQUAL"
},
"BufferBinding":
{
"Array": "GL_ARRAY_BUFFER",
"AtomicCounter": "GL_ATOMIC_COUNTER_BUFFER",
"CopyRead": "GL_COPY_READ_BUFFER",
"CopyWrite": "GL_COPY_WRITE_BUFFER",
"DispatchIndirect": "GL_DISPATCH_INDIRECT_BUFFER",
"DrawIndirect": "GL_DRAW_INDIRECT_BUFFER",
"ElementArray": "GL_ELEMENT_ARRAY_BUFFER",
"PixelPack": "GL_PIXEL_PACK_BUFFER",
"PixelUnpack": "GL_PIXEL_UNPACK_BUFFER",
"ShaderStorage": "GL_SHADER_STORAGE_BUFFER",
"TransformFeedback": "GL_TRANSFORM_FEEDBACK_BUFFER",
"Uniform": "GL_UNIFORM_BUFFER"
},
"BufferUsage":
{
"DynamicCopy": "GL_DYNAMIC_COPY",
"DynamicDraw": "GL_DYNAMIC_DRAW",
"DynamicRead": "GL_DYNAMIC_READ",
"StaticCopy": "GL_STATIC_COPY",
"StaticDraw": "GL_STATIC_DRAW",
"StaticRead": "GL_STATIC_READ",
"StreamCopy": "GL_STREAM_COPY",
"StreamDraw": "GL_STREAM_DRAW",
"StreamRead": "GL_STREAM_READ"
},
"CullFaceMode":
{
"Back": "GL_BACK",
"Front": "GL_FRONT",
"FrontAndBack": "GL_FRONT_AND_BACK"
},
"FogMode":
{
"Exp": "GL_EXP",
"Exp2": "GL_EXP2",
"Linear": "GL_LINEAR"
},
"HintSetting":
{
"DontCare" : "GL_DONT_CARE",
"Nicest" : "GL_NICEST",
"Fastest" : "GL_FASTEST"
},
"LogicalOperation":
{
"Clear" : "GL_CLEAR",
"And" : "GL_AND",
"AndReverse" : "GL_AND_REVERSE",
"Copy" : "GL_COPY",
"AndInverted" : "GL_AND_INVERTED",
"Noop" : "GL_NOOP",
"Xor" : "GL_XOR",
"Or" : "GL_OR",
"Nor" : "GL_NOR",
"Equiv" : "GL_EQUIV",
"Invert" : "GL_INVERT",
"OrReverse" : "GL_OR_REVERSE",
"CopyInverted" : "GL_COPY_INVERTED",
"OrInverted" : "GL_OR_INVERTED",
"Nand" : "GL_NAND",
"Set" : "GL_SET"
},
"MatrixType":
{
"Modelview" : "GL_MODELVIEW",
"Projection" : "GL_PROJECTION",
"Texture" : "GL_TEXTURE"
},
"ShadingModel":
{
"Flat" : "GL_FLAT",
"Smooth" : "GL_SMOOTH"
},
"TextureCombine":
{
"Replace" : "GL_REPLACE",
"Modulate" : "GL_MODULATE",
"Add" : "GL_ADD",
"AddSigned" : "GL_ADD_SIGNED",
"Interpolate" : "GL_INTERPOLATE",
"Subtract" : "GL_SUBTRACT",
"Dot3Rgb" : "GL_DOT3_RGB",
"Dot3Rgba" : "GL_DOT3_RGBA"
},
"TextureEnvMode":
{
"Replace" : "GL_REPLACE",
"Modulate" : "GL_MODULATE",
"Decal" : "GL_DECAL",
"Blend" : "GL_BLEND",
"Add" : "GL_ADD",
"Combine" : "GL_COMBINE"
},
"TextureOp":
{
"SrcColor" : "GL_SRC_COLOR",
"OneMinusSrcColor" : "GL_ONE_MINUS_SRC_COLOR",
"SrcAlpha" : "GL_SRC_ALPHA",
"OneMinusSrcAlpha" : "GL_ONE_MINUS_SRC_ALPHA"
},
"TextureSrc":
{
"Texture" : "GL_TEXTURE",
"Constant" : "GL_CONSTANT",
"PrimaryColor" : "GL_PRIMARY_COLOR",
"Previous" : "GL_PREVIOUS"
},
"TextureType":
[
{"name": "_2D", "gl_name": "GL_TEXTURE_2D", "value": 0},
{"name": "_2DArray", "gl_name": "GL_TEXTURE_2D_ARRAY","value": 1},
{"name": "_2DMultisample", "gl_name": "GL_TEXTURE_2D_MULTISAMPLE","value": 2},
{"name": "_3D", "gl_name": "GL_TEXTURE_3D","value": 3},
{"name": "External", "gl_name": "GL_TEXTURE_EXTERNAL_OES","value": 4},
{"name": "Rectangle", "gl_name": "GL_TEXTURE_RECTANGLE_ANGLE","value": 5},
{"name": "CubeMap", "gl_name": "GL_TEXTURE_CUBE_MAP", "value": 6}
],
"TextureTarget":
[
{"name": "_2D", "gl_name": "GL_TEXTURE_2D", "value": 0},
{"name": "_2DArray", "gl_name": "GL_TEXTURE_2D_ARRAY", "value": 1},
{"name": "_2DMultisample", "gl_name": "GL_TEXTURE_2D_MULTISAMPLE", "value": 2},
{"name": "_3D", "gl_name": "GL_TEXTURE_3D", "value": 3},
{"name": "External", "gl_name": "GL_TEXTURE_EXTERNAL_OES", "value": 4},
{"name": "Rectangle", "gl_name": "GL_TEXTURE_RECTANGLE_ANGLE", "value": 5},
{"name": "CubeMapPositiveX", "gl_name": "GL_TEXTURE_CUBE_MAP_POSITIVE_X", "value": 6},
{"name": "CubeMapNegativeX", "gl_name": "GL_TEXTURE_CUBE_MAP_NEGATIVE_X", "value": 7},
{"name": "CubeMapPositiveY", "gl_name": "GL_TEXTURE_CUBE_MAP_POSITIVE_Y", "value": 8},
{"name": "CubeMapNegativeY", "gl_name": "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y", "value": 9},
{"name": "CubeMapPositiveZ", "gl_name": "GL_TEXTURE_CUBE_MAP_POSITIVE_Z", "value": 10},
{"name": "CubeMapNegativeZ", "gl_name": "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z", "value": 11}
],
"VertexArrayType":
{
"Vertex" : "GL_VERTEX_ARRAY",
"Normal" : "GL_NORMAL_ARRAY",
"Color" : "GL_COLOR_ARRAY",
"PointSize" : "GL_POINT_SIZE_ARRAY_OES",
"TextureCoord" : "GL_TEXTURE_COORD_ARRAY"
}
}