MCPcopy Index your code
hub / github.com/processing/processing / getGLVersion

Method getGLVersion

core/src/processing/opengl/PGL.java:2117–2148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2115 }
2116
2117 protected int[] getGLVersion() {
2118 String version = getString(VERSION).trim().toLowerCase();
2119
2120 String ES = "opengl es";
2121 int esPosition = version.indexOf(ES);
2122 if (esPosition >= 0) {
2123 version = version.substring(esPosition + ES.length()).trim();
2124 }
2125
2126 int[] res = {0, 0, 0};
2127 String[] parts = version.split(" ");
2128 for (int i = 0; i < parts.length; i++) {
2129 if (0 < parts[i].indexOf(".")) {
2130 String nums[] = parts[i].split("\\.");
2131 try {
2132 res[0] = Integer.parseInt(nums[0]);
2133 } catch (NumberFormatException e) { }
2134 if (1 < nums.length) {
2135 try {
2136 res[1] = Integer.parseInt(nums[1]);
2137 } catch (NumberFormatException e) { }
2138 }
2139 if (2 < nums.length) {
2140 try {
2141 res[2] = Integer.parseInt(nums[2]);
2142 } catch (NumberFormatException e) { }
2143 }
2144 break;
2145 }
2146 }
2147 return res;
2148 }
2149
2150
2151 protected boolean hasFBOs() {

Callers 11

hasFBOsMethod · 0.95
hasShadersMethod · 0.95
hasNpotTexSupportMethod · 0.95
hasSynchronizationMethod · 0.95
hasPBOsMethod · 0.95
hasReadBufferMethod · 0.95
hasDrawBufferMethod · 0.95

Calls 4

getStringMethod · 0.95
splitMethod · 0.80
parseIntMethod · 0.80
trimMethod · 0.45

Tested by

no test coverage detected