class ES2SwapChain extends java.lang.Object implements ES2RenderTarget, Presentable, GraphicsResource
| Modifier and Type | Field and Description |
|---|---|
private ES2Context |
context |
private boolean |
copyFullBuffer |
private GLDrawable |
drawable |
private int |
h |
private boolean |
msaa |
(package private) int |
nativeDestHandle |
private boolean |
needsResize |
private boolean |
opaque |
private float |
pixelScaleFactor |
private PresentableState |
pState |
private RTTexture |
stableBackbuffer
An offscreen surface that acts as a persistent backbuffer, currently
only used when dirty region optimizations are enabled in the scenegraph.
|
private int |
w |
| Constructor and Description |
|---|
ES2SwapChain(ES2Context context,
PresentableState pState) |
| Modifier and Type | Method and Description |
|---|---|
ES2Graphics |
createGraphics() |
void |
dispose() |
private void |
drawTexture(ES2Graphics g,
RTTexture src,
float dx1,
float dy1,
float dx2,
float dy2,
float sx1,
float sy1,
float sx2,
float sy2) |
Screen |
getAssociatedScreen() |
int |
getContentHeight() |
int |
getContentWidth() |
int |
getContentX() |
int |
getContentY() |
int |
getFboID() |
int |
getPhysicalHeight() |
int |
getPhysicalWidth() |
float |
getPixelScaleFactor() |
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.
|
boolean |
prepare(Rectangle clip)
display the indicated region to the user.
|
boolean |
present()
present the prepared region to the user.
|
void |
setOpaque(boolean isOpaque) |
private final ES2Context context
private final PresentableState pState
private GLDrawable drawable
private boolean needsResize
private boolean opaque
private int w
private int h
private float pixelScaleFactor
int nativeDestHandle
private final boolean msaa
private RTTexture stableBackbuffer
private boolean copyFullBuffer
ES2SwapChain(ES2Context context, PresentableState pState)
public boolean isOpaque()
isOpaque in interface RenderTargetpublic void setOpaque(boolean isOpaque)
setOpaque in interface RenderTargetpublic 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 boolean prepare(Rectangle clip)
Presentableprepare in interface Presentableclip - display region or null for full areaprivate void drawTexture(ES2Graphics g, RTTexture src, float dx1, float dy1, float dx2, float dy2, float sx1, float sy1, float sx2, float sy2)
public boolean present()
Presentablepresent in interface Presentablepublic ES2Graphics createGraphics()
createGraphics in interface RenderTargetpublic int getFboID()
getFboID in interface ES2RenderTargetpublic Screen getAssociatedScreen()
getAssociatedScreen in interface RenderTargetpublic int getPhysicalWidth()
getPhysicalWidth in interface Surfacepublic int getPhysicalHeight()
getPhysicalHeight in interface Surfacepublic int getContentX()
getContentX in interface Surfacepublic int getContentY()
getContentY in interface Surfacepublic int getContentWidth()
getContentWidth in interface Surfacepublic int getContentHeight()
getContentHeight in interface Surfacepublic float getPixelScaleFactor()
getPixelScaleFactor in interface Presentablepublic void dispose()
dispose in interface GraphicsResourcepublic boolean isMSAA()
isMSAA in interface RenderTarget