public void glReadPixels (int x, int y, int width, int height, int format, int type, Buffer pixels) { if (pixels instanceof ByteBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ByteBuffer)pixels); else if (pixels instanceof ShortBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ShortBuffer)pixels); else if (pixels instanceof IntBuffer) GL11.glReadPixels(x, y, width, height, format, type, (IntBuffer)pixels); else if (pixels instanceof FloatBuffer) GL11.glReadPixels(x, y, width, height, format, type, (FloatBuffer)pixels); else throw new GdxRuntimeException("Can't use " + pixels.getClass().getName() + " with this method. Use ByteBuffer, ShortBuffer, IntBuffer or FloatBuffer instead. Blame LWJGL"); }
public void glReadPixels (int x, int y, int width, int height, int format, int type, Buffer pixels) { if (pixels instanceof ByteBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ByteBuffer)pixels); else if (pixels instanceof ShortBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ShortBuffer)pixels); else if (pixels instanceof IntBuffer) GL11.glReadPixels(x, y, width, height, format, type, (IntBuffer)pixels); else if (pixels instanceof FloatBuffer) GL11.glReadPixels(x, y, width, height, format, type, (FloatBuffer)pixels); else throw new GdxRuntimeException("Can't use " + pixels.getClass().getName() + " with this method. Use ByteBuffer, ShortBuffer, IntBuffer or FloatBuffer instead. Blame LWJGL"); }
public void glReadPixels (int x, int y, int width, int height, int format, int type, Buffer pixels) { if (pixels instanceof ByteBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ByteBuffer)pixels); else if (pixels instanceof ShortBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ShortBuffer)pixels); else if (pixels instanceof IntBuffer) GL11.glReadPixels(x, y, width, height, format, type, (IntBuffer)pixels); else if (pixels instanceof FloatBuffer) GL11.glReadPixels(x, y, width, height, format, type, (FloatBuffer)pixels); else throw new GdxRuntimeException("Can't use " + pixels.getClass().getName() + " with this method. Use ByteBuffer, ShortBuffer, IntBuffer or FloatBuffer instead. Blame LWJGL"); }
@Override public void glReadPixels(final int x, final int y, final int width, final int height, final int format, final int type, final long offset) { GL11.glReadPixels(x, y, width, height, format, type, offset); }
public void glReadPixels (int x, int y, int width, int height, int format, int type, Buffer pixels) { if (pixels instanceof ByteBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ByteBuffer)pixels); else if (pixels instanceof ShortBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ShortBuffer)pixels); else if (pixels instanceof IntBuffer) GL11.glReadPixels(x, y, width, height, format, type, (IntBuffer)pixels); else if (pixels instanceof FloatBuffer) GL11.glReadPixels(x, y, width, height, format, type, (FloatBuffer)pixels); else throw new GdxRuntimeException("Can't use " + pixels.getClass().getName() + " with this method. Use ByteBuffer, ShortBuffer, IntBuffer or FloatBuffer instead. Blame LWJGL"); }
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, long param7) { GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7); }
@Override public void glReadPixels(final int x, final int y, final int width, final int height, final int format, final int type, final ByteBuffer data) { checkLimit(data); GL11.glReadPixels(x, y, width, height, format, type, data); }
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, ByteBuffer param7) { checkLimit(param7); GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7); }
public void copyFromFBO(int fboId, int width, int height, int format, int type) { bind(); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboId); glReadPixels(0, 0, width, height, format, type, 0); unbind(); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); }
@Override public void glReadPixels(int x, int y, int width, int height, int format, int type, int pixelsBufferOffset) { GL11.glReadPixels(x, y, width, height, format, type, pixelsBufferOffset); }
@Override public void glReadPixels(int x, int y, int width, int height, int format, int type, int pixelsBufferOffset) { GL11.glReadPixels(x, y, width, height, format, type, pixelsBufferOffset); }
@Override public void glReadPixels(int x, int y, int width, int height, int format, int type, int pixelsBufferOffset) { GL11.glReadPixels(x, y, width, height, format, type, pixelsBufferOffset); }
@Override public void glReadPixels(int x, int y, int width, int height, int format, int type, int pixelsBufferOffset) { GL11.glReadPixels(x, y, width, height, format, type, pixelsBufferOffset); }
/** * @see org.newdawn.slick.opengl.renderer.SGL#glReadPixels(int, int, int, int, int, int, java.nio.ByteBuffer) */ public void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { GL11.glReadPixels(x, y, width, height, format, type, pixels); }
public void glReadPixels (int x, int y, int width, int height, int format, int type, Buffer pixels) { if (pixels instanceof ByteBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ByteBuffer)pixels); else if (pixels instanceof ShortBuffer) GL11.glReadPixels(x, y, width, height, format, type, (ShortBuffer)pixels); else if (pixels instanceof IntBuffer) GL11.glReadPixels(x, y, width, height, format, type, (IntBuffer)pixels); else if (pixels instanceof FloatBuffer) GL11.glReadPixels(x, y, width, height, format, type, (FloatBuffer)pixels); else throw new GdxRuntimeException("Can't use " + pixels.getClass().getName() + " with this method. Use ByteBuffer, ShortBuffer, IntBuffer or FloatBuffer instead. Blame LWJGL"); }
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, ByteBuffer param7) { checkLimit(param7); GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7); }
public void glReadPixels(int param1, int param2, int param3, int param4, int param5, int param6, ByteBuffer param7) { checkLimit(param7); GL11.glReadPixels(param1, param2, param3, param4, param5, param6, param7); }
public BufferedImage readPixels(int width, int height) { glReadBuffer(GL_FRONT); ByteBuffer buf = BufferUtils.createByteBuffer(width * height * 4); glReadPixels(0, 0, width, height, GL_BGRA, GL_UNSIGNED_BYTE, buf); checkGLError(); BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); int[] pixels = new int[width*height]; buf.asIntBuffer().get(pixels); img.setRGB(0, 0, width, height, pixels, 0, width); if (Visage.trace) Visage.log.finest("Read pixels"); return img; } }
public void grabScreenContents(final ByteBuffer buff, final ImageDataFormat format, final PixelDataType type, final int x, final int y, final int w, final int h) { final int pixFormat = LwjglTextureUtil.getGLPixelFormat(format); final int pixDataType = LwjglTextureUtil.getGLPixelDataType(type); GL11.glReadPixels(x, y, w, h, pixFormat, pixDataType, buff); }
public static Color getPixel(int x, int y) { Minecraft mc = Minecraft.getMinecraft(); ScaledResolution resolution = new ScaledResolution(mc); int scale = resolution.getScaleFactor(); FloatBuffer buffer = BufferUtils.createFloatBuffer(3); GL11.glReadPixels(x * scale, mc.displayHeight - y * scale - scale, 1, 1, GL11.GL_RGB, GL11.GL_FLOAT, buffer); return new Color(buffer.get(0), buffer.get(1), buffer.get(2)); }