Example usage for org.lwjgl.opengl GL11 nglGetTexImage

List of usage examples for org.lwjgl.opengl GL11 nglGetTexImage

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 nglGetTexImage.

Prototype

public static void nglGetTexImage(int tex, int level, int format, int type, long pixels) 

Source Link

Document

Unsafe version of: #glGetTexImage GetTexImage

Usage

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

License:Open Source License

/**
 * Downloads the OpenGL data for this texture into the given image.
 *///from   w  ww.  ja  v  a  2 s.  c  o  m
public T download(Image image, int format) {
    int dataFormat = TexUtil.getBaseFormat(format);
    int primType = TexUtil.getPrimitiveType(format);
    int oldID = tempBind();
    GL11.nglGetTexImage(target, 0, dataFormat, primType, image.address());
    tempUnbind(oldID);
    return getThis();
}