Java Code Examples for com.badlogic.gdx.graphics.Texture#TextureFilter

The following examples show how to use com.badlogic.gdx.graphics.Texture#TextureFilter . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VfxFrameBufferPool.java    From gdx-vfx with Apache License 2.0 6 votes vote down vote up
public void setTextureParams(Texture.TextureWrap textureWrapU,
                             Texture.TextureWrap textureWrapV,
                             Texture.TextureFilter textureFilterMin,
                             Texture.TextureFilter textureFilterMag) {
    this.textureWrapU = textureWrapU;
    this.textureWrapV = textureWrapV;
    this.textureFilterMin = textureFilterMin;
    this.textureFilterMag = textureFilterMag;

    // Update the free textures'.
    for (int i = 0; i < freeBuffers.size; i++) {
        Texture texture = freeBuffers.get(i).getTexture();
        texture.setWrap(textureWrapU, textureWrapV);
        texture.setFilter(textureFilterMin, textureFilterMag);
    }
}
 
Example 2
Source File: MainController.java    From gdx-texture-packer-gui with Apache License 2.0 6 votes vote down vote up
@LmlAction("onSettingsCboChanged") void onSettingsCboChanged(VisSelectBox selectBox) {
        if (!viewShown) return;

        PackModel pack = getSelectedPack();
        if (pack == null) return;

        TexturePacker.Settings settings = pack.getSettings();
        Object value = selectBox.getSelected();
        switch (selectBox.getName()) {
            case "cboEncodingFormat": settings.format = (Pixmap.Format) value; break;
            case "cboMinFilter": settings.filterMin = (Texture.TextureFilter) value; break;
            case "cboMagFilter": settings.filterMag = (Texture.TextureFilter) value; break;
            case "cboWrapX": settings.wrapX = (Texture.TextureWrap) value; break;
            case "cboWrapY": settings.wrapY = (Texture.TextureWrap) value; break;
//            case "cboOutputFormat": settings.outputFormat = (String) value; break;
        }
    }
 
Example 3
Source File: VfxManager.java    From gdx-vfx with Apache License 2.0 5 votes vote down vote up
public void setEffectTextureParams(
        Texture.TextureWrap textureWrapU,
        Texture.TextureWrap textureWrapV,
        Texture.TextureFilter textureFilterMin,
        Texture.TextureFilter textureFilterMag) {
    this.context.getBufferPool().setTextureParams(textureWrapU, textureWrapV, textureFilterMin, textureFilterMag);
}
 
Example 4
Source File: VfxFrameBufferQueue.java    From gdx-vfx with Apache License 2.0 5 votes vote down vote up
public void setTextureParams(Texture.TextureWrap u, Texture.TextureWrap v, Texture.TextureFilter min, Texture.TextureFilter mag) {
    wrapU = u;
    wrapV = v;
    filterMin = min;
    filterMag = mag;
    rebind();
}
 
Example 5
Source File: LibgdxTextureAtlasWrapper.java    From mini2Dx with Apache License 2.0 5 votes vote down vote up
public Page (FileHandle handle, float width, float height, boolean useMipMaps, Pixmap.Format format, Texture.TextureFilter minFilter,
			 Texture.TextureFilter magFilter, Texture.TextureWrap uWrap, Texture.TextureWrap vWrap) {
	this.width = width;
	this.height = height;
	this.textureFile = handle;
	this.useMipMaps = useMipMaps;
	this.format = format;
	this.minFilter = minFilter;
	this.magFilter = magFilter;
	this.uWrap = uWrap;
	this.vWrap = vWrap;
}