Example usage for org.lwjgl.opengl GL31 GL_TEXTURE_RECTANGLE

List of usage examples for org.lwjgl.opengl GL31 GL_TEXTURE_RECTANGLE

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL31 GL_TEXTURE_RECTANGLE.

Prototype

int GL_TEXTURE_RECTANGLE

To view the source code for org.lwjgl.opengl GL31 GL_TEXTURE_RECTANGLE.

Click Source Link

Document

Accepted by the cap parameter of Enable, Disable and IsEnabled; by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv and GetDoublev; and by the target parameter of BindTexture, GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, TexParameterfv and TexParameteriv.

Usage

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

TextureRectangle() {
    super(GL31.GL_TEXTURE_RECTANGLE, GL31.GL_TEXTURE_BINDING_RECTANGLE);
    if (!(DGL.getCapabilities().OpenGL31 || DGL.getCapabilities().GL_ARB_texture_rectangle))
        throw new UnsupportedOperationException("Rectangle textures unsupported on this machine.");

    int oldID = tempBind();
    parami(GL11.GL_TEXTURE_WRAP_S, GL12.GL_CLAMP_TO_EDGE);
    parami(GL11.GL_TEXTURE_WRAP_T, GL12.GL_CLAMP_TO_EDGE);
    parami(GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
    parami(GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
    tempUnbind(oldID);//from  w w w  .  j ava 2 s.co m
}