Clears the render context with a certain color and alpha value.
Creates an AGAL source string with a tex
operation, including an options
list with the appropriate format flag.
Note that values for repeat/clamp
, filter
and
mip-filter
are not included in the options list, since it's preferred
to set those values at runtime via setSamplerStateAt
.
Starling expects every color to have its alpha value premultiplied into
the RGB channels. Thus, if this method encounters a non-PMA texture, it will
(per default) convert the color in the result register to PMA mode, resulting
in an additional mul
-operation.
@param resultReg the register to write the result into. @param uvReg the register containing the texture coordinates. @param sampler the texture sampler to use. @param texture the texture that's active in the given texture sampler. @param convertToPmaIfRequired indicates if a non-PMA color should be converted to PMA. @param tempReg if 'resultReg' is the output register and PMA conversion is done, a temporary register is needed.
@return the AGAL source code, line break(s) included.
Returns the flags that are required for AGAL texture lookup, including the '<' and '>' delimiters.
Returns a bit field uniquely describing texture format and premultiplied alpha,
so that each required AGAL variant will get its unique ID. This method is most
useful when overriding the programVariantName
method of custom
effects.
@return a bit field using the 3 least significant bits.
Requests a context3D object from the given Stage3D object.
The stage3D object the context needs to be requested from.
The 'Context3DRenderMode' to use when requesting the context.
If you know exactly which 'Context3DProfile' you want to use, simply pass a String with that profile.
<p>If you are unsure which profiles are supported on the current
device, you can also pass an Array of profiles; they will be
tried one after the other (starting at index 0), until a working
profile is found. If none of the given profiles is supported,
the Stage3D object will dispatch an ERROR event.</p>
<p>You can also pass the String 'auto' to use the best available
profile automatically. This will try all known Stage3D profiles,
beginning with the most powerful.</p>
Calls setSamplerStateAt
at the current context,
converting the given parameters to their low level counterparts.
Generated using TypeDoc
A utility class containing methods related to Stage3D and rendering in general.