#include <hxcpp.h>

#ifndef INCLUDED_Luxe
#include <Luxe.h>
#endif
#ifndef INCLUDED_Std
#include <Std.h>
#endif
#ifndef INCLUDED_haxe_Log
#include <haxe/Log.h>
#endif
#ifndef INCLUDED_haxe_Resource
#include <haxe/Resource.h>
#endif
#ifndef INCLUDED_haxe_io_Bytes
#include <haxe/io/Bytes.h>
#endif
#ifndef INCLUDED_luxe_Core
#include <luxe/Core.h>
#endif
#ifndef INCLUDED_luxe_resource_Resource
#include <luxe/resource/Resource.h>
#endif
#ifndef INCLUDED_luxe_resource_ResourceManager
#include <luxe/resource/ResourceManager.h>
#endif
#ifndef INCLUDED_luxe_resource_ResourceType
#include <luxe/resource/ResourceType.h>
#endif
#ifndef INCLUDED_luxe_utils_Utils
#include <luxe/utils/Utils.h>
#endif
#ifndef INCLUDED_phoenix_ClampType
#include <phoenix/ClampType.h>
#endif
#ifndef INCLUDED_phoenix_Color
#include <phoenix/Color.h>
#endif
#ifndef INCLUDED_phoenix_FilterType
#include <phoenix/FilterType.h>
#endif
#ifndef INCLUDED_phoenix_RenderState
#include <phoenix/RenderState.h>
#endif
#ifndef INCLUDED_phoenix_Renderer
#include <phoenix/Renderer.h>
#endif
#ifndef INCLUDED_phoenix_Texture
#include <phoenix/Texture.h>
#endif
#ifndef INCLUDED_phoenix_Vector
#include <phoenix/Vector.h>
#endif
#ifndef INCLUDED_snow_App
#include <snow/App.h>
#endif
#ifndef INCLUDED_snow_Snow
#include <snow/Snow.h>
#endif
#ifndef INCLUDED_snow_assets_Asset
#include <snow/assets/Asset.h>
#endif
#ifndef INCLUDED_snow_assets_AssetImage
#include <snow/assets/AssetImage.h>
#endif
#ifndef INCLUDED_snow_assets_Assets
#include <snow/assets/Assets.h>
#endif
#ifndef INCLUDED_snow_platform_native_render_opengl_GL
#include <snow/platform/native/render/opengl/GL.h>
#endif
#ifndef INCLUDED_snow_platform_native_render_opengl_GLObject
#include <snow/platform/native/render/opengl/GLObject.h>
#endif
#ifndef INCLUDED_snow_platform_native_render_opengl_GLTexture
#include <snow/platform/native/render/opengl/GLTexture.h>
#endif
#ifndef INCLUDED_snow_platform_native_utils_ArrayBufferView
#include <snow/platform/native/utils/ArrayBufferView.h>
#endif
#ifndef INCLUDED_snow_platform_native_utils_ByteArray
#include <snow/platform/native/utils/ByteArray.h>
#endif
#ifndef INCLUDED_snow_platform_native_utils_UInt8Array
#include <snow/platform/native/utils/UInt8Array.h>
#endif
#ifndef INCLUDED_snow_utils_IDataInput
#include <snow/utils/IDataInput.h>
#endif
#ifndef INCLUDED_snow_utils_IMemoryRange
#include <snow/utils/IMemoryRange.h>
#endif
namespace phoenix{

Void Texture_obj::__construct(::luxe::resource::ResourceManager _manager,::luxe::resource::ResourceType _type)
{
HX_STACK_FRAME("phoenix.Texture","new",0x3a7497ce,"phoenix.Texture.new","phoenix/Texture.hx",34,0xc84e46a3)

HX_STACK_ARG(_manager,"_manager")

HX_STACK_ARG(_type,"_type")
{
	HX_STACK_LINE(45)
	this->slot = (int)0;
	HX_STACK_LINE(43)
	this->loaded = false;
	HX_STACK_LINE(42)
	this->height = (int)-1;
	HX_STACK_LINE(41)
	this->width = (int)-1;
	HX_STACK_LINE(40)
	this->height_actual = (int)-1;
	HX_STACK_LINE(39)
	this->width_actual = (int)-1;
	HX_STACK_LINE(58)
	if (((_type == null()))){
		HX_STACK_LINE(58)
		_type = ::luxe::resource::ResourceType_obj::texture;
	}
	HX_STACK_LINE(60)
	super::__construct(_manager,_type,null());
	HX_STACK_LINE(61)
	this->_onload_handlers = Dynamic( Array_obj<Dynamic>::__new() );
	HX_STACK_LINE(63)
	this->id = HX_CSTRING("Untitled");
	HX_STACK_LINE(64)
	this->set_filter(::phoenix::FilterType_obj::linear);
	HX_STACK_LINE(65)
	this->set_clamp(::phoenix::ClampType_obj::edge);
}
;
	return null();
}

//Texture_obj::~Texture_obj() { }

Dynamic Texture_obj::__CreateEmpty() { return  new Texture_obj; }
hx::ObjectPtr< Texture_obj > Texture_obj::__new(::luxe::resource::ResourceManager _manager,::luxe::resource::ResourceType _type)
{  hx::ObjectPtr< Texture_obj > result = new Texture_obj();
	result->__construct(_manager,_type);
	return result;}

Dynamic Texture_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< Texture_obj > result = new Texture_obj();
	result->__construct(inArgs[0],inArgs[1]);
	return result;}

Dynamic Texture_obj::set_onload( Dynamic f){
	HX_STACK_FRAME("phoenix.Texture","set_onload",0x07b0a754,"phoenix.Texture.set_onload","phoenix/Texture.hx",69,0xc84e46a3)
	HX_STACK_THIS(this)
	HX_STACK_ARG(f,"f")
	HX_STACK_LINE(72)
	if ((this->loaded)){
		HX_STACK_LINE(73)
		f(hx::ObjectPtr<OBJ_>(this)).Cast< Void >();
		HX_STACK_LINE(74)
		return f;
	}
	else{
		HX_STACK_LINE(77)
		this->_onload_handlers->__Field(HX_CSTRING("push"),true)(f);
	}
	HX_STACK_LINE(80)
	return f;
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,set_onload,return )

Void Texture_obj::do_onload( ){
{
		HX_STACK_FRAME("phoenix.Texture","do_onload",0x40b51627,"phoenix.Texture.do_onload","phoenix/Texture.hx",84,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_LINE(86)
		this->loaded = true;
		HX_STACK_LINE(88)
		{
			HX_STACK_LINE(88)
			int _g = (int)0;		HX_STACK_VAR(_g,"_g");
			HX_STACK_LINE(88)
			Dynamic _g1 = this->_onload_handlers;		HX_STACK_VAR(_g1,"_g1");
			HX_STACK_LINE(88)
			while(((_g < _g1->__Field(HX_CSTRING("length"),true)))){
				HX_STACK_LINE(88)
				Dynamic f = _g1->__GetItem(_g);		HX_STACK_VAR(f,"f");
				HX_STACK_LINE(88)
				++(_g);
				HX_STACK_LINE(89)
				if (((f != null()))){
					HX_STACK_LINE(90)
					f(hx::ObjectPtr<OBJ_>(this)).Cast< Void >();
				}
			}
		}
		HX_STACK_LINE(94)
		this->_onload_handlers->__Field(HX_CSTRING("splice"),true)((int)0,this->_onload_handlers->__Field(HX_CSTRING("length"),true));
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,do_onload,(void))

::String Texture_obj::toString( ){
	HX_STACK_FRAME("phoenix.Texture","toString",0x4a5e5a7e,"phoenix.Texture.toString","phoenix/Texture.hx",98,0xc84e46a3)
	HX_STACK_THIS(this)
	HX_STACK_LINE(99)
	::String _g = ((((((((((HX_CSTRING("Texture (") + ::Std_obj::string(this->texture)) + HX_CSTRING(") (")) + this->width) + HX_CSTRING("x")) + this->height) + HX_CSTRING(") real size(")) + this->width_actual) + HX_CSTRING("x")) + this->height_actual) + HX_CSTRING(") "));		HX_STACK_VAR(_g,"_g");
	HX_STACK_LINE(99)
	::String _g1 = ((_g + ::Std_obj::string(this->filter)) + HX_CSTRING(" filtering. "));		HX_STACK_VAR(_g1,"_g1");
	HX_STACK_LINE(99)
	return (((_g1 + ::Std_obj::string(this->clamp)) + HX_CSTRING(" clamp. id: ")) + this->id);
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,toString,return )

::String Texture_obj::estimated_memory( ){
	HX_STACK_FRAME("phoenix.Texture","estimated_memory",0xa25f6936,"phoenix.Texture.estimated_memory","phoenix/Texture.hx",102,0xc84e46a3)
	HX_STACK_THIS(this)
	HX_STACK_LINE(104)
	int _bytes = ((this->width_actual * this->height_actual) * (int)4);		HX_STACK_VAR(_bytes,"_bytes");
	HX_STACK_LINE(106)
	return ::Luxe_obj::utils->bytes_to_string(_bytes);
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,estimated_memory,return )

Void Texture_obj::create_from_bytes_html( ::String _asset_name,Dynamic _asset_bytes,Float _width,Float _height){
{
		HX_STACK_FRAME("phoenix.Texture","create_from_bytes_html",0x4b48a7c3,"phoenix.Texture.create_from_bytes_html","phoenix/Texture.hx",110,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_asset_name,"_asset_name")
		HX_STACK_ARG(_asset_bytes,"_asset_bytes")
		HX_STACK_ARG(_width,"_width")
		HX_STACK_ARG(_height,"_height")
		HX_STACK_LINE(112)
		Float max_size = ::snow::platform::native::render::opengl::GL_obj::getParameter((int)3379);		HX_STACK_VAR(max_size,"max_size");
		HX_STACK_LINE(114)
		this->texture = ::snow::platform::native::render::opengl::GL_obj::createTexture();
		HX_STACK_LINE(117)
		this->id = _asset_name;
		HX_STACK_LINE(118)
		this->width = ::Std_obj::_int(_width);
		HX_STACK_LINE(119)
		this->height = ::Std_obj::_int(_height);
		HX_STACK_LINE(121)
		this->width_actual = this->width;
		HX_STACK_LINE(122)
		this->height_actual = this->height;
		HX_STACK_LINE(124)
		if (((_width > max_size))){
			HX_STACK_LINE(124)
			HX_STACK_DO_THROW((((HX_CSTRING("texture bigger than MAX_TEXTURE_SIZE (") + max_size) + HX_CSTRING(") ")) + _asset_name));
		}
		HX_STACK_LINE(125)
		if (((_height > max_size))){
			HX_STACK_LINE(125)
			HX_STACK_DO_THROW((((HX_CSTRING("texture bigger than MAX_TEXTURE_SIZE (") + max_size) + HX_CSTRING(") ")) + _asset_name));
		}
		HX_STACK_LINE(128)
		this->bind();
		HX_STACK_LINE(131)
		::snow::platform::native::render::opengl::GL_obj::texImage2D((int)3553,(int)0,(int)6408,this->width,this->height,(int)0,(int)6408,(int)5121,_asset_bytes);
		HX_STACK_LINE(134)
		this->_set_filter(::phoenix::FilterType_obj::linear);
		HX_STACK_LINE(135)
		this->_set_clamp(::phoenix::ClampType_obj::edge);
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC4(Texture_obj,create_from_bytes_html,(void))

Void Texture_obj::check_size( ){
{
		HX_STACK_FRAME("phoenix.Texture","check_size",0x906a712a,"phoenix.Texture.check_size","phoenix/Texture.hx",242,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_LINE(244)
		int max_size = ::snow::platform::native::render::opengl::GL_obj::getParameter((int)3379);		HX_STACK_VAR(max_size,"max_size");
		HX_STACK_LINE(246)
		if (((this->asset->image->__Field(HX_CSTRING("width_actual"),true) > max_size))){
			HX_STACK_LINE(246)
			HX_STACK_DO_THROW((((HX_CSTRING("texture bigger than MAX_TEXTURE_SIZE (") + max_size) + HX_CSTRING(") ")) + this->asset->id));
		}
		HX_STACK_LINE(247)
		if (((this->asset->image->__Field(HX_CSTRING("height_actual"),true) > max_size))){
			HX_STACK_LINE(247)
			HX_STACK_DO_THROW((((HX_CSTRING("texture bigger than MAX_TEXTURE_SIZE (") + max_size) + HX_CSTRING(") ")) + this->asset->id));
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,check_size,(void))

Void Texture_obj::reset( ){
{
		HX_STACK_FRAME("phoenix.Texture","reset",0x803c48bd,"phoenix.Texture.reset","phoenix/Texture.hx",253,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_LINE(256)
		this->texture = ::snow::platform::native::render::opengl::GL_obj::createTexture();
		HX_STACK_LINE(258)
		this->bind();
		HX_STACK_LINE(260)
		::snow::platform::native::render::opengl::GL_obj::texImage2D((int)3553,(int)0,(int)6408,this->width_actual,this->height_actual,(int)0,(int)6408,(int)5121,this->asset->image->__Field(HX_CSTRING("data"),true));
		HX_STACK_LINE(263)
		this->_set_filter(this->filter);
		HX_STACK_LINE(264)
		this->_set_clamp(this->clamp);
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,reset,(void))

Void Texture_obj::from_asset( ::snow::assets::AssetImage _asset){
{
		HX_STACK_FRAME("phoenix.Texture","from_asset",0x4513646d,"phoenix.Texture.from_asset","phoenix/Texture.hx",268,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_asset,"_asset")
		HX_STACK_LINE(270)
		if (((_asset == null()))){
			HX_STACK_LINE(271)
			HX_STACK_DO_THROW(HX_CSTRING("null asset passed to Texture.from_asset"));
		}
		HX_STACK_LINE(275)
		this->asset = _asset;
		HX_STACK_LINE(278)
		this->check_size();
		HX_STACK_LINE(281)
		this->id = this->asset->id;
		HX_STACK_LINE(284)
		this->width = this->asset->image->__Field(HX_CSTRING("width"),true);
		HX_STACK_LINE(285)
		this->height = this->asset->image->__Field(HX_CSTRING("height"),true);
		HX_STACK_LINE(286)
		this->width_actual = this->asset->image->__Field(HX_CSTRING("width_actual"),true);
		HX_STACK_LINE(287)
		this->height_actual = this->asset->image->__Field(HX_CSTRING("height_actual"),true);
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,from_asset,(void))

Void Texture_obj::generate_mipmaps( ){
{
		HX_STACK_FRAME("phoenix.Texture","generate_mipmaps",0x90c8cb73,"phoenix.Texture.generate_mipmaps","phoenix/Texture.hx",291,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_LINE(291)
		Array< ::Dynamic > _g = Array_obj< ::Dynamic >::__new().Add(hx::ObjectPtr<OBJ_>(this));		HX_STACK_VAR(_g,"_g");

		HX_BEGIN_LOCAL_FUNC_S1(hx::LocalFunc,_Function_1_1,Array< ::Dynamic >,_g)
		Void run(::phoenix::Texture t){
			HX_STACK_FRAME("*","_Function_1_1",0x5200ed37,"*._Function_1_1","phoenix/Texture.hx",293,0xc84e46a3)
			HX_STACK_ARG(t,"t")
			{
				HX_STACK_LINE(295)
				_g->__get((int)0).StaticCast< ::phoenix::Texture >()->bind();
				HX_STACK_LINE(297)
				::snow::platform::native::render::opengl::GL_obj::generateMipmap((int)3553);
			}
			return null();
		}
		HX_END_LOCAL_FUNC1((void))

		HX_STACK_LINE(293)
		this->set_onload( Dynamic(new _Function_1_1(_g)));
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,generate_mipmaps,(void))

Void Texture_obj::bind( ){
{
		HX_STACK_FRAME("phoenix.Texture","bind",0xe3a4ae8f,"phoenix.Texture.bind","phoenix/Texture.hx",302,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_LINE(303)
		::Luxe_obj::renderer->state->activeTexture(((int)33984 + this->slot));
		HX_STACK_LINE(304)
		::Luxe_obj::renderer->state->bindTexture2D(this->texture);
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,bind,(void))

Dynamic Texture_obj::get_pixel( ::phoenix::Vector _pos){
	HX_STACK_FRAME("phoenix.Texture","get_pixel",0xa5f630cb,"phoenix.Texture.get_pixel","phoenix/Texture.hx",307,0xc84e46a3)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_pos,"_pos")
	HX_STACK_LINE(309)
	if (((this->asset->image->__Field(HX_CSTRING("data"),true) == null()))){
		HX_STACK_LINE(309)
		return null();
	}
	HX_STACK_LINE(311)
	int x = ::Std_obj::_int(_pos->x);		HX_STACK_VAR(x,"x");
	HX_STACK_LINE(312)
	int y = ::Std_obj::_int(_pos->y);		HX_STACK_VAR(y,"y");
	struct _Function_1_1{
		inline static Dynamic Block( ::phoenix::Texture_obj *__this,int &x,int &y){
			HX_STACK_FRAME("*","closure",0x5bdab937,"*.closure","phoenix/Texture.hx",314,0xc84e46a3)
			{
				hx::Anon __result = hx::Anon_obj::Create();
				__result->Add(HX_CSTRING("r") , (Float(__this->asset->image->__Field(HX_CSTRING("data"),true)->__GetItem(((((y * __this->width) + x)) * (int)4))) / Float(255.0)),false);
				__result->Add(HX_CSTRING("g") , (Float(__this->asset->image->__Field(HX_CSTRING("data"),true)->__GetItem((((((y * __this->width) + x)) * (int)4) + (int)1))) / Float(255.0)),false);
				__result->Add(HX_CSTRING("b") , (Float(__this->asset->image->__Field(HX_CSTRING("data"),true)->__GetItem((((((y * __this->width) + x)) * (int)4) + (int)2))) / Float(255.0)),false);
				__result->Add(HX_CSTRING("a") , (Float(__this->asset->image->__Field(HX_CSTRING("data"),true)->__GetItem((((((y * __this->width) + x)) * (int)4) + (int)3))) / Float(255.0)),false);
				return __result;
			}
			return null();
		}
	};
	HX_STACK_LINE(314)
	return _Function_1_1::Block(this,x,y);
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,get_pixel,return )

Void Texture_obj::set_pixel( ::phoenix::Vector _pos,::phoenix::Color _color){
{
		HX_STACK_FRAME("phoenix.Texture","set_pixel",0x89471cd7,"phoenix.Texture.set_pixel","phoenix/Texture.hx",323,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_pos,"_pos")
		HX_STACK_ARG(_color,"_color")
		HX_STACK_LINE(325)
		if (((this->asset->image->__Field(HX_CSTRING("data"),true) == null()))){
			HX_STACK_LINE(325)
			return null();
		}
		HX_STACK_LINE(327)
		int x = ::Std_obj::_int(_pos->x);		HX_STACK_VAR(x,"x");
		HX_STACK_LINE(328)
		int y = ::Std_obj::_int(_pos->y);		HX_STACK_VAR(y,"y");
		HX_STACK_LINE(330)
		hx::IndexRef((this->asset->image->__Field(HX_CSTRING("data"),true)).mPtr,((((y * this->width) + x)) * (int)4)) = ::Std_obj::_int((_color->r * (int)255));
		HX_STACK_LINE(331)
		hx::IndexRef((this->asset->image->__Field(HX_CSTRING("data"),true)).mPtr,(((((y * this->width) + x)) * (int)4) + (int)1)) = ::Std_obj::_int((_color->g * (int)255));
		HX_STACK_LINE(332)
		hx::IndexRef((this->asset->image->__Field(HX_CSTRING("data"),true)).mPtr,(((((y * this->width) + x)) * (int)4) + (int)2)) = ::Std_obj::_int((_color->b * (int)255));
		HX_STACK_LINE(333)
		hx::IndexRef((this->asset->image->__Field(HX_CSTRING("data"),true)).mPtr,(((((y * this->width) + x)) * (int)4) + (int)3)) = ::Std_obj::_int((_color->a * (int)255));
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC2(Texture_obj,set_pixel,(void))

bool Texture_obj::lock( ){
	HX_STACK_FRAME("phoenix.Texture","lock",0xea4554bd,"phoenix.Texture.lock","phoenix/Texture.hx",346,0xc84e46a3)
	HX_STACK_THIS(this)
	HX_STACK_LINE(346)
	return true;
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,lock,return )

Void Texture_obj::unlock( ){
{
		HX_STACK_FRAME("phoenix.Texture","unlock",0x1197b416,"phoenix.Texture.unlock","phoenix/Texture.hx",351,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_LINE(351)
		if (((this->asset->image->__Field(HX_CSTRING("data"),true) != null()))){
			HX_STACK_LINE(353)
			::Luxe_obj::renderer->state->bindTexture2D(this->texture);
			HX_STACK_LINE(354)
			::snow::platform::native::render::opengl::GL_obj::texImage2D((int)3553,(int)0,(int)6408,this->width,this->height,(int)0,(int)6408,(int)5121,this->asset->image->__Field(HX_CSTRING("data"),true));
			HX_STACK_LINE(356)
			this->asset->image->__FieldRef(HX_CSTRING("data")) = null();
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,unlock,(void))

Void Texture_obj::drop( ){
{
		HX_STACK_FRAME("phoenix.Texture","drop",0xe4fdf101,"phoenix.Texture.drop","phoenix/Texture.hx",362,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_LINE(364)
		this->super::drop();
		HX_STACK_LINE(365)
		this->destroy();
	}
return null();
}


Void Texture_obj::activate( int att){
{
		HX_STACK_FRAME("phoenix.Texture","activate",0xf79ba585,"phoenix.Texture.activate","phoenix/Texture.hx",369,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_ARG(att,"att")
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,activate,(void))

Void Texture_obj::destroy( ){
{
		HX_STACK_FRAME("phoenix.Texture","destroy",0x022a4368,"phoenix.Texture.destroy","phoenix/Texture.hx",373,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_LINE(373)
		::snow::platform::native::render::opengl::GL_obj::deleteTexture(this->texture);
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC0(Texture_obj,destroy,(void))

Void Texture_obj::_set_clamp( ::phoenix::ClampType _clamp){
{
		HX_STACK_FRAME("phoenix.Texture","_set_clamp",0xdf385971,"phoenix.Texture._set_clamp","phoenix/Texture.hx",381,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_clamp,"_clamp")
		HX_STACK_LINE(381)
		switch( (int)(_clamp->__Index())){
			case (int)0: {
				HX_STACK_LINE(383)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10242,(int)33071);
				HX_STACK_LINE(384)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10243,(int)33071);
			}
			;break;
			case (int)1: {
				HX_STACK_LINE(386)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10242,(int)10497);
				HX_STACK_LINE(387)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10243,(int)10497);
			}
			;break;
			case (int)2: {
				HX_STACK_LINE(389)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10242,(int)33648);
				HX_STACK_LINE(390)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10243,(int)33648);
			}
			;break;
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,_set_clamp,(void))

::phoenix::ClampType Texture_obj::set_clamp( ::phoenix::ClampType _clamp){
	HX_STACK_FRAME("phoenix.Texture","set_clamp",0x0efbc94c,"phoenix.Texture.set_clamp","phoenix/Texture.hx",395,0xc84e46a3)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_clamp,"_clamp")
	HX_STACK_LINE(395)
	Array< ::Dynamic > _clamp1 = Array_obj< ::Dynamic >::__new().Add(_clamp);		HX_STACK_VAR(_clamp1,"_clamp1");
	HX_STACK_LINE(395)
	Array< ::Dynamic > _g = Array_obj< ::Dynamic >::__new().Add(hx::ObjectPtr<OBJ_>(this));		HX_STACK_VAR(_g,"_g");
	HX_STACK_LINE(397)
	if (((this->clamp == null()))){
		HX_STACK_LINE(398)
		return this->clamp = _clamp1->__get((int)0).StaticCast< ::phoenix::ClampType >();
	}
	HX_STACK_LINE(401)
	if (((this->loaded == false))){

		HX_BEGIN_LOCAL_FUNC_S2(hx::LocalFunc,_Function_2_1,Array< ::Dynamic >,_clamp1,Array< ::Dynamic >,_g)
		Void run(::phoenix::Texture t){
			HX_STACK_FRAME("*","_Function_2_1",0x5201af78,"*._Function_2_1","phoenix/Texture.hx",402,0xc84e46a3)
			HX_STACK_ARG(t,"t")
			{
				HX_STACK_LINE(403)
				_g->__get((int)0).StaticCast< ::phoenix::Texture >()->bind();
				HX_STACK_LINE(404)
				_g->__get((int)0).StaticCast< ::phoenix::Texture >()->_set_clamp(_clamp1->__get((int)0).StaticCast< ::phoenix::ClampType >());
			}
			return null();
		}
		HX_END_LOCAL_FUNC1((void))

		HX_STACK_LINE(402)
		this->set_onload( Dynamic(new _Function_2_1(_clamp1,_g)));
	}
	else{
		HX_STACK_LINE(407)
		this->bind();
		HX_STACK_LINE(408)
		this->_set_clamp(_clamp1->__get((int)0).StaticCast< ::phoenix::ClampType >());
	}
	HX_STACK_LINE(411)
	return _clamp1->__get((int)0).StaticCast< ::phoenix::ClampType >();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,set_clamp,return )

Void Texture_obj::_set_filter( ::phoenix::FilterType _filter){
{
		HX_STACK_FRAME("phoenix.Texture","_set_filter",0xf23ee082,"phoenix.Texture._set_filter","phoenix/Texture.hx",417,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_filter,"_filter")
		HX_STACK_LINE(417)
		switch( (int)(_filter->__Index())){
			case (int)1: {
				HX_STACK_LINE(420)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9729);
				HX_STACK_LINE(421)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9729);
			}
			;break;
			case (int)0: {
				HX_STACK_LINE(424)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9728);
				HX_STACK_LINE(425)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9728);
			}
			;break;
			case (int)2: {
				HX_STACK_LINE(429)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9984);
				HX_STACK_LINE(430)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9984);
			}
			;break;
			case (int)3: {
				HX_STACK_LINE(432)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9985);
				HX_STACK_LINE(433)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9985);
			}
			;break;
			case (int)4: {
				HX_STACK_LINE(435)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9986);
				HX_STACK_LINE(436)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9986);
			}
			;break;
			case (int)5: {
				HX_STACK_LINE(438)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9987);
				HX_STACK_LINE(439)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9987);
			}
			;break;
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,_set_filter,(void))

Void Texture_obj::_set_filter_min( ::phoenix::FilterType _filter){
{
		HX_STACK_FRAME("phoenix.Texture","_set_filter_min",0xc464a015,"phoenix.Texture._set_filter_min","phoenix/Texture.hx",447,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_filter,"_filter")
		HX_STACK_LINE(447)
		switch( (int)(_filter->__Index())){
			case (int)1: {
				HX_STACK_LINE(450)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9729);
			}
			;break;
			case (int)0: {
				HX_STACK_LINE(452)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9728);
			}
			;break;
			case (int)2: {
				HX_STACK_LINE(456)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9984);
			}
			;break;
			case (int)3: {
				HX_STACK_LINE(458)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9985);
			}
			;break;
			case (int)4: {
				HX_STACK_LINE(460)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9986);
			}
			;break;
			case (int)5: {
				HX_STACK_LINE(462)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10241,(int)9987);
			}
			;break;
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,_set_filter_min,(void))

Void Texture_obj::_set_filter_mag( ::phoenix::FilterType _filter){
{
		HX_STACK_FRAME("phoenix.Texture","_set_filter_mag",0xc4649916,"phoenix.Texture._set_filter_mag","phoenix/Texture.hx",470,0xc84e46a3)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_filter,"_filter")
		HX_STACK_LINE(470)
		switch( (int)(_filter->__Index())){
			case (int)1: {
				HX_STACK_LINE(473)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9729);
			}
			;break;
			case (int)0: {
				HX_STACK_LINE(475)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9728);
			}
			;break;
			case (int)2: {
				HX_STACK_LINE(479)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9984);
			}
			;break;
			case (int)3: {
				HX_STACK_LINE(481)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9985);
			}
			;break;
			case (int)4: {
				HX_STACK_LINE(483)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9986);
			}
			;break;
			case (int)5: {
				HX_STACK_LINE(485)
				::snow::platform::native::render::opengl::GL_obj::texParameteri((int)3553,(int)10240,(int)9987);
			}
			;break;
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,_set_filter_mag,(void))

::phoenix::FilterType Texture_obj::set_filter( ::phoenix::FilterType _filter){
	HX_STACK_FRAME("phoenix.Texture","set_filter",0x8d7d5047,"phoenix.Texture.set_filter","phoenix/Texture.hx",490,0xc84e46a3)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_filter,"_filter")
	HX_STACK_LINE(490)
	Array< ::Dynamic > _filter1 = Array_obj< ::Dynamic >::__new().Add(_filter);		HX_STACK_VAR(_filter1,"_filter1");
	HX_STACK_LINE(490)
	Array< ::Dynamic > _g = Array_obj< ::Dynamic >::__new().Add(hx::ObjectPtr<OBJ_>(this));		HX_STACK_VAR(_g,"_g");
	HX_STACK_LINE(492)
	if (((this->filter == null()))){
		HX_STACK_LINE(493)
		return this->filter = _filter1->__get((int)0).StaticCast< ::phoenix::FilterType >();
	}
	HX_STACK_LINE(496)
	if (((this->loaded == false))){

		HX_BEGIN_LOCAL_FUNC_S2(hx::LocalFunc,_Function_2_1,Array< ::Dynamic >,_g,Array< ::Dynamic >,_filter1)
		Void run(::phoenix::Texture t){
			HX_STACK_FRAME("*","_Function_2_1",0x5201af78,"*._Function_2_1","phoenix/Texture.hx",497,0xc84e46a3)
			HX_STACK_ARG(t,"t")
			{
				HX_STACK_LINE(498)
				_g->__get((int)0).StaticCast< ::phoenix::Texture >()->bind();
				HX_STACK_LINE(499)
				_g->__get((int)0).StaticCast< ::phoenix::Texture >()->_set_filter(_filter1->__get((int)0).StaticCast< ::phoenix::FilterType >());
			}
			return null();
		}
		HX_END_LOCAL_FUNC1((void))

		HX_STACK_LINE(497)
		this->set_onload( Dynamic(new _Function_2_1(_g,_filter1)));
	}
	else{
		HX_STACK_LINE(502)
		this->bind();
		HX_STACK_LINE(503)
		this->_set_filter(_filter1->__get((int)0).StaticCast< ::phoenix::FilterType >());
	}
	HX_STACK_LINE(506)
	return this->filter = _filter1->__get((int)0).StaticCast< ::phoenix::FilterType >();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,set_filter,return )

::phoenix::FilterType Texture_obj::set_filter_min( ::phoenix::FilterType _filter){
	HX_STACK_FRAME("phoenix.Texture","set_filter_min",0xbef6d65a,"phoenix.Texture.set_filter_min","phoenix/Texture.hx",510,0xc84e46a3)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_filter,"_filter")
	HX_STACK_LINE(510)
	Array< ::Dynamic > _filter1 = Array_obj< ::Dynamic >::__new().Add(_filter);		HX_STACK_VAR(_filter1,"_filter1");
	HX_STACK_LINE(510)
	Array< ::Dynamic > _g = Array_obj< ::Dynamic >::__new().Add(hx::ObjectPtr<OBJ_>(this));		HX_STACK_VAR(_g,"_g");
	HX_STACK_LINE(512)
	if (((this->loaded == false))){

		HX_BEGIN_LOCAL_FUNC_S2(hx::LocalFunc,_Function_2_1,Array< ::Dynamic >,_g,Array< ::Dynamic >,_filter1)
		Void run(::phoenix::Texture t){
			HX_STACK_FRAME("*","_Function_2_1",0x5201af78,"*._Function_2_1","phoenix/Texture.hx",513,0xc84e46a3)
			HX_STACK_ARG(t,"t")
			{
				HX_STACK_LINE(514)
				_g->__get((int)0).StaticCast< ::phoenix::Texture >()->bind();
				HX_STACK_LINE(515)
				_g->__get((int)0).StaticCast< ::phoenix::Texture >()->_set_filter_min(_filter1->__get((int)0).StaticCast< ::phoenix::FilterType >());
			}
			return null();
		}
		HX_END_LOCAL_FUNC1((void))

		HX_STACK_LINE(513)
		this->set_onload( Dynamic(new _Function_2_1(_g,_filter1)));
	}
	else{
		HX_STACK_LINE(518)
		this->bind();
		HX_STACK_LINE(519)
		this->_set_filter_min(_filter1->__get((int)0).StaticCast< ::phoenix::FilterType >());
	}
	HX_STACK_LINE(522)
	return this->filter_min = _filter1->__get((int)0).StaticCast< ::phoenix::FilterType >();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,set_filter_min,return )

::phoenix::FilterType Texture_obj::set_filter_mag( ::phoenix::FilterType _filter){
	HX_STACK_FRAME("phoenix.Texture","set_filter_mag",0xbef6cf5b,"phoenix.Texture.set_filter_mag","phoenix/Texture.hx",526,0xc84e46a3)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_filter,"_filter")
	HX_STACK_LINE(526)
	Array< ::Dynamic > _filter1 = Array_obj< ::Dynamic >::__new().Add(_filter);		HX_STACK_VAR(_filter1,"_filter1");
	HX_STACK_LINE(526)
	Array< ::Dynamic > _g = Array_obj< ::Dynamic >::__new().Add(hx::ObjectPtr<OBJ_>(this));		HX_STACK_VAR(_g,"_g");
	HX_STACK_LINE(528)
	if (((this->loaded == false))){

		HX_BEGIN_LOCAL_FUNC_S2(hx::LocalFunc,_Function_2_1,Array< ::Dynamic >,_g,Array< ::Dynamic >,_filter1)
		Void run(::phoenix::Texture t){
			HX_STACK_FRAME("*","_Function_2_1",0x5201af78,"*._Function_2_1","phoenix/Texture.hx",529,0xc84e46a3)
			HX_STACK_ARG(t,"t")
			{
				HX_STACK_LINE(530)
				_g->__get((int)0).StaticCast< ::phoenix::Texture >()->bind();
				HX_STACK_LINE(531)
				_g->__get((int)0).StaticCast< ::phoenix::Texture >()->_set_filter_mag(_filter1->__get((int)0).StaticCast< ::phoenix::FilterType >());
			}
			return null();
		}
		HX_END_LOCAL_FUNC1((void))

		HX_STACK_LINE(529)
		this->set_onload( Dynamic(new _Function_2_1(_g,_filter1)));
	}
	else{
		HX_STACK_LINE(534)
		this->bind();
		HX_STACK_LINE(535)
		this->_set_filter_mag(_filter1->__get((int)0).StaticCast< ::phoenix::FilterType >());
	}
	HX_STACK_LINE(538)
	return this->filter_mag = _filter1->__get((int)0).StaticCast< ::phoenix::FilterType >();
}


HX_DEFINE_DYNAMIC_FUNC1(Texture_obj,set_filter_mag,return )

::phoenix::Texture Texture_obj::load( ::String _id,Dynamic _onloaded,Dynamic __o__silent){
Dynamic _silent = __o__silent.Default(false);
	HX_STACK_FRAME("phoenix.Texture","load",0xea4552f8,"phoenix.Texture.load","phoenix/Texture.hx",142,0xc84e46a3)
	HX_STACK_ARG(_id,"_id")
	HX_STACK_ARG(_onloaded,"_onloaded")
	HX_STACK_ARG(_silent,"_silent")
{
		HX_STACK_LINE(142)
		Array< ::Dynamic > _silent1 = Array_obj< ::Dynamic >::__new().Add(_silent);		HX_STACK_VAR(_silent1,"_silent1");
		HX_STACK_LINE(142)
		Array< ::String > _id1 = Array_obj< ::String >::__new().Add(_id);		HX_STACK_VAR(_id1,"_id1");
		HX_STACK_LINE(145)
		::luxe::resource::ResourceManager resources = ::Luxe_obj::resources;		HX_STACK_VAR(resources,"resources");
		HX_STACK_LINE(148)
		::phoenix::Texture _exists = resources->find_texture(_id1->__get((int)0));		HX_STACK_VAR(_exists,"_exists");
		HX_STACK_LINE(150)
		if (((_exists != null()))){
			HX_STACK_LINE(154)
			if (((_onloaded != null()))){
				HX_STACK_LINE(155)
				_onloaded(_exists).Cast< Void >();
			}
			HX_STACK_LINE(158)
			return _exists;
		}
		HX_STACK_LINE(164)
		Array< ::Dynamic > texture = Array_obj< ::Dynamic >::__new().Add(::phoenix::Texture_obj::__new(resources,null()));		HX_STACK_VAR(texture,"texture");
		HX_STACK_LINE(167)
		if (((_onloaded != null()))){
			HX_STACK_LINE(168)
			texture->__get((int)0).StaticCast< ::phoenix::Texture >()->set_onload(_onloaded);
		}
		struct _Function_1_1{
			inline static Dynamic Block( Array< ::Dynamic > &_silent1,Array< ::Dynamic > &texture,Array< ::String > &_id1){
				HX_STACK_FRAME("*","closure",0x5bdab937,"*.closure","phoenix/Texture.hx",171,0xc84e46a3)
				{
					hx::Anon __result = hx::Anon_obj::Create();

					HX_BEGIN_LOCAL_FUNC_S3(hx::LocalFunc,_Function_2_1,Array< ::Dynamic >,_silent1,Array< ::Dynamic >,texture,Array< ::String >,_id1)
					Void run(::snow::assets::AssetImage asset){
						HX_STACK_FRAME("*","_Function_2_1",0x5201af78,"*._Function_2_1","phoenix/Texture.hx",173,0xc84e46a3)
						HX_STACK_ARG(asset,"asset")
						{
							HX_STACK_LINE(173)
							if (((bool((asset != null())) && bool((asset->image != null()))))){
								HX_STACK_LINE(175)
								texture->__get((int)0).StaticCast< ::phoenix::Texture >()->from_asset(asset);
								HX_STACK_LINE(176)
								texture->__get((int)0).StaticCast< ::phoenix::Texture >()->reset();
								HX_STACK_LINE(177)
								texture->__get((int)0).StaticCast< ::phoenix::Texture >()->do_onload();
								HX_STACK_LINE(179)
								if ((!(_silent1->__get((int)0)))){
									HX_STACK_LINE(180)
									::haxe::Log_obj::trace((HX_CSTRING("  i / texture / ") + (((((((((((HX_CSTRING("texture loaded ") + texture->__get((int)0).StaticCast< ::phoenix::Texture >()->id) + HX_CSTRING(" (")) + texture->__get((int)0).StaticCast< ::phoenix::Texture >()->width) + HX_CSTRING("x")) + texture->__get((int)0).StaticCast< ::phoenix::Texture >()->height) + HX_CSTRING(") real size (")) + texture->__get((int)0).StaticCast< ::phoenix::Texture >()->width_actual) + HX_CSTRING("x")) + texture->__get((int)0).StaticCast< ::phoenix::Texture >()->height_actual) + HX_CSTRING(")")))),hx::SourceInfo(HX_CSTRING("Texture.hx"),180,HX_CSTRING("phoenix.Texture"),HX_CSTRING("load")));
								}
							}
							else{
								HX_STACK_LINE(184)
								if ((!(_silent1->__get((int)0)))){
									HX_STACK_LINE(185)
									::haxe::Log_obj::trace((HX_CSTRING("  i / texture / ") + ((HX_CSTRING("texture failed to load! ") + _id1->__get((int)0)))),hx::SourceInfo(HX_CSTRING("Texture.hx"),185,HX_CSTRING("phoenix.Texture"),HX_CSTRING("load")));
								}
							}
						}
						return null();
					}
					HX_END_LOCAL_FUNC1((void))

					__result->Add(HX_CSTRING("onload") ,  Dynamic(new _Function_2_1(_silent1,texture,_id1)),true);
					return __result;
				}
				return null();
			}
		};
		HX_STACK_LINE(171)
		::snow::assets::AssetImage _asset = ::Luxe_obj::core->app->assets->image(_id1->__get((int)0),_Function_1_1::Block(_silent1,texture,_id1));		HX_STACK_VAR(_asset,"_asset");
		HX_STACK_LINE(191)
		if (((_asset != null()))){
			HX_STACK_LINE(193)
			texture->__get((int)0).StaticCast< ::phoenix::Texture >()->id = _id1->__get((int)0);
			HX_STACK_LINE(195)
			resources->cache(texture->__get((int)0).StaticCast< ::phoenix::Texture >());
			HX_STACK_LINE(197)
			return texture->__get((int)0).StaticCast< ::phoenix::Texture >();
		}
		HX_STACK_LINE(201)
		return null();
	}
}


STATIC_HX_DEFINE_DYNAMIC_FUNC3(Texture_obj,load,return )

::phoenix::Texture Texture_obj::load_from_resource( ::String _name,int _width,int _height,Dynamic __o__cache){
Dynamic _cache = __o__cache.Default(true);
	HX_STACK_FRAME("phoenix.Texture","load_from_resource",0xd09236bc,"phoenix.Texture.load_from_resource","phoenix/Texture.hx",206,0xc84e46a3)
	HX_STACK_ARG(_name,"_name")
	HX_STACK_ARG(_width,"_width")
	HX_STACK_ARG(_height,"_height")
	HX_STACK_ARG(_cache,"_cache")
{
		HX_STACK_LINE(208)
		::haxe::io::Bytes texture_bytes = ::haxe::Resource_obj::getBytes(_name);		HX_STACK_VAR(texture_bytes,"texture_bytes");
		HX_STACK_LINE(210)
		if (((texture_bytes != null()))){
			HX_STACK_LINE(213)
			::luxe::resource::ResourceManager resources = ::Luxe_obj::renderer->resource_manager;		HX_STACK_VAR(resources,"resources");
			HX_STACK_LINE(214)
			::phoenix::Texture texture = ::phoenix::Texture_obj::__new(resources,null());		HX_STACK_VAR(texture,"texture");
			struct _Function_2_1{
				inline static Dynamic Block( ::haxe::io::Bytes &texture_bytes){
					HX_STACK_FRAME("*","closure",0x5bdab937,"*.closure","phoenix/Texture.hx",216,0xc84e46a3)
					{
						hx::Anon __result = hx::Anon_obj::Create();
						__result->Add(HX_CSTRING("bytes") , ::snow::platform::native::utils::ByteArray_obj::fromBytes(texture_bytes),false);
						return __result;
					}
					return null();
				}
			};
			HX_STACK_LINE(216)
			::snow::assets::AssetImage _asset = ::Luxe_obj::core->app->assets->image(_name,_Function_2_1::Block(texture_bytes));		HX_STACK_VAR(_asset,"_asset");
			HX_STACK_LINE(220)
			if (((_asset != null()))){
				HX_STACK_LINE(222)
				texture->from_asset(_asset);
				HX_STACK_LINE(224)
				texture_bytes = null();
				HX_STACK_LINE(225)
				texture->reset();
				HX_STACK_LINE(226)
				texture->do_onload();
				HX_STACK_LINE(228)
				if ((_cache)){
					HX_STACK_LINE(229)
					resources->cache(texture);
				}
				HX_STACK_LINE(232)
				return texture;
			}
		}
		HX_STACK_LINE(238)
		return null();
	}
}


STATIC_HX_DEFINE_DYNAMIC_FUNC4(Texture_obj,load_from_resource,return )


Texture_obj::Texture_obj()
{
}

void Texture_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(Texture);
	HX_MARK_MEMBER_NAME(texture,"texture");
	HX_MARK_MEMBER_NAME(asset,"asset");
	HX_MARK_MEMBER_NAME(width_actual,"width_actual");
	HX_MARK_MEMBER_NAME(height_actual,"height_actual");
	HX_MARK_MEMBER_NAME(width,"width");
	HX_MARK_MEMBER_NAME(height,"height");
	HX_MARK_MEMBER_NAME(loaded,"loaded");
	HX_MARK_MEMBER_NAME(slot,"slot");
	HX_MARK_MEMBER_NAME(_onload_handlers,"_onload_handlers");
	HX_MARK_MEMBER_NAME(filter,"filter");
	HX_MARK_MEMBER_NAME(filter_min,"filter_min");
	HX_MARK_MEMBER_NAME(filter_mag,"filter_mag");
	HX_MARK_MEMBER_NAME(clamp,"clamp");
	::luxe::resource::Resource_obj::__Mark(HX_MARK_ARG);
	HX_MARK_END_CLASS();
}

void Texture_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(texture,"texture");
	HX_VISIT_MEMBER_NAME(asset,"asset");
	HX_VISIT_MEMBER_NAME(width_actual,"width_actual");
	HX_VISIT_MEMBER_NAME(height_actual,"height_actual");
	HX_VISIT_MEMBER_NAME(width,"width");
	HX_VISIT_MEMBER_NAME(height,"height");
	HX_VISIT_MEMBER_NAME(loaded,"loaded");
	HX_VISIT_MEMBER_NAME(slot,"slot");
	HX_VISIT_MEMBER_NAME(_onload_handlers,"_onload_handlers");
	HX_VISIT_MEMBER_NAME(filter,"filter");
	HX_VISIT_MEMBER_NAME(filter_min,"filter_min");
	HX_VISIT_MEMBER_NAME(filter_mag,"filter_mag");
	HX_VISIT_MEMBER_NAME(clamp,"clamp");
	::luxe::resource::Resource_obj::__Visit(HX_VISIT_ARG);
}

Dynamic Texture_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"load") ) { return load_dyn(); }
		if (HX_FIELD_EQ(inName,"slot") ) { return slot; }
		if (HX_FIELD_EQ(inName,"bind") ) { return bind_dyn(); }
		if (HX_FIELD_EQ(inName,"lock") ) { return lock_dyn(); }
		if (HX_FIELD_EQ(inName,"drop") ) { return drop_dyn(); }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"asset") ) { return asset; }
		if (HX_FIELD_EQ(inName,"width") ) { return width; }
		if (HX_FIELD_EQ(inName,"clamp") ) { return clamp; }
		if (HX_FIELD_EQ(inName,"reset") ) { return reset_dyn(); }
		break;
	case 6:
		if (HX_FIELD_EQ(inName,"height") ) { return height; }
		if (HX_FIELD_EQ(inName,"loaded") ) { return loaded; }
		if (HX_FIELD_EQ(inName,"filter") ) { return filter; }
		if (HX_FIELD_EQ(inName,"unlock") ) { return unlock_dyn(); }
		break;
	case 7:
		if (HX_FIELD_EQ(inName,"texture") ) { return texture; }
		if (HX_FIELD_EQ(inName,"destroy") ) { return destroy_dyn(); }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"toString") ) { return toString_dyn(); }
		if (HX_FIELD_EQ(inName,"activate") ) { return activate_dyn(); }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"do_onload") ) { return do_onload_dyn(); }
		if (HX_FIELD_EQ(inName,"get_pixel") ) { return get_pixel_dyn(); }
		if (HX_FIELD_EQ(inName,"set_pixel") ) { return set_pixel_dyn(); }
		if (HX_FIELD_EQ(inName,"set_clamp") ) { return set_clamp_dyn(); }
		break;
	case 10:
		if (HX_FIELD_EQ(inName,"filter_min") ) { return filter_min; }
		if (HX_FIELD_EQ(inName,"filter_mag") ) { return filter_mag; }
		if (HX_FIELD_EQ(inName,"set_onload") ) { return set_onload_dyn(); }
		if (HX_FIELD_EQ(inName,"check_size") ) { return check_size_dyn(); }
		if (HX_FIELD_EQ(inName,"from_asset") ) { return from_asset_dyn(); }
		if (HX_FIELD_EQ(inName,"_set_clamp") ) { return _set_clamp_dyn(); }
		if (HX_FIELD_EQ(inName,"set_filter") ) { return set_filter_dyn(); }
		break;
	case 11:
		if (HX_FIELD_EQ(inName,"_set_filter") ) { return _set_filter_dyn(); }
		break;
	case 12:
		if (HX_FIELD_EQ(inName,"width_actual") ) { return width_actual; }
		break;
	case 13:
		if (HX_FIELD_EQ(inName,"height_actual") ) { return height_actual; }
		break;
	case 14:
		if (HX_FIELD_EQ(inName,"set_filter_min") ) { return set_filter_min_dyn(); }
		if (HX_FIELD_EQ(inName,"set_filter_mag") ) { return set_filter_mag_dyn(); }
		break;
	case 15:
		if (HX_FIELD_EQ(inName,"_set_filter_min") ) { return _set_filter_min_dyn(); }
		if (HX_FIELD_EQ(inName,"_set_filter_mag") ) { return _set_filter_mag_dyn(); }
		break;
	case 16:
		if (HX_FIELD_EQ(inName,"_onload_handlers") ) { return _onload_handlers; }
		if (HX_FIELD_EQ(inName,"estimated_memory") ) { return estimated_memory_dyn(); }
		if (HX_FIELD_EQ(inName,"generate_mipmaps") ) { return generate_mipmaps_dyn(); }
		break;
	case 18:
		if (HX_FIELD_EQ(inName,"load_from_resource") ) { return load_from_resource_dyn(); }
		break;
	case 22:
		if (HX_FIELD_EQ(inName,"create_from_bytes_html") ) { return create_from_bytes_html_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic Texture_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"slot") ) { slot=inValue.Cast< int >(); return inValue; }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"asset") ) { asset=inValue.Cast< ::snow::assets::AssetImage >(); return inValue; }
		if (HX_FIELD_EQ(inName,"width") ) { width=inValue.Cast< int >(); return inValue; }
		if (HX_FIELD_EQ(inName,"clamp") ) { if (inCallProp) return set_clamp(inValue);clamp=inValue.Cast< ::phoenix::ClampType >(); return inValue; }
		break;
	case 6:
		if (HX_FIELD_EQ(inName,"height") ) { height=inValue.Cast< int >(); return inValue; }
		if (HX_FIELD_EQ(inName,"loaded") ) { loaded=inValue.Cast< bool >(); return inValue; }
		if (HX_FIELD_EQ(inName,"onload") ) { return set_onload(inValue); }
		if (HX_FIELD_EQ(inName,"filter") ) { if (inCallProp) return set_filter(inValue);filter=inValue.Cast< ::phoenix::FilterType >(); return inValue; }
		break;
	case 7:
		if (HX_FIELD_EQ(inName,"texture") ) { texture=inValue.Cast< ::snow::platform::native::render::opengl::GLTexture >(); return inValue; }
		break;
	case 10:
		if (HX_FIELD_EQ(inName,"filter_min") ) { if (inCallProp) return set_filter_min(inValue);filter_min=inValue.Cast< ::phoenix::FilterType >(); return inValue; }
		if (HX_FIELD_EQ(inName,"filter_mag") ) { if (inCallProp) return set_filter_mag(inValue);filter_mag=inValue.Cast< ::phoenix::FilterType >(); return inValue; }
		break;
	case 12:
		if (HX_FIELD_EQ(inName,"width_actual") ) { width_actual=inValue.Cast< int >(); return inValue; }
		break;
	case 13:
		if (HX_FIELD_EQ(inName,"height_actual") ) { height_actual=inValue.Cast< int >(); return inValue; }
		break;
	case 16:
		if (HX_FIELD_EQ(inName,"_onload_handlers") ) { _onload_handlers=inValue.Cast< Dynamic >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void Texture_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("texture"));
	outFields->push(HX_CSTRING("asset"));
	outFields->push(HX_CSTRING("width_actual"));
	outFields->push(HX_CSTRING("height_actual"));
	outFields->push(HX_CSTRING("width"));
	outFields->push(HX_CSTRING("height"));
	outFields->push(HX_CSTRING("loaded"));
	outFields->push(HX_CSTRING("slot"));
	outFields->push(HX_CSTRING("_onload_handlers"));
	outFields->push(HX_CSTRING("filter"));
	outFields->push(HX_CSTRING("filter_min"));
	outFields->push(HX_CSTRING("filter_mag"));
	outFields->push(HX_CSTRING("clamp"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	HX_CSTRING("load"),
	HX_CSTRING("load_from_resource"),
	String(null()) };

#if HXCPP_SCRIPTABLE
static hx::StorageInfo sMemberStorageInfo[] = {
	{hx::fsObject /*::snow::platform::native::render::opengl::GLTexture*/ ,(int)offsetof(Texture_obj,texture),HX_CSTRING("texture")},
	{hx::fsObject /*::snow::assets::AssetImage*/ ,(int)offsetof(Texture_obj,asset),HX_CSTRING("asset")},
	{hx::fsInt,(int)offsetof(Texture_obj,width_actual),HX_CSTRING("width_actual")},
	{hx::fsInt,(int)offsetof(Texture_obj,height_actual),HX_CSTRING("height_actual")},
	{hx::fsInt,(int)offsetof(Texture_obj,width),HX_CSTRING("width")},
	{hx::fsInt,(int)offsetof(Texture_obj,height),HX_CSTRING("height")},
	{hx::fsBool,(int)offsetof(Texture_obj,loaded),HX_CSTRING("loaded")},
	{hx::fsInt,(int)offsetof(Texture_obj,slot),HX_CSTRING("slot")},
	{hx::fsObject /*Dynamic*/ ,(int)offsetof(Texture_obj,_onload_handlers),HX_CSTRING("_onload_handlers")},
	{hx::fsObject /*::phoenix::FilterType*/ ,(int)offsetof(Texture_obj,filter),HX_CSTRING("filter")},
	{hx::fsObject /*::phoenix::FilterType*/ ,(int)offsetof(Texture_obj,filter_min),HX_CSTRING("filter_min")},
	{hx::fsObject /*::phoenix::FilterType*/ ,(int)offsetof(Texture_obj,filter_mag),HX_CSTRING("filter_mag")},
	{hx::fsObject /*::phoenix::ClampType*/ ,(int)offsetof(Texture_obj,clamp),HX_CSTRING("clamp")},
	{ hx::fsUnknown, 0, null()}
};
#endif

static ::String sMemberFields[] = {
	HX_CSTRING("texture"),
	HX_CSTRING("asset"),
	HX_CSTRING("width_actual"),
	HX_CSTRING("height_actual"),
	HX_CSTRING("width"),
	HX_CSTRING("height"),
	HX_CSTRING("loaded"),
	HX_CSTRING("slot"),
	HX_CSTRING("_onload_handlers"),
	HX_CSTRING("filter"),
	HX_CSTRING("filter_min"),
	HX_CSTRING("filter_mag"),
	HX_CSTRING("clamp"),
	HX_CSTRING("set_onload"),
	HX_CSTRING("do_onload"),
	HX_CSTRING("toString"),
	HX_CSTRING("estimated_memory"),
	HX_CSTRING("create_from_bytes_html"),
	HX_CSTRING("check_size"),
	HX_CSTRING("reset"),
	HX_CSTRING("from_asset"),
	HX_CSTRING("generate_mipmaps"),
	HX_CSTRING("bind"),
	HX_CSTRING("get_pixel"),
	HX_CSTRING("set_pixel"),
	HX_CSTRING("lock"),
	HX_CSTRING("unlock"),
	HX_CSTRING("drop"),
	HX_CSTRING("activate"),
	HX_CSTRING("destroy"),
	HX_CSTRING("_set_clamp"),
	HX_CSTRING("set_clamp"),
	HX_CSTRING("_set_filter"),
	HX_CSTRING("_set_filter_min"),
	HX_CSTRING("_set_filter_mag"),
	HX_CSTRING("set_filter"),
	HX_CSTRING("set_filter_min"),
	HX_CSTRING("set_filter_mag"),
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
	HX_MARK_MEMBER_NAME(Texture_obj::__mClass,"__mClass");
};

#ifdef HXCPP_VISIT_ALLOCS
static void sVisitStatics(HX_VISIT_PARAMS) {
	HX_VISIT_MEMBER_NAME(Texture_obj::__mClass,"__mClass");
};

#endif

Class Texture_obj::__mClass;

void Texture_obj::__register()
{
	hx::Static(__mClass) = hx::RegisterClass(HX_CSTRING("phoenix.Texture"), hx::TCanCast< Texture_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics
#ifdef HXCPP_VISIT_ALLOCS
    , sVisitStatics
#endif
#ifdef HXCPP_SCRIPTABLE
    , sMemberStorageInfo
#endif
);
}

void Texture_obj::__boot()
{
}

} // end namespace phoenix
