List of usage examples for org.lwjgl.opengl GL11 nglGetTexImage
public static void nglGetTexImage(int tex, int level, int format, int type, long pixels)
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(); }