APIdia Launch Partner
Top Inners Fields Constructors Methods
com.badlogic.gdx.graphics.g3d.shaders

public Class DepthShader

extends DefaultShader
Class Inheritance
Imports
com.badlogic.gdx.Gdx, com.badlogic.gdx.graphics.Camera, .GL20, com.badlogic.gdx.graphics.g3d.Attributes, .Renderable, com.badlogic.gdx.graphics.g3d.attributes.BlendingAttribute, .FloatAttribute, .TextureAttribute, com.badlogic.gdx.graphics.g3d.utils.RenderContext, com.badlogic.gdx.graphics.glutils.ShaderProgram, com.badlogic.gdx.utils.GdxRuntimeException

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private final FloatAttribute
private static String
private static String
public final int
private static final Attributes
Inherited from com.badlogic.gdx.graphics.g3d.shaders.DefaultShader:
ambientCubemapattributesMaskconfigdefaultCullFacedefaultDepthFuncdirectionalLightsdirLightsColorOffsetdirLightsDirectionOffsetdirLightsLocdirLightsSizeenvironmentCubemapimplementedFlagslightingpointLightspointLightsColorOffsetpointLightsIntensityOffsetpointLightsLocpointLightsPositionOffsetpointLightsSizeshadowMapspotLightsspotLightsColorOffsetspotLightsCutoffAngleOffsetspotLightsDirectionOffsetspotLightsExponentOffsetspotLightsIntensityOffsetspotLightsLocspotLightsPositionOffsetspotLightsSizeu_alphaTestu_ambientCubemapu_ambientTextureu_ambientUVTransformu_bonesu_cameraDirectionu_cameraNearFaru_cameraPositionu_cameraUpu_diffuseColoru_diffuseTextureu_diffuseUVTransformu_dirLights0coloru_dirLights0directionu_dirLights1coloru_emissiveColoru_emissiveTextureu_emissiveUVTransformu_environmentCubemapu_fogColoru_normalMatrixu_normalTextureu_normalUVTransformu_opacityu_pointLights0coloru_pointLights0intensityu_pointLights0positionu_pointLights1coloru_projTransu_projViewTransu_projViewWorldTransu_reflectionColoru_reflectionTextureu_reflectionUVTransformu_shadowMapProjViewTransu_shadowPCFOffsetu_shadowTextureu_shininessu_specularColoru_specularTextureu_specularUVTransformu_spotLights0coloru_spotLights0cutoffAngleu_spotLights0directionu_spotLights0exponentu_spotLights0intensityu_spotLights0positionu_spotLights1coloru_timeu_viewTransu_viewWorldTransu_worldTrans

Constructor Summary

AccessConstructor and Description
public
DepthShader(final Renderable renderable)

public
DepthShader(final Renderable renderable, final DepthShader.Config config)

public
DepthShader(final Renderable renderable, final DepthShader.Config config, final String prefix)

public
DepthShader(final Renderable renderable, final DepthShader.Config config, final String prefix, final String vertexShader, final String fragmentShader)

public
DepthShader(final Renderable renderable, final DepthShader.Config config, final ShaderProgram shaderProgram)

Method Summary

Modifier and TypeMethod and Description
public void
begin(Camera camera, RenderContext context)

Overrides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.begin.

Implements com.badlogic.gdx.graphics.g3d.Shader.begin.

Initializes the context for exclusive rendering by this shader.

public boolean
canRender(Renderable renderable)

Overrides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.canRender.

Implements com.badlogic.gdx.graphics.g3d.Shader.canRender.

Checks whether this shader is intended to render the Renderable.

private static final Attributes
public static String
createPrefix(final Renderable renderable, final DepthShader.Config config)

public void
end()

Overrides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.end.

Implements com.badlogic.gdx.graphics.g3d.Shader.end.

Cleanup the context so other shaders can render.

public static final String
public static final String
public void
Inherited from com.badlogic.gdx.graphics.g3d.shaders.DefaultShader:
bindLightsbindMaterialcompareTocreatePrefixdisposeequalsequalsgetDefaultCullFacegetDefaultDepthFuncinitsetDefaultCullFacesetDefaultDepthFunc

Field Detail

alphaTestAttributeback to summary
private final FloatAttribute alphaTestAttribute
defaultFragmentShaderback to summary
private static String defaultFragmentShader

Hides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.defaultFragmentShader.

defaultVertexShaderback to summary
private static String defaultVertexShader

Hides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.defaultVertexShader.

numBonesback to summary
public final int numBones
tmpAttributesback to summary
private static final Attributes tmpAttributes

Hides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.tmpAttributes.

Constructor Detail

DepthShaderback to summary
public DepthShader(final Renderable renderable)
DepthShaderback to summary
public DepthShader(final Renderable renderable, final DepthShader.Config config)
DepthShaderback to summary
public DepthShader(final Renderable renderable, final DepthShader.Config config, final String prefix)
DepthShaderback to summary
public DepthShader(final Renderable renderable, final DepthShader.Config config, final String prefix, final String vertexShader, final String fragmentShader)
DepthShaderback to summary
public DepthShader(final Renderable renderable, final DepthShader.Config config, final ShaderProgram shaderProgram)

Method Detail

beginback to summary
public void begin(Camera camera, RenderContext context)

Overrides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.begin.

Implements com.badlogic.gdx.graphics.g3d.Shader.begin.

Doc from com.badlogic.gdx.graphics.g3d.Shader.begin.

Initializes the context for exclusive rendering by this shader. Use the render(Renderable) method to render a Renderable. When done rendering the end() method must be called.

Annotations
@Override
canRenderback to summary
public boolean canRender(Renderable renderable)

Overrides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.canRender.

Implements com.badlogic.gdx.graphics.g3d.Shader.canRender.

Doc from com.badlogic.gdx.graphics.g3d.Shader.canRender.

Checks whether this shader is intended to render the Renderable. Use this to make sure a call to the render(Renderable) method will succeed. This is expected to be a fast, non-blocking method. Note that this method will only return true if it is intended to be used. Even when it returns false the Shader might still be capable of rendering, but it's not preferred to do so.

Annotations
@Override
combineAttributesback to summary
private static final Attributes combineAttributes(final Renderable renderable)

Hides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.combineAttributes.

createPrefixback to summary
public static String createPrefix(final Renderable renderable, final DepthShader.Config config)
endback to summary
public void end()

Overrides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.end.

Implements com.badlogic.gdx.graphics.g3d.Shader.end.

Doc from com.badlogic.gdx.graphics.g3d.Shader.end.

Cleanup the context so other shaders can render. Must be called when done rendering using the render(Renderable) method, which must be preceded by a call to begin(Camera, RenderContext). After a call to this method an call to the render(Renderable) method will fail until the begin(Camera, RenderContext) is called.

Annotations
@Override
getDefaultFragmentShaderback to summary
public static final String getDefaultFragmentShader()

Hides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.getDefaultFragmentShader.

getDefaultVertexShaderback to summary
public static final String getDefaultVertexShader()

Hides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.getDefaultVertexShader.

renderback to summary
public void render(Renderable renderable, Attributes combinedAttributes)

Overrides com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.render.

Annotations
@Override
com.badlogic.gdx.graphics.g3d.shaders back to summary

public Class DepthShader.Config

extends Config
Class Inheritance

Field Summary

Modifier and TypeField and Description
public float
public boolean
Inherited from com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.Config:
defaultCullFacedefaultDepthFuncfragmentShaderignoreUnimplementednumBonesnumBoneWeightsnumDirectionalLightsnumPointLightsnumSpotLightsvertexShader

Constructor Summary

AccessConstructor and Description
public
public
Config(String vertexShader, String fragmentShader)

Field Detail

defaultAlphaTestback to summary
public float defaultAlphaTest
depthBufferOnlyback to summary
public boolean depthBufferOnly

Constructor Detail

Configback to summary
public Config()
Configback to summary
public Config(String vertexShader, String fragmentShader)