Skip to content

Commit

Permalink
added 'rgb' and 'alpha' arguments to 'RenderTexture.clear' (closes Ga…
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimaryFeather committed Jan 9, 2014
1 parent 9db970b commit a9cb004
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions starling/src/starling/textures/RenderTexture.as
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,15 @@ package starling.textures
}
}

/** Clears the texture (restoring full transparency). */
public function clear():void
/** Clears the render texture with a certain color and alpha value. Call without any
* arguments to restore full transparency. */
public function clear(rgb:uint=0, alpha:Number=0.0):void
{
var context:Context3D = Starling.context;
if (context == null) throw new MissingContextError();

mSupport.renderTarget = mActiveTexture;
mSupport.clear();
mSupport.clear(rgb, alpha);
mSupport.renderTarget = null;
}

Expand Down

0 comments on commit a9cb004

Please sign in to comment.