class D3DSwapChain extends D3DResource implements D3DRenderTarget, Presentable, D3DContextSource
D3DResource.D3DRecord| Modifier and Type | Field and Description |
|---|---|
private float |
pixelScaleFactor |
private D3DRTTexture |
texBackBuffer |
d3dResRecorddisposerRecord| Constructor and Description |
|---|
D3DSwapChain(D3DContext context,
long pResource,
D3DRTTexture rtt,
float pixelScale) |
| Modifier and Type | Method and Description |
|---|---|
Graphics |
createGraphics() |
void |
dispose() |
Screen |
getAssociatedScreen() |
int |
getContentHeight() |
int |
getContentWidth() |
int |
getContentX() |
int |
getContentY() |
D3DContext |
getContext() |
int |
getPhysicalHeight() |
int |
getPhysicalWidth() |
float |
getPixelScaleFactor() |
long |
getResourceHandle() |
RTTexture |
getRTTBackBuffer() |
boolean |
isMSAA() |
boolean |
isOpaque() |
boolean |
lockResources(PresentableState pState)
Locks any underlying resources needed for a createGraphics/prepare/present
sequence and returns a boolean indicating if the presentable needs to be
recreated.
|
private static int |
nPresent(long context,
long pSwapChain) |
boolean |
prepare(Rectangle dirtyregion)
display the indicated region to the user.
|
boolean |
present()
present the prepared region to the user.
|
void |
setOpaque(boolean opaque) |
private final D3DRTTexture texBackBuffer
private final float pixelScaleFactor
D3DSwapChain(D3DContext context, long pResource, D3DRTTexture rtt, float pixelScale)
public void dispose()
dispose in interface GraphicsResourcedispose in class D3DResourcepublic boolean prepare(Rectangle dirtyregion)
Presentableprepare in interface Presentabledirtyregion - display region or null for full areapublic boolean present()
Presentablepresent in interface Presentablepublic long getResourceHandle()
getResourceHandle in interface D3DRenderTargetpublic int getPhysicalWidth()
getPhysicalWidth in interface Surfacepublic int getPhysicalHeight()
getPhysicalHeight in interface Surfacepublic int getContentWidth()
getContentWidth in interface Surfacepublic int getContentHeight()
getContentHeight in interface Surfacepublic int getContentX()
getContentX in interface Surfacepublic int getContentY()
getContentY in interface Surfaceprivate static int nPresent(long context,
long pSwapChain)
public D3DContext getContext()
getContext in interface D3DContextSourcepublic boolean lockResources(PresentableState pState)
PresentableGraphicsResource then its dispose() method will be
called prior to recreating a new Presentable object and
so no resource should need to be locked in that case.
The resources will be unlocked in either #prepare() or
Presentable.present().lockResources in interface PresentablepState - The presentation state for the upcoming pulsepublic Graphics createGraphics()
createGraphics in interface RenderTargetpublic RTTexture getRTTBackBuffer()
public Screen getAssociatedScreen()
getAssociatedScreen in interface RenderTargetpublic float getPixelScaleFactor()
getPixelScaleFactor in interface Presentablepublic boolean isOpaque()
isOpaque in interface RenderTargetpublic void setOpaque(boolean opaque)
setOpaque in interface RenderTargetpublic boolean isMSAA()
isMSAA in interface RenderTarget