Top Fields Constructors Methods
com.sun.prism.es2

pack-priv Class ES2Context

extends BaseShaderContext
Class Inheritance
Imports
com.sun.glass.ui.Screen, com.sun.javafx.geom.Rectangle, .Vec3d, com.sun.javafx.geom.transform.Affine2D, .Affine3D, .BaseTransform, .GeneralTransform3D, com.sun.javafx.sg.prism.NGCamera, .NGDefaultCamera, com.sun.prism.CompositeMode, .Graphics, .Material, .RTTexture, .RenderTarget, .Texture, com.sun.prism.impl.PrismSettings, com.sun.prism.impl.ps.BaseShaderContext, com.sun.prism.ps.Shader, .ShaderFactory

Field Summary

Modifier and TypeField and Description
private Vec3d
private GLDrawable
private RenderTarget
private final GLDrawable
private static final GeneralTransform3D
private final GLContext
private int
public static final int
private final GLPixelFormat
private GeneralTransform3D
private int
private static float[]
private static final Affine3D
private static GeneralTransform3D
private int
private BaseShaderContext.State
private GeneralTransform3D

Constructor Summary

AccessConstructor and Description
pack-priv
ES2Context(Screen screen, ShaderFactory factory)

Method Summary

Modifier and TypeMethod and Description
public void
blit(RTTexture srcRTT, RTTexture dstRTT, int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1)

Implements abstract com.sun.prism.impl.ps.BaseShaderContext.blit.

pack-priv boolean
buildNativeGeometry(long nativeHandle, float[] vertexBuffer, int vertexBufferLength, short[] indexBuffer, int indexBufferLength)

pack-priv boolean
buildNativeGeometry(long nativeHandle, float[] vertexBuffer, int vertexBufferLength, int[] indexBuffer, int indexBufferLength)

pack-priv final void
pack-priv long
pack-priv long
pack-priv long
pack-priv void
forceRenderTarget(ES2Graphics g)

Called from ES2Graphics.updateRenderTarget() in response to a window resize event.

pack-priv int
genQuadsIndexBuffer(int numQuads)

pack-priv GLContext
pack-priv ES2Shader
pack-priv GLPixelFormat
pack-priv static short[]
getQuadIndices16bit(int numQuads)

pack-priv int
protected void
pack-priv void
pack-priv void
pack-priv void
releaseES2Mesh(long nativeHandle)

pack-priv void
releaseES2MeshView(long nativeHandle)

pack-priv void
releaseES2PhongMaterial(long nativeHandle)

protected void
pack-priv void
renderMeshView(long nativeHandle, Graphics g, ES2MeshView meshView)

protected void
renderQuads(float[] coordArray, byte[] colorArray, int numVertices)

Implements abstract com.sun.prism.impl.BaseContext.renderQuads.

pack-priv void
setAmbientLight(long nativeHandle, float r, float g, float b)

pack-priv void
setCullingMode(long nativeHandle, int cullingMode)

public void
public void
pack-priv final void
pack-priv void
setLight(long nativeHandle, int index, float x, float y, float z, float r, float g, float b, float w, float ca, float la, float qa, float isAttenuated, float maxRange, float dirX, float dirY, float dirZ, float innerAngle, float outerAngle, float falloff)

pack-priv void
setMap(long nativeHandle, int mapType, int texID)

pack-priv void
setMaterial(long nativeHandle, Material material)

pack-priv void
setShaderProgram(int progid)

pack-priv void
setSolidColor(long nativeHandle, float r, float g, float b, float a)

pack-priv void
setWireframe(long nativeHandle, boolean wireframe)

protected void
protected void
private void
protected BaseShaderContext.State
pack-priv void
updateShaderProgram(int progid)

protected void
protected void
protected void
Inherited from com.sun.prism.impl.ps.BaseShaderContext:
disposedisposeLCDBuffergetLCDBufferinitLCDBufferisSuperShaderEnabledresetLastClipsetPerspectiveTransformsetRenderTargetvalidateClearOpvalidateLCDBuffervalidateLCDOpvalidatePaintOpvalidateTextureOp

Field Detail

cameraPosback to summary
private Vec3d cameraPos
currentDrawableback to summary
private GLDrawable currentDrawable
currentTargetback to summary
private RenderTarget currentTarget
dummyGLDrawableback to summary
private final GLDrawable dummyGLDrawable
flipTxback to summary
private static final GeneralTransform3D flipTx
glContextback to summary
private final GLContext glContext
indexBufferback to summary
private int indexBuffer
NUM_QUADSback to summary
public static final int NUM_QUADS
pixelFormatback to summary
private final GLPixelFormat pixelFormat
projViewTxback to summary
private GeneralTransform3D projViewTx
quadIndicesback to summary
private int quadIndices
rawMatrixback to summary
private static float[] rawMatrix
scratchAffine3DTxback to summary
private static final Affine3D scratchAffine3DTx
scratchTxback to summary
private static GeneralTransform3D scratchTx
shaderProgramback to summary
private int shaderProgram
stateback to summary
private BaseShaderContext.State state

Hides com.sun.prism.impl.ps.BaseShaderContext.state.

worldTxback to summary
private GeneralTransform3D worldTx

Constructor Detail

ES2Contextback to summary
pack-priv ES2Context(Screen screen, ShaderFactory factory)

Method Detail

blitback to summary
public void blit(RTTexture srcRTT, RTTexture dstRTT, int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1)

Implements abstract com.sun.prism.impl.ps.BaseShaderContext.blit.

Annotations
@Override
buildNativeGeometryback to summary
pack-priv boolean buildNativeGeometry(long nativeHandle, float[] vertexBuffer, int vertexBufferLength, short[] indexBuffer, int indexBufferLength)
buildNativeGeometryback to summary
pack-priv boolean buildNativeGeometry(long nativeHandle, float[] vertexBuffer, int vertexBufferLength, int[] indexBuffer, int indexBufferLength)
clearContextback to summary
pack-priv final void clearContext()
createES2Meshback to summary
pack-priv long createES2Mesh()
createES2MeshViewback to summary
pack-priv long createES2MeshView(ES2Mesh mesh)
createES2PhongMaterialback to summary
pack-priv long createES2PhongMaterial()
forceRenderTargetback to summary
pack-priv void forceRenderTarget(ES2Graphics g)

Called from ES2Graphics.updateRenderTarget() in response to a window resize event. This method ensures that the context is made current after the resize event, which is required on Mac OS X in order to force a call to [NSOpenGLContext update].

genQuadsIndexBufferback to summary
pack-priv int genQuadsIndexBuffer(int numQuads)
getGLContextback to summary
pack-priv GLContext getGLContext()
getPhongShaderback to summary
pack-priv ES2Shader getPhongShader(ES2MeshView meshView)
getPixelFormatback to summary
pack-priv GLPixelFormat getPixelFormat()
getQuadIndices16bitback to summary
pack-priv static short[] getQuadIndices16bit(int numQuads)
getShaderProgramback to summary
pack-priv int getShaderProgram()
initback to summary
protected void init()

Overrides com.sun.prism.impl.ps.BaseShaderContext.init.

Annotations
@Override
makeCurrentback to summary
pack-priv void makeCurrent(GLDrawable drawable)
printRawMatrixback to summary
pack-priv void printRawMatrix(String mesg)
releaseES2Meshback to summary
pack-priv void releaseES2Mesh(long nativeHandle)
releaseES2MeshViewback to summary
pack-priv void releaseES2MeshView(long nativeHandle)
releaseES2PhongMaterialback to summary
pack-priv void releaseES2PhongMaterial(long nativeHandle)
releaseRenderTargetback to summary
protected void releaseRenderTarget()

Overrides com.sun.prism.impl.ps.BaseShaderContext.releaseRenderTarget.

Annotations
@Override
renderMeshViewback to summary
pack-priv void renderMeshView(long nativeHandle, Graphics g, ES2MeshView meshView)
renderQuadsback to summary
protected void renderQuads(float[] coordArray, byte[] colorArray, int numVertices)

Implements abstract com.sun.prism.impl.BaseContext.renderQuads.

Annotations
@Override
setAmbientLightback to summary
pack-priv void setAmbientLight(long nativeHandle, float r, float g, float b)
setCullingModeback to summary
pack-priv void setCullingMode(long nativeHandle, int cullingMode)
setDeviceParametersFor2Dback to summary
public void setDeviceParametersFor2D()

Overrides com.sun.prism.impl.BaseContext.setDeviceParametersFor2D.

Annotations
@Override
setDeviceParametersFor3Dback to summary
public void setDeviceParametersFor3D()

Overrides com.sun.prism.impl.BaseContext.setDeviceParametersFor3D.

Annotations
@Override
setIndexBufferback to summary
pack-priv final void setIndexBuffer(int ib)
setLightback to summary
pack-priv void setLight(long nativeHandle, int index, float x, float y, float z, float r, float g, float b, float w, float ca, float la, float qa, float isAttenuated, float maxRange, float dirX, float dirY, float dirZ, float innerAngle, float outerAngle, float falloff)
setMapback to summary
pack-priv void setMap(long nativeHandle, int mapType, int texID)
setMaterialback to summary
pack-priv void setMaterial(long nativeHandle, Material material)
setShaderProgramback to summary
pack-priv void setShaderProgram(int progid)
setSolidColorback to summary
pack-priv void setSolidColor(long nativeHandle, float r, float g, float b, float a)
setWireframeback to summary
pack-priv void setWireframe(long nativeHandle, boolean wireframe)
updateClipRectback to summary
protected void updateClipRect(Rectangle clipRect)

Implements abstract com.sun.prism.impl.ps.BaseShaderContext.updateClipRect.

Annotations
@Override
updateCompositeModeback to summary
protected void updateCompositeMode(CompositeMode mode)

Implements abstract com.sun.prism.impl.ps.BaseShaderContext.updateCompositeMode.

Annotations
@Override
updateRawMatrixback to summary
private void updateRawMatrix(GeneralTransform3D src)
updateRenderTargetback to summary
protected BaseShaderContext.State updateRenderTarget(RenderTarget target, NGCamera camera, boolean depthTest)

Implements abstract com.sun.prism.impl.ps.BaseShaderContext.updateRenderTarget.

Annotations
@Override
updateShaderProgramback to summary
pack-priv void updateShaderProgram(int progid)
updateShaderTransformback to summary
protected void updateShaderTransform(Shader shader, BaseTransform xform)

Implements abstract com.sun.prism.impl.ps.BaseShaderContext.updateShaderTransform.

Annotations
@Override
updateTextureback to summary
protected void updateTexture(int texUnit, Texture tex)

Implements abstract com.sun.prism.impl.ps.BaseShaderContext.updateTexture.

Annotations
@Override
updateWorldTransformback to summary
protected void updateWorldTransform(BaseTransform xform)

Implements abstract com.sun.prism.impl.ps.BaseShaderContext.updateWorldTransform.

Annotations
@Override