Example usage for org.lwjgl.opengl GL33 GL_TEXTURE_SWIZZLE_RGBA

List of usage examples for org.lwjgl.opengl GL33 GL_TEXTURE_SWIZZLE_RGBA

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL33 GL_TEXTURE_SWIZZLE_RGBA.

Prototype

int GL_TEXTURE_SWIZZLE_RGBA

To view the source code for org.lwjgl.opengl GL33 GL_TEXTURE_SWIZZLE_RGBA.

Click Source Link

Document

Accepted by the pname parameters of TexParameteriv, TexParameterfv, GetTexParameterfv, and GetTexParameteriv.

Usage

From source file:com.google.gapid.glviewer.gl.Texture.java

License:Apache License

public Texture setSwizzle(int r, int g, int b, int a) {
    bind();//from   w w  w.  j a  v  a  2s. co m
    GL11.glTexParameteriv(target, GL33.GL_TEXTURE_SWIZZLE_RGBA, new int[] { r, g, b, a });
    return this;
}

From source file:com.samrj.devil.gl.Texture.java

License:Open Source License

public final T swizzle(int r, int g, int b, int a) {
    if (!isBound())
        throw new IllegalStateException("Texture must be bound.");
    long address = MemStack.wrapi(r, g, b, a);
    GL11.nglTexParameteriv(target, GL33.GL_TEXTURE_SWIZZLE_RGBA, address);
    MemStack.pop();//from w  ww. ja  v  a 2s.  c o m
    return getThis();
}