|
@@ -50,9 +50,9 @@ class Texture {
|
|
If set to null, depth testing is disabled.
|
|
If set to null, depth testing is disabled.
|
|
**/
|
|
**/
|
|
public var depthBuffer : DepthBuffer;
|
|
public var depthBuffer : DepthBuffer;
|
|
-
|
|
|
|
|
|
+
|
|
var _lastFrame:Int;
|
|
var _lastFrame:Int;
|
|
-
|
|
|
|
|
|
+
|
|
function set_lastFrame(lf:Int) {
|
|
function set_lastFrame(lf:Int) {
|
|
// Make sure we do not override lastFrame of textures set to prevent auto dispose
|
|
// Make sure we do not override lastFrame of textures set to prevent auto dispose
|
|
if(_lastFrame != PREVENT_AUTO_DISPOSE) {
|
|
if(_lastFrame != PREVENT_AUTO_DISPOSE) {
|
|
@@ -218,7 +218,7 @@ class Texture {
|
|
|
|
|
|
public function clear( color : Int, alpha = 1., ?layer = -1 ) {
|
|
public function clear( color : Int, alpha = 1., ?layer = -1 ) {
|
|
alloc();
|
|
alloc();
|
|
- if( flags.has(Target) #if (usegl || hlsdl || js) || true #end ) {
|
|
|
|
|
|
+ if( #if (usegl || hlsdl || js) true #else flags.has(Target) #end && (width != 1 || height != 1) ) {
|
|
var engine = h3d.Engine.getCurrent();
|
|
var engine = h3d.Engine.getCurrent();
|
|
color |= Std.int(hxd.Math.clamp(alpha)*255) << 24;
|
|
color |= Std.int(hxd.Math.clamp(alpha)*255) << 24;
|
|
if( layer < 0 ) {
|
|
if( layer < 0 ) {
|