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 RenderTarget
public void setOpaque(boolean isOpaque)
setOpaque
in interface RenderTarget
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 boolean prepare(Rectangle clip)
Presentable
prepare
in interface Presentable
clip
- 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()
Presentable
present
in interface Presentable
public ES2Graphics createGraphics()
createGraphics
in interface RenderTarget
public int getFboID()
getFboID
in interface ES2RenderTarget
public Screen getAssociatedScreen()
getAssociatedScreen
in interface RenderTarget
public int getPhysicalWidth()
getPhysicalWidth
in interface Surface
public int getPhysicalHeight()
getPhysicalHeight
in interface Surface
public int getContentX()
getContentX
in interface Surface
public int getContentY()
getContentY
in interface Surface
public int getContentWidth()
getContentWidth
in interface Surface
public int getContentHeight()
getContentHeight
in interface Surface
public float getPixelScaleFactor()
getPixelScaleFactor
in interface Presentable
public void dispose()
dispose
in interface GraphicsResource
public boolean isMSAA()
isMSAA
in interface RenderTarget