class D3DTexture extends BaseTexture<D3DTextureResource> implements D3DContextSource
Texture.Usage, Texture.WrapMode
contentHeight, contentWidth, resource
Constructor and Description |
---|
D3DTexture(D3DContext context,
PixelFormat format,
Texture.WrapMode wrapMode,
long pResource,
int physicalWidth,
int physicalHeight,
int contentWidth,
int contentHeight,
boolean isRTT) |
D3DTexture(D3DContext context,
PixelFormat format,
Texture.WrapMode wrapMode,
long pResource,
int physicalWidth,
int physicalHeight,
int contentX,
int contentY,
int contentWidth,
int contentHeight,
boolean isRTT,
int samples,
boolean useMipmap) |
D3DTexture(D3DTexture sharedTex,
Texture.WrapMode altMode) |
Modifier and Type | Method and Description |
---|---|
protected Texture |
createSharedTexture(Texture.WrapMode newMode)
Create a new version of this texture which shares the same
ManagedResource reference. |
D3DContext |
getContext() |
long |
getNativeSourceHandle() |
long |
getNativeTextureObject() |
void |
update(java.nio.Buffer pixels,
PixelFormat format,
int dstx,
int dsty,
int srcx,
int srcy,
int srcw,
int srch,
int srcscan) |
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(MediaFrame frame,
boolean skipFlush)
Updates this texture using the contents of the provided
MediaFrame . |
assertLocked, 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, unlock, update, update, update, update
D3DTexture(D3DContext context, PixelFormat format, Texture.WrapMode wrapMode, long pResource, int physicalWidth, int physicalHeight, int contentWidth, int contentHeight, boolean isRTT)
D3DTexture(D3DContext context, PixelFormat format, Texture.WrapMode wrapMode, long pResource, int physicalWidth, int physicalHeight, int contentX, int contentY, int contentWidth, int contentHeight, boolean isRTT, int samples, boolean useMipmap)
D3DTexture(D3DTexture sharedTex, Texture.WrapMode altMode)
protected Texture createSharedTexture(Texture.WrapMode newMode)
BaseTexture
ManagedResource
reference.
The lock counts for the shared resource reference are not
changed in the processing of this method.createSharedTexture
in class BaseTexture<D3DTextureResource>
newMode
- the WrapMode
to use for the new texture.Texture
object sharing the underlying resource.public long getNativeSourceHandle()
public long getNativeTextureObject()
public D3DContext getContext()
getContext
in interface D3DContextSource
public void update(MediaFrame frame, boolean skipFlush)
Texture
MediaFrame
. The source and destination coordinates are implicit,
you can only update the entire video texture.public void update(java.nio.Buffer pixels, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan, boolean skipFlush)
Texture
Buffer
.
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 Texture
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 void update(java.nio.Buffer pixels, PixelFormat format, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, int srcscan)