import Texture from "../textures/Texture";
import Context3DRenderMode from "openfl/display3D/Context3DRenderMode";
import Stage3D from "openfl/display/Stage3D";
declare namespace starling.utils {
/**
* A utility class containing methods related to Stage3D and rendering in general.
*/
export class RenderUtil {
/**
* @private
*/
protected constructor();
/**
* Clears the render context with a certain color and alpha value.
*/
static clear(rgb?: number, alpha?: number, depth?: number, stencil?: number): void;
/**
* Returns the flags that are required for AGAL texture lookup,
* * including the '<' and '>' delimiters.
*/
static getTextureLookupFlags(format: string, mipMapping: boolean, repeat?: boolean, smoothing?: string): string;
/**
* 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.
*
*/
static getTextureVariantBits(texture: Texture): number;
/**
* Calls setSamplerStateAt at the current context,
* * converting the given parameters to their low level counterparts.
*/
static setSamplerStateAt(sampler: number, mipMapping: boolean, smoothing?: string, repeat?: boolean): void;
/**
* 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.
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.
* * * *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.
* */ static requestContext3D(stage3D: Stage3D, renderMode: Context3DRenderMode, profile: any): void; } } export default starling.utils.RenderUtil;