private static void initialize() {
constantMap = new HashMap<String, String>();
/* DataType */
- constantMap.put("1400", "GL_BYTE");
- constantMap.put("1401", "GL_UNSIGNED_BYTE");
- constantMap.put("1402", "GL_SHORT");
- constantMap.put("1403", "GL_UNSIGNED_SHORT");
- constantMap.put("1404", "GL_INT");
- constantMap.put("1405", "GL_UNSIGNED_INT");
- constantMap.put("1406", "GL_FLOAT");
- constantMap.put("140c", "GL_FIXED");
+ constantMap.put("5120", "GL_BYTE");
+ constantMap.put("5121", "GL_UNSIGNED_BYTE");
+ constantMap.put("5122", "GL_SHORT");
+ constantMap.put("5123", "GL_UNSIGNED_SHORT");
+ constantMap.put("5124", "GL_INT");
+ constantMap.put("5125", "GL_UNSIGNED_INT");
+ constantMap.put("5126", "GL_FLOAT");
+ constantMap.put("5132", "GL_FIXED");
/* BlendingFactorDest */
constantMap.put("0", "GL_ZERO");
constantMap.put("1", "GL_ONE");
- constantMap.put("300", "GL_SRC_COLOR");
- constantMap.put("301", "GL_ONE_MINUS_SRC_COLOR");
- constantMap.put("302", "GL_SRC_ALPHA");
- constantMap.put("303", "GL_ONE_MINUS_SRC_ALPHA");
- constantMap.put("304", "GL_DST_ALPHA");
- constantMap.put("305", "GL_ONE_MINUS_DST_ALPHA");
+ constantMap.put("768", "GL_SRC_COLOR");
+ constantMap.put("769", "GL_ONE_MINUS_SRC_COLOR");
+ constantMap.put("770", "GL_SRC_ALPHA");
+ constantMap.put("771", "GL_ONE_MINUS_SRC_ALPHA");
+ constantMap.put("772", "GL_DST_ALPHA");
+ constantMap.put("773", "GL_ONE_MINUS_DST_ALPHA");
/* BlendingFactorSrc */
- constantMap.put("306", "GL_DST_COLOR");
- constantMap.put("307", "GL_ONE_MINUS_DST_COLOR");
- constantMap.put("308", "GL_SRC_ALPHA_SATURATE");
+ constantMap.put("774", "GL_DST_COLOR");
+ constantMap.put("775", "GL_ONE_MINUS_DST_COLOR");
+ constantMap.put("776", "GL_SRC_ALPHA_SATURATE");
/* BlendEquationSeparate */
- constantMap.put("8006", "GL_FUNC_ADD");
- constantMap.put("8009", "GL_BLEND_EQUATION");
- constantMap.put("8009", "GL_BLEND_EQUATION_RGB");//FIXME
- constantMap.put("883d", "GL_BLEND_EQUATION_ALPHA");
+ constantMap.put("32774", "GL_FUNC_ADD");
+ constantMap.put("32777", "GL_BLEND_EQUATION");
+ constantMap.put("32777", "GL_BLEND_EQUATION_RGB");//FIXME
+ constantMap.put("34877", "GL_BLEND_EQUATION_ALPHA");
/* BlendSubtract */
- constantMap.put("800a", "GL_FUNC_SUBTRACT");
- constantMap.put("880b", "GL_FUNC_REVERSE_SUBTRACT");
+ constantMap.put("32778", "GL_FUNC_SUBTRACT");
+ constantMap.put("32779", "GL_FUNC_REVERSE_SUBTRACT");
/* Separate Blend Functions */
- constantMap.put("80c8", "GL_BLEND_DST_RGB");
- constantMap.put("80c9", "GL_BLEND_SRC_RGB");
- constantMap.put("80ca", "GL_BLEND_DST_ALPHA");
- constantMap.put("80cb", "GL_BLEND_SRC_ALPHA");
- constantMap.put("8001", "GL_CONSTANT_COLOR");
- constantMap.put("8002", "GL_ONE_MINUS_CONSTANT_COLOR");
- constantMap.put("8003", "GL_CONSTANT_ALPHA");
- constantMap.put("8004", "GL_ONE_MINUS_CONSTANT_ALPHA");
- constantMap.put("8005", "GL_BLEND_COLOR");
+ constantMap.put("32968", "GL_BLEND_DST_RGB");
+ constantMap.put("32969", "GL_BLEND_SRC_RGB");
+ constantMap.put("32970", "GL_BLEND_DST_ALPHA");
+ constantMap.put("32971", "GL_BLEND_SRC_ALPHA");
+ constantMap.put("32769", "GL_CONSTANT_COLOR");
+ constantMap.put("32770", "GL_ONE_MINUS_CONSTANT_COLOR");
+ constantMap.put("32771", "GL_CONSTANT_ALPHA");
+ constantMap.put("32772", "GL_ONE_MINUS_CONSTANT_ALPHA");
+ constantMap.put("32773", "GL_BLEND_COLOR");
/* FrontFaceDirection */
- constantMap.put("900", "GL_CW");
- constantMap.put("901", "GL_CCW");
+ constantMap.put("2304", "GL_CW");
+ constantMap.put("2305", "GL_CCW");
/* CullFaceMode */
- constantMap.put("404", "GL_FRONT");
- constantMap.put("405", "GL_BACK");
- constantMap.put("408", "GL_FRONT_AND_BACK");
+ constantMap.put("1028", "GL_FRONT");
+ constantMap.put("1029", "GL_BACK");
+ constantMap.put("1030", "GL_FRONT_AND_BACK");
/* StencilFunction */
- constantMap.put("200", "GL_NEVER");
- constantMap.put("201", "GL_LESS");
- constantMap.put("202", "GL_EQUAL");
- constantMap.put("203", "GL_LEQUAL");
- constantMap.put("204", "GL_GREATER");
- constantMap.put("205", "GL_NOTEQUAL");
- constantMap.put("206", "GL_GEQUAL");
- constantMap.put("207", "GL_ALWAYS");
+ constantMap.put("512", "GL_NEVER");
+ constantMap.put("513", "GL_LESS");
+ constantMap.put("514", "GL_EQUAL");
+ constantMap.put("515", "GL_LEQUAL");
+ constantMap.put("516", "GL_GREATER");
+ constantMap.put("517", "GL_NOTEQUAL");
+ constantMap.put("518", "GL_GEQUAL");
+ constantMap.put("519", "GL_ALWAYS");
/* StencilOp */
- constantMap.put("1e00", "GL_KEEP");
- constantMap.put("1e01", "GL_REPLACE");
- constantMap.put("1e02", "GL_INCR");
- constantMap.put("1e03", "GL_DECR");
- constantMap.put("1e0a", "GL_INVERT");
- constantMap.put("1e07", "GL_INCR_WRAP");
- constantMap.put("1e08", "GL_DECR_WRAP");
+ constantMap.put("7680", "GL_KEEP");
+ constantMap.put("7681", "GL_REPLACE");
+ constantMap.put("7682", "GL_INCR");
+ constantMap.put("7683", "GL_DECR");
+ constantMap.put("7690", "GL_INVERT");
+ constantMap.put("7687", "GL_INCR_WRAP");
+ constantMap.put("7688", "GL_DECR_WRAP");
/* TextureUnit */
- constantMap.put("84c0", "GL_TEXTURE0");
- constantMap.put("84c1", "GL_TEXTURE1");
- constantMap.put("84c2", "GL_TEXTURE2");
- constantMap.put("84c3", "GL_TEXTURE3");
- constantMap.put("84c4", "GL_TEXTURE4");
- constantMap.put("84c5", "GL_TEXTURE5");
- constantMap.put("84c6", "GL_TEXTURE6");
- constantMap.put("84c7", "GL_TEXTURE7");
- constantMap.put("84c8", "GL_TEXTURE8");
- constantMap.put("84c9", "GL_TEXTURE9");
- constantMap.put("84ca", "GL_TEXTURE10");
- constantMap.put("84cb", "GL_TEXTURE11");
- constantMap.put("84cc", "GL_TEXTURE12");
- constantMap.put("84cd", "GL_TEXTURE13");
- constantMap.put("84ce", "GL_TEXTURE14");
- constantMap.put("84cf", "GL_TEXTURE15");
- constantMap.put("84d0", "GL_TEXTURE16");
- constantMap.put("84d1", "GL_TEXTURE17");
- constantMap.put("84d2", "GL_TEXTURE18");
- constantMap.put("84d3", "GL_TEXTURE19");
- constantMap.put("84d4", "GL_TEXTURE20");
- constantMap.put("84d5", "GL_TEXTURE21");
- constantMap.put("84d6", "GL_TEXTURE22");
- constantMap.put("84d7", "GL_TEXTURE23");
- constantMap.put("84d8", "GL_TEXTURE24");
- constantMap.put("84d9", "GL_TEXTURE25");
- constantMap.put("84da", "GL_TEXTURE26");
- constantMap.put("84db", "GL_TEXTURE27");
- constantMap.put("84dc", "GL_TEXTURE28");
- constantMap.put("84dd", "GL_TEXTURE29");
- constantMap.put("84de", "GL_TEXTURE30");
- constantMap.put("84df", "GL_TEXTURE31");
- constantMap.put("84e0", "GL_ACTIVE_TEXTURE");
+ constantMap.put("33984", "GL_TEXTURE0");
+ constantMap.put("33985", "GL_TEXTURE1");
+ constantMap.put("33986", "GL_TEXTURE2");
+ constantMap.put("33987", "GL_TEXTURE3");
+ constantMap.put("33988", "GL_TEXTURE4");
+ constantMap.put("33989", "GL_TEXTURE5");
+ constantMap.put("33990", "GL_TEXTURE6");
+ constantMap.put("33991", "GL_TEXTURE7");
+ constantMap.put("33992", "GL_TEXTURE8");
+ constantMap.put("33993", "GL_TEXTURE9");
+ constantMap.put("33994", "GL_TEXTURE10");
+ constantMap.put("33995", "GL_TEXTURE11");
+ constantMap.put("33996", "GL_TEXTURE12");
+ constantMap.put("33997", "GL_TEXTURE13");
+ constantMap.put("33998", "GL_TEXTURE14");
+ constantMap.put("33999", "GL_TEXTURE15");
+ constantMap.put("34000", "GL_TEXTURE16");
+ constantMap.put("34001", "GL_TEXTURE17");
+ constantMap.put("34002", "GL_TEXTURE18");
+ constantMap.put("34003", "GL_TEXTURE19");
+ constantMap.put("34004", "GL_TEXTURE20");
+ constantMap.put("34005", "GL_TEXTURE21");
+ constantMap.put("34006", "GL_TEXTURE22");
+ constantMap.put("34007", "GL_TEXTURE23");
+ constantMap.put("34008", "GL_TEXTURE24");
+ constantMap.put("34009", "GL_TEXTURE25");
+ constantMap.put("34010", "GL_TEXTURE26");
+ constantMap.put("34011", "GL_TEXTURE27");
+ constantMap.put("34012", "GL_TEXTURE28");
+ constantMap.put("34013", "GL_TEXTURE29");
+ constantMap.put("34014", "GL_TEXTURE30");
+ constantMap.put("34015", "GL_TEXTURE31");
+ constantMap.put("34016", "GL_ACTIVE_TEXTURE");
/* Shaders */
- constantMap.put("8b30", "GL_FRAGMENT_SHADER");
- constantMap.put("8b31", "GL_VERTEX_SHADER");
+ constantMap.put("35632", "GL_FRAGMENT_SHADER");
+ constantMap.put("35633", "GL_VERTEX_SHADER");
/* Uniform Types */
- constantMap.put("8b50", "GL_FLOAT_VEC2");
- constantMap.put("8b51", "GL_FLOAT_VEC3");
- constantMap.put("8b52", "GL_FLOAT_VEC4");
- constantMap.put("8b53", "GL_INT_VEC2");
- constantMap.put("8b54", "GL_INT_VEC3");
- constantMap.put("8b55", "GL_INT_VEC4");
- constantMap.put("8b56", "GL_BOOL");
- constantMap.put("8b57", "GL_BOOL_VEC2");
- constantMap.put("8b58", "GL_BOOL_VEC3");
- constantMap.put("8b59", "GL_BOOL_VEC4");
- constantMap.put("8b5a", "GL_FLOAT_MAT2");
- constantMap.put("8b5b", "GL_FLOAT_MAT3");
- constantMap.put("8b5c", "GL_FLOAT_MAT4");
- constantMap.put("8b5e", "GL_SAMPLER_2D");
- constantMap.put("8b60", "GL_SAMPLER_CUBE");
+ constantMap.put("35664", "GL_FLOAT_VEC2");
+ constantMap.put("35665", "GL_FLOAT_VEC3");
+ constantMap.put("35666", "GL_FLOAT_VEC4");
+ constantMap.put("35667", "GL_INT_VEC2");
+ constantMap.put("35668", "GL_INT_VEC3");
+ constantMap.put("35669", "GL_INT_VEC4");
+ constantMap.put("35670", "GL_BOOL");
+ constantMap.put("35671", "GL_BOOL_VEC2");
+ constantMap.put("35672", "GL_BOOL_VEC3");
+ constantMap.put("35673", "GL_BOOL_VEC4");
+ constantMap.put("35674", "GL_FLOAT_MAT2");
+ constantMap.put("35675", "GL_FLOAT_MAT3");
+ constantMap.put("35676", "GL_FLOAT_MAT4");
+ constantMap.put("35678", "GL_SAMPLER_2D");
+ constantMap.put("35680", "GL_SAMPLER_CUBE");
/* TextureParameterName */
- constantMap.put("2800", "GL_TEXTURE_MAG_FILTER");
- constantMap.put("2801", "GL_TEXTURE_MIN_FILTER");
- constantMap.put("2802", "GL_TEXTURE_WRAP_S");
- constantMap.put("2803", "GL_TEXTURE_WRAP_T");
+ constantMap.put("10240", "GL_TEXTURE_MAG_FILTER");
+ constantMap.put("10241", "GL_TEXTURE_MIN_FILTER");
+ constantMap.put("10242", "GL_TEXTURE_WRAP_S");
+ constantMap.put("10243", "GL_TEXTURE_WRAP_T");
/* TextureTarget */
- constantMap.put("de1", "GL_TEXTURE_2D");
- constantMap.put("8513", "GL_TEXTURE_CUBE_MAP");
+ constantMap.put("3553", "GL_TEXTURE_2D");
+ constantMap.put("34067", "GL_TEXTURE_CUBE_MAP");
/* TextureMagFilter */
- constantMap.put("2600", "GL_NEAREST");
- constantMap.put("2601", "GL_LINEAR");
+ constantMap.put("9728", "GL_NEAREST");
+ constantMap.put("9729", "GL_LINEAR");
/* TextureMinFilter */
/* GL_NEAREST */
/* GL_LINEAR */
- constantMap.put("2700", "GL_NEAREST_MIPMAP_NEAREST");
- constantMap.put("2701", "GL_LINEAR_MIPMAP_NEAREST");
- constantMap.put("2702", "GL_NEAREST_MIPMAP_LINEAR");
- constantMap.put("2703", "GL_LINEAR_MIPMAP_LINEAR");
+ constantMap.put("9984", "GL_NEAREST_MIPMAP_NEAREST");
+ constantMap.put("9985", "GL_LINEAR_MIPMAP_NEAREST");
+ constantMap.put("9986", "GL_NEAREST_MIPMAP_LINEAR");
+ constantMap.put("9987", "GL_LINEAR_MIPMAP_LINEAR");
/* TextureWrapMode */
- constantMap.put("2901", "GL_REPEAT");
- constantMap.put("812f", "GL_CLAMP_TO_EDGE");
- constantMap.put("8370", "GL_MIRRORED_REPEAT");
+ constantMap.put("10497", "GL_REPEAT");
+ constantMap.put("33071", "GL_CLAMP_TO_EDGE");
+ constantMap.put("33648", "GL_MIRRORED_REPEAT");
/* Buffer Objects */
- constantMap.put("8892", "GL_ARRAY_BUFFER");
- constantMap.put("8893", "GL_ELEMENT_ARRAY_BUFFER");
- constantMap.put("8894", "GL_ARRAY_BUFFER_BINDING");
- constantMap.put("8895", "GL_ELEMENT_ARRAY_BUFFER_BINDING");
+ constantMap.put("34962", "GL_ARRAY_BUFFER");
+ constantMap.put("34963", "GL_ELEMENT_ARRAY_BUFFER");
+ constantMap.put("34964", "GL_ARRAY_BUFFER_BINDING");
+ constantMap.put("34965", "GL_ELEMENT_ARRAY_BUFFER_BINDING");
- constantMap.put("88e0", "GL_STREAM_DRAW");
- constantMap.put("88e4", "GL_STATIC_DRAW");
- constantMap.put("88e8", "GL_DYNAMIC_DRAW");
+ constantMap.put("35040", "GL_STREAM_DRAW");
+ constantMap.put("35044", "GL_STATIC_DRAW");
+ constantMap.put("35048", "GL_DYNAMIC_DRAW");
}
public static String getConstantString(String key) {
if (constantMap == null) {
initialize();
}
+
return constantMap.get(key);
}
}