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

Method loadUniforms

core/src/processing/opengl/PShader.java:1146–1186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1144
1145
1146 protected void loadUniforms() {
1147 if (loadedUniforms) return;
1148 transformMatLoc = getUniformLoc("transform");
1149 if (transformMatLoc == -1)
1150 transformMatLoc = getUniformLoc("transformMatrix");
1151
1152 modelviewMatLoc = getUniformLoc("modelview");
1153 if (modelviewMatLoc == -1)
1154 modelviewMatLoc = getUniformLoc("modelviewMatrix");
1155
1156 projectionMatLoc = getUniformLoc("projection");
1157 if (projectionMatLoc == -1)
1158 projectionMatLoc = getUniformLoc("projectionMatrix");
1159
1160 viewportLoc = getUniformLoc("viewport");
1161 resolutionLoc = getUniformLoc("resolution");
1162 ppixelsLoc = getUniformLoc("ppixels");
1163
1164 normalMatLoc = getUniformLoc("normalMatrix");
1165
1166 lightCountLoc = getUniformLoc("lightCount");
1167 lightPositionLoc = getUniformLoc("lightPosition");
1168 lightNormalLoc = getUniformLoc("lightNormal");
1169 lightAmbientLoc = getUniformLoc("lightAmbient");
1170 lightDiffuseLoc = getUniformLoc("lightDiffuse");
1171 lightSpecularLoc = getUniformLoc("lightSpecular");
1172 lightFalloffLoc = getUniformLoc("lightFalloff");
1173 lightSpotLoc = getUniformLoc("lightSpot");
1174
1175 textureLoc = getUniformLoc("texture");
1176 if (textureLoc == -1) {
1177 textureLoc = getUniformLoc("texMap");
1178 }
1179
1180 texMatrixLoc = getUniformLoc("texMatrix");
1181 texOffsetLoc = getUniformLoc("texOffset");
1182
1183 perspectiveLoc = getUniformLoc("perspective");
1184 scaleLoc = getUniformLoc("scale");
1185 loadedUniforms = true;
1186 }
1187
1188
1189 protected void setCommonUniforms() {

Callers 4

bindTypedMethod · 0.95
getPolyShaderMethod · 0.95
getLineShaderMethod · 0.95
getPointShaderMethod · 0.95

Calls 1

getUniformLocMethod · 0.95

Tested by

no test coverage detected