class ES2RTTexture extends ES2Texture<ES2RTTextureData> implements ES2RenderTarget, RTTexture, ReadbackRenderTarget
Texture.Usage, Texture.WrapMode| Modifier and Type | Field and Description |
|---|---|
private boolean |
opaque |
contextcontentHeight, contentWidth, resource| Modifier | Constructor and Description |
|---|---|
private |
ES2RTTexture(ES2Context context,
ES2TextureResource<ES2RTTextureData> resource,
Texture.WrapMode wrapMode,
int physicalWidth,
int physicalHeight,
int contentX,
int contentY,
int contentWidth,
int contentHeight,
int maxContentWidth,
int maxContentHeight) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
attachDepthBuffer(ES2Context context)
Attach a depth buffer to the currently bound FBO
|
(package private) static ES2RTTexture |
create(ES2Context context,
int w,
int h,
Texture.WrapMode wrapMode,
boolean msaa) |
private void |
createAndAttachMSAABuffer(ES2Context context)
Create and attach a color multisample render buffer to current FBO
|
Graphics |
createGraphics() |
Screen |
getAssociatedScreen() |
Texture |
getBackBuffer() |
(package private) static int |
getCompatibleDimension(ES2Context context,
int dim,
Texture.WrapMode wrapMode) |
int |
getFboID() |
int[] |
getPixels() |
boolean |
isMSAA() |
boolean |
isOpaque() |
boolean |
isVolatile() |
boolean |
readPixels(java.nio.Buffer pixels) |
boolean |
readPixels(java.nio.Buffer pixels,
int x,
int y,
int width,
int height) |
void |
setOpaque(boolean opaque) |
void |
update(java.nio.Buffer pixels,
PixelFormat format,
int dstx,
int dsty,
int srcx,
int srcy,
int srcw,
int srch,
int srcscan,
boolean skipFlush)
Updates this texture using the contents of the given
Buffer. |
void |
update(Image img)
Updates this texture using the contents of the given
Image. |
void |
update(Image img,
int dstx,
int dsty)
Updates this texture using the contents of the given
Image. |
void |
update(Image img,
int dstx,
int dsty,
int w,
int h)
Updates this texture using the contents of the given
Image. |
void |
update(Image img,
int dstx,
int dsty,
int w,
int h,
boolean skipFlush)
Updates this texture using the contents of the given
Image. |
create, create, createSharedTexture, getBufferElementSizeLog, getNativeSourceHandle, nextPowerOfTwo, update, updateFilterState, updateWrapStateassertLocked, checkUpdateParams, contentsNotUseful, contentsUseful, dispose, getContentHeight, getContentWidth, getContentX, getContentY, getLastImageSerial, getLinearFiltering, getLockCount, getMaxContentHeight, getMaxContentWidth, getPhysicalHeight, getPhysicalWidth, getPixelFormat, getSharedTexture, getUseMipmap, getWrapMode, isLocked, isSurfaceLost, lock, makePermanent, setContentHeight, setContentWidth, setLastImageSerial, setLinearFiltering, toString, unlockclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitassertLocked, contentsNotUseful, contentsUseful, getContentHeight, getContentWidth, getContentX, getContentY, getLastImageSerial, getLinearFiltering, getLockCount, getMaxContentHeight, getMaxContentWidth, getPhysicalHeight, getPhysicalWidth, getPixelFormat, getSharedTexture, getUseMipmap, getWrapMode, isLocked, isSurfaceLost, lock, makePermanent, setContentHeight, setContentWidth, setLastImageSerial, setLinearFiltering, unlock, updatedisposegetContentHeight, getContentWidth, getContentX, getContentY, getPhysicalHeight, getPhysicalWidthprivate ES2RTTexture(ES2Context context, ES2TextureResource<ES2RTTextureData> resource, Texture.WrapMode wrapMode, int physicalWidth, int physicalHeight, int contentX, int contentY, int contentWidth, int contentHeight, int maxContentWidth, int maxContentHeight)
void attachDepthBuffer(ES2Context context)
context - current contextprivate void createAndAttachMSAABuffer(ES2Context context)
context - current contextstatic int getCompatibleDimension(ES2Context context, int dim, Texture.WrapMode wrapMode)
static ES2RTTexture create(ES2Context context, int w, int h, Texture.WrapMode wrapMode, boolean msaa)
public Texture getBackBuffer()
getBackBuffer in interface ReadbackRenderTargetpublic Graphics createGraphics()
createGraphics in interface RenderTargetpublic boolean readPixels(java.nio.Buffer pixels,
int x,
int y,
int width,
int height)
readPixels in interface RTTexturepublic boolean readPixels(java.nio.Buffer pixels)
readPixels in interface RTTexturepublic int getFboID()
getFboID in interface ES2RenderTargetpublic Screen getAssociatedScreen()
getAssociatedScreen in interface RenderTargetpublic void update(Image img)
TextureImage.
The upper-left corner of the image data will be positioned
at (contentX, contentY) of the texture, and the full width and height
of the image will be uploaded.
This method will cause the vertex buffer to be flushed prior to
uploading the pixels.
This is equivalent to calling:
update(img, 0, 0);
update in interface Textureupdate in class BaseTexture<ES2TextureResource<ES2RTTextureData>>img - the image data to be uploaded to this texturepublic void update(Image img, int dstx, int dsty)
TextureImage.
The upper-left corner of the image data will be positioned
at (contentX+dstx, contentY+dsty) of the texture, and the full width
and height of the image will be uploaded.
This method will cause the vertex buffer to be flushed prior to
uploading the pixels.
This is equivalent to calling:
update(img, dstx, dsty, img.getWidth(), img.getHeight());
update in interface Textureupdate in class BaseTexture<ES2TextureResource<ES2RTTextureData>>img - the image data to be uploaded to this texturedstx - the x-offset of the image data, in pixels, relative to the
contentX of this texturedsty - the y-offset of the image data, in pixels, relative to the
contentY of this texturepublic void update(Image img, int dstx, int dsty, int w, int h)
TextureImage.
The upper-left corner of the image data will be positioned
at (contentX+dstx, contentY+dsty) of the texture, and the source
region to be uploaded will be srcw by srch pixels.
This method will cause the vertex buffer to be flushed prior to
uploading the pixels.
This is equivalent to calling:
update(img, dstx, dsty, srcw, srch, false);
update in interface Textureupdate in class BaseTexture<ES2TextureResource<ES2RTTextureData>>img - the image data to be uploaded to this texturedstx - the x-offset of the image data, in pixels, relative to the
contentX of this texturedsty - the y-offset of the image data, in pixels, relative to the
contentY of this texturew - the width of the pixel region from the source imageh - the height of the pixel region from the source imagepublic void update(Image img, int dstx, int dsty, int w, int h, boolean skipFlush)
TextureImage.
The upper-left corner of the image data will be positioned
at (contentX+dstx, contentY+dsty) of the texture, and the source
region to be uploaded will be srcw by srch pixels.
This method will cause the vertex buffer to be flushed unless
skipFlush is true.
This is equivalent to calling:
update(img.getPixelBuffer(), img.getPixelFormat(),
dstx, dsty, img.getMinX(), img.getMinY(),
srcw, srch, img.getScanlineStride(), skipFlush);
update in interface Textureupdate in class BaseTexture<ES2TextureResource<ES2RTTextureData>>img - the image data to be uploaded to this texturedstx - the x-offset of the image data, in pixels, relative to the
contentX of this texturedsty - the y-offset of the image data, in pixels, relative to the
contentY of this texturew - the width of the pixel region from the source imageh - the height of the pixel region from the source imageskipFlush - if true, the vertex buffer will not be flushedpublic void update(java.nio.Buffer pixels,
PixelFormat format,
int dstx,
int dsty,
int srcx,
int srcy,
int srcw,
int srch,
int srcscan,
boolean skipFlush)
TextureBuffer.
The upper-left corner of the image data will be positioned
at (contentX+dstx, contentY+dsty) of the texture, and the source
region to be uploaded will be srcw by srch pixels.
This method will cause the vertex buffer to be flushed unless
skipFlush is true.update in interface Textureupdate in class ES2Texture<ES2RTTextureData>format - the format of the data contained in the pixel bufferdstx - the x-offset of the image data, in pixels, relative to the
contentX of this texturedsty - the y-offset of the image data, in pixels, relative to the
contentY of this texturesrcx - the x-offset into the source buffer, in pixelssrcy - the y-offset into the source buffer, in pixelssrcw - the width of the pixel region from the source buffersrch - the height of the pixel region from the source buffersrcscan - the scanline stride of the source buffer, in bytesskipFlush - if true, the vertex buffer will not be flushedpublic boolean isOpaque()
isOpaque in interface RenderTargetpublic void setOpaque(boolean opaque)
setOpaque in interface RenderTargetpublic boolean isVolatile()
isVolatile in interface RTTexturepublic boolean isMSAA()
isMSAA in interface RenderTarget