class D3DSwapChain extends D3DResource implements D3DRenderTarget, Presentable, D3DContextSource
D3DResource.D3DRecord
Modifier and Type | Field and Description |
---|---|
private float |
pixelScaleFactor |
private D3DRTTexture |
texBackBuffer |
d3dResRecord
disposerRecord
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 GraphicsResource
dispose
in class D3DResource
public boolean prepare(Rectangle dirtyregion)
Presentable
prepare
in interface Presentable
dirtyregion
- display region or null for full areapublic boolean present()
Presentable
present
in interface Presentable
public long getResourceHandle()
getResourceHandle
in interface D3DRenderTarget
public int getPhysicalWidth()
getPhysicalWidth
in interface Surface
public int getPhysicalHeight()
getPhysicalHeight
in interface Surface
public int getContentWidth()
getContentWidth
in interface Surface
public int getContentHeight()
getContentHeight
in interface Surface
public int getContentX()
getContentX
in interface Surface
public int getContentY()
getContentY
in interface Surface
private static int nPresent(long context, long pSwapChain)
public D3DContext getContext()
getContext
in interface D3DContextSource
public boolean lockResources(PresentableState pState)
Presentable
GraphicsResource
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 Presentable
pState
- The presentation state for the upcoming pulsepublic Graphics createGraphics()
createGraphics
in interface RenderTarget
public RTTexture getRTTBackBuffer()
public Screen getAssociatedScreen()
getAssociatedScreen
in interface RenderTarget
public float getPixelScaleFactor()
getPixelScaleFactor
in interface Presentable
public boolean isOpaque()
isOpaque
in interface RenderTarget
public void setOpaque(boolean opaque)
setOpaque
in interface RenderTarget
public boolean isMSAA()
isMSAA
in interface RenderTarget