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

Method bindTexture

core/src/processing/opengl/PGL.java:3239–3256  ·  view source on GitHub ↗
(int target, int texture)

Source from the content-addressed store, hash-verified

3237 protected abstract void activeTextureImpl(int texture);
3238
3239 public void bindTexture(int target, int texture) {
3240 bindTextureImpl(target, texture);
3241
3242 if (boundTextures == null) {
3243 maxTexUnits = getMaxTexUnits();
3244 boundTextures = new int[maxTexUnits][2];
3245 }
3246
3247 if (maxTexUnits <= activeTexUnit) {
3248 throw new RuntimeException(TEXUNIT_ERROR);
3249 }
3250
3251 if (target == TEXTURE_2D) {
3252 boundTextures[activeTexUnit][0] = texture;
3253 } else if (target == TEXTURE_RECTANGLE) {
3254 boundTextures[activeTexUnit][1] = texture;
3255 }
3256 }
3257 protected abstract void bindTextureImpl(int target, int texture);
3258
3259 ///////////////////////////////////////////////////////////

Callers 14

bindFrontTextureMethod · 0.95
unbindFrontTextureMethod · 0.95
endRenderMethod · 0.95
createFBOLayerMethod · 0.95
restoreFirstFrameMethod · 0.95
copyToTextureMethod · 0.95
drawTexture2DMethod · 0.95
drawTextureRectMethod · 0.95
setMethod · 0.80
setNativeMethod · 0.80
bindMethod · 0.80
unbindMethod · 0.80

Calls 2

bindTextureImplMethod · 0.95
getMaxTexUnitsMethod · 0.95

Tested by

no test coverage detected