mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-05 06:14:36 +00:00
cleaning code
This commit is contained in:
parent
ab7ba485cb
commit
f7a519b13f
|
@ -1,12 +1,10 @@
|
||||||
package funkin.graphics.framebuffer;
|
package funkin.graphics.framebuffer;
|
||||||
|
|
||||||
import flixel.FlxCamera;
|
import flixel.FlxCamera;
|
||||||
import flixel.FlxG;
|
|
||||||
import flixel.graphics.FlxGraphic;
|
import flixel.graphics.FlxGraphic;
|
||||||
import flixel.graphics.frames.FlxFrame;
|
import flixel.graphics.frames.FlxFrame;
|
||||||
import flixel.math.FlxMatrix;
|
import flixel.math.FlxMatrix;
|
||||||
import flixel.math.FlxRect;
|
import flixel.math.FlxRect;
|
||||||
import flixel.system.FlxAssets.FlxShader;
|
|
||||||
import openfl.Lib;
|
import openfl.Lib;
|
||||||
import openfl.display.BitmapData;
|
import openfl.display.BitmapData;
|
||||||
import openfl.display3D.textures.TextureBase;
|
import openfl.display3D.textures.TextureBase;
|
||||||
|
@ -24,7 +22,6 @@ class GrabbableCamera extends FlxCamera
|
||||||
{
|
{
|
||||||
final grabbed:Array<BitmapData> = [];
|
final grabbed:Array<BitmapData> = [];
|
||||||
final texturePool:Array<TextureBase> = [];
|
final texturePool:Array<TextureBase> = [];
|
||||||
final defaultShader:FlxShader = new FlxShader();
|
|
||||||
|
|
||||||
final bgTexture:TextureBase;
|
final bgTexture:TextureBase;
|
||||||
final bgBitmap:BitmapData;
|
final bgBitmap:BitmapData;
|
||||||
|
@ -119,8 +116,8 @@ class GrabbableCamera extends FlxCamera
|
||||||
// also clear grabbed bitmaps
|
// also clear grabbed bitmaps
|
||||||
for (bitmap in grabbed)
|
for (bitmap in grabbed)
|
||||||
{
|
{
|
||||||
texturePool.push(@:privateAccess bitmap.__texture);
|
texturePool.push(bitmap.__texture);
|
||||||
bitmap.dispose();
|
bitmap.dispose(); // this doesn't release the texture
|
||||||
}
|
}
|
||||||
grabbed.clear();
|
grabbed.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue