@Override public AreaInclusiveUnsignedLType area() { return this.t_depth.texture().textureGetArea(); }
@Override public AreaInclusiveUnsignedLType area() { return this.t_depth.texture().textureGetArea(); }
@Override public AreaInclusiveUnsignedLType area() { return this.t_occ.texture().textureGetArea(); }
@Override public AreaInclusiveUnsignedLType area() { return this.t_rgba.texture().textureGetArea(); }
/** * Create a new update that will replace the entirety of {@code t}. * * @param t The texture * * @return A new update */ public static JCGLTexture2DUpdateType newUpdateReplacingAll2D( final JCGLTexture2DUsableType t) { NullCheck.notNull(t); return JCGLTextureUpdates.newUpdateReplacingArea2D(t, t.textureGetArea()); }
final AreaInclusiveUnsignedLType depth_area = dt.texture().textureGetArea(); if (!Objects.equals(depth_area, area)) { final StringBuilder sb = new StringBuilder(128);
final AreaInclusiveUnsignedLType depth_area = dt.texture().textureGetArea(); if (!Objects.equals(depth_area, area)) { final StringBuilder sb = new StringBuilder(128);
NullCheck.notNull(area, "Area"); if (!area.isIncludedIn(t.textureGetArea())) { final String s = String.format( "Target area %s is not included within the texture's area %s", area, t.textureGetArea()); assert s != null; throw new RangeCheckException(s);
@Override public ByteBuffer texture2DGetImage( final JCGLTextureUnitType unit, final JCGLTexture2DUsableType texture) throws JCGLException { NullCheck.notNull(texture); NullCheck.notNull(unit); LWJGL3Textures.checkTextureUnit(this.context, unit); LWJGL3Textures.checkTexture2D(this.context, texture); final JCGLTextureFormat format = texture.textureGetFormat(); final LWJGL3TextureSpec spec = LWJGL3TextureSpecs.getTextureSpec(format); final AreaInclusiveUnsignedLType area = texture.textureGetArea(); final long width = area.getRangeX().getInterval(); final long height = area.getRangeY().getInterval(); final ByteBuffer data = ByteBuffer.allocateDirect( (int) (width * height * (long) format.getBytesPerPixel())); data.order(ByteOrder.nativeOrder()); this.texture2DBind(unit, texture); GL11.glGetTexImage( GL11.GL_TEXTURE_2D, 0, spec.getFormat(), spec.getType(), data); return data; }
final AreaInclusiveUnsignedLType texture_area = texture.textureGetArea();
update_area.isIncludedIn(texture.textureGetArea()), ignored -> "Update area must be included in texture area");
final JCGLTexture2DUsableType map = rt_map.texture(); Assert.assertEquals( map.textureGetArea(), desc.area()); Assert.assertEquals( map.textureGetWrapS(), JCGLTextureWrapS.TEXTURE_WRAP_CLAMP_TO_EDGE);