ShaderRegisterCache
ShaderRegister Cache provides the usage management system for all registers during shading compilation.
Can be created using method new:
Lib.Away3D.Materials.Compilation.ShaderRegisterCache.new(profile) |
Create a new ShaderRegisterCache object. |
profile - String, The compatibility profile used by the renderer. |
Created element has method:
addFragmentTempUsages(register, usageCount) |
Marks a fragment temporary register as used, so it cannot be retrieved. The register won't be able to be used until removeUsage has been called usageCount times again. |
register - ShaderRegisterElement, The register to mark as used. usageCount - Int, The amount of usages to add. |
addVertexTempUsages(register, usageCount) |
Marks a vertex temporary register as used, so it cannot be retrieved. The register won't be able to be used until removeUsage has been called usageCount times again. |
register - ShaderRegisterElement, The register to mark as used. usageCount - Int, The amount of usages to add. |
dispose() |
Disposes all resources used. |
|
getFreeFragmentConstant() |
Retrieve an available fragment constant register. ShaderRegisterElement) |
|
getFreeFragmentSingleTemp() |
Retrieve a single component from a fragment temporary register that's still available. (ShaderRegisterElement) |
|
getFreeFragmentVectorTemp() |
Retrieve an entire fragment temporary register that's still available. The register won't be able to be used until removeUsage has been called usageCount times again. (ShaderRegisterElement) |
|
getFreeTextureReg() |
Retrieve an available texture register (ShaderRegisterElement) |
|
getFreeVarying() |
Retrieve an available varying register. (ShaderRegisterElement) |
|
getFreeVertexAttribute() |
Retrieve an available vertex attribute register (ShaderRegisterElement) |
|
getFreeVertexConstant() |
Retrieve an available vertex constant register (ShaderRegisterElement) |
|
getFreeVertexSingleTemp() |
Retrieve a single component from a vertex temporary register that's still available. (ShaderRegisterElement) |
|
getFreeVertexVectorTemp() |
Retrieve an entire vertex temporary register that's still available. (ShaderRegisterElement) |
|
removeFragmentTempUsage(register) |
Removes a usage from a fragment temporary register. When usages reach 0, the register is freed again. |
register - ShaderRegisterElement, The register for which to remove a usage. |
removeVertexTempUsage(register) |
Removes a usage from a vertex temporary register. When usages reach 0, the register is freed again. |
register - ShaderRegisterElement, The register for which to remove a usage. |
reset() |
Resets all registers. |
|
Properties:
vertexConstantOffset |
Int, Indicates the start index from which to retrieve vertex constants. |
vertexAttributesOffset |
Int, Indicates the start index from which to retrieve vertex attributes. |
varyingsOffset |
Int, Indicates the start index from which to retrieve varying registers. |
fragmentConstantOffset |
Int, Indicates the start index from which to retrieve fragment constants. |
fragmentOutputRegister |
[read-only] ShaderRegisterElement, The fragment output register. |
numUsedVertexConstants |
[read-only] Int, The amount of used vertex constant registers. |
numUsedFragmentConstants |
[read-only] Int, The amount of used fragment constant registers. |
numUsedStreams |
[read-only] Int, The amount of used vertex streams. |
numUsedTextures |
[read-only] Int, The amount of used texture slots. |
numUsedVaryings |
[read-only] Int, The amount of used varying registers. |
Created with the Personal Edition of HelpNDoc: Easily create EPub books