public static void applyBorderColor(final Texture texture, final TextureRecord texRecord, final int unit, final TextureStateRecord record) { final ReadOnlyColorRGBA texBorder = texture.getBorderColor(); if (!texRecord.isValid() || !texRecord.borderColor.equals(texBorder)) { TextureRecord.colorBuffer.clear(); TextureRecord.colorBuffer.put(texBorder.getRed()).put(texBorder.getGreen()).put(texBorder.getBlue()) .put(texBorder.getAlpha()); TextureRecord.colorBuffer.rewind(); GL11.glTexParameter(getGLType(texture.getType()), GL11.GL_TEXTURE_BORDER_COLOR, TextureRecord.colorBuffer); texRecord.borderColor.set(texBorder); } }
public static void applyBorderColor(final Texture texture, final TextureRecord texRecord, final int unit, final TextureStateRecord record) { final ReadOnlyColorRGBA texBorder = texture.getBorderColor(); if (!texRecord.isValid() || !texRecord.borderColor.equals(texBorder)) { TextureRecord.colorBuffer.clear(); TextureRecord.colorBuffer.put(texBorder.getRed()).put(texBorder.getGreen()).put(texBorder.getBlue()) .put(texBorder.getAlpha()); TextureRecord.colorBuffer.rewind(); GL11C.glTexParameterfv(getGLType(texture.getType()), GL11C.GL_TEXTURE_BORDER_COLOR, TextureRecord.colorBuffer); texRecord.borderColor.set(texBorder); } }
public static void applyBorderColor(final Texture texture, final TextureRecord texRecord, final int unit, final TextureStateRecord record, final ContextCapabilities caps) { final GL gl = GLContext.getCurrentGL(); final ReadOnlyColorRGBA texBorder = texture.getBorderColor(); if (!texRecord.isValid() || !texRecord.borderColor.equals(texBorder)) { TextureRecord.colorBuffer.clear(); TextureRecord.colorBuffer.put(texBorder.getRed()).put(texBorder.getGreen()).put(texBorder.getBlue()) .put(texBorder.getAlpha()); TextureRecord.colorBuffer.rewind(); gl.glTexParameterfv(getGLType(texture.getType()), GL2GL3.GL_TEXTURE_BORDER_COLOR, TextureRecord.colorBuffer); texRecord.borderColor.set(texBorder); } }
switch (mode) { case BorderClamp: final ReadOnlyColorRGBA col = parameterObject.getTexture().getBorderColor(); borderClamp(data, rectangle, textureWidth, textureHeight, parameterObject, col); break;