
#pragma once

'######### PLATFORMS ###################################
#Ifndef __STATIC__
	'Dynamic linking
	#LibPath "./"
	#Ifdef __FB_WIN32__
		#Ifdef __FB_64BIT__
			#Inclib "WS3DCoreLib64"
		#Else
			#Inclib "WS3DCoreLib"
		#EndIf	
	#Else
 		#Ifdef  __FB_LINUX__
			#Ifdef __FB_64BIT__
				#Inclib "WS3DCoreLib64"
				#Inclib "Irrlicht64"
			#Else
				#Inclib "WS3DCoreLib"
				#Inclib "Irrlicht"
			#EndIf
 		#Else
			#Error Build target must be Windows or Linux !
 		#EndIf
	#EndIf
#Else
	'Static linking
	#Include Once "fbgfx.bi"
	#Ifdef __FB_WIN32__
		#Ifdef __FB_64BIT__
			#LibPath "../../Static/Windows64"
		#Else
			#LibPath "../../Static/Windows"
		#EndIf	
	#Else
 		#Ifdef  __FB_LINUX__
			#Ifdef __FB_64BIT__
				#LibPath "../../Static/Linux64"
			#Else
				#LibPath "../../Static/Linux"
			#EndIf
 		#Else
			#Error Build target must be Windows or Linux !
 		#EndIf
	#EndIf
	
	'Windows/Linux system libs
	#Ifdef __FB_LINUX__
		#Inclib "Xxf86vm"
		#Inclib "Xext"
		#Inclib "X11"
	#else
		#ifdef __FB_WIN32__
			#Inclib "advapi32"
			#Inclib "ole32"
			#Inclib "winmm"
			#Inclib "shell32"
		#Endif
	#Endif
	
	' openg/glut libs (optional)
	#Ifdef __USE_OGL__
		#Include once "GL/gl.bi"
		#Include once "GL/glu.bi"
	#else
		#ifdef __FB_LINUX__
			#Inclib "GL"
			#Inclib "GLU"
		#else	
			#ifdef __FB_WIN32__
				#Inclib "opengl32"
				#Inclib "glu32"
			#Endif
		#Endif
	#endif
	
	' First libs for WS3D
	#Ifdef __FB_64BIT__
		#Inclib "WS3DCoreLib64"
		#Inclib "Irrlicht64"
	#Else
		#Inclib "WS3DCoreLib"
		#Inclib "Irrlicht"
	#EndIf	
	
	'OpenAL
	#Ifdef __FB_WIN32__
		#Ifdef __FB_64BIT__
			#Inclib "OpenAl32_x64"
		#else
			#Inclib "OpenAl32"
		#endif
	#Else
		#Ifdef  __FB_LINUX__
			#Inclib "openal"
		#EndIf
	#EndIf
	
	'ogg/vorbis libs	
	#Inclib "ogg"
	#Inclib "vorbis"
	#Inclib "vorbisfile"
	'#inclib "vorbisenc"
	'#inclib "vorbisdec"

	'True Type fonts
	#Inclib "freetype"

	'kNet libs
	'#Ifdef __USE_KNET__
		#Inclib "kNet"
		#Ifdef __FB_WIN32__
			#Inclib "ws2_32"
		#EndIf
	'#EndIf
	
	'Newton Game Dynamics lib
	'#Ifdef __USE_NEWTON__
		#Inclib "newton"
	'#EndIf
	
	'Theora video-wrapper lib
	'#Ifdef __USE_THEORA__
		#Inclib "theora"
	'#EndIf

	#Inclib "stdc++"
	#Inclib "gcc"
	#Inclib "pthread"
	
	#Ifdef __FB_64BIT__
		#Inclib "gcc_eh"
	#else
		#Inclib "gcc_s"
	#endif
	

#EndIf

extern "C"

'#define WORLDSIM3D_H_INCLUDED

const FLOAT_DEFAULTVALUE = 7285624.0f

Type UInt64 As Unsigned Integer<64>
Type UInt32 As Unsigned Integer<32>
Type UInt16 As Unsigned Short
Type Uint8 As Unsigned Byte

Type Int64 As Integer<64>
Type Int32 As Integer<32>
Type Int16 As Short
Type Int8 As Byte

Type Float64 As Double
Type Float32 As Single

Type wImage as UInt32 ptr
type wTexture as UInt32 ptr
type wFont as UInt32 ptr
type wGuiObject as UInt32 ptr
Type wMesh as UInt32 ptr
type wMeshBuffer as UInt32 ptr
Type wNode as UInt32 ptr
Type wMaterial as UInt32 ptr
Type wSelector as UInt32 ptr
type wEmitter as UInt32 ptr
type wAffector as UInt32 ptr
type wAnimator as UInt32 ptr

type wXmlReader as UInt32 ptr
type wXmlWriter as UInt32 ptr
type wFile as UInt32 ptr
type wFileArchive as UInt32 ptr
type wFileList as UInt32 ptr

Type wSoundEffect as UInt32 ptr
type wSoundFilter as UInt32 ptr
type wSoundBuffer as UInt32 ptr
type wSound as UInt32 ptr

Type wVideo as UInt32 ptr
Type wPostEffect as UInt32 ptr
Type wPacket as UInt32 ptr

'############# CONVERTING Type (U)Integer FB 64 bit => FB 32 bit ##
Function ToInt32(value As integer)As Int32
	Return Cast(Integer<32>,value)
End Function
Function ToUInt32(value As uinteger)As UInt32
	Return Cast(UInteger<32>,value)
End Function
'########## FOR FB OLD VERSIONS ##################################
#If Not __FB_MIN_VERSION__(1, 0, 4)
	Enum Boolean
		TRUE=1
		FALSE=0
	End Enum

	Function cBoolean(ByVal s As Integer)As UInt32
		Return CUInt<32>(s)
	End Function
#EndIf

'#############################################################################
Type wMouseEventType as UInt32
Enum
	wMET_LMOUSE_PRESSED_DOWN = 0
	wMET_RMOUSE_PRESSED_DOWN
	wMET_MMOUSE_PRESSED_DOWN
	wMET_LMOUSE_LEFT_UP
	wMET_RMOUSE_LEFT_UP
	wMET_MMOUSE_LEFT_UP
	wMET_MOUSE_MOVED
	wMET_MOUSE_WHEEL
	wMET_LMOUSE_DOUBLE_CLICK
	wMET_RMOUSE_DOUBLE_CLICK
	wMET_MMOUSE_DOUBLE_CLICK
	wMET_LMOUSE_TRIPLE_CLICK
	wMET_RMOUSE_TRIPLE_CLICK
	wMET_MMOUSE_TRIPLE_CLICK
	wMET_COUNT
end Enum

Type wMouseButtons As UInt32
Enum  
	wMB_LEFT = &h01
	wMB_RIGHT = &h02
	wMB_MIDDLE = &h04
	wMB_EXTRA1 = &h08
	wMB_EXTRA2 = &h10
	wMB_FORCE_32_BIT = &h7fffffff
end enum

type wVector2i
	x as Int32
	y as Int32
end type

Dim shared wVECTOR2i_ZERO as const wVector2i = (0, 0)
Dim shared wVECTOR2i_ONE as const wVector2i = (1, 1)

type wMouseEvent
	action as wMouseEventType
	delta as Float32
	position as wVector2i
	isShift as Boolean
	isControl as Boolean
end type

Type wKeyCode As UInt32
Enum 
	wKC_UNKNOWN = &h0
	wKC_LBUTTON = &h01
	wKC_RBUTTON = &h02
	wKC_CANCEL = &h03
	wKC_MBUTTON = &h04
	wKC_XBUTTON1 = &h05
	wKC_XBUTTON2 = &h06
	wKC_BACK = &h08
	wKC_TAB = &h09
	wKC_CLEAR = &h0C
	wKC_RETURN = &h0D
	wKC_SHIFT = &h10
	wKC_CONTROL = &h11
	wKC_MENU = &h12
	wKC_PAUSE = &h13
	wKC_CAPITAL = &h14
	wKC_KANA = &h15
	wKC_HANGUEL = &h15
	wKC_HANGUL = &h15
	wKC_JUNJA = &h17
	wKC_FINAL = &h18
	wKC_HANJA = &h19
	wKC_KANJI = &h19
	wKC_ESCAPE = &h1B
	wKC_CONVERT = &h1C
	wKC_NONCONVERT = &h1D
	wKC_ACCEPT = &h1E
	wKC_MODECHANGE = &h1F
	wKC_SPACE = &h20
	wKC_PRIOR = &h21
	wKC_NEXT = &h22
	wKC_END = &h23
	wKC_HOME = &h24
	wKC_LEFT = &h25
	wKC_UP = &h26
	wKC_RIGHT = &h27
	wKC_DOWN = &h28
	wKC_SELECT = &h29
	wKC_PRINT = &h2A
	wKC_EXECUT = &h2B
	wKC_SNAPSHOT = &h2C
	wKC_INSERT = &h2D
	wKC_DELETE = &h2E
	wKC_HELP = &h2F
	wKC_KEY_0 = &h30
	wKC_KEY_1 = &h31
	wKC_KEY_2 = &h32
	wKC_KEY_3 = &h33
	wKC_KEY_4 = &h34
	wKC_KEY_5 = &h35
	wKC_KEY_6 = &h36
	wKC_KEY_7 = &h37
	wKC_KEY_8 = &h38
	wKC_KEY_9 = &h39
	wKC_KEY_A = &h41
	wKC_KEY_B = &h42
	wKC_KEY_C = &h43
	wKC_KEY_D = &h44
	wKC_KEY_E = &h45
	wKC_KEY_F = &h46
	wKC_KEY_G = &h47
	wKC_KEY_H = &h48
	wKC_KEY_I = &h49
	wKC_KEY_J = &h4A
	wKC_KEY_K = &h4B
	wKC_KEY_L = &h4C
	wKC_KEY_M = &h4D
	wKC_KEY_N = &h4E
	wKC_KEY_O = &h4F
	wKC_KEY_P = &h50
	wKC_KEY_Q = &h51
	wKC_KEY_R = &h52
	wKC_KEY_S = &h53
	wKC_KEY_T = &h54
	wKC_KEY_U = &h55
	wKC_KEY_V = &h56
	wKC_KEY_W = &h57
	wKC_KEY_X = &h58
	wKC_KEY_Y = &h59
	wKC_KEY_Z = &h5A
	wKC_LWIN = &h5B
	wKC_RWIN = &h5C
	wKC_APPS = &h5D
	wKC_SLEEP = &h5F
	wKC_NUMPAD0 = &h60
	wKC_NUMPAD1 = &h61
	wKC_NUMPAD2 = &h62
	wKC_NUMPAD3 = &h63
	wKC_NUMPAD4 = &h64
	wKC_NUMPAD5 = &h65
	wKC_NUMPAD6 = &h66
	wKC_NUMPAD7 = &h67
	wKC_NUMPAD8 = &h68
	wKC_NUMPAD9 = &h69
	wKC_MULTIPLY = &h6A
	wKC_ADD = &h6B
	wKC_SEPARATOR = &h6C
	wKC_SUBTRACT = &h6D
	wKC_DECIMAL = &h6E
	wKC_DIVIDE = &h6F
	wKC_F1 = &h70
	wKC_F2 = &h71
	wKC_F3 = &h72
	wKC_F4 = &h73
	wKC_F5 = &h74
	wKC_F6 = &h75
	wKC_F7 = &h76
	wKC_F8 = &h77
	wKC_F9 = &h78
	wKC_F10 = &h79
	wKC_F11 = &h7A
	wKC_F12 = &h7B
	wKC_F13 = &h7C
	wKC_F14 = &h7D
	wKC_F15 = &h7E
	wKC_F16 = &h7F
	wKC_F17 = &h80
	wKC_F18 = &h81
	wKC_F19 = &h82
	wKC_F20 = &h83
	wKC_F21 = &h84
	wKC_F22 = &h85
	wKC_F23 = &h86
	wKC_F24 = &h87
	wKC_NUMLOCK = &h90
	wKC_SCROLL = &h91
	wKC_LSHIFT = &hA0
	wKC_RSHIFT = &hA1
	wKC_LCONTROL = &hA2
	wKC_RCONTROL = &hA3
	wKC_LMENU = &hA4
	wKC_RMENU = &hA5
	wKC_BROWSER_BACK = &hA6
	wKC_BROWSER_FORWARD = &hA7
	wKC_BROWSER_REFRESH = &hA8
	wKC_BROWSER_STOP = &hA9
	wKC_BROWSER_SEARCH = &hAA
	wKC_BROWSER_FAVORITES = &hAB
	wKC_BROWSER_HOME = &hAC
	wKC_VOLUME_MUTE = &hAD
	wKC_VOLUME_DOWN = &hAE
	wKC_VOLUME_UP = &hAF
	wKC_MEDIA_NEXT_TRACK = &hB0
	wKC_MEDIA_PREV_TRACK = &hB1
	wKC_MEDIA_STOP = &hB2
	wKC_MEDIA_PLAY_PAUSE = &hB3
	wKC_OEM_1 = &hBA
	wKC_PLUS = &hBB
	wKC_COMMA = &hBC
	wKC_MINUS = &hBD
	wKC_PERIOD = &hBE
	wKC_OEM_2 = &hBF
	wKC_OEM_3 = &hC0
	wKC_OEM_4 = &hDB
	wKC_OEM_5 = &hDC
	wKC_OEM_6 = &hDD
	wKC_OEM_7 = &hDE
	wKC_OEM_8 = &hDF
	wKC_OEM_AX = &hE1
	wKC_OEM_102 = &hE2
	wKC_ATTN = &hF6
	wKC_CRSEL = &hF7
	wKC_EXSEL = &hF8
	wKC_EREOF = &hF9
	wKC_PLAY = &hFA
	wKC_ZOOM = &hFB
	wKC_PA1 = &hFD
	wKC_OEM_CLEAR = &hFE
	wKC_NONE = &hFF
	wKC_KEY_CODES_COUNT = &h100
end enum

Type wKeyDirection As UInt32
Enum 
	wKD_UP = 0
	wKD_DOWN
end enum

type wKeyEvent
	key as wKeyCode
	direction as wKeyDirection
	isShift as Boolean
	isControl as Boolean
end type

Type wKeyAction As UInt32
Enum 
	wKA_MOVE_FORWARD = 0
	wKA_MOVE_BACKWARD
	wKA_STRAFE_LEFT
	wKA_STRAFE_RIGHT
	wKA_JUMP_UP
	wKA_COUNT
	wKA_FORCE_32BIT = &h7fffffff
end enum

type wKeyMap
	Action as wKeyAction
	KeyCode as wKeyCode
end type

Type wJoystickPovHat As UInt32
Enum 
	wJPH_PRESENT
	wJPH_ABSENT
	wJPH_UNKNOWN
end enum

type wJoystickInfo
	Axes as UInt32
	Buttons as UInt32
	joyId as UInt8
	joyName as const zstring ptr
	PovHat as wJoystickPovHat
end type

enum
	wNUMBER_OF_BUTTONS = 32
	wAXIS_X = 0
	wAXIS_Y
	wAXIS_Z
	wAXIS_R
	wAXIS_U
	wAXIS_V
	wNUMBER_OF_AXES
end enum

type wJoystickEvent
	joyId as UInt8
	ButtonStates(0 to wNUMBER_OF_BUTTONS - 1) as Boolean
	Axis(0 to wNUMBER_OF_AXES - 1) as UInt16
	POV as UInt16
end type

type wLoggingLevel as UInt32
Enum
	wLL_DEBUG = 0
	wLL_INFORMATION = 1
	wLL_WARNING = 2
	wLL_ERROR = 3
	wLL_NONE = 4
end enum

type wLoggingEvent
    Level as wLoggingLevel 
    Text as const zstring ptr
end type

type wUserEvent
    UserData1 as Int32
    UserData2 as Int32
end type

Type wEventType As UInt32
Enum 
	wET_GUI_EVENT = 0
	wET_MOUSE_INPUT_EVENT
	wET_KEY_INPUT_EVENT
	wET_JOYSTICK_INPUT_EVENT
	wET_LOG_TEXT_EVENT
	wET_USER_EVENT
	wET_FORCE_32_BIT = &h7fffffff
end enum

Type wGuiCallerType As UInt32
Enum 
	wGCT_ELEMENT_FOCUS_LOST
	wGCT_ELEMENT_FOCUSED
	wGCT_ELEMENT_HOVERED
	wGCT_ELEMENT_LEFT
	wGCT_ELEMENT_CLOSED
	wGCT_BUTTON_CLICKED
	wGCT_SCROLL_BAR_CHANGED
	wGCT_CHECKBOX_CHANGED
	wGCT_LISTBOX_CHANGED
	wGCT_LISTBOX_SELECTED_AGAIN
	wGCT_FILE_SELECTED
	wGCT_DIRECTORY_SELECTED
	wGCT_FILE_CHOOSE_DIALOG_CANCELLED
	wGCT_MESSAGEBOX_YES
	wGCT_MESSAGEBOX_NO
	wGCT_MESSAGEBOX_OK
	wGCT_MESSAGEBOX_CANCEL
	wGCT_EDITBOX_ENTER
	wGCT_EDITBOX_CHANGED
	wGCT_EDITBOX_MARKING_CHANGED
	wGCT_TAB_CHANGED
	wGCT_MENU_ITEM_SELECTED
	wGCT_COMBO_BOX_CHANGED
	wGCT_SPINBOX_CHANGED
	wGCT_TABLE_CHANGED
	wGCT_TABLE_HEADER_CHANGED
	wGCT_TABLE_SELECTED_AGAIN
	wGCT_TREEVIEW_NODE_DESELECT
	wGCT_TREEVIEW_NODE_SELECT
	wGCT_TREEVIEW_NODE_EXPAND
	wGCT_TREEVIEW_NODE_COLLAPSE
	wGCT_RADIOBUTTONGROUP_CHANGED
	wGCT_RADIOCHECKBOXGROUP_CHANGED
	wGCT_COUNT
end enum

type wGuiEvent
	id as Int32
	name as const zstring ptr
	event as wGuiCallerType
	position as wVector2i
end type

Type wGuiMessageBoxFlags As UInt32
Enum 
	wGMBF_OK = &h1
	wGMBF_CANCEL = &h2
	wGMBF_YES = &h4
	wGMBF_NO = &h8
	wGMBF_FORCE_32BIT = &h7fffffff
end enum

Type wFogType As UInt32
Enum 
	wFT_EXP
	wFT_LINEAR
	wFT_EXP2
end enum

type wVector2f
	x as Float32
	y as Float32
end type

Dim shared wVECTOR2f_ZERO as const wVector2f = (0, 0)
Dim shared wVECTOR2f_ONE as const wVector2f = (1.0f, 1.0f)

type wVector2u
	x as UInt32
	y as UInt32
end type

Dim shared wVECTOR2u_ZERO as const wVector2u = (0, 0)
Dim shared wVECTOR2u_ONE as const wVector2u = (1, 1)
Dim shared wDEFAULT_SCREENSIZE as const wVector2u = (800, 600)

type wVector3f
	x as Float32
	y as Float32
	z as Float32
end type

Dim shared wVECTOR3f_ZERO as const wVector3f = (0, 0, 0)
Dim shared wVECTOR3f_ONE as const wVector3f = (1.0f, 1.0f, 1.0f)

Dim shared wVECTOR3f_UP as const wVector3f = (0, 1.0f, 0)
Dim shared wVECTOR3f_DOWN as const wVector3f = (0, -1.0f, 0)

Dim shared wVECTOR3f_FORWARD as wVector3f = (0.0f, 0.0f, -1.0f)
Dim shared wVECTOR3f_BACKWARD as wVector3f = (0.0f, 0.0f, 1.0f)
Dim shared wVECTOR3f_RIGHT as wVector3f = (1.0f, 0.0f, 0.0f)
Dim shared wVECTOR3f_LEFT as wVector3f = (-1.0f, 0.0f, 0.0f)

type wVector3i
	x as Int32
	y as Int32
	z as Int32
end type

Dim shared wVECTOR3i_ZERO as const wVector3i = (0, 0, 0)
Dim shared wVECTOR3i_ONE as const wVector3i = (1, 1, 1)

Dim shared wVECTOR3i_FORWARD as wVector3i = (0,0,-1)
Dim shared wVECTOR3i_BACKWARD as wVector3i = (0,0,1)
Dim shared wVECTOR3i_RIGHT as wVector3i = (1,0,0)
Dim shared wVECTOR3i_LEFT as wVector3i = (-1,0,0)

type wVector3u
	x as UInt32
	y as UInt32
	z as UInt32
end type

Dim shared wVECTOR3u_ZERO as const wVector3u = (0, 0, 0)
Dim shared wVECTOR3u_ONE as const wVector3u = (1, 1, 1)

type wColor4s
	alpha as UInt8
	red as UInt8
	green as UInt8
	blue as UInt8
end type

Dim shared wCOLOR4s_ZERO as const wColor4s=(0,0,0,0)

Dim shared wCOLOR4s_WHITE as const wColor4s=(255,255,255,255)

Dim shared wCOLOR4s_DARKGREY as const wColor4s=(255,64,64,64)
Dim shared wCOLOR4s_GREY as const wColor4s=(255,128,128,128)
Dim shared wCOLOR4s_SILVER as const wColor4s=(255,192,192,192)

Dim shared wCOLOR4s_BLACK as const wColor4s=(255,0,0,0)

Dim shared wCOLOR4s_RED as const wColor4s=(255,255,0,0)
Dim shared wCOLOR4s_DARKRED as const wColor4s=(255,140,0,0)
Dim shared wCOLOR4s_MAROON as const wColor4s=(255,128,0,0)

Dim shared wCOLOR4s_GREEN as const wColor4s=(255,0,255,0)
Dim shared wCOLOR4s_LIME as const wColor4s=(255,250,128,114)
Dim shared wCOLOR4s_DARKGREEN as const wColor4s=(255,0,100,0)
Dim shared wCOLOR4s_OLIVE as const wColor4s=(255,240,128,128)

Dim shared wCOLOR4s_BLUE as const wColor4s=(255,0,0,255)
Dim shared wCOLOR4s_DARKBLUE as const wColor4s=(255,0,0,139)
Dim shared wCOLOR4s_NAVY as const wColor4s=(255,0,0,128)
Dim shared wCOLOR4s_SKYBLUE as const wColor4s=(255,135,206,235)

Dim shared wCOLOR4s_MAGENTA as const wColor4s=(255,255,0,255)
Dim shared wCOLOR4s_PINK as const wColor4s=(255,255,192,203)
Dim shared wCOLOR4s_DEEPPINK as const wColor4s=(255,255,20,147)
Dim shared wCOLOR4s_INDIGO as const wColor4s=(255,75,0,130)

Dim shared wCOLOR4s_YELLOW as const wColor4s=(255,255,255,0)
Dim shared wCOLOR4s_GOLD as const wColor4s=(255,255,215,0)
Dim shared wCOLOR4s_KHAKI as const wColor4s=(255,245,230,140)

Dim shared wCOLOR4s_ORANGE as const wColor4s=(255,255,68,0)
Dim shared wCOLOR4s_DARKORANGE as const wColor4s=(255,255,140,0)
Dim shared wCOLOR4s_ORANGERED as const wColor4s=(255,255,69,0)

type wColor4f
	alpha as Float32
	red as Float32
	green as Float32
	blue as Float32
end type

Dim shared wCOLOR4f_WHITE as const wColor4f = (1.0f, 1.0f, 1.0f, 1.0f)
Dim shared wCOLOR4f_BLACK as const wColor4f = (0.0f, 0.0f, 0.0f, 0.0f)

type wColor3s
	red as UInt8
	green as UInt8
	blue as UInt8
end type

Dim shared wCOLOR3s_WHITE as const wColor3s = (255, 255, 255)
Dim shared wCOLOR3s_BLACK as const wColor3s = (0, 0, 0)

type wColor3f
	red as Float32
	green as Float32
	blue as Float32
end type

Dim shared wCOLOR3f_WHITE as const wColor3f = (1.0f, 1.0f, 1.0f)
dim shared wCOLOR3f_BLACK as const wColor3f = (0, 0, 0)

type wWeekDay as UInt32
Enum
    wWD_SUNDAY
    wWD_MONDAY
    wWD_TUESDAY
    wWD_WEDNESDAY
    wWD_THURSDAY
    wWD_FRIDAY
    wWD_SATURDAY
end enum

type wRealTimeDate
    _Day as UInt32   
    _Hour as UInt32   
    _IsDST as Boolean     
    _Minute as UInt32   
    _Month as UInt32   
    _Second as UInt32   
    _Weekday as wWeekDay 
    _Year as Int32 	 
    _Yearday as UInt32 	 
end type

type wVert
    vertPos as wVector3f  
    vertNormal as wVector3f  
    vertColor as wColor4s   
    texCoords as wVector2f  
end type

type wParticleEmitter
	direction As wVector3f =(0,0.03f,0)
	minParticlesPerSecond As UInt32 =5
	maxParticlesPerSecond As UInt32 =10
	minStartColor As wColor4s =(255,0,0,0)
	maxStartColor As wColor4s =(255,255,255,255)
	lifeTimeMin As UInt32 =2000
	lifeTimeMax As UInt32 =4000
	maxAnglesDegrees As Int32 =0
	minStartSize As wVector2f =(5,5)
	maxStartSize As wVector2f =(5,5)
end type

type wParticleEmitterType as UInt32
enum
	wPET_POINT = 0
	wPET_ANIMATED_MESH
	wPET_BOX
	wPET_CYLINDER
	wPET_MESH
	wPET_RING
	wPET_SPHERE
	wPET_COUNT
end enum

type wParticleCylinderEmitter
	center as wVector3f
	length as Float32
	normal as wVector3f
	getOutlineOnly As Boolean =FALSE
	radius as Float32
end type

type wParticleMeshEmitter
	animMeshNode as wNode
	animMeshName as const ZString ptr
	staticMesh as wMesh
	staticMeshName as const ZString ptr
	nodeId as Int32
	useNormalDirection As Boolean =TRUE
	normalDirectionModifier as Float32
	everyMeshVertex as Boolean  =TRUE
end type

type wParticleRingEmitter
	center as wVector3f
	radius as Float32
	ringThickness as Float32
end type

type wParticleSphereEmitter
	center as wVector3f
	radius as Float32
end type

type wParticleAffectorType as UInt32
enum
	wPAT_NONE = 0
	wPAT_ATTRACT
	wPAT_FADE_OUT
	wPAT_GRAVITY
	wPAT_ROTATE
	wPAT_SCALE
	wPAT_STOP
	wPAT_PUSH
	wPAT_SPLINE
	wPAT_COLOR_MORPH
	wPAT_COUNT
end enum

type wParticleAttractionAffector
	point as wVector3f
	speed as Float32
	attract As Boolean =TRUE
	affectX as Boolean =TRUE
	affectY as Boolean =TRUE
	affectZ as Boolean =TRUE
End type

type wParticleColorMorphAffector
	colorsList as wColor4s ptr
	colorsCount as UInt32
	timesList as UInt32 ptr
	timesCount as UInt32
	smooth as Boolean =FALSE
End type

type wParticlePushAffector
	furthestDistance as Float32
	nearestDistance as Float32
	columnDistance as Float32
	center as wVector3f
	strength as wVector3f
	distant as Boolean
end type

type wParticleSplineAffector
	points as wVector3f ptr
	pointsCount as UInt32
	speed as Float32
	tightness as Float32
	attraction as Float32
	deleteAtFinalPoint as Boolean
end type

type wTriangle
	pointA as wVector3f
	pointB as wVector3f
	pointC as wVector3f
end type

Dim shared wTRIANGLE3f_ZERO as wTriangle=((0,0,0),(0,0,0),(0,0,0))

type wAnimatorCollisionResponse
	world as wSelector ptr
	targetNode as wNode ptr
	ellipsoidRadius as wVector3f =(30.0f,60.0f,30.0f)
	gravity as wVector3f =(0.0f,-10.0f,0.0f)
	animateTarget as Boolean
	ellipsoidTranslation as wVector3f =(0.0f,0.0f,0.0f)
	collisionPoint as wVector3f
	collisionResultPosition as wVector3f
	collisionTriangle as wTriangle
	collisionNode as wNode ptr
	isFalling as Boolean
	collisionOccured as Boolean
end type

type wSceneNodeAnimatorType as UInt32
enum
    wSNAT_FLY_CIRCLE'//Fly circle scene node animator.
    wSNAT_FLY_STRAIGHT'//Fly straight scene node animator.
    wSNAT_FOLLOW_SPLINE'//Follow spline scene node animator.
    wSNAT_ROTATION'//Rotation scene node animator.
    wSNAT_TEXTURE'//Texture scene node animator.
    wSNAT_DELETION'//Deletion scene node animator.
    wSNAT_COLLISION_RESPONSE'//Collision respose scene node animator.
    wSNAT_CAMERA_FPS'//FPS camera animator.
    wSNAT_CAMERA_MAYA'//Maya camera animator.
    wSNAT_COUNT'//Amount of built-in scene node animators.
    wSNAT_UNKNOWN'//Unknown scene node animator.
    wSNAT_FORCE_32_BIT'//This enum is never used, it only forces the compiler to compile this enumeration to 32 bit.
end enum

'///FLY CIRCLE ANIMATOR
type wAnimatorFlyingCircle
     center as wVector3f
     direction as wVector3f
	 radius as Float32 
     radiusEllipsoid as Float32
     speed as Float32
end type

'///FLY STRAIGHT ANIMATOR
type wAnimatorFlyingStraight
    startPoint as wVector3f
    endPoint as wVector3f
    timeForWay as UInt32
    loopMode as Boolean
    pingPongMode as Boolean
end type

'///SPLINE ANIMATOR
type wAnimatorSpline
    points as wVector3f ptr
    pointsCount as UInt32
    speed as Float32
    tightness as Float32
    loopMode as Boolean
    pingPongMode as Boolean
end type

'///ROTATION ANIMATOR
type wAnimatorRotation
     rotation as wVector3f
end type

type wConstant
	next as wConstant ptr
	name as const zstring ptr
	address as Int32
	preset as Int32
	data as const Float32 ptr
	count as Int32
end type

type wDriverTypes as UInt32
Enum
	wDRT_NULL = 0
	wDRT_SOFTWARE
	wDRT_BURNINGS_VIDEO
	wDRT_OPENGL
	wDRT_DIRECT3D9
	wDRT_CHOICE_CONSOLE = 6
end enum

type wDeviceTypes as UInt32
Enum
	wDT_BEST
	wDT_WIN32
	wDT_WINCE
	wDT_X11
	wDT_OSX
	wDT_SDL
	wDT_FRAMEBUFFER
	wDT_CONSOLE
end enum

type wVertexShaderVersion as UInt32
Enum
	wVSV_1_1 = 0
	wVSV_2_0
	wVSV_2_a
	wVSV_3_0
end enum

type wPixelShaderVersion as UInt32
Enum
	wPSV_1_1 = 0
	wPSV_1_2
	wPSV_1_3
	wPSV_1_4
	wPSV_2_0
	wPSV_2_a
	wPSV_2_b
	wPSV_3_0
end enum

type wGeometryShaderVersion as UInt32
Enum
	wGSV_4_0 = 0
	wGSV_COUNT
end enum

type wPrimitiveType as UInt32
Enum
	wPT_POINTS
	wPT_LINE_STRIP
	wPT_LINE_LOOP
	wPT_LINES
	wPT_TRIANGLE_STRIP
	wPT_TRIANGLE_FAN
	wPT_TRIANGLES
	wPT_QUAD_STRIP
	wPT_QUADS
	wPT_POLYGON
	wPT_POINT_SPRITES
	wPT_COUNT
end enum

type wShaderConstants as UInt32
Enum
	wSC_NO_PRESET = 0
	wSC_INVERSE_WORLD
	wSC_WORLD_VIEW_PROJECTION
	wSC_CAMERA_POSITION
	wSC_TRANSPOSED_WORLD
	wSC_WORLD_VIEW
    wSC_CAMERA_FAR
    wSC_CAMERA_FAR_LEFT_UP
end enum

Dim shared as Float32 wShaderConstZero   =0
Dim shared as Float32 wShaderConstOne    =1
Dim shared as Float32 wShaderConstTwo    =2
Dim shared as Float32 wShaderConstThree  =3

type wVideoFeatureQuery as UInt32
Enum
	wVDF_RENDER_TO_TARGET = 0
	wVDF_HARDWARE_TL
	wVDF_MULTITEXTURE
	wVDF_BILINEAR_FILTER
	wVDF_MIP_MAP
	wVDF_MIP_MAP_AUTO_UPDATE
	wVDF_STENCIL_BUFFER
	wVDF_VERTEX_SHADER_1_1
	wVDF_VERTEX_SHADER_2_0
	wVDF_VERTEX_SHADER_3_0
	wVDF_PIXEL_SHADER_1_1
	wVDF_PIXEL_SHADER_1_2
	wVDF_PIXEL_SHADER_1_3
	wVDF_PIXEL_SHADER_1_4
	wVDF_PIXEL_SHADER_2_0
	wVDF_PIXEL_SHADER_3_0
	wVDF_ARB_VERTEX_PROGRAM_1
	wVDF_ARB_FRAGMENT_PROGRAM_1
	wVDF_ARB_GLSL
	wVDF_HLSL
	wVDF_TEXTURE_NSQUARE
	wVDF_TEXTURE_NPOT
	wVDF_FRAMEBUFFER_OBJECT
	wVDF_VERTEX_BUFFER_OBJECT
	wVDF_ALPHA_TO_COVERAGE
	wVDF_COLOR_MASK
	wVDF_MULTIPLE_RENDER_TARGETS
	wVDF_MRT_BLEND
	wVDF_MRT_COLOR_MASK
	wVDF_MRT_BLEND_FUNC
	wVDF_GEOMETRY_SHADER
	wVDF_OCCLUSION_QUERY
	wVDF_POLYGON_OFFSET
	wVDF_BLEND_OPERATIONS
	wVDF_BLEND_SEPARATE
	wVDF_TEXTURE_MATRIX
	wVDF_TEXTURE_COMPRESSED_DXT
	wVDF_TEXTURE_COMPRESSED_PVRTC
	wVDF_TEXTURE_COMPRESSED_PVRTC2
	wVDF_TEXTURE_COMPRESSED_ETC1
	wVDF_TEXTURE_COMPRESSED_ETC2
	wVDF_TEXTURE_CUBEMAP
	wVDF_COUNT
end enum

type wMaterialFlags as UInt32
Enum
	wMF_WIREFRAME = 0
	wMF_POINTCLOUD
	wMF_GOURAUD_SHADING
	wMF_LIGHTING
	wMF_ZBUFFER
	wMF_ZWRITE_ENABLE
	wMF_BACK_FACE_CULLING
	wMF_FRONT_FACE_CULLING
	wMF_BILINEAR_FILTER
	wMF_TRILINEAR_FILTER
	wMF_ANISOTROPIC_FILTER
	wMF_FOG_ENABLE
	wMF_NORMALIZE_NORMALS
	wMF_TEXTURE_WRAP
	wMF_ANTI_ALIASING
	wMF_COLOR_MASK
	wMF_COLOR_MATERIAL
	wMF_COUNT
end enum

type wMaterialTypes as UInt32
Enum
	wMT_SOLID = 0
	wMT_SOLID_2_LAYER
	wMT_LIGHTMAP
	wMT_LIGHTMAP_ADD
	wMT_LIGHTMAP_M2
	wMT_LIGHTMAP_M4
	wMT_LIGHTMAP_LIGHTING
	wMT_LIGHTMAP_LIGHTING_M2
	wMT_LIGHTMAP_LIGHTING_M4
	wMT_DETAIL_MAP
	wMT_SPHERE_MAP
	wMT_REFLECTION_2_LAYER
	wMT_TRANSPARENT_ADD_COLOR
	wMT_TRANSPARENT_ALPHA_CHANNEL
	wMT_TRANSPARENT_ALPHA_CHANNEL_REF
	wMT_TRANSPARENT_VERTEX_ALPHA
	wMT_TRANSPARENT_REFLECTION_2_LAYER
	wMT_NORMAL_MAP_SOLID
	wMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR
	wMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA
	wMT_PARALLAX_MAP_SOLID
	wMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR
	wMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA
	wMT_ONETEXTURE_BLEND
	wMT_FOUR_DETAIL_MAP
	wMT_TRANSPARENT_ADD_ALPHA_CHANNEL_REF
	wMT_TRANSPARENT_ADD_ALPHA_CHANNEL
	wMT_FORCE_32BIT = &h7fffffff
end enum

type wCustomMaterialTypes

     Solid as wMaterialTypes
    /'*Transparent alpha reference material
     * Each texel is either fully transparent or solid. Supports lighting.\n
     * Works just as wMT_TRANSPARENT_ALPHA_CHANNEL_REF.
     *'/
     TransparentRef as wMaterialTypes

     Transparent as wMaterialTypes

     TransparentSoft as wMaterialTypes
    /'*Normal map
     * Requires a normal map texture and a mesh with tangents.
     *'/
     Normal as wMaterialTypes
    /'*Normal map for animated meshes
     * Requires a normal map texture, however does NOT require a tangent mesh, which means it can be easily used on WS3D animated meshes. \n
     * Approximates the tangent in code, results in lower quality.
     *'/
     NormalAnimated as wMaterialTypes
    /'*Parallax map
     * Requires a normal map texture with the original height stored in the alpha channel. Plus a tangent mesh. \n
     * Param1 affects bumpiness.
     *'/
     Parallax as wMaterialTypes
    /'*Detail map
     * Meant as a replacement for wMT_DETAIL_MAP. \n
     * First texture is applied as a solid material. Then, it's mixed with the second texture, which is the detail map. \n
     * Param1 affects detail map repeat.
     *'/
    Detail as wMaterialTypes
end type

type wColorMaterial as UInt32
Enum
	wCM_NONE = 0
	wCM_DIFFUSE
	wCM_AMBIENT
	wCM_EMISSIVE
	wCM_SPECULAR
	wCM_DIFFUSE_AND_AMBIENT
end enum

type wBlendFactor as UInt32
Enum
	wBF_ZERO = 0
	wBF_ONE
	wBF_DST_COLOR
	wBF_ONE_MINUS_DST_COLOR
	wBF_SRC_COLOR
	wBF_ONE_MINUS_SRC_COLOR
	wBF_SRC_ALPHA
	wBF_ONE_MINUS_SRC_ALPHA
	wBF_DST_ALPHA
	wBF_ONE_MINUS_DST_ALPHA
	wBF_SRC_ALPHA_SATURATE
end enum

type wBlendOperation as UInt32
Enum
	wBO_SCREEN = 0
	wBO_ADD
	wBO_SUBTRACT
	wBO_MULTIPLY
	wBO_DIVIDE
end enum

type wBlendModulateFunc as UInt32
Enum
	wBMF_MODULATE_1X	= 1
	wBMF_MODULATE_2X	= 2
	wBMF_MODULATE_4X	= 4
End enum

type wBlendAlphaSource as UInt32
Enum
	wBAS_NONE=0'//! Use no alpha, somewhat redundant with other settings
	wBAS_VERTEX_COLOR'//! Use vertex color alpha
	wBAS_TEXTURE'//! Use texture alpha channel
End enum

type wTextureCreationFlag as UInt32
Enum
	wTCF_ALWAYS_16_BIT = &h00000001
	wTCF_ALWAYS_32_BIT = &h00000002
	wTCF_OPTIMIZED_FOR_QUALITY = &h00000004
	wTCF_OPTIMIZED_FOR_SPEED = &h00000008
	wTCF_CREATE_MIP_MAPS = &h00000010
	wTCF_NO_ALPHA_CHANNEL = &h00000020
	wTCF_ALLOW_NON_POWER_2 = &h00000040
end enum

type wTextureClamp as UInt32
Enum
	wTC_REPEAT
	wTC_CLAMP
	wTC_CLAMP_TO_EDGE
	wTC_CLAMP_TO_BORDER
	wTC_MIRROR
	wTC_MIRROR_CLAMP
	wTC_MIRROR_CLAMP_TO_EDGE
	wTC_MIRROR_CLAMP_TO_BORDER
end enum

type wColorPlane as UInt32 
Enum
	wCP_NONE = 0
	wCP_ALPHA = 1
	wCP_RED = 2
	wCP_GREEN = 4
	wCP_BLUE = 8
	wCP_RGB = 14
	wCP_ALL = 15
end enum

type wAntiAliasingMode as UInt32 
Enum
	wAAM_OFF = 0
	wAAM_SIMPLE = 1
	wAAM_QUALITY = 3
	wAAM_LINE_SMOOTH = 4
	wAAM_POINT_SMOOTH = 8
	wAAM_FULL_BASIC = 15
	wAAM_ALPHA_TO_COVERAGE = 16
end enum

type wCullingState as UInt32 
Enum
	wCS_OFF = 0
	wCS_BOX = 1
	wCS_FRUSTUM_BOX = 2
	wCS_FRUSTUM_SPHERE = 4
end enum

type wSceneNodeType as UInt32 
Enum
	wSNT_CUBE = 1
	wSNT_SPHERE = 2
	wSNT_CYLINDER = 3
	wSNT_CONE = 4
	wSNT_PLANE = 5
	wSNT_TEXT = 6
	wSNT_WATER_SURFACE = 7
	wSNT_TERRAIN = 8
	wSNT_SKY_BOX = 9
	wSNT_SKY_DOME = 10
	wSNT_SHADOW_VOLUME = 11
	wSNT_OCTREE = 12
	wSNT_MESH = 13
	wSNT_LIGHT = 14
	wSNT_EMPTY = 15
	wSNT_DUMMY_TRANSFORMATION = 16
	wSNT_CAMERA = 17
	wSNT_BILLBOARD = 18
	wSNT_ANIMATED_MESH = 19
	wSNT_PARTICLE_SYSTEM = 20
	wSNT_VOLUME_LIGHT = 21
	wSNT_CAMERA_MAYA = 22
	wSNT_CAMERA_FPS = 23
	wSNT_Q3SHADER_SCENE_NODE = 24
	wSNT_UNKNOWN = 25
	wSNT_ANY = 26
end enum

type wOctreeVBOMode as UInt32
Enum
	'//! No VBO's used. Vertices+indices send to graphic-card on each render.
	wOVM_NO_VBO
	'//! VBO's used. Draw the complete meshbuffers if any polygon in it is visible.
	'//! This allows VBO's for the meshbuffers to be completely static, but basically means
	'//! the octree is not used as an octree (not it still does do all the octree calculations)
	'//! Might work in very specific cases, but if this is gives you the best fastest results
	'//! you should probably compare as well to simply using a static mesh with no octree at all.
	'//! In most cases the other 2 options should work better with an octree.
	wOVM_USE_VBO
	'//! VBO's used. The index-buffer information is updated each frame
	'//! with only the visible parts of a tree-node.
	'//! So the vertex-buffer is static and the index-buffer is dynamic.
	'//! This is the default
	wOVM_USE_VBO_WITH_VISIBITLY
End enum

type wOctreePolygonCheck as UInt32
Enum
    '//! Check against box of the camera frustum
	'//! This is the default
	wOPC_BOX
	'//! against the camera frustum
	wOPC_FRUSTUM
End enum

type wOctreeParameters
	VBOmode as wOctreeVBOMode = wOVM_USE_VBO_WITH_VISIBITLY
	checkMode as wOctreePolygonCheck = wOPC_BOX
    minimalPolysPerNode as Int32'///read only
    hasShadowVolume as Boolean=false'///read only
end type

type wXmlNodeType as UInt32 
Enum
	wXNT_NONE
	wXNT_ELEMENT
	wXNT_ELEMENT_END
	wXNT_TEXT
	wXNT_COMMENT
	wXNT_CDATA
	wXNT_UNKNOWN
end enum

type wTextFormat as UInt32 
Enum
	wTF_ASCII
	wTF_UTF8
	wTF_UTF16_BE
	wTF_UTF16_LE
	wTF_UTF32_BE
	wTF_UTF32_LE
end enum

type wFilterType as UInt32 
Enum
	wFT_NONE
	wFT_4PCF
	wFT_8PCF
	wFT_12PCF
	wFT_16PCF
	wFT_COUNT
end enum

type wShadowMode as UInt32 
Enum
	wSM_RECEIVE
	wSM_CAST
	wSM_BOTH
	wSM_EXCLUDE
	wSM_COUNT
end enum

type wColorFormat as UInt32 
Enum
	'//! 16 bit color format used by the software driver.
	/'** It is thus preferred by all other irrlicht engine video drivers.
	There are 5 bits for every color component, and a single bit is left
	for alpha information. *'/
	wCF_A1R5G5B5 = 0
	'//! Standard 16 bit color format.
	wCF_R5G6B5
	'//! 24 bit color, no alpha channel, but 8 bit for red, green and blue.
	wCF_R8G8B8
	'//! Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha.
	wCF_A8R8G8B8
	/'** Compressed image formats. **'/
	'//! DXT1 color format.
	wCF_DXT1
	'//! DXT2 color format.
	wCF_DXT2
	'//! DXT3 color format.
	wCF_DXT3
	'//! DXT4 color format.
	wCF_DXT4
	'//! DXT5 color format.
	wCF_DXT5
	'//! PVRTC RGB 2bpp.
	wCF_PVRTC_RGB2
	'//! PVRTC ARGB 2bpp.
	wCF_PVRTC_ARGB2
	'//! PVRTC RGB 4bpp.
	wCF_PVRTC_RGB4
	'//! PVRTC ARGB 4bpp.
	wCF_PVRTC_ARGB4
	'//! PVRTC2 ARGB 2bpp.
	wCF_PVRTC2_ARGB2
	'//! PVRTC2 ARGB 4bpp.
	wCF_PVRTC2_ARGB4
	'//! ETC1 RGB.
	wCF_ETC1
	'//! ETC2 RGB.
	wCF_ETC2_RGB
	'//! ETC2 ARGB.
	wCF_ETC2_ARGB
	/'** The following formats may only be used for render target textures. */
	/** Floating point formats. *'/
	'//! 16 bit format using 16 bits for the red channel.
	wCF_R16F
	'//! 32 bit format using 16 bits for the red and green channels.
	wCF_G16R16F
	'//! 64 bit format using 16 bits for the red, green, blue and alpha channels.
	wCF_A16B16G16R16F
	'//! 32 bit format using 32 bits for the red channel.
	wCF_R32F
	'//! 64 bit format using 32 bits for the red and green channels.
	wCF_G32R32F
	'//! 128 bit format using 32 bits for the red, green, blue and alpha channels.
	wCF_A32B32G32R32F
	/'** Unsigned normalized integer formats. *'/
	'//! 8 bit format using 8 bits for the red channel.
	wCF_R8
	'//! 16 bit format using 8 bits for the red and green channels.
	wCF_R8G8
	'//! 16 bit format using 16 bits for the red channel.
	wCF_R16
	'//! 32 bit format using 16 bits for the red and green channels.
	wCF_R16G16
	/'** Depth and stencil formats. *'/
	'//! 16 bit format using 16 bits for depth.
	wCF_D16
	'//! 32 bit format using 32 bits for depth.
	wCF_D32
	'//! 32 bit format using 24 bits for depth and 8 bits for stencil.
	wCF_D24S8
	'//! Unknown color format:
	wCF_UNKNOWN
end enum

type wMd2AnimationType as UInt32 
Enum
	wMAT_STAND
	wMAT_RUN
	wMAT_ATTACK
	wMAT_PAIN_A
	wMAT_PAIN_B
	wMAT_PAIN_C
	wMAT_JUMP
	wMAT_FLIP
	wMAT_SALUTE
	wMAT_FALLBACK
	wMAT_WAVE
	wMAT_POINT
	wMAT_CROUCH_STAND
	wMAT_CROUCH_WALK
	wMAT_CROUCH_ATTACK
	wMAT_CROUCH_PAIN
	wMAT_CROUCH_DEATH
	wMAT_DEATH_FALLBACK
	wMAT_DEATH_FALLFORWARD
	wMAT_DEATH_FALLBACKSLOW
	wMAT_BOOM
	wMAT_COUNT
    wMAT_UNKNOWN
end enum

type wJointMode as UInt32 
Enum
	wJM_NONE = 0
	wJM_READ
	wJM_CONTROL
end enum

type wBoneSkinningSpace as UInt32 
Enum
	wBSS_LOCAL
	wBSS_GLOBAL
	wBSS_COUNT
end enum

type wMeshFileFormat as UInt32 
Enum
	wMFF_WS_MESH = 0
	wMFF_COLLADA
	wMFF_STL
end enum

type wAnimatedMeshType as UInt32
Enum
    wAMT_UNKNOWN,'///Unknown animated mesh type.
    wAMT_MD2'//Quake 2 MD2 model file.
    wAMT_MD3'//Quake 3 MD3 model file.
    wAMT_OBJ'//Maya .obj static model.
    wAMT_BSP'//Quake 3 .bsp static Map.
    wAMT_3DS'//3D Studio .3ds file
    wAMT_MY3D'//My3D Mesh, the file format by Zhuck Dimitry.
    wAMT_LMTS'//Pulsar LMTools .lmts file. This Irrlicht loader was written by Jonas Petersen.
    wAMT_CSM'//Cartography Shop .csm file. This loader was created by Saurav Mohapatra.
    wAMT_OCT'//.oct file for Paul Nette's FSRad or from Murphy McCauley's Blender .oct exporter.
            '//The oct file format contains 3D geometry and lightmaps and can be loaded directly by Irrlicht
    wAMT_MDL_HALFLIFE'//Halflife MDL model file.
    wAMT_SKINNED'//generic skinned mesh 
End enum

type wGuiAlignment as UInt32 
Enum
	wGA_UPPERLEFT = 0
	wGA_LOWERRIGHT
	wGA_CENTER
	wGA_SCALE
end enum

type wGuiElementType as UInt32 
Enum
	wGET_BUTTON
	wGET_CHECK_BOX
	wGET_COMBO_BOX
	wGET_CONTEXT_MENU
	wGET_MENU
	wGET_EDIT_BOX
	wGET_FILE_OPEN_DIALOG
	wGET_COLOR_SELECT_DIALOG
	wGET_IN_OUT_FADER
	wGET_IMAGE
	wGET_LIST_BOX
	wGET_MESH_VIEWER
	wGET_MESSAGE_BOX
	wGET_MODAL_SCREEN
	wGET_SCROLL_BAR
	wGET_SPIN_BOX
	wGET_STATIC_TEXT
	wGET_TAB
	wGET_TAB_CONTROL
	wGET_TABLE
	wGET_TOOL_BAR
	wGET_TREE_VIEW
	wGET_WINDOW
	wGET_ELEMENT
	wGET_ROOT
	wGET_COUNT
	wGET_FORCE_32_BIT
end enum

type wGuiColumnOrdering as UInt32 
Enum
	wGCO_NONE = 0
	wGCO_CUSTOM = 1
	wGCO_ASCENDING = 2
	wGCO_DESCENDING = 3
	wGCO_FLIP_ASCENDING_DESCENDING = 4
	wGCO_COUNT = 5
end enum

type wGuiListBoxColor as UInt32 
Enum
	wGLC_TEXT = 0
	wGLC_TEXT_HIGHLIGHT
	wGLC_ICON
	wGLC_ICON_HIGHLIGHT
	wGLC_COUNT
end enum

type wGuiDefaultColor as UInt32 
Enum
	wGDC_3D_DARK_SHADOW = 0
	wGDC_3D_SHADOW
	wGDC_3D_FACE
	wGDC_3D_HIGH_LIGHT
	wGDC_3D_LIGHT
	wGDC_ACTIVE_BORDER
	wGDC_ACTIVE_CAPTION
	wGDC_APP_WORKSPACE
	wGDC_BUTTON_TEXT
	wGDC_GRAY_TEXT
	wGDC_HIGH_LIGHT
	wGDC_HIGH_LIGHT_TEXT
	wGDC_INACTIVE_BORDER
	wGDC_INACTIVE_CAPTION
	wGDC_TOOLTIP
	wGDC_TOOLTIP_BACKGROUND
	wGDC_SCROLLBAR
	wGDC_WINDOW
	wGDC_WINDOW_SYMBOL
	wGDC_ICON
	wGDC_ICON_HIGH_LIGHT
	wGDC_COUNT
end enum

type wContextMenuClose as UInt32 
Enum
	wCMC_IGNORE = 0
	wCMC_REMOVE
	wCMC_HIDE
end enum

type wGuiOrderingMode as UInt32 
Enum
	wGOM_NONE = 0
	wGOM_ASCENDING
	wGOM_DESCENDING
	wGOM_COUNT
end enum

type wGuiTableDrawFlags as UInt32 
Enum
	wGTDF_ROWS = 1
	wGTDF_COLUMNS = 2
	wGTDF_ACTIVE_ROW = 4
	wGTDF_COUNT
end enum

type wGuiSkinSpace as UInt32 
Enum
	wGSS_WINDOWS_CLASSIC = 0
	wGSS_WINDOWS_METALLIC
	wGSS_BURNING_SKIN
	wGSS_UNKNOWN
	wGSS_COUNT
end enum

type wGuiDefaultSize as UInt32 
Enum
	wGDS_SCROLLBAR_SIZE = 0
	wGDS_MENU_HEIGHT
	wGDS_WINDOW_BUTTON_WIDTH
	wGDS_CHECK_BOX_WIDTH
	wGDS_MESSAGE_BOX_WIDTH
	wGDS_MESSAGE_BOX_HEIGHT
	wGDS_BUTTON_WIDTH
	wGDS_BUTTON_HEIGHT
	wGDS_TEXT_DISTANCE_X
	wGDS_TEXT_DISTANCE_Y
	wGDS_TITLEBARTEXT_DISTANCE_X
	wGDS_TITLEBARTEXT_DISTANCE_Y
	wGDS_MESSAGE_BOX_GAP_SPACE
	wGDS_MESSAGE_BOX_MIN_TEXT_WIDTH
	wGDS_MESSAGE_BOX_MAX_TEXT_WIDTH
	wGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT
	wGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT
	wGDS_BUTTON_PRESSED_IMAGE_OFFSET_X
	wGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y
	wGDS_BUTTON_PRESSED_TEXT_OFFSET_X
	wGDS_BUTTON_PRESSED_TEXT_OFFSET_Y
	wGDS_BUTTON_PRESSED_SPRITE_OFFSET_X
	wGDS_BUTTON_PRESSED_SPRITE_OFFSET_Y
	wGDS_COUNT
end enum

type wGuiDefaultText as UInt32 
Enum
	wGDT_MSG_BOX_OK = 0
	wGDT_MSG_BOX_CANCEL = 1
	wGDT_MSG_BOX_YES = 2
	wGDT_MSG_BOX_NO = 3
	wGDT_WINDOW_CLOSE = 4
	wGDT_WINDOW_MAXIMIZE = 5
	wGDT_WINDOW_MINIMIZE = 6
	wGDT_WINDOW_RESTORE = 7
	wGDT_COUNT = 8
end enum

type wGuiDefaultFont as UInt32 
Enum
	wGDF_DEFAULT = 0
	wGDF_BUTTON
	wGDF_WINDOW
	wGDF_MENU
	wGDF_TOOLTIP
	wGDF_COUNT
end enum

type wGuiButtonState as UInt32 
Enum
	wGBS_BUTTON_UP = 0
	wGBS_BUTTON_DOWN = 1
	wGBS_BUTTON_MOUSE_OVER = 2
	wGBS_BUTTON_MOUSE_OFF = 3
	wGBS_BUTTON_FOCUSED = 4
	wGBS_BUTTON_NOT_FOCUSED = 5
	wGBS_COUNT
end enum

type wGuiDefaultIcon as UInt32 
enum
	wGDI_WINDOW_MAXIMIZE = 0
	wGDI_WINDOW_RESTORE
	wGDI_WINDOW_CLOSE
	wGDI_WINDOW_MINIMIZE
	wGDI_WINDOW_RESIZE
	wGDI_CURSOR_UP
	wGDI_CURSOR_DOWN
	wGDI_CURSOR_LEFT
	wGDI_CURSOR_RIGHT
	wGDI_MENU_MORE
	wGDI_CHECK_BOX_CHECKED
	wGDI_DROP_DOWN
	wGDI_SMALL_CURSOR_UP
	wGDI_SMALL_CURSOR_DOWN
	wGDI_RADIO_BUTTON_CHECKED
	wGDI_MORE_LEFT
	wGDI_MORE_RIGHT
	wGDI_MORE_UP
	wGDI_MORE_DOWN
	wGDI_EXPAND
	wGDI_COLLAPSE
	wGDI_FILE
	wGDI_DIRECTORY
	wGDI_COUNT
end enum

type wLightType as UInt32 
enum
	wLT_POINT = 0
	wLT_SPOT
	wLT_DIRECTIONAL
end enum

type wDebugMode as UInt32 
enum
	wDM_OFF = 0
	wDM_BBOX = 1
	wDM_NORMALS = 2
	wDM_SKELETON = 4
	wDM_MESH_WIRE_OVERLAY = 8
	wDM_HALF_TRANSPARENCY = 16
	wDM_BBOX_BUFFERS = 32
	wDM_FULL = &hffffffff
end enum

type wTerrainPatchSize as UInt32 
enum
	wTPS_9 = 9
	wTPS_17 = 17
	wTPS_33 = 33
	wTPS_65 = 65
	wTPS_129 = 129
end enum

type wTiledTerrainEdge as UInt32 
enum
	wTTE_TOP = 0
	wTTE_BOTTOM
	wTTE_LEFT
	wTTE_RIGHT
end enum

type wPostEffectQuality as UInt32 
enum
	wPEQ_CRUDE = 0
	wPEQ_FAST = 1
	wPEQ_DEFAULT = 2
	wPEQ_GOOD = 3
	wPEQ_BEST = 4
end enum

type wPostEffectId as UInt32 
enum
	wPEI_CUSTOM = 0
	wPEI_DIRECT = 1
	wPEI_PUNCH = 2
	wPEI_PIXELATE = 3
	wPEI_PIXELATEBANDS = 4
	wPEI_DARKEN = 5
	wPEI_LIGHTEN = 6
	wPEI_RANGE = 7
	wPEI_POSTERIZE = 8
	wPEI_INVERT = 9
	wPEI_TINT = 10
	wPEI_CURVES = 11
	wPEI_GREYSCALE = 12
	wPEI_SEPIA = 13
	wPEI_SATURATE = 14
	wPEI_VIGNETTE = 15
	wPEI_NOISE = 16
	wPEI_COLORNOISE = 17
	wPEI_PURENOISE = 18
	wPEI_HBLUR = 19
	wPEI_VBLUR = 20
	wPEI_HSHARPEN = 21
	wPEI_VSHARPEN = 22
	wPEI_BIBLUR = 23
	wPEI_HBLURDOFFAR = 24
	wPEI_VBLURDOFFAR = 25
	wPEI_HBLURDOFNEAR = 26
	wPEI_VBLURDOFNEAR = 27
	wPEI_LINEARBLUR = 28
	wPEI_RADIALBLUR = 29
	wPEI_RADIALBEAM = 30
	wPEI_ROTATIONALBLUR = 31
	wPEI_OVERLAY = 32
	wPEI_OVERLAYNEG = 33
	wPEI_MOTIONBLUR = 34
	wPEI_HAZE = 35
	wPEI_HAZEDEPTH = 36
	wPEI_DEPTH = 37
	wPEI_OCCLUSION = 38
	wPEI_BLUR = 39
	wPEI_SHARPEN = 40
	wPEI_BLURDOFFAR = 41
	wPEI_BLURDOFNEAR = 42
	wPEI_BLURDOF = 43
	wPEI_BLOOM = 44
	wPEI_GLOOM = 45
	wPEI_NIGHTVISION = 46
	wPEI_MONITOR = 47
	wPEI_WATERCOLOR = 48
	wPEI_COUNT = 49
end enum

type wBillboard
	Position as wVector3f
	Size as wVector2f
	Roll as Float32
	Axis as wVector3f
	HasAxis as Int32
	sColor as Int32'//not for use
	alpha as UInt32
	red as UInt32
	green as UInt32
	blue as UInt32
	vertexIndex as UInt32
	sprev as wBillboard ptr
	snext as wBillboard ptr
end type

type wConsoleFontColor as UInt32 
enum
	wCFC_BLACK
	wCFC_BLUE
	wCFC_GREEN
	wCFC_CYAN
	wCFC_RED
	wCFC_MAGENTA
	wCFC_BROWN
	wCFC_GREY
	wCFC_DARKGREY
	wCFC_LIGHTBLUE
	wCFC_LIGHTGREEN
	wCFC_LIGHTCYAN
	wCFC_LIGHTRED
	wCFC_LIGHTMAGENTA
	wCFC_YELLOW
	wCFC_WHITE
	wCFC_COUNT
end enum

type wConsoleBackColor as UInt32 
enum
	wCBC_BLACK
	wCBC_BLUE
	wCBC_GREEN
	wCBC_CYAN
	wCBC_RED
	wCBC_MAGENTA
	wCBC_YELLOW
	wCBC_WHITE
	wCBC_COUNT
end enum

type wBillboardAxisParam
    isEnablePitch as Boolean    '// вращение по X
    isEnableYaw as Boolean      '// вращение по Y
    isEnableRoll as Boolean     '//вращение по Z
    notUse as Boolean
end type

type wFileArchiveType as UInt32
enum
    wFAT_ZIP 		'A PKZIP archive.
    wFAT_GZIP		'A gzip archive.
    wFAT_FOLDER	'A virtual directory.
    wFAT_PAK		'An ID Software PAK archive.
    wFAT_NPK		'A Nebula Device archive.
    wFAT_TAR		'A Tape ARchive.
    wFAT_WAD		'A wad Archive, Quake2, Halflife.
    wFAT_UNKNOWN 	'The type of this archive is unknown.  
end enum

type wPhysSolverModel as UInt32
enum
    wPSM_EXACT      =0 'точный обсчет
    wPSM_ADAPTIVE   =1,'уменьшение точности обсчета в пользу производительности
    wPSM_LINEAR     =2,
    wPSM_LINEAR2    =4,
end enum 

type wPhysFrictionModel as UInt32
enum
    wPFM_ZERO       =0,
    wPFM_ONE        =1    
end enum

type wPhysVehicleType as UInt32
enum
    wPVT_RAYCAST_WORLD  =0,
    wPVT_RAYCAST_CONVEX =1
end enum

type wPhysVehicleTireType as UInt32
enum
    wPVTT_STEER         =0,'///Поворачиваемое колесо
    wPVTT_ACCEL         =1,'///Ведущее колесо
    wPVTT_ACCEL_STEER   =2,'///Поворачиваемое и ведущее
    wPVTT_ONLYWEEL      =3'///Просто колесо
end enum

type wEngineCreationParameters

	/' Type of the device.
	/** This setting decides the windowing system used by the device, most device types are native
	to a specific operating system and so may not be available.
	wDT_WIN32 is only available on Windows desktops,
	wDT_WINCE is only available on Windows mobile devices,
	wDT_COCOA is only available on Mac OSX,
	wDT_X11 is available on Linux, Solaris, BSD and other operating systems which use X11,
	wDT_SDL is available on most systems if compiled in,
	wDT_CONSOLE is usually available but can only render to text,
	wDT_BEST will select the best available device for your operating system.
	Default: wDT_BEST. '/
	DeviceType as wDeviceTypes = wDT_BEST

	/' Type of video driver used to render graphics.
	/** This can currently be wDT_NULL, wDT_SOFTWARE,
	wDT_BURNINGSVIDEO, wDT_DIRECT3D9, and wDT_OPENGL.'/
	DriverType as wDriverTypes = wDRT_BURNINGS_VIDEO

	/' Size of the window or the video mode in fullscreen mode. Default: 800x600 '/
	WindowSize as wVector2u = wDEFAULT_SCREENSIZE

	/'Position of the window on-screen. Default: (-1, -1) or centered.'/
	WindowPosition as wVector2i = (-1,-1)

	/'Minimum Bits per pixel of the color buffer in fullscreen mode. Ignored if windowed mode. Default: 32.'/
	Bits as UInt8 = 32

	/'Minimum Bits per pixel of the depth buffer. Default: 24.'/
	ZBufferBits as UInt8 = 24

	/'Should be set to true if the device should run in fullscreen.
	/** Otherwise the device runs in windowed mode. Default: false.'/
	Fullscreen as Boolean=false

	/'Specifies if the stencil buffer should be enabled.
	/** Set this to true, if you want the engine be able to draw
	stencil buffer shadows. Note that not all drivers are able to
	use the stencil buffer, hence it can be ignored during device
	creation. Without the stencil buffer no shadows will be drawn.
	Default: true.'/
	Stencilbuffer as Boolean = true

	/' Specifies vertical synchronization.
	/** If set to true, the driver will wait for the vertical
	retrace period, otherwise not. May be silently ignored.
	Default: false '/
	Vsync as Boolean = false

	/' Specifies if the device should use fullscreen anti aliasing
	/** Makes sharp/pixelated edges softer, but requires more
	performance. Also, 2D elements might look blurred with this
	switched on. The resulting rendering quality also depends on
	the hardware and driver you are using, your program might look
	different on different hardware with this. So if you are
	writing a game/application with AntiAlias switched on, it would
	be a good idea to make it possible to switch this option off
	again by the user.
	The value is the maximal antialiasing factor requested for
	the device. The creation method will automatically try smaller
	values if no window can be created with the given value.
	Value one is usually the same as 0 (disabled), but might be a
	special value on some platforms. On D3D devices it maps to
	NONMASKABLE.
	Default value: 0 - disabled '/
	 AntiAlias as wAntiAliasingMode = wAAM_OFF

	/'Flag to enable proper sRGB and linear color handling
	/** In most situations, it is desirable to have the color handling in
	non-linear sRGB color space, and only do the
	 intermediate color
	calculations in linear RGB space. If this flag is enabled, the device and
	driver try to assure that all color input and output are color corrected
	and only the internal color representation is linear. This means, that
	the color output is properly gamma-adjusted to provide the brighter
	colors for monitor display. And that blending and lighting give a more
	natural look, due to proper conversion from non-linear colors into linear
	color space for blend operations. If this flag is enabled, all texture colors
	(which are usually in sRGB space) are correctly displayed. However vertex colors
	and other explicitly set values have to be manually encoded in linear color space.
	Default value: false. '/
	HandleSRGB as Boolean = false

	/'Whether the main framebuffer uses an alpha channel.
	/** In some situations it might be desirable to get a color
	buffer with an alpha channel, e.g. when rendering into a
	transparent window or overlay. If this flag is set the device
	tries to create a framebuffer with alpha channel.
	If this flag is set, only color buffers with alpha channel
	are considered. Otherwise, it depends on the actual hardware
	if the colorbuffer has an alpha channel or not.
	Default value: false '/
	WithAlphaChannel as Boolean = false

	/'Whether the main framebuffer uses doublebuffering.
	/** This should be usually enabled, in order to avoid render
	artifacts on the visible framebuffer. However, it might be
	useful to use only one buffer on very small devices. If no
	doublebuffering is available, the drivers will fall back to
	single buffers. Default value: true'/
	Doublebuffer as Boolean = true

	/'Specifies if the device should ignore input events
	/** This is only relevant when using external I/O handlers.
	External windows need to take care of this themselves.
	Currently only supported by X11.
	Default value: false '/
	IgnoreInput as Boolean = false

	/'Specifies if the device should use stereo buffers
	/** Some high-end gfx cards support two framebuffers for direct
	support of stereoscopic output devices. If this flag is set the
	device tries to create a stereo context.
	Currently only supported by OpenGL.
	Default value: false '/
	Stereobuffer as Boolean = false

	/'Specifies if the device should use high precision FPU setting
	/** This is only relevant for DirectX Devices, which switch to
	low FPU precision by default for performance reasons. However,
	this may lead to problems with the other computations of the
	application. In this case setting this flag to true should help
	- on the expense of performance loss, though.
	Default value: false '/
	HighPrecisionFPU as Boolean = false

	/'Window Id.
	/** If this is set to a value other than 0, the WorldSim3D Engine
	will be created in an already existing window.
	For Windows, set this to the HWND of the window you want.
	For iOS, assign UIView to this variable.
	The windowSize and FullScreen options will be ignored when using
	the WindowId parameter. Default this is set to 0.
	To make WorldSim3D run inside the custom window, you still will
	have to draw WorldSim3D on your own.

	Instead of this, you can also simply use your own message loop
	using GetMessage, DispatchMessage and whatever. Calling
	wEngineRunning() will cause WorldSim3D to dispatch messages
	internally too.  You need not call wEngineRunning() if you want to
	do your own message dispatching loop, but WorldSim3D will not be
	able to fetch user input then and you have to do it on your own
	using the window messages, DirectInput, or whatever. Also,
	you'll have to increment the WorldSim3D timer.
	However, there is no need to draw the picture this often. Just
	do it how you like. '/
	WindowId as any ptr = 0

	/'Specifies the logging level used in the logging interface.
	/** The default value is wLL_INFORMATION. You can access the logger interface
	later on from the WorldSim3D and set another level.
	But if you need more or less logging information already from device creation,
	then you have to change it here.'/
	LoggingLevel as wLoggingLevel =wLL_INFORMATION

	/'Allows to select which graphic card is used for rendering when more than one card is in the system.
	/** So far only supported on D3D '/
	DisplayAdapter as UInt32 = 0

	/'Create the driver multithreaded.
	/** Default is false. Enabling this can slow down your application.
	Note that this does _not_ make WorldSim3D threadsafe, but only the underlying driver-API for the graphiccard.
	So far only supported on D3D. '/
	DriverMultithreaded as Boolean=false

	/'Enables use of high performance timers on Windows platform.
	/** When performance timers are not used, standard GetTickCount()
	is used instead which usually has worse resolution, but also less
	problems with speed stepping and other techniques.'/
	UsePerformanceTimer as Boolean = true

	/'Define some private data storage.
	/** Used when platform devices need access to OS specific data structures etc.
	This is only used for Android at th emoment in order to access the native	Java RE. '/
	PrivateData as any ptr = 0
	
	/'Set the path where default-shaders to simulate the fixed-function pipeline can be found.
	/** This is about the shaders which can be found in media/Shaders by default. It's only necessary
	to set when using OGL-ES 2.0 '/
	OGLES2ShaderPath as const zstring ptr = @"../../Assets/Shaders"
end type

type wLanguage as UInt32
enum
    wL_RU=0
    wL_EN=1
end enum

type wNodeCubeParameters
    size as Float32
    isTangent as Boolean
end type

type wNodeSphereParameters
    radius as Float32
    polyCount as Int32
    isTangent as Boolean
end type

type wNodeCylinderParameters
    radius as Float32
    length as Float32
    tesselation as UInt32
    closeTop as Boolean
    oblique as Float32
    isTangent as Boolean
end type

type wNodeConeParameters
    radius as Float32
    length as Float32
    tesselation as UInt32
    isTangent as Boolean
end type

type wNodePlaneParameters
    tileSize as wVector2f
    tileCount as wVector2u
    textureRepeatCount as wVector2f
    isTangent as Boolean
end type

'//SOUND
type wSoundEffectType as UInt32 
enum
	wSET_NULL = 0
	wSET_EAX_REVERB
	wSET_REVERB
	wSET_CHORUS
	wSET_DISTORTION
	wSET_ECHO
	wSET_FLANGER
	wSET_FREQUENCY_SHIFTER
	wSET_VOCAL_MORPHER
	wSET_PITCH_SHIFTER
	wSET_RING_MODULATOR
	wSET_AUTOWAH
	wSET_COMPRESSOR
	wSET_EQUALIZER
	wSET_COUNT
end enum

type wSoundFilterType as UInt32 
enum
	wSFT_NULL = 0
	wSFT_LOWPASS
	wSFT_HIGHPASS
	wSFT_BANDPASS
	wSFT_COUNT
end enum

type wAudioFormats as UInt32 
enum
	wAF_8BIT_MONO
	wAF_8BIT_STEREO
	wAF_16BIT_MONO
	wAF_16BIT_STEREO
end enum

type wEaxReverbParameters
	Density as Float32				=1.f
	Diffusion as Float32			=1.f
	Gain as Float32					=0.32f
	GainHF as Float32				=0.89f
	GainLF as Float32				=0.f
	DecayTime as Float32			=1.49f
	DecayHFRatio as Float32			=0.83f
	DecayLFRatio as Float32			=1.f
	ReflectionsGain as Float32		=0.05f
	ReflectionsDelay as Float32		=0.007f
	ReflectionsPanX as Float32		=0.f
	ReflectionsPanY as Float32		=0.f
	ReflectionsPanZ as Float32		=0.f
	LateReverbGain as Float32		=1.26f
	LateReverbDelay as Float32		=0.011f
	LateReverbPanX as Float32		=0.f
	LateReverbPanY as Float32		=0.f	
	LateReverbPanZ as Float32		=0.f
	EchoTime as Float32				=0.25f
	EchoDepth as Float32			=0.f
	ModulationTime as Float32		=0.25f
	ModulationDepth as Float32		=0.f
	AirAbsorptionGainHF as Float32	=0.994f
	HFReference as Float32			=5000.f
	LFReference as Float32			=250.f
	RoomRolloffFactor as Float32	=0.f
	DecayHFLimit as Boolean			=true
end type

type wReverbParameters
	Density as Float32				=1.f
	Diffusion as Float32			=1.f
	Gain as Float32					=0.32f
	GainHF as Float32				=0.89f
	DecayTime as Float32			=1.49f
	DecayHFRatio as Float32			=0.83f
	ReflectionsGain as Float32		=0.05f
	ReflectionsDelay as Float32		=0.007f
	LateReverbGain as Float32		=1.26f
	LateReverbDelay as Float32		=0.011f
	AirAbsorptionGainHF as Float32	=0.994f
	RoomRolloffFactor as Float32	=0.f
	DecayHFLimit as Boolean			=true
end type

type ChorusWaveform as UInt32 
enum
	wCWF_SINUSOID
	wCWF_TRIANGLE
	wCWF_COUNT
end enum

type wChorusParameters
	Waveform as ChorusWaveform
	Phase as Int32					=90
	Rate as Float32					=1.1f
	Depth as Float32				=0.1f
	Feedback as Float32				=0.25f
	Delay as Float32				=0.016f
end type

type wDistortionParameters
	Edge as Float32					=0.2f
	Gain as Float32					=0.05f
	LowpassCutoff as Float32		=8000.f
	EqCenter as Float32				=3600.f
	EqBandwidth as Float32			=3600.f
end type

type wEchoParameters
	Delay as Float32				=0.1f
	LRDelay as Float32				=0.1f
	Damping as Float32				=0.5f
	Feedback as Float32				=0.5f
	Spread as Float32				=-1.f
end type

Type FlangerWaveform as UInt32 
enum
	wFWF_SINUSOID
	wFWF_TRIANGLE
	wFWF_COUNT
end enum

type wFlangerParameters
	Waveform as FlangerWaveform		=wFWF_TRIANGLE
	Phase as Int32					=0
	Rate as Float32					=0.27f
	Depth as Float32				=1.f
	Feedback as Float32				=-0.5f
	Delay as Float32				=0.002f
end type

Type ShiftDirection as UInt32 
enum
	wSD_DOWN
	wSD_UP
	wSD_OFF
	wSD_COUNT
end enum

type wFrequencyShiftParameters
	Frequency as Float32			=0.f
	Left as ShiftDirection			=wSD_DOWN
	Right as ShiftDirection			=wSD_DOWN
end type

Type MorpherPhoneme as UInt32 
enum
	wMP_A
	wMP_E
	wMP_I
	wMP_O
	wMP_U
	wMP_AA
	wMP_AE
	wMP_AH
	wMP_AO
	wMP_EH
	wMP_ER
	wMP_IH
	wMP_IY
	wMP_UH
	wMP_UW
	wMP_B
	wMP_D
	wMP_F
	wMP_G
	wMP_J
	wMP_K
	wMP_L
	wMP_M
	wMP_N
	wMP_P
	wMP_R
	wMP_S
	wMP_T
	wMP_V
	wMP_Z
	wMP_COUNT
end enum

type MorpherWaveform as UInt32 
enum
	wMWF_SINUSOID
	wMWF_TRIANGLE
	wMWF_SAW
	wMWF_COUNT
end enum

type wVocalMorpherParameters
	PhonemeA as MorpherPhoneme		=wMP_A
	PhonemeB as MorpherPhoneme		=wMP_ER
	PhonemeACoarseTune as Int32		=0
	PhonemeBCoarseTune as Int32		=0
	Waveform as MorpherWaveform		=wMWF_SINUSOID
	Rate as Float32					=1.41f
end type

type wPitchShifterParameters
	CoarseTune as Int32				=12
	FineTune as Int32				=0
end type

Type ModulatorWaveform as UInt32 
enum
	wMDWF_SINUSOID
	wMDWF_SAW
	wMDWF_SQUARE
	wMDWF_COUNT
end enum

type wRingModulatorParameters
	Frequency as Float32			=440.f			
	HighPassCutoff as Float32		=800.f
	Waveform as ModulatorWaveform	=wMDWF_SINUSOID
end type

type wAutowahParameters
	AttackTime as Float32			=0.06f
	ReleaseTime as Float32			=0.06f
	Resonance as Float32			=1000.f
	PeakGain as Float32				=11.22f
end type

type wCompressorParameters
	Active as Boolean				=true
end type

type wEqualizerParameters
	LowGain as Float32				=1.f
	LowCutoff as Float32			=200.f
	Mid1Gain as Float32				=1.f
	Mid1Center as Float32			=500.f
	Mid1Width as Float32			=1.f
	Mid2Gain as Float32				=1.f
	Mid2Center as Float32			=3000.f
	Mid2Width as Float32			=1.f
	HighGain as Float32				=1.f
	HighCutoff as Float32			=6000.f
end type

type wShader
	material_type as Int32
	irrShaderCallBack as any ptr
	next_shader as wShader ptr
end type

'///wConsole///
declare sub wConsoleSetFontColor(byval c as wConsoleFontColor)

declare sub wConsoleSetBackColor(byval c as wConsoleBackColor)

declare function wConsoleSaveDefaultColors() as Int32

declare sub wConsoleResetColors(byval defValues as Int32)

'///wTexture///
declare function wTextureLoad(byval cptrFile as const zstring ptr) as wTexture

declare function wTextureCreateRenderTarget(byval size as wVector2i) as wTexture

declare function wTextureCreate(byval name as const zstring ptr,_
								byval size as wVector2i,_
								byval format as wColorFormat) as wTexture
								
declare sub wTextureDestroy(byval texture as wTexture)

declare function wTextureLock(byval texture as wTexture) as UInt32 ptr

declare sub wTextureUnlock(byval texture as wTexture)

declare sub wTextureSave(byval texture as wTexture,_
						byval file as const zstring ptr)
						
declare function wTextureConvertToImage(byval texture as wTexture) as wImage

declare sub wTextureGetInformation(byval texture as wTexture,_
									byval size as wVector2u ptr,_
									byval pitch as UInt32 ptr,_
									byval format as wColorFormat ptr)
									
declare sub wTextureMakeNormalMap(byval texture as wTexture,_
								  byval amplitude as Float32)
								  
declare function wTexturesSetBlendMode(byval texturedest as wTexture,_
										byval texturesrc as wTexture,_
										byval offset as wVector2i,_
										byval operation as wBlendOperation) as Int32
										
declare sub wTextureSetColorKey(byval texture as wTexture,_
								byval key as wColor4s)
								
declare sub wTextureSetGray(byval texture as wTexture ptr)

declare sub wTextureSetAlpha(byval texture as wTexture ptr,_
							byval value as UInt32)
							
declare sub wTextureSetInverse(byval texture as wTexture ptr)

declare sub wTextureSetBrightness(byval texture as wTexture ptr,_
								  byval value as UInt32)
								  
declare function wTextureCopy(byval texture as wTexture,_
							  byval name as zstring ptr) as wTexture
							  
declare sub wTextureSetContrast(byval texture as wTexture ptr,_
								byval value as Float32)


declare function wTextureFlip(byval texture as wTexture ptr,_
							  byval mode as Int32 = 1) as wTexture


declare sub wTextureSetBlur(byval texture as wTexture ptr,_
							byval radius as Float32)
							
declare function wTextureGetFullName(byval texture as wTexture) as const zstring ptr

declare function wTextureGetInternalName(byval texture as wTexture) as const zstring ptr

declare sub wTextureDraw(byval texture as wTexture,_
						byval pos as wVector2i,_
						byval useAlphaChannel as Boolean = true,_
						byval color as wColor4s = wCOLOR4s_WHITE)
						
declare sub wTextureDrawEx(byval texture as wTexture,_
						byval pos as wVector2i,_
						byval scale as wVector2f,_
						byval useAlphaChannel as Boolean = true)

declare sub wTextureDrawMouseCursor(byval texture as wTexture)

declare sub wTextureDrawElement(byval texture as wTexture,_
								byval pos as wVector2i,_
								byval fromPos as wVector2i,_
								byval toPos as wVector2i,_
								byval useAlphaChannel as Boolean,_
								byval color as wColor4s = wCOLOR4s_WHITE)
								
declare sub wTextureDrawElementStretch(byval texture as wTexture,_
									byval destFromPos as wVector2i,_
									byval destToPos as wVector2i,_
									byval sourceFromPos as wVector2i,_
									byval sourceToPos as wVector2i,_
									byval useAlphaChannel as Boolean = true)
									
declare sub wTextureDrawAdvanced(byval texture as wTexture,_
								byval pos as wVector2i,_
								byval rotPoint as wVector2i,_
								byval rotation as Float32,_
								byval scale as wVector2f,_
								byval useAlphaChannel as Boolean = true,_
								byval color as wColor4s = wCOLOR4s_WHITE,_
								byval aliasMode as wAntiAliasingMode=wAAM_SIMPLE,_
								byval bilinearFilter as Boolean =true,_
                                byval trilinearFilter as Boolean =true,_
								byval anisotropFilter as Boolean =true)
								
declare sub wTextureDrawElementAdvanced(byval texture as wTexture,_
									byval pos as wVector2i,_
									byval fromPos as wVector2i,_
									byval toPos as wVector2i,_
									byval rotPoint as wVector2i,_
									byval rotAngleDeg as Float32,_
									byval scale as wVector2f,_
									byval useAlphaChannel as Boolean,_
									byval color as wColor4s = wCOLOR4s_WHITE,_
									byval aliasMode as wAntiAliasingMode=wAAM_SIMPLE,_
									byval bilinearFilter as Boolean =true,_
									byval trilinearFilter as Boolean =true,_
									byval anisotropFilter as Boolean =true)

'///w2d///
declare sub w2dDrawRect(byval minPos as wVector2i,_
						byval maxPos as wVector2i,_
						byval color as wColor4s = wCOLOR4s_WHITE)

declare sub w2dDrawRectWithGradient(byval minPos as wVector2i,_
									byval maxPos as wVector2i,_
									byval colorLeftUp as wColor4s,_
									byval colorRightUp as wColor4s,_
									byval colorLeftDown as wColor4s,_
									byval colorRightDown as wColor4s)
									
declare sub w2dDrawRectOutline(byval minPos as wVector2i,_
								byval maxPos as wVector2i,_
								byval color as wColor4s)

declare sub w2dDrawLine(byval fromPos as wVector2i,_
						byval toPos as wVector2i,_
						byval color as wColor4s = wCOLOR4s_WHITE)
						
declare sub w2dDrawPixel(byval pos as wVector2i,_
						byval color as wColor4s = wCOLOR4s_WHITE)
						
declare sub w2dDrawPolygon(byval pos as wVector2i,_
							byval Radius as Float32,_
							byval color as wColor4s = wCOLOR4s_WHITE,_
							byval vertexCount as Int32 = 12)

'///w3d///							
declare sub w3dDrawLine(byval start as wVector3f,_
						byval end as wVector3f,_
						byval color as wColor4s = wCOLOR4s_WHITE)
						
declare sub w3dDrawBox(byval minPoint as wVector3f,_
						byval maxPoint as wVector3f,_
						byval color as wColor4s = wCOLOR4s_WHITE)
						
declare sub w3dDrawTriangle(byval triangle as wTriangle,_
							byval color as wColor4s = wCOLOR4s_WHITE)

'///wFont///
declare function wFontLoad(byval fontPath as const zstring ptr) as wFont

declare function wFontAddToFont(byval fontPath as const zstring ptr,_
								byval destFont as wFont) as wFont
								
declare function wFontGetDefault() as wFont

declare sub wFontDraw(byval font as wFont,_
					byval wcptrText as const wstring ptr,_
					byval fromPos as wVector2i,_
					byval toPos as wVector2i,_
					byval color as wColor4s = wCOLOR4s_WHITE)

declare sub wFontDestroy(byval font as wFont)

declare function wFontGetTextSize(byval font as wFont,_
								byval text as const wstring ptr) as wVector2u
								
declare sub wFontSetKerningSize(byval font as wFont,_
								byval kerning as wVector2u)
								
declare function wFontGetKerningSize(byval font as wFont) as wVector2u

declare function wFontGetCharacterFromPos(byval font as wFont,_
										byval text as const wstring ptr,_
										byval xPixel as Int32) as Int32
										
declare sub wFontSetInvisibleCharacters(byval font as wFont,_
										byval s as const wstring ptr)

declare function wFontLoadFromTTF(byval fontPath as const zstring ptr,_
								byval size as UInt32,_
								byval antialias as Boolean = false,_
								byval transparency as Boolean = false) as wFont
								
declare sub wFontDrawAsTTF(byval font as wFont,_
							byval wcptrText as const wstring ptr,_
							byval fromPos as wVector2i,_
							byval toPos as wVector2i,_
							byval color as wColor4s = wCOLOR4s_WHITE,_
							byval hcenter as Boolean = false,_
							byval vcenter as Boolean = false)

'///wImage///
declare function wImageLoad(byval cptrFile as const zstring ptr) as wImage

declare function wImageSave(byval img as wImage,_
							byval file as const zstring ptr) as Boolean
							
declare function wImageCreate(byval size as wVector2i,_
							  byval format as wColorFormat) as wImage
							  
declare sub wImageDestroy(byval image as wImage)

declare function wImageLock(byval image as wImage) as UInt32 ptr

declare sub wImageUnlock(byval image as wImage)

declare function wImageConvertToTexture(byval img as wImage,_
										byval name as const zstring ptr) as wTexture
										
declare function wImageGetPixelColor(byval img as wImage,_
									byval pos as wVector2u) as wColor4s

declare sub wImageSetPixelColor(byval img as wImage,_
									byval pos as wVector2u,_
									byval color as wColor4s,_
									byval blend as Boolean = false)

declare sub wImageGetInformation(byval image as wImage,_
								byval size as wVector2u ptr,_
								byval pitch as UInt32 ptr,_
								byval format as wColorFormat ptr)

'///wTimer///								
declare function wTimerGetDelta() as Float32

declare function wTimerGetTime() as UInt32

declare function wTimerGetRealTime() as UInt32

declare function wTimerGetRealTimeAndDate() as wRealTimeDate  

declare sub wTimerSetTime(byval newTime as UInt32)

declare function wTimerIsStopped() as Boolean

declare sub wTimerSetSpeed(byval speed as Float32)

declare sub wTimerStart()

declare sub wTimerStop()

declare sub wTimerTick()

'///wLog///
declare sub wLogSetLevel(byval level as wLoggingLevel = wLL_INFORMATION)

declare sub wLogSetFile(byval path as const zstring ptr)

declare sub wLogClear(byval path as const zstring ptr)

declare sub wLogWrite(byval hint as const wstring ptr,_
					byval text as const wstring ptr,_
					byval path as const zstring ptr = 0,_
					byval mode as UInt32 = 1)

'///wSystem///
declare sub wSystemSetClipboardText(byval text as const ZString ptr)

declare function wSystemGetClipboardText()as const ZString ptr

declare function wSystemGetProcessorSpeed() as UInt32

declare function wSystemGetTotalMemory() as UInt32

declare function wSystemGetAvailableMemory() as UInt32

declare function wSystemGetMaxTextureSize() as wVector2i

declare function wSystemIsTextureFormatSupported(byval format as wColorFormat) as Boolean

declare sub wSystemSetTextureCreationFlag(byval flag as wTextureCreationFlag, byval value as Boolean)

declare function wSystemIsTextureCreationFlag(byval flag as wTextureCreationFlag) as Boolean

declare function wSystemCreateScreenShot(byval minPos as wVector2u,_
										byval maxPos as wVector2u) as wTexture
										
declare function wSystemSaveScreenShot(byval file as const zstring ptr) as Boolean

declare function wSystemGetVersion() as const zstring ptr

declare function wSystemIsDriverSupported(byval testDriver as wDriverTypes) as Boolean

'///wDisplay
declare function wDisplayGetVendor()as const zstring ptr

declare function wDisplayModesGetCount() as Int32

declare function wDisplayModeGetDepth(byval modeNumber as Int32) as Int32

declare function wDisplayModeGetResolution(byval ModeNumber as Int32) as wVector2u

declare function wDisplayGetCurrentResolution() as wVector2u

declare function wDisplayGetCurrentDepth() as Int32

declare sub wDisplaySetGammaRamp(byval gamma as wColor3f,byval brightness as Float32,byval contrast as Float32)

declare sub wDisplayGetGammaRamp(byval gamma as wColor3f ptr,byval brightness as Float32 ptr,byval contrast as Float32 ptr)

declare function wDisplaySetDepth(byval depth as UInt32) as Boolean

'///wMath///
dim shared wMathPI as const Float32 = 3.14159265359f

dim shared wMathPI64 as const Float64 = 3.1415926535897932384626433832795028841971693993751

declare function wMathVector3fNormalize(byval source as wVector3f) as wVector3f

declare function wMathVector3fGetLength(byval vector as wVector3f) as Float32

declare function wMathVector3fGetHorizontalAngle(byval vector as wVector3f) as wVector3f

declare function wMathVector3fInvert(byval vector as wVector3f) as wVector3f

declare function wMathVector3fAdd(byval vector1 as wVector3f,_
								byval vector2 as wVector3f) as wVector3f
								
declare function wMathVector3fSubstract(byval vector1 as wVector3f,_
										byval vector2 as wVector3f) as wVector3f
										
declare function wMathVector3fCrossProduct(byval vector1 as wVector3f,_
											byval vector2 as wVector3f) as wVector3f
											
declare function wMathVector3fDotProduct(byval vector1 as wVector3f,_
										byval vector2 as wVector3f) as Float32
										
declare function wMathVector3fGetDistanceFrom(byval vector1 as wVector3f,_
											byval vector2 as wVector3f) as Float32
											
declare function wMathVector3fInterpolate(byval vector1 as wVector3f,_
										byval vector2 as wVector3f,_
										byval d as Float64) as wVector3f
										
declare function wMathRandomRange(byval first as Float64,_
								  byval last as Float64) as Float64
								  
declare function wMathDegToRad(byval degrees as Float32) as Float32

declare function wMathRadToDeg(byval radians as Float32) as Float32

declare function wMathRound(byval value as Float32) as Float32

declare function wMathCeil(byval value as Float32) as Int32

declare function wMathFloor(byval value as Float32) as Int32

declare function wMathFloatEquals(byval value1 as Float32,_
									byval value2 as Float32,_
									byval tolerance as Float32 = 0.000001f) as Boolean
									
declare function wMathIntEquals(byval value1 as Int32,_
								byval value2 as Int32,_
								byval tolerance as Int32 = 0) as Boolean
								
declare function wMathUIntEquals(byval value1 as UInt32,_
								byval value2 as UInt32,_
								byval tolerance as UInt32 = 0) as Boolean
								
declare function wMathFloatIsZero(byval value as Float32,_
								  byval tolerance as Float32 = 0.000001f) as Boolean
								  
declare function wMathIntIsZero(byval value as Int32,_
								byval tolerance as Int32 = 0) as Boolean
								
declare function wMathUIntIsZero(byval value as UInt32,_
								byval tolerance as UInt32 = 0) as Boolean
								
declare function wMathFloatMax2(byval value1 as Float32,_
								byval value2 as Float32) as Float32
								
declare function wMathFloatMax3(byval value1 as Float32,_
								byval value2 as Float32,_
								byval value3 as Float32) as Float32
								
declare function wMathIntMax2(byval value1 as Int32,_
							  byval value2 as Int32) as Float32
							  
declare function wMathIntMax3(byval value1 as Int32,_
							  byval value2 as Int32,_
							  byval value3 as Int32) as Float32
							  
declare function wMathFloatMin2(byval value1 as Float32,_
								byval value2 as Float32) as Float32
								
declare function wMathMinMax3(byval value1 as Float32,_
							  byval value2 as Float32,_
							  byval value3 as Float32) as Float32
							  
declare function wMathIntMin2(byval value1 as Int32,_
							  byval value2 as Int32) as Float32
							  
declare function wMathIntMin3(byval value1 as Int32,_
							  byval value2 as Int32,_
							  byval value3 as Int32) as Float32

'///wUtil///
declare function wUtilVector3fToStr(byval vector as wVector3f,_
									byval s as const zstring ptr =@";",_
									byval addNullChar as Boolean = false) as const zstring ptr
							
declare function wUtilVector2fToStr(byval vector as wVector2f,_
									byval s as const zstring ptr =@";",_
									byval addNullChar as Boolean = false) as const zstring ptr
									
declare function wUtilColor4sToStr(byval color as wColor4s,_
									byval s as const zstring ptr =@";",_
									byval addNullChar as Boolean = false) as const zstring ptr
									
declare function wUtilColor4fToStr(byval color as wColor4f,_
									byval s as const zstring ptr =@";",_
									byval addNullChar as Boolean = false) as const zstring ptr

declare function wUtilColor4sToUInt(byval color as wColor4s) as UInt32

declare function wUtilColor4fToUInt(byval color as wColor4f) as UInt32

declare function wUtilUIntToColor4s(byval color as UInt32) as wColor4s

declare function wUtilUIntToColor4f(byval color as UInt32) as wColor4f

declare function wUtilStrToInt(byval str as const zstring ptr) as Int32


declare function wUtilIntToStr(byval value as Int32,_
								byval addNullChar as Boolean = false) as const zstring ptr

declare function wUtilStrToFloat(byval str as const zstring ptr) as Float32

declare function wUtilFloatToStr(byval value as Float32,_
								byval addNullChar as Boolean = false) as const zstring ptr

declare function wUtilStrToUInt(byval str as const zstring ptr) as UInt32

declare function wUtilUIntToStr(byval value as UInt32,_
								byval addNullChar as Boolean = false) as const zstring ptr

declare sub wUtilSwapInt(byval value1 as Int32 ptr,_
						byval value2 as Int32 ptr)
						
declare sub wUtilSwapUInt(byval value1 as UInt32 ptr,_
						byval value2 as UInt32 ptr)
						
declare sub wUtilSwapFloat(byval value1 as Float32 ptr,_
							byval value2 as Float32 ptr)
							
declare function wUtilWideStrToStr(byval str as const wstring ptr) as const zstring ptr

declare function wUtilStrToWideStr(byval str as const zstring ptr) as const wstring ptr

declare sub wUtilStrAddNullChar(byval str as const zstring ptr ptr)

declare sub wUtilWideStrAddNullChar(byval str as const wstring ptr ptr)

'///wEngine///
declare function wEngineSetClipPlaneByPoints(byval indexPlane as UInt32,_
											byval point1 as wVector3f,_
											byval point2 as wVector3f,_
											byval point3 as wVector3f,_
											byval enable as Boolean)as Boolean

declare function wEngineSetClipPlaneByPointAndNormal(byval indexPlane as UInt32,_
													byval _point as wVector3f,_
													byval normal as wVector3f,_
													byval enable as Boolean)as Boolean

declare sub wEngineEnableClipPlane(byval indexPlane as UInt32,_
									byval value as Boolean)

declare sub wEngineSetClipboardText(byval text as const wstring ptr)

declare function wEngineGetClipboardText() as const wstring ptr

declare function wEngineStart(byval iDevice as wDriverTypes = wDRT_OPENGL,_
								byval size as wVector2u = (800, 600),_
								byval iBPP as UInt32 = 32,_
								byval boFullscreen as Boolean = false,_
								byval boShadows as Boolean = true,_
								byval boCaptureEvents as Boolean = true,_
								byval vsync as Boolean = true) as Boolean

declare sub wEngineCloseByEsc()

declare function wEngineStartAdvanced(byval params as wEngineCreationParameters) as Boolean

declare function wEngineLoadCreationParameters(byval outParameters as wEngineCreationParameters ptr,_
											   byval xmlFilePath as const zstring ptr) as Boolean

declare function wEngineSaveCreationParameters(byval inParameters as wEngineCreationParameters ptr,_
											   byval xmlFilePath as const zstring ptr) as Boolean

declare function wEngineStartWithGui(byval captionText as const wstring ptr,_
									byval fontPath as const zstring ptr=0,_
									byval logo as const zstring ptr=0,_
									byval language as wLanguage=wL_EN,_
									byval outParams as wEngineCreationParameters ptr=0,_
									byval inXmlConfig as const zstring ptr=0) as Boolean

declare sub wEngineSetTransparentZWrite(byval value as Boolean)

declare function wEngineRunning() as Boolean

declare sub wEngineSleep(byval ms as UInt32,_
                         byval pauseTimer as Boolean=false)
                         
declare sub wEngineYield()

declare sub wEngineSetViewPort(byval fromPos as wVector2i,_
								byval toPos as wVector2i)
								
declare function wEngineIsQueryFeature(byval feature as wVideoFeatureQuery) as Boolean

declare sub wEngineDisableFeature(byval feature as wVideoFeatureQuery,_
								byval flag as Boolean)
								
declare function wEngineStop(byval closeDevice as Boolean=true) as Boolean

declare sub wEngineSetFPS(byval limit as UInt32)

declare function wEngineGetFPS() as Int32

declare function wEngineGetGlobalMaterial() as wMaterial

/'
Get the 2d override material for altering its values.
The 2d override materual allows to alter certain render states of the 2d methods.
Not all members of SMaterial are honored, especially not MaterialType and Textures.
Moreover, the zbuffer is always ignored, and lighting is always off.
All other flags can be changed, though some might have to effect in most cases.
Please note that you have to enable/disable this effect with enableInitMaterial2D().
This effect is costly, as it increases the number of state changes considerably.
Always reset the values when done.
'/
declare function wEngineGet2dMaterial()as wMaterial

declare sub wEngineSet2dMaterial(byval value as Boolean)

declare sub wEngineShowLogo(byval value as Boolean)

'///wCustomRenderer (only  OpenGL!   Experimental!!!)
declare function wCustomRendererCreate(byval shaderDirPath as const zstring ptr,_
										byval cFormat as wColorFormat = wCF_D16) as Boolean

declare function wCustomRendererDestroy() as Boolean

declare sub wCustomRendererSwapMaterials(byval node as wNode)

declare sub wCustomRendererUpdateMaterialEntry(byval swapFromw as wMaterialTypes,_
												byval swapTo as wMaterialTypes)

declare sub wCustomRendererRemoveMaterialEntry(byval swapFrom as wMaterialTypes)

declare sub wCustomRendererGetMaterialTypes(byval customMaterials as wCustomMaterialTypes ptr)

declare function wCustomRendererGetDepthBuffer() as wTexture

declare function wCustomRendererGetFinalRenderTexture() as wTexture

declare function wCustomRendererGetMRTCount() as UInt32

declare function wCustomRendererGetMRT(byval index as UInt32) as wTexture

'///wScene///
declare function wSceneBegin(byval color as wColor4s = wCOLOR4s_BLACK) as Boolean

declare function wSceneBeginAdvanced(byval backColor as wColor4s = wCOLOR4s_BLACK,_
									byval clearBackBuffer as Boolean = true,_
									byval clearZBuffer as Boolean = true) as Boolean

declare function wSceneLoad(byval filename as const zstring ptr,_
							byval parentNode as wNode=0) as Boolean

declare function wSceneLoadFromFile(byval file as wFile,_
									byval parentNode as wNode=0) as Boolean

declare function wSceneSave(byval filename as const zstring ptr,_
						   byval parentNode as wNode=0) as Boolean

declare function wSceneSaveToFile(byval file as wFile,_
                                 byval parentNode as wNode=0)as Boolean

declare function wSceneSaveToXml(byval writer as wXmlWriter,_
                                byval relativePath as Const ZString ptr,_
                                byval parentNode as wNode=0) as Boolean

declare sub wSceneDrawAll()

declare function wSceneEnd() as Boolean

declare sub wSceneDrawToTexture(byval renderTarget as wTexture)

declare sub wSceneSetRenderTarget(byval renderTarget as wTexture,_
								byval backColor as wColor4s = wCOLOR4s_BLACK,_
								byval clearBackBuffer as Boolean = true,_
								byval clearZBuffer as Boolean = true)

declare sub wSceneSetAmbientLight(byval color as wColor4f)

declare function wSceneGetAmbientLight() as wColor4f

declare sub wSceneSetShadowColor(byval color as wColor4s)

declare function wSceneGetShadowColor() as wColor4s

declare sub wSceneSetFog(byval color as wColor4s,_
						byval fogtype as wFogType,_
						byval start as Float32,_
						byval end as Float32,_
						byval density as Float32,_
						byval pixelFog as Boolean = false,_
						byval rangeFog as Boolean = false)

declare sub wSceneGetFog(byval color as wColor4s ptr,_
						byval fogtype as wFogType ptr,_
						byval start as Float32 ptr,_
						byval end as Float32 ptr,_
						byval density as Float32 ptr,_
						byval pixelFog as Boolean ptr,_
						byval rangeFog as Boolean ptr)

declare function wSceneGetActiveCamera() as wNode

declare function wSceneGetTextureByName(byval File as const zstring ptr) as wTexture
						
declare sub wSceneDestroyAllTextures()

declare sub wSceneDestroyAllNodes()

declare function wSceneGetMeshByName(byval name as const zstring ptr)as wMesh

declare function wSceneGetMeshByIndex(byval index as UInt32) as wMesh

declare function wSceneGetMeshesCount() as UInt32

declare sub wSceneDestroyAllMeshes()

declare function wSceneIsMeshLoaded(byval filePath as const zstring ptr) as Boolean

declare sub wSceneDestroyAllUnusedMeshes()

declare function wSceneGetPrimitivesDrawn() as UInt32

declare function wSceneGetNodesCount() as UInt32

declare function wSceneGetNodeById(byval id as Int32) as wNode

declare function wSceneGetNodeByName(byval name as const zstring ptr) as wNode

declare function wSceneGetRootNode() as wNode

'///wWindow///
declare sub wWindowSetCaption(byval wcptrText as const wstring ptr)

declare sub wWindowGetSize(byval size as wVector2u ptr)

declare function wWindowIsFullscreen() as Boolean

declare function wWindowIsResizable() as Boolean

declare function wWindowIsActive() as Boolean

declare function wWindowIsFocused() as Boolean

declare function wWindowIsMinimized() as Boolean

declare sub wWindowMaximize()

declare sub wWindowMinimize()

declare sub wWindowRestore()

declare sub wWindowSetResizable(byval resizable as Boolean)

declare sub wWindowMove(byval pos as wVector2u)

declare sub wWindowPlaceToCenter()

declare sub wWindowResize(byval newSize as wVector2u)

declare sub wWindowSetFullscreen(byval value as Boolean)

'Only for windowed screen mode
Declare function wWindowSetDepth(byval depth as UInt32)as Boolean

'///wPostEffect///
declare function wPostEffectCreate(byval effectnum as wPostEffectId,_
									byval quality as wPostEffectQuality,_
									byval value1 as Float32 = FLOAT_DEFAULTVALUE,_
									byval value2 as Float32 = FLOAT_DEFAULTVALUE,_
									byval value3 as Float32 = FLOAT_DEFAULTVALUE,_
									byval value4 as Float32 = FLOAT_DEFAULTVALUE,_
									byval value5 as Float32 = FLOAT_DEFAULTVALUE,_
									byval value6 as Float32 = FLOAT_DEFAULTVALUE,_
									byval value7 as Float32 = FLOAT_DEFAULTVALUE,_
									byval value8 as Float32 = FLOAT_DEFAULTVALUE) as wPostEffect ptr

declare sub wPostEffectDestroy(byval ppEffect as wPostEffect ptr)

declare sub wPostEffectSetParameters(byval ppEffect as wPostEffect ptr,_
									byval para1 as Float32,_
									byval para2 as Float32 = FLOAT_DEFAULTVALUE,_
									byval para3 as Float32 = FLOAT_DEFAULTVALUE,_
									byval para4 as Float32 = FLOAT_DEFAULTVALUE,_
									byval para5 as Float32 = FLOAT_DEFAULTVALUE,_
									byval para6 as Float32 = FLOAT_DEFAULTVALUE,_
									byval para7 as Float32 = FLOAT_DEFAULTVALUE,_
									byval para8 as Float32 = FLOAT_DEFAULTVALUE)

declare sub wPostEffectsDestroyAll()

'///wXEffects///
declare sub wXEffectsStart(byval vsm as Boolean,_
							byval softShadows as Boolean,_
							byval bitDepth32 as Boolean,_
							byval color as wColor4s = wCOLOR4s_WHITE)

declare sub wXEffectsEnableDepthPass(byval enable as Boolean)

declare sub wXEffectsAddPostProcessingFromFile(byval name as const zstring ptr,_
												byval effectType as Int32 = 1)

declare sub wXEffectsSetPostProcessingUserTexture(byval texture as wTexture)

declare sub wXEffectsAddShadowToNode(byval node as wNode,_
									byval filterType as wFilterType,_
									byval shadowType as wShadowMode)
									
declare sub wXEffectsRemoveShadowFromNode(byval node as wNode)

declare sub wXEffectsExcludeNodeFromLightingCalculations(byval node as wNode)

declare sub wXEffectsAddNodeToDepthPass(byval node as wNode)

declare sub wXEffectsSetAmbientColor(byval color as wColor4s)

declare sub wXEffectsSetClearColor(byval color as wColor4s)

declare sub wXEffectsAddShadowLight(byval shadowDimen as UInt32,_
									byval position as wVector3f,_
									byval target as wVector3f,_
									byval color as wColor4f,_
									byval lightNearDist as Float32,_
									byval lightFarDist as Float32,_
									byval angleDeg as Float32)
									
declare function wXEffectsGetShadowLightsCount() as UInt32

declare function wXEffectsGetShadowMapTexture(byval resolution as UInt32,_
												byval secondary as Boolean = false) as wTexture

declare function wXEffectsGetDepthMapTexture() as wTexture

declare sub wXEffectsSetScreenRenderTargetResolution(byval size as wVector2u)

declare sub wXEffectsSetShadowLightPosition(byval index as UInt32,_
											byval position as wVector3f)
											
declare function wXEffectsGetShadowLightPosition(byval index as UInt32) as wVector3f

declare sub wXEffectsSetShadowLightTarget(byval index as UInt32,_
											byval target as wVector3f)
											
declare function wXEffectsGetShadowLightTarget(byval index as UInt32) as wVector3f

declare sub wXEffectsSetShadowLightColor(byval index as UInt32,_
										byval color as wColor4f)
										
declare function wXEffectsGetShadowLightColor(byval index as UInt32) as wColor4f

declare sub wXEffectsSetShadowLightMapResolution(byval index as UInt32,_
												byval resolution as UInt32)
												
declare function wXEffectsGetShadowLightMapResolution(byval index as UInt32) as UInt32

declare function wXEffectsGetShadowLightFarValue(byval index as UInt32) as Float32

'///wAnimator///
declare function wAnimatorFollowCameraCreate(byval node as wNode,_
											 byval position as wVector3f)as wAnimator
											 
declare function wAnimatorCollisionResponseCreate(byval selector as wSelector,_
												byval node as wNode,_
												byval slidingValue as Float32 = 0.0005f) as wAnimator

declare sub wAnimatorCollisionResponseSetParameters(byval anim as wAnimator,_
													byval params as wAnimatorCollisionResponse)

declare sub wAnimatorCollisionResponseGetParameters(byval anim as wAnimator,_
													byval params as wAnimatorCollisionResponse ptr)
													
declare function wAnimatorDeletingCreate(byval node as wNode,_
										byval delete_after as Int32) as wAnimator
										
declare function wAnimatorFlyingCircleCreate(byval node as wNode,_
											byval pos as wVector3f,_
											byval radius as Float32=100.0f,_
											byval speed as Float32=0.001f,_
											byval direction as wVector3f=(0,1.0f,0),_
											byval startPos as Float32=0.0f,_
											byval radiusEllipsoid as Float32=0.0f) as wAnimator

declare sub wAnimatorFlyingCircleSetParameters(byval anim as wAnimator,_
											byval params as wAnimatorFlyingCircle)

declare sub wAnimatorFlyingCircleGetParameters(byval anim as wAnimator,_
											byval params as wAnimatorFlyingCircle ptr)

	
declare function wAnimatorFlyingStraightCreate(byval node as wNode,_
												byval startPoint as wVector3f,_
												byval endPoint as wVector3f,_
												byval time as UInt32,_
												byval loop as Boolean) as wAnimator

declare sub wAnimatorFlyingStraightSetParameters(byval anim as wAnimator,_
												byval param as wAnimatorFlyingStraight)

declare sub wAnimatorFlyingStraightGetParameters(byval anim as wAnimator,_
												byval params as wAnimatorFlyingStraight ptr)
	
												
declare function wAnimatorRotationCreate(byval node as wNode,_
										byval pos as wVector3f) as wAnimator
				
declare sub wAnimatorRotationSetParameters(byval anim as wAnimator,_
										byval params as wAnimatorRotation)


declare sub wAnimatorRotationGetParameters(byval anim as wAnimator,_
										byval params as wAnimatorRotation ptr)
										
declare function wAnimatorSplineCreate(byval node as wNode,_
										byval iPoints as Int32,_
										byval points as wVector3f ptr,_
										byval time as Int32,_
										byval speed as Float32,_
										byval tightness as Float32) as wAnimator
				
declare sub wAnimatorSplineSetParameters(byval anim as wAnimator,_
										byval params as wAnimatorSpline)

declare sub wAnimatorSplineGetParameters(byval anim as wAnimator,_
										byval params as wAnimatorSpline ptr)
				
										
declare function wAnimatorFadingCreate(byval node as wNode,_
										byval delete_after as Int32,_
										byval scale as Float32) as wAnimator
	
'For all animators
declare sub wAnimatorSetEnable(byval anim as wAnimator,_
								byval enable as Boolean,_
								byval timeNow as UInt32)
	
declare function wAnimatorIsEnable(byval anim as wAnimator) as Boolean

declare function wAnimatorIsFinished(byval anim as wAnimator) as Boolean

declare sub wAnimatorSetStartTime(byval anim as wAnimator,_
								byval time as UInt32,_
								byval resetPauseTime as Boolean=true)

declare function wAnimatorGetStartTime(byval anim as wAnimator) as UInt32

declare function wAnimatorGetType(byval anim as wAnimator) as wSceneNodeAnimatorType
										
'///wTpsCamera///						
declare function wTpsCameraCreate(byval name as const zstring ptr) as wNode

declare sub wTpsCameraDestroy(byval ctrl as wNode)

declare sub wTpsCameraUpdate(byval ctrl as wNode)

declare sub wTpsCameraSetTarget(byval ctrl as wNode,_
								byval node as wNode)
								
declare sub wTpsCameraRotateHorizontal(byval ctrl as wNode,_
										byval rotVal as Float32)
										
declare sub wTpsCameraRotateVertical(byval ctrl as wNode,_
									byval rotVal as Float32)
									
declare sub wTpsCameraSetHorizontalRotation(byval ctrl as wNode,_
											byval rotVal as Float32)
											
declare sub wTpsCameraSetVerticalRotation(byval ctrl as wNode,_
										byval rotVal as Float32)
										
declare sub wTpsCameraZoomIn(byval ctrl as wNode)

declare sub wTpsCameraZoomOut(byval ctrl as wNode)

declare function wTpsCameraGetCamera(byval ctrl as wNode) as wNode

declare sub wTpsCameraSetCurrentDistance(byval ctrl as wNode,_
										byval dist as Float32)
										
declare sub wTpsCameraSetRelativeTarget(byval ctrl as wNode,_
										byval target as wVector3f)
										
declare sub wTpsCameraSetDefaultDistanceDirection(byval ctrl as wNode,_
												  byval dir as wVector3f)
												  
declare sub wTpsCameraSetMaximalDistance(byval ctrl as wNode,_
										byval value as Float32)
										
declare sub wTpsCameraSetMinimalDistance(byval ctrl as wNode,_
										byval value as Float32)
										
declare sub wTpsCameraSetZoomStepSize(byval ctrl as wNode,_
									 byval value as Float32)
									 
declare sub wTpsCameraSetHorizontalSpeed(byval ctrl as wNode,_
										byval value as Float32)
										
declare sub wTpsCameraSetVerticalSpeed(byval ctrl as wNode,_
										byval value as Float32)

'///wFpsCamera///										
declare function wFpsCameraCreate(byval rotateSpeed as Float32=100,_
								byval moveSpeed as Float32=0.1,_
								byval keyMapArray as wKeyMap ptr=0,_
								byval keyMapSize as Int32=0,_
								byval noVerticalMovement as Boolean=false,_
								byval jumpSpeed as Float32=0) as wNode
								
declare function wFpsCameraGetSpeed(byval camera as wNode) as Float32

declare sub wFpsCameraSetSpeed(byval camera as wNode,_
								byval newSpeed as Float32)
								
declare function wFpsCameraGetRotationSpeed(byval camera as wNode) as Float32

declare sub wFpsCameraSetRotationSpeed(byval camera as wNode,_
										byval rotSpeed as Float32)
										
declare sub wFpsCameraSetKeyMap(byval camera as wNode,_
								byval map as wKeyMap ptr,_
								byval count as UInt32)
								
declare sub wFpsCameraSetVerticalMovement(byval camera as wNode,_
										byval value as Boolean)
										
declare sub wFpsCameraSetInvertMouse(byval camera as wNode,_
									byval value as Boolean)

'///wMayaCamera///							
declare function wMayaCameraCreate(byval rotateSpeed as Float32,_
									byval zoomSpeed as Float32,_
									byval moveSpeed as Float32) as wNode

'///wCamera///									
declare function wCameraCreate(byval pos as wVector3f,_
								byval taget as wVector3f) as wNode

								
declare sub wCameraSetTarget(byval camera as wNode,_
							byval target as wVector3f)
							
declare function wCameraGetTarget(byval camera as wNode) as wVector3f

declare function wCameraGetUpDirection(byval camera as wNode) as wVector3f

declare sub wCameraSetUpDirection(byval camera as wNode,_
								  byval upDir as wVector3f)
declare sub wCameraGetOrientation(byval camera as wNode,_
								byval upDir as wVector3f ptr,_
								byval forwardDir as wVector3f ptr,_
								byval rightDir as wVector3f ptr)
								
declare sub wCameraSetClipDistance(byval camera as wNode,_
									byval farDistance as Float32,_
									byval nearDistance as Float32)
									
declare sub wCameraSetActive(byval camera as wNode)

declare sub wCameraSetFov(byval camera as wNode,_
						  byval fov as Float32)
						  
declare function wCameraGetFov(byval camera as wNode)as Float32
						  
declare sub wCameraSetOrthogonal(byval camera as wNode,_
								byval vec as wVector3f)
								
declare sub wCameraRevolve(byval camera as wNode,_
						   byval angleDeg as wVector3f,_
						   byval offset as wVector3f)
						   
declare sub wCameraSetUpAtRightAngle(byval camera as wNode)

declare sub wCameraSetAspectRatio(byval camera as wNode,_
									byval aspectRatio as Float32)

Declare sub wCameraSetInputEnabled(byval camera As wNode,_
                                   ByVal value As Boolean)
                                   
Declare function wCameraIsInputEnabled(byval camera As wNode)As Boolean  

declare sub wCameraSetCollisionWithScene(byval camera as wNode,_
										byval radius as wVector3f,_
										byval gravity as wVector3f = (0, -10, 0),_
										byval offset as wVector3f = (0, 0, 0),_
										byval slidingValue as Float32 = 0.0005f)                           
'///wRtsCamera///									
declare function wRtsCameraCreate(byval pos as wVector3f,_
								byval offsetX as wVector2f,_
								byval offsetZ as wVector2f,_
								byval offsetDistance as wVector2f=(20.f,40.f),_
								byval offsetAngle as wVector2f=(60.f,88.f),_
								byval driftSpeed as Float32=100.f,_
								byval scrollSpeed as Float32=5.f,_
								byval mouseSpeedRelative as Float32=5.f,_
								byval orbit as Float32=0.f,_
								byval mouseButtonActive as wMouseButtons=wMB_RIGHT) as wNode

'///wCollision///								
declare function wCollisionGroupCreate() as wSelector

declare sub wCollisionGroupAddCollision(byval ms as wSelector,_
										byval ts as wSelector)
										
declare sub wCollisionGroupRemoveAll(byval ms as wSelector)

declare sub wCollisionGroupRemoveCollision(byval ms as wSelector,_
											byval ts as wSelector)
											
declare function wCollisionCreateFromMesh(byval mesh as wMesh,_
										byval node as wNode,_
										byval iframe as Int32=0) as wSelector

declare function wCollisionCreateFromStaticMesh(byval staticMesh as wMesh,_
										byval node as wNode) as wSelector

declare function wCollisionCreateFromBatchingMesh(byval mesh as wMesh,_
                                                  byval node as wNode)as wSelector
										
declare function wCollisionCreateFromMeshBuffer(byval meshbuffer as wMeshBuffer,_
												byval node as wNode) as wSelector
										
declare function wCollisionCreateFromOctreeMesh(byval mesh as wMesh,_
												byval node as wNode,_
												byval iframe as Int32=0) as wSelector
												
declare function wCollisionCreateFromBox(byval node as wNode) as wSelector

declare function wCollisionCreateFromTerrain(byval node as wNode,_
											byval level_of_detail as Int32) as wSelector
				
declare function wCollisionGetNodeFromCamera(byval camera as wNode) as wNode

declare function wCollisionGetNodeFromRay(byval vectorStart as wVector3f ptr,_
										byval vectorEnd as wVector3f ptr) as wNode

declare function wCollisionGetNodeChildFromRay(byval node as wNode,_
												byval id as Int32,_
												byval recurse as Boolean,_
												byval vectorStart as wVector3f ptr,_
												byval vectorEnd as wVector3f ptr) as wNode

declare function wCollisionGetNodeChildFromPoint(byval node as wNode,_
											byval id as Int32,_
											byval recurse as Boolean,_
											byval vectorPoint as wVector3f ptr) as wNode

declare function wCollisionGetNodeAndPointFromRay(byval vectorStart as wVector3f ptr,_
												 byval vectorEnd as wVector3f ptr,_
												 byval colPoint as wVector3f ptr,_
												 byval normal as wVector3f ptr,_
												 byval id as Int32,_
												 byval rootNode as wNode) as wNode

declare function wCollisionGetNodeFromScreen(byval screenPos as wVector2i,_
											byval idBitMask as Int32 = 0,_
											byval bNoDebugObjects as Boolean = false,_
											byval root as wNode = 0) as wNode

declare function wCollisionGetScreenCoordFrom3dPosition(byval pos as wVector3f) as wVector2i

declare sub wCollisionGetRayFromScreenCoord(byval camera as wNode,_
											byval screenCoord as wVector2i,_
											byval vectorStart as wVector3f ptr,_
											byval vectorEnd as wVector3f ptr)

declare function wCollisionGet3dPositionFromScreen(byval camera as wNode,_
												byval screenPos as wVector2i,_
												byval normal as wVector3f,_
												byval distanceFromOrigin as Float32) as wVector3f

declare function wCollisionGet2dPositionFromScreen(byval camera as wNode,_
													byval screenPos as wVector2i) as wVector2f

declare function wCollisionGetPointFromRay(byval ts as wSelector,_
											byval vectorStart as wVector3f ptr,_
											byval vectorEnd as wVector3f ptr,_
											byval collisionPoint as wVector3f ptr,_
											byval vectorNormal as wVector3f ptr,_
											byval collisionTriangle as wTriangle ptr,_
											byval collisionNode as wNode ptr) as Boolean

declare sub wCollisionGetResultPosition(byval selector as wSelector,_
										byval ellipsoidPosition as wVector3f ptr,_
										byval ellipsoidRadius as wVector3f ptr,_
										byval velocity as wVector3f ptr,_
										byval gravity as wVector3f ptr,_
										byval slidingSpeed as Float32,_
										byval outPosition as wVector3f ptr,_
										byval outHitPosition as wVector3f ptr,_
										byval outFalling as Int32 ptr)

'///wFile///
declare function wFileAddZipArchive( byval cptrFile as const zstring ptr,_
								byval boIgnoreCase as Boolean,_
								byval boIgnorePaths as Boolean)as Boolean
								
declare function wFileAddArchive(byval cptrFile as const zstring ptr,_
							byval boIgnoreCase as Boolean,_
							byval boIgnorePaths as Boolean,_
							byval aType as wFileArchiveType = wFAT_UNKNOWN,_
							byval password as const ZString ptr =@"")as Boolean

declare function wFileAddPakArchive(byval cptrFile as const zstring ptr,_
							byval boIgnoreCase as Boolean,_
							byval boIgnorePaths as Boolean)as Boolean

declare function wFileAddDirectory(byval cptrFile as const zstring ptr,_
									byval boIgnoreCase as Boolean,_
									byval boIgnorePaths as Boolean)as Boolean

'///Get the archive at a given index
declare function wFileGetArchiveByIndex(byval index as UInt32 ) as wFileArchive

declare function wFileGetArchiveFileList(byval fArchive as wFileArchive) as wFileList

declare function wFileGetArchiveType(byval fArchive as wFileArchive) as wFileArchiveType

'///Get the number of archives currently attached to the file system
declare function wFileGetArchivesCount() as UInt32

'///Changes the search order of attached archives
declare sub wFileMoveArchive(byval sourceIndex as UInt32, byval relative as Int32)

'///Removes an archive from the file system
declare sub wFileRemoveArchiveByName(byval fileName as const zstring ptr)

declare sub wFileRemoveArchiveByIndex(byval index as UInt32)

declare sub wFileRemoveArchive(byval fArchive as wFileArchive)

'///Opens a file based on its name   (from archive).
declare function wFileOpenForReadFromArchive(byval fArchive as wFileArchive,_
									byval cptrFile as const zstring ptr) as wFile

'///Opens a file based on its position in the file list.
declare function wFileOpenForReadByIndexFromArchive(byval fArchive as wFileArchive,_
												byval fileIdx as UInt32) as wFile
'///
declare sub wFileSetWorkingDirectory(byval cptrPath as Const zstring ptr)

declare function wFileGetWorkingDirectory() as const zstring ptr

declare function wFileIsExist(byval cptrFile as const zstring ptr) as Boolean

declare function wFileGetAbsolutePath(byval cptrPath as const zstring ptr) as const zstring ptr

'flatten a path and file name for example: "/you/me/../." becomes "/you"
declare function wFileGetFlattenPath(byval directory as const zstring ptr,_
									byval rootPath as const zstring ptr=0)as const zstring ptr

declare function wFileGetRelativePath(byval cptrPath as const zstring ptr,_
									  byval directory as const zstring ptr) as const zstring ptr

declare function wFileGetBaseName(byval cptrPath as const zstring ptr, byval keepExtension as Boolean) as const zstring ptr

declare function wFileGetDirectory(byval cptrPath as const zstring ptr) as const zstring ptr

declare function wFileOpenForRead(byval cptrFile as const zstring ptr) as wFile

declare function wFileRead(byval file as wFile, byval buffer as any ptr, byval sizeToRead as UInt32) as Int32

declare function wFileGetSize(byval file as wFile) as Int64

declare function wFileCreateForWrite(byval cptrFile as const zstring ptr, byval append as Boolean) as wFile

declare function wFileWrite(byval file as wFile, byval buffer as const any ptr, byval sizeToWrite as UInt32) as Int32

declare function wFileGetName(byval file as wFile) as const zstring ptr

declare function wFileGetPos(byval file as wFile) as Int64

declare function wFileSeek(byval file as wFile, byval finalPos as Int64, byval relativeMovement as Boolean) as Boolean

declare sub wFileClose(byval file as wFile)

'///wFileList///
declare function wFileListCreateEmpty(byval fPath as const zstring ptr,_
									byval ignoreCase as Boolean,_
									byval ignorePaths as Boolean) as wFileList

'///Creates a list of files and directories in the current working directory and returns it
declare function wFileListCreate() as wFileList

declare sub wFileListRemove(byval flist as wFileList)

'///Returns the base path of the file list.
declare function wFileListGetPath(byval flist as wFileList) as const zstring ptr

'///Sorts the file list. You should call this after adding any items to the file list.
declare sub wFileListSort(byval flist as wFileList)

'///Add as a file or folder to the list.
declare function wFileListAddItem(byval flist as wFileList,_
								byval  fullPath as const zstring ptr,_
								byval offset as UInt32,_
								byval size as UInt32,_
								byval isDirectory as Boolean,_
								byval id as UInt32=0) as Int32

'///Searches for a file or folder in the list.
declare function wFileListFindFile(byval flist as wFileList,_
								byval fileName as const zstring ptr,_
								byval isFolder as Boolean=false) as Int32

'///Get the number of files in the filelist.
declare function wFileListGetFilesCount(byval flist as wFileList) as UInt32

'///Gets the name of a file in the list, based on an index.
declare function wFileListGetFileBaseName(byval flist as wFileList,_
										byval idx as UInt32) as const zstring ptr

'///Gets the full name of a file in the list including the path, based on an index.
declare function wFileListGetFileName(byval flist as wFileList,_
									byval idx as UInt32) as const zstring ptr

'///Returns the file offset of a file in the file list, based on an index
declare function wFileListGetFileOffset(byval flist as wFileList,_
									byval idx as UInt32) as UInt32

'///Returns the size of a file in the file list, based on an index.
declare function wFileListGetFileSize(byval flist as wFileList,_
									byval idx as UInt32) as UInt32

'///Returns the ID of a file in the file list, based on an index.
declare function wFileListGetFileId(byval flist as wFileList,_
									byval idx as UInt32) as UInt32

'///Check if the file is a directory.
declare function wFileListIsItemDirectory(byval flist as wFileList,_
									byval idx as UInt32) as Boolean

'///wXml///
declare function wXmlReaderCreate(byval cptrFile as const zstring ptr) as wXmlReader

declare function wXmlReaderCreateUTF8(byval cptrFile as const zstring ptr) as wXmlReader

declare function wXmlGetAttributesCount(byval xml as wXmlReader) as UInt32

declare function wXmlGetAttributeNameByIdx(byval xml as wXmlReader, byval idx as Int32) as const wstring ptr

declare function wXmlGetAttributeValueByIdx(byval xml as wXmlReader, byval idx as Int32) as const wstring ptr

declare function wXmlGetAttributeValueByName(byval xml as wXmlReader, byval name as const wstring ptr) as const wstring ptr

declare function wXmlGetAttributeValueFloatByIdx(byval xml as wXmlReader, byval idx as Int32) as Float32

declare function wXmlGetAttributeValueFloatByName(byval xml as wXmlReader, byval name as const wstring ptr) as Float32

declare function wXmlGetAttributeValueIntByIdx(byval xml as wXmlReader, byval idx as Int32) as Int32

declare function wXmlGetAttributeValueIntByName(byval xml as wXmlReader, byval name as const wstring ptr) as Int32

declare function wXmlGetAttributeValueSafeByName(byval xml as wXmlReader, byval name as const wstring ptr) as const wstring ptr

declare function wXmlGetNodeName(byval xml as wXmlReader) as const wstring ptr

declare function wXmlGetNodeData(byval xml as wXmlReader) as const wstring ptr

declare function wXmlGetSourceFormat(byval xml as wXmlReader) as wTextFormat

declare function wXmlGetParserFormat(byval xml as wXmlReader) as wTextFormat

declare function wXmlGetNodeType(byval xml as wXmlReader) as wXmlNodeType

declare function wXmlIsEmptyElement(byval xml as wXmlReader) as Boolean

declare function wXmlRead(byval xml as wXmlReader) as Boolean

declare sub wXmlReaderDestroy(byval xml as wXmlReader)

declare function wXmlWriterCreate(byval cptrFile as const zstring ptr) as wXmlWriter

declare sub wXmlWriteClosingTag(byval xml as wXmlWriter, byval name as const wstring ptr)

declare sub wXmlWriteComment(byval xml as wXmlWriter, byval comment as const wstring ptr)

declare sub wXmlWriteLineBreak(byval xml as wXmlWriter)

declare sub wXmlWriteText(byval xml as wXmlWriter, byval file as const wstring ptr)

declare sub wXmlWriteHeader(byval xml as wXmlWriter)

declare sub wXmlWriteElement(byval xml as wXmlWriter,_
							byval name as const wstring ptr,_
							byval empty as Boolean,_
							byval attr1Name as const wstring ptr=0,_
							byval attr1Value as const wstring ptr=0,_
							byval attr2Name as const wstring ptr=0,_
							byval attr2Value as const wstring ptr=0,_
							byval attr3Name as const wstring ptr=0,_
							byval attr3Value as const wstring ptr=0,_
							byval attr4Name as const wstring ptr=0,_
							byval attr4Value as const wstring ptr=0,_
							byval attr5Name as const wstring ptr=0,_
							byval attr5Value as const wstring ptr=0)

declare sub wXmlWriterDestroy(byval xml as wXmlWriter)

'///wInput///
'///Logger
declare function wInputIsLoggingEventAvailable() as Boolean

declare function wInputReadLoggingEvent() as wLoggingEvent ptr

'///User
declare function wInputIsUserEventAvailable() as Boolean

declare function wInputReadUserEvent() as wUserEvent ptr

'///Keyboard
declare function wInputWaitKey() as Boolean

declare function wInputIsKeyEventAvailable() as Boolean

declare function wInputReadKeyEvent() as wKeyEvent ptr

declare function wInputIsKeyUp(byval num as wKeyCode) as Boolean

declare function wInputIsKeyHit(byval num as wKeyCode) as Boolean

declare function wInputIsKeyPressed(byval num as wKeyCode) as Boolean

declare function wInputIsMouseEventAvailable() as Boolean

declare function wInputReadMouseEvent() as wMouseEvent ptr

declare sub wInputSetCursorVisible(byval boShow as Boolean)

declare function wInputIsCursorVisible() as Boolean

'///Mouse
declare sub wInputSetMousePosition(byval position as wVector2i ptr)

declare sub wInputGetMousePosition(byval position as wVector2i ptr)

declare sub wInputSetMouseLogicalPosition(byval position as wVector2f ptr)

declare sub wInputGetMouseLogicalPosition(byval position as wVector2f ptr)

declare function wInputGetMouseWheel() as Float32

declare sub wInputGetMouseDelta(byval deltaPos as wVector2i ptr)

declare function wInputIsMouseUp(byval num as wMouseButtons) as Boolean

declare function wInputIsMouseHit(byval num as wMouseButtons) as Boolean

declare function wInputIsMousePressed(byval num as wMouseButtons) as Boolean

declare function wInputGetMouseX() as Int32

declare function wInputGetMouseY() as Int32

declare function wInputGetMouseDeltaX() as Int32

declare function wInputGetMouseDeltaY() as Int32

'///Joystick
declare function wInputActivateJoystick() as Boolean

declare function wInputGetJoysitcksCount() as UInt32

declare sub wInputGetJoystickInfo(byval joyIndex as UInt32, byval joyInfo as wJoystickInfo ptr)

declare function wInputIsJoystickEventAvailable() as Boolean

declare function wInputReadJoystickEvent() as wJoystickEvent ptr

'///wLight///
declare function wLightCreate(byval position as wVector3f, byval color as wColor4f, byval radius as Float32) as wNode

declare sub wLightSetAmbientColor(byval light as wNode, byval color as wColor4f)

declare function wLightGetAmbientColor(byval light as wNode) as wColor4f

declare sub wLightSetSpecularColor(byval light as wNode, byval color as wColor4f)

declare function wLightGetSpecularColor(byval light as wNode) as wColor4f

declare sub wLightSetAttenuation(byval light as wNode, byval attenuation as wVector3f)

declare function wLightGetAttenuation(byval light as wNode) as wVector3f

declare sub wLightSetCastShadows(byval light as wNode, byval castShadows as Boolean)

declare function wLightIsCastShadows(byval light as wNode) as Boolean

declare sub wLightSetDiffuseColor(byval light as wNode, byval color as wColor4f)

declare function wLightGetDiffuseColor(byval light as wNode) as wColor4f

declare sub wLightSetFallOff(byval light as wNode, byval FallOff as Float32)

declare function wLightGetFallOff(byval light as wNode) as Float32

declare sub wLightSetInnerCone(byval light as wNode, byval InnerCone as Float32)

declare function wLightGetInnerCone(byval light as wNode) as Float32

declare sub wLightSetOuterCone(byval light as wNode, byval OuterCone as Float32)

declare function wLightGetOuterCone(byval light as wNode) as Float32

declare sub wLightSetRadius(byval light as wNode, byval Radius as Float32)

declare function wLightGetRadius(byval light as wNode) as Float32

declare sub wLightSetType(byval light as wNode, byval Type as wLightType)

declare function wLightGetType(byval light as wNode) as wLightType

declare function wLightGetDirection(byval light as wNode) as wVector3f

'///wBillboardGroup///
declare function wBillboardGroupCreate(byval position as wVector3f = wVECTOR3f_ZERO, byval rotation as wVector3f = wVECTOR3f_ZERO, byval scale as wVector3f = wVECTOR3f_ONE) as wNode

declare sub wBillboardGroupSetShadows(byval node as wNode, byval direction as wVector3f, byval intensity as Float32, byval ambient as Float32)

declare sub wBillboardGroupResetShadows(byval node as wNode)

declare function wBillboardGroupGetSize(byval node as wNode) as UInt32

declare function wBillboardGroupGetMeshBuffer(byval node as wNode)as wMeshBuffer

declare sub wBillboardGroupUpdateForce(byval node as wNode)

declare function wBillboardGroupGetFirstElement(byval node as wNode)as wBillboard

declare function wBillboardGroupAddElement(byval node as wNode, byval position as wVector3f, byval size as wVector2f, byval roll as Float32, byval color as wColor4s) as wBillboard ptr

declare function wBillboardGroupAddElementByAxis(byval node as wNode, byval position as wVector3f, byval size as wVector2f, byval roll as Float32, byval color as wColor4s, byval axis as wVector3f) as wBillboard ptr

declare sub wBillboardGroupRemoveElement(byval node as wNode, byval billboard as wBillboard ptr)

'///wBillBoard///
declare function wBillboardCreate(byval position as wVector3f, byval size as wVector2f) as wNode

declare sub wBillboardSetEnabledAxis(byval billboard as wNode,_
									 byval param as wBillboardAxisParam)
									 
declare function wBillboardGetEnabledAxis(byval billboard as wNode) as wBillboardAxisParam

declare sub wBillboardSetColor(byval node as wNode, byval topColor as wColor4s, byval bottomColor as wColor4s)

declare sub wBillboardSetSize(byval node as wNode, byval size as wVector2f)

declare function wBillboardCreateText(byval position as wVector3f, byval size as wVector2f, byval font as wFont, byval text as const wstring ptr, byval topColor as wColor4s, byval bottomColor as wColor4s) as wNode

'///wSkyBox///
declare function wSkyBoxCreate(byval texture_up as wTexture, byval texture_down as wTexture, byval texture_left as wTexture, byval texture_right as wTexture, byval texture_front as wTexture, byval texture_back as wTexture) as wNode

'///wSkyDome///
declare function wSkyDomeCreate(byval texture_file as wTexture, byval horiRes as UInt32, byval vertRes as UInt32, byval texturePercentage as Float64, byval spherePercentage as Float64, byval domeRadius as Float64 = 1000.0f) as wNode

declare sub wSkyDomeSetColor(byval dome as wNode, byval horizonColor as wColor4s, byval zenithColor as wColor4s)

declare sub wSkyDomeSetColorBand(byval dome as wNode, byval horizonColor as wColor4s, byval position as Int32, byval fade as Float32, byval additive as Boolean)

declare sub wSkyDomeSetColorPoint(byval dome as wNode, byval horizonColor as wColor4s, byval position as wVector3f, byval radius as Float32, byval fade as Float32, byval additive as Boolean)

'///wLodManager///
declare function wLodManagerCreate(_
					byval fadeScale as uInt32 = 4,_
					byval useAlpha as Boolean,_
					byval callback as Uint32 Ptr = 0 ) As wNode
					
declare sub wLodManagerAddMesh(byval node as wNode, byval mesh as wMesh, byval distance as Float32)

declare sub wLodManagerSetMaterialMap(byval node as wNode, byval source as wMaterialTypes, byval target as wMaterialTypes)

'///wZoneManager///
declare function wZoneManagerCreate(byval initialNearDistance as Float32, byval initialFarDistance as Float32) as wNode

declare sub wZoneManagerSetProperties(byval node as wNode, byval newNearDistance as Float32, byval newFarDistance as Float32, byval accumulateChildBoxes as Boolean)

declare sub wZoneManagerSetBoundingBox(byval node as wNode, byval position as wVector3f, byval size as wVector3f)

declare sub wZoneManagerAddTerrain(byval node as wNode,_
									byval terrainSource as wNode,_
									byval structureMap as const zstring ptr,_
									byval colorMap as const zstring ptr,_
									byval detailMap as const zstring ptr,_
									byval pos as wVector2i,_
									byval sliceSize as Int32)

'///wWater///
declare function wWaterSurfaceCreate(byval mesh as wMesh,_
									byval waveHeight as Float32 = 2.0f,_
									byval waveSpeed as Float32 = 300.0f,_
									byval waveLength as Float32 = 10.0f,_
									byval position as wVector3f = wVECTOR3f_ZERO,_
									byval rotation as wVector3f = wVECTOR3f_ZERO,_
									byval scale as wVector3f = wVECTOR3f_ONE) as wNode
									
declare sub wWaterSurfaceSetWaveHeight(byval water as wNode,_
									byval newWaveHeight as Float32)

declare sub wWaterSurfaceSetWaveLength(byval water as wNode,_
									byval newWaveLength as Float32)

declare sub wWaterSurfaceSetWaveSpeed(byval water as wNode,_
									byval newWaveSpeed as Float32)

declare function wWaterSurfaceGetWaveHeight(byval water as wNode) as Float32

declare function wWaterSurfaceGetWaveLength(byval water as wNode) as Float32

declare function wWaterSurfaceGetWaveSpeed(byval water as wNode) as Float32

'///wRealWater///
declare function wRealWaterSurfaceCreate(byval bumpTexture as wTexture,_
										byval size as wVector2f,_
										byval renderSize as wVector2u =(512,512),_
										byval otherMesh as wMesh=0) as wNode

declare sub wRealWaterSetWindForce(byval water as wNode, byval force as Float32)

declare function wRealWaterGetWindForce(byval water as wNode) as Float32

declare sub wRealWaterSetWindDirection(byval water as wNode,_
										byval direction as wVector2f)

declare function wRealWaterGetWindDirection(byval water as wNode) as wVector2f

declare sub wRealWaterSetWaveHeight(byval water as wNode, byval height as Float32)

declare function wRealWaterGetWaveHeight(byval water as wNode) as Float32

declare sub wRealWaterSetColor(byval water as wNode, byval color as wColor4f)

declare function wRealWaterGetColor(byval water as wNode) as wColor4f

declare sub wRealWaterSetColorBlendFactor(byval water as wNode, byval factor as Float32)

declare function wRealWaterGetColorBlendFactor(byval water as wNode) as Float32

declare sub wRealWaterSetWaveRealHeight(byval water as wNode,_
                                        byval height as Float32)
                                            
declare function wRealWaterGetWaveRealHeight(byval water as wNode) as Float32

declare sub wRealWaterSetWaveSpeed(byval water as wNode,_
                                   byval speed as Float32)
                                            
declare function wRealWaterGetWaveSpeed(byval water as wNode) as Float32

declare sub wRealWaterSetWaveLength(byval water as wNode,_
                                    byval length as Float32)
                                            
declare function wRealWaterGetWaveLength(byval water as wNode) as Float32

'///wClouds///
declare function wCloudsCreate(byval texture as wTexture, byval lod as UInt32, byval depth as UInt32, byval density as UInt32) as wNode

'///wRealClouds///
declare function wRealCloudsCreate(byval txture as wTexture, byval height as wVector3f, byval speed as wVector2f, byval textureScale as Float32) as wNode

declare sub wRealCloudsSetTextureTranslation(byval cloud as wNode,_
											byval speed as wVector2f)

declare function wRealCloudsGetTextureTranslation(byval cloud as wNode)as wVector2f

declare sub wRealCloudsSetTextureScale(byval cloud as wNode,_
										byval scale as Float32)

declare function wRealCloudsGetTextureScale(byval cloud as wNode)as Float32

declare sub wRealCloudsSetCloudHeight(byval cloud as wNode,_
										byval height as wVector3f)

declare function wRealCloudsGetCloudHeight(byval cloud as wNode)as wVector3f

declare sub wRealCloudsSetCloudRadius(byval cloud as wNode,_
										byval radius as wVector2f)

declare function wRealCloudsGetCloudRadius(byval cloud as wNode)as wVector2f

declare sub wRealCloudsSetColors(byval cloud as wNode,_
								byval centerColor as wColor4s,_
								byval innerColor as wColor4s,_
								byval outerColor as wColor4s)

declare sub wRealCloudsGetColors(byval cloud as wNode,_
								byval centerColor as wColor4s ptr,_
								byval innerColor as wColor4s ptr,_
								byval outerColor as wColor4s ptr)

'///wLensFlare///
declare function wLensFlareCreate(byval txture as wTexture) as wNode

declare sub wLensFlareSetStrength(byval flare as wNode, byval strength as Float32)

declare function wLensFlareGetStrength(byval flare as wNode)as Float32

'///wGrass///
declare function wGrassCreate(byval terrain as wNode, byval position as wVector2i, byval patchSize as UInt32, byval fadeDistance as Float32, byval crossed as Boolean, byval grassScale as Float32, byval maxDensity as UInt32, byval dataPosition as wVector2u, byval heightMap as wImage, byval textureMap as wImage, byval grassMap as wImage, byval grassTexture as wTexture) as wNode

declare sub wGrassSetDensity(byval grass as wNode, byval density as UInt32, byval distance as Float32)

declare sub wGrassSetWind(byval grass as wNode, byval strength as Float32, byval res as Float32)

declare function wGrassGetDrawingCount(byval grass as wNode) as UInt32

'///wTreeGenerator/////
declare function wTreeGeneratorCreate(byval xmlFilePath as const ZString ptr)as wNode

declare sub wTreeGeneratorDestroy(byval generator as wNode)

'///wTree///
declare function wTreeCreate(byval generator as wNode,byval seed as Int32, byval billboardTexture as wTexture)as wNode

declare sub wTreeSetDistances(byval tree as wNode,byval midRange as Float32,byval farRange as Float32)

declare function wTreeGetLeafNode(byval tree as wNode)as wNode

declare sub wTreeSetLeafEnabled(byval tree as wNode, byval value as Boolean)

declare function wTreeIsLeafEnabled(byval tree as wNode) as Boolean

declare sub wTreeSetBillboardVertexColor(byval tree as wNode, byval _color as wColor4s)

declare function wTreeGetBillboardVertexColor(byval tree as wNode)as wColor4s

declare function wTreeGetMeshBuffer(byval tree as wNode,_
									byval idx as UInt32) as wMeshBuffer ' idx =0 or 1

'///wWindGenerator
declare function wWindGeneratorCreate()as wNode

declare sub wWindGeneratorDestroy(byval windGenerator as wNode)

declare sub wWindGeneratorSetStrength(byval windGenerator as wNode,byval strength as Float32)

declare function wWindGeneratorGetStrength(byval windGenerator as wNode)as Float32

declare sub wWindGeneratorSetRegularity(byval windGenerator as wNode,byval regularity as Float32)

declare function wWindGeneratorGetRegularity(byval windGenerator as wNode)as Float32

declare function wWindGeneratorGetWind(byval windGenerator as wNode,byval position as wVector3f,byval timeMs as UInt32)as wVector2f

'///wBolt///
declare function wBoltCreate() as wNode

declare sub wBoltSetProperties(byval bolt as wNode, byval start as wVector3f, byval end as wVector3f, byval updateTime as UInt32, byval height as UInt32, byval thickness as Float32, byval parts as UInt32, byval bolts as UInt32, byval steddyend as Boolean, byval color as wColor4s)

'///wBeam///
declare function wBeamCreate() as wNode

declare sub wBeamSetSize(byval beam as wNode, byval size as Float32)

declare sub wBeamSetPosition(byval beam as wNode, byval start as wVector3f, byval end as wVector3f)

'///wParticleSystem///
declare function wParticleSystemCreate(byval defaultemitter as Boolean = false, byval position as wVector3f = wVECTOR3f_ZERO, byval rotation as wVector3f = wVECTOR3f_ZERO, byval scale as wVector3f = wVECTOR3f_ONE) as wNode

declare function wParticleSystemGetEmitter(byval ps as wNode) as wEmitter

declare sub wParticleSystemSetEmitter(byval ps as wNode, byval em as wEmitter)

declare function wParticleSystemGetAffectorsCount(byval ps as wNode) as UInt32

declare function wParticleSystemGetAffectorByIndex(byval ps as wNode,_
													byval idx as UInt32) as wAffector

declare sub wParticleSystemRemoveAllAffectors(byval ps as wNode)

declare sub wParticleSystemSetGlobal(byval ps as wNode, byval value as Boolean)

declare function wParticleSystemIsGlobal(byval ps as wNode) as Boolean

declare sub wParticleSystemSetParticleSize(byval ps as wNode, byval size as wVector2f)

declare function wParticleSystemGetParticleSize(byval ps as wNode)as wVector2f

declare sub wParticleSystemClear(byval ps as wNode)

'///wParticleEmitter (for all)///
declare sub wParticleEmitterSetParameters(byval em as wEmitter, byval params as wParticleEmitter)

declare sub wParticleEmitterGetParameters(byval em as wEmitter, byval params as wParticleEmitter ptr)

declare function wParticleEmitterGetType(byval em as wEmitter) as wParticleEmitterType

'///wParticleBoxEmitter///
declare function wParticleBoxEmitterCreate(byval ps as wNode) as wEmitter

declare sub wParticleBoxEmitterSetBox(byval em as wEmitter, byval boxMin as wVector3f = (-10, 28, 10), byval boxMax as wVector3f = (10, 30, 10))

declare sub wParticleBoxEmitterGetBox(byval em as wEmitter, byval boxMin as wVector3f ptr, byval boxMax as wVector3f ptr)

'///wParticleCylinderEmitter///
declare function wParticleCylinderEmitterCreate(byval ps as wNode, byval center as wVector3f, byval radius as Float32, byval normal as wVector3f, byval lenght as Float32) as wEmitter

declare sub wParticleCylinderEmitterSetParameters(byval em as wEmitter, byval params as wParticleCylinderEmitter)

declare sub wParticleCylinderEmitterGetParameters(byval em as wEmitter, byval params as wParticleCylinderEmitter ptr)

'///wParticleMeshEmitter///
declare function wParticleMeshEmitterCreate(byval ps as wNode,_
											byval staticMesh as wMesh) as wEmitter

declare sub wParticleMeshEmitterSetParameters(byval em as wEmitter, byval params as wParticleMeshEmitter)

declare sub wParticleMeshEmitterGetParameters(byval em as wEmitter, byval params as wParticleMeshEmitter ptr)

'///wParticleAnimatedMeshEmitter///

declare function wParticleAnimatedMeshEmitterCreate(byval ps as wNode,_
                                              byval animMeshNode as wNode) as wEmitter

declare sub wParticleAnimatedMeshEmitterSetParameters(byval em as wEmitter,_
                                               byval params as wParticleMeshEmitter)

declare sub wParticleAnimatedMeshEmitterGetParameters(byval em as wEmitter,_
                                               byval params as wParticleMeshEmitter)

'///wParticlePointEmitter///
declare function wParticlePointEmitterCreate(byval ps as wNode) as wEmitter

'///wParticleRingEmitter///
declare function wParticleRingEmitterCreate(byval ps as wNode, byval center as wVector3f, byval radius as Float32, byval ringThickness as Float32) as wEmitter
declare sub wParticleRingEmitterSetParameters(byval em as wEmitter, byval params as wParticleRingEmitter)
declare sub wParticleRingEmitterGetParameters(byval em as wEmitter, byval params as wParticleRingEmitter ptr)

'///wParticleSphereEmitter///
declare function wParticleSphereEmitterCreate(byval ps as wNode, byval center as wVector3f, byval radius as Float32) as wEmitter

declare sub wParticleSphereEmitterSetParameters(byval em as wEmitter, byval params as wParticleSphereEmitter)
declare sub wParticleSphereEmitterGetParameters(byval em as wEmitter, byval params as wParticleSphereEmitter ptr)

'///wParticleAffector (for all)///
declare sub wParticleAffectorSetEnable(byval foa as wAffector, byval enable as Boolean)

declare function wParticleAffectorIsEnable(byval foa as wAffector) as Boolean

declare function wParticleAffectorGetType(byval foa as wAffector) as wParticleAffectorType 

'///wParticleFadeOutAffector///
declare function wParticleFadeOutAffectorCreate(byval ps as wNode) as wAffector

declare sub wParticleFadeOutAffectorSetTime(byval paf as wAffector, byval fadeOutTime as UInt32 = 1000)

declare function wParticleFadeOutAffectorGetTime(byval paf as wAffector) as UInt32

declare sub wParticleFadeOutAffectorSetColor(byval paf as wAffector, byval targetColor as wColor4s = wCOLOR4s_BLACK)

declare function wParticleFadeOutAffectorGetColor(byval paf as wAffector) as wColor4s

'///wParticleGravityAffector///
declare function wParticleGravityAffectorCreate(byval ps as wNode) as wAffector

declare sub wParticleGravityAffectorSetGravity(byval paf as wAffector, byval gravity as wVector3f = (0, -0.03f, 0))

declare function wParticleGravityAffectorGetGravity(byval paf as wAffector) as wVector3f

declare sub wParticleGravityAffectorSetTimeLost(byval paf as wAffector, byval timeForceLost as UInt32 = 1000)

declare function wParticleGravityAffectorGetTimeLost(byval paf as wAffector) as UInt32

'///wParticleAttractionAffector///
declare function wParticleAttractionAffectorCreate(byval ps as wNode, byval point as wVector3f, byval speed as Float32 = 1.0f) as wAffector

declare sub wParticleAttractionAffectorSetParameters(byval paf as wAffector, byval params as wParticleAttractionAffector)

declare sub wParticleAttractionAffectorGetParameters(byval paf as wAffector, byval params as wParticleAttractionAffector ptr)

'///wParticleRotationAffector///
declare function wParticleRotationAffectorCreate(byval ps as wNode) as wAffector

declare sub wParticleRotationAffectorSetSpeed(byval paf as wAffector, byval speed as wVector3f)

declare function wParticleRotationAffectorGetSpeed(byval paf as wAffector) as wVector3f

declare sub wParticleRotationAffectorSetPivot(byval paf as wAffector, byval pivotPoint as wVector3f)

declare function wParticleRotationAffectorGetPivot(byval paf as wAffector) as wVector3f

'///wParticleStopAffector///
declare function wParticleStopAffectorCreate(byval ps as wNode, byval em as wEmitter, byval time as UInt32 = 1000) as wAffector

declare sub wParticleStopAffectorSetTime(byval paf as wAffector, byval time as UInt32)

declare function wParticleStopAffectorGetTime(byval paf as wAffector) as UInt32

'///wParticleColorMorphAffector///
declare function wParticleColorMorphAffectorCreate(byval ps as wNode) as wAffector

declare sub wParticleColorAffectorSetParameters(byval paf as wAffector, byval params as wParticleColorMorphAffector)

declare sub wParticleColorAffectorGetParameters(byval paf as wAffector, byval params as wParticleColorMorphAffector ptr)

'///wParticlePushAffector
declare function wParticlePushAffectorCreate(byval ps as wNode) as wAffector

declare sub wParticlePushAffectorSetParameters(byval paf as wAffector, byval params as wParticlePushAffector)

declare sub wParticlePushAffectorGetParameters(byval paf as wAffector, byval params as wParticlePushAffector ptr)

'///wParticleSplineAffector
declare function wParticleSplineAffectorCreate(byval ps as wNode) as wAffector

declare sub wParticleSplineAffectorSetParameters(byval paf as wAffector, byval params as wParticleSplineAffector)

declare sub wParticleSplineAffectorGetParameters(byval paf as wAffector, byval params as wParticleSplineAffector ptr)

'///wParticleScaleAffector
declare function wParticleScaleAffectorCreate(byval ps as wNode, byval scaleTo as wVector2f) as wAffector

declare sub wParticleScaleAffectorSetTargetScale(byval paf as wAffector,_
                                          byval tScale as wVector2f)

declare function wParticleScaleAffectorGetTargetScale(byval paf as wAffector) as wVector2f

'///wNode///
declare function wNodeCreateEmpty() as wNode

declare function wNodeCreateCube(byval size as Float32,_
								byval isTangent as Boolean=false,_
								byval color as wColor4s = wCOLOR4s_WHITE) as wNode

declare sub wNodeSetCubeParameters(byval cube as wNode,_
                                   byval params as wNodeCubeParameters)

declare sub wNodeGetCubeParameters(byval cube as wNode,_
                                   byval params as wNodeCubeParameters ptr)

declare function wNodeCreateSphere(byval radius as Float32,_
									byval polyCount as Int32 = 32,_
									byval isTangent as Boolean=false,_
									byval color as wColor4s = wCOLOR4s_WHITE) as wNode

declare sub wNodeSetSphereParameters(byval sphere as wNode,_
                                     byval params as wNodeSphereParameters)

declare sub wNodeGetSphereParameters(byval sphere as wNode,_
                                     byval params as wNodeSphereParameters ptr)

declare function wNodeCreateCylinder(byval radius as Float32,_
									byval length as Float32,_
									byval tesselation as UInt32,_
									byval color as wColor4s = wCOLOR4s_WHITE,_
									byval closeTop as Boolean=true,_
									byval oblique as Float32=0,_
									byval isTangent as Boolean=false) as wNode

declare sub wNodeSetCylinderParameters(byval cylinder as wNode,_
                                       byval params as wNodeCylinderParameters)

declare sub wNodeGetCylinderParameters(byval cylinder as wNode,_
                                       byval params as wNodeCylinderParameters ptr)

declare function wNodeCreateCone(byval radius as Float32,_
								byval length as Float32,_
								byval tesselation as UInt32,_
								byval colorTop as wColor4s = wCOLOR4s_WHITE,_
								byval colorBottom as wColor4s = wCOLOR4s_WHITE,_
								byval isTangent as Boolean=false) as wNode

declare sub wNodeSetConeParameters(byval cone as wNode,_
								byval params as wNodeConeParameters)

declare sub wNodeGetConeParameters(byval cone as wNode,_
								byval params as wNodeConeParameters ptr)

declare function wNodeCreatePlane(byval tileSize as wVector2f,_
									byval tileCount as wVector2u=wVECTOR2u_ONE,_
									byval material as wMaterial=0,_
									byval texRepeatCount as wVector2f=wVECTOR2f_ONE,_
									byval isTangent as Boolean=false) as wNode

declare sub wNodeSetPlaneParameters(byval plane as wNode,_
                                    byval params as wNodePlaneParameters)

declare sub wNodeGetPlaneParameters(byval plane as wNode,_
                                    byval params as wNodePlaneParameters ptr)

declare function wNodeCreateFromMesh(byval mesh as wMesh) as wNode

declare function wNodeCreateFromStaticMesh(byval mesh as wMesh,_
											byval isTangent as Boolean=false) as wNode

declare function wNodeCreateFromMeshAsOctree(byval vptrMesh as wMesh,_
											byval minimalPolysPerNode as Int32 = 512,_
											byval alsoAddIfMeshPointerZero as Boolean = false,_
											byval isTangent as Boolean=false) as wNode

declare function wNodeCreateFromBatchingMesh(byval batchMesh as wMesh) as wNode


declare sub  wNodeSetDecalsEnabled(byval node as wNode)

declare sub wNodeSetParent(byval node as wNode, byval parent as wNode)

declare function wNodeGetParent(byval node as wNode) as wNode

declare sub wNodeSetReadOnlyMaterials(byval node as wNode, byval readonly as Boolean)

declare function wNodeIsReadOnlyMaterials(byval node as wNode) as Boolean

declare function wNodeGetFirstChild(byval node as wNode, byval iterator as UInt32 ptr) as wNode

declare function wNodeGetChildsCount(byval node as wNode, byval iterator as UInt32 ptr) as UInt32

declare function wNodeGetNextChild(byval node as wNode, byval iterator as UInt32 ptr) as wNode

declare function wNodeIsLastChild(byval node as wNode, byval iterator as UInt32 ptr) as Boolean

declare function wNodeDestroyChild(byval node as wNode,_
									byval child as wNode) as Boolean

declare sub wNodeSetId(byval node as wNode, byval id as Int32)

declare function wNodeGetId(byval node as wNode) as Int32

declare sub wNodeSetName(byval node as wNode, byval name as const zstring ptr)

declare function wNodeGetName(byval node as wNode) as const zstring ptr

declare sub wNodeSetUserData(byval node as wNode, byval newData as any const ptr)

declare function wNodeGetUserData(byval node as wNode) as any ptr

declare sub wNodeSetDebugMode(byval node as wNode, byval visible as wDebugMode = wDM_FULL)

declare sub wNodeSetDebugDataVisible(byval node as wNode, byval value as Boolean)

declare function wNodeGetMaterialsCount(byval node as wNode) as UInt32

declare function wNodeGetMaterial(byval node as wNode, byval matIndex as UInt32) as wMaterial

declare sub wNodeSetPosition(byval node as wNode, byval position as wVector3f)

declare function wNodeGetPosition(byval node as wNode) as wVector3f

declare function wNodeGetAbsolutePosition(byval node as wNode) as wVector3f

declare sub wNodeSetRotation(byval node as wNode, byval rotation as wVector3f)

declare sub wNodeSetAbsoluteRotation(byval node as wNode, byval rotation as wVector3f)

declare function wNodeGetRotation(byval node as wNode) as wVector3f

declare function wNodeGetAbsoluteRotation(byval node as wNode) as wVector3f

declare sub wNodeTurn(byval Entity as wNode, byval turn as wVector3f)

declare sub wNodeMove(byval Entity as wNode, byval direction as wVector3f)

declare sub wNodeRotateToNode(byval Entity1 as wNode, byval Entity2 as wNode)

declare function wNodesGetBetweenDistance(byval nodeA as wNode, byval nodeB as wNode) as Float32

declare function wNodesAreIntersecting(byval nodeA as wNode, byval nodeB as wNode) as Boolean

declare function wNodeIsPointInside(byval node as wNode, byval pos as wVector3f) as Boolean

declare sub wNodeDrawBoundingBox(byval node as wNode, byval color as wColor4s)

declare sub wNodeGetBoundingBox(byval Node as wNode, byval min as wVector3f ptr, byval max as wVector3f ptr)

declare sub wNodeGetTransformedBoundingBox(byval Node as wNode, byval min as wVector3f ptr, byval max as wVector3f ptr)

declare sub wNodeSetScale(byval node as wNode, byval scale as wVector3f)

declare function wNodeGetScale(byval node as wNode) as wVector3f

declare function wNodeDuplicate(byval entity as wNode) as wNode

declare function wNodeGetJointByName(byval node as wNode, byval node_name as const zstring ptr) as wNode

declare function wNodeGetJointById(byval node as wNode, byval id as Int32) as wNode

declare function wNodeGetJointsCount(byval node as wNode) as Int32

declare sub wNodeSetJointSkinningSpace(byval bone as wNode, byval space as wBoneSkinningSpace)

declare function wNodeGetJointSkinningSpace(byval bone as wNode) as wBoneSkinningSpace

Declare sub wNodeSetRenderFromIdentity(_
					ByVal animatedNode As wNode,_
					ByVal value As Boolean)

declare function wNodeAddShadowVolume(byval node as wNode,_
									  byval mesh as wMesh=0,_
									  byval zfailMethod as Boolean=true,_
                                      byval infinity as Float32=10000.f,_
                                      byval oldStyle as Boolean=false)as wNode
                                      
declare function wNodeAddShadowVolumeFromMeshBuffer(byval node as wNode,_
													byval meshbuffer as wMeshBuffer,_
													byval zfailMethod as Boolean=true,_
													byval infinity as Float32=10000.f,_
													byval oldStyle as Boolean=false)as wNode

declare function wNodeGetShadowVolume(byval node as wNode) as wNode

'for octree only
declare sub wNodeSetOctreeParameters(byval node as wNode,_
									byval params as wOctreeParameters)

declare sub wNodeGetOctreeParameters(byval node as wNode,_
									byval params as wOctreeParameters ptr)


declare sub wNodeSetVisibility(byval node as wNode, byval visible as Boolean)

declare function wNodeIsVisible(byval node as wNode) as Boolean

declare function wNodeIsInView(byval node as wNode) as Boolean

declare sub wNodeDestroy(byval node as wNode)

declare sub wNodeSetMesh(byval node as wNode, byval mesh as wMesh)

declare function wNodeGetMesh(byval node as wNode) as wMesh

declare sub wNodeSetRotationPositionChange(byval node as wNode,_
											byval angles as wVector3f,_
											byval offset as wVector3f,_
											byval forwardStore as wVector3f ptr,_
											byval upStore as wVector3f ptr,_
											byval numOffsets as UInt32,_
											byval offsetStore as wVector3f ptr)

declare sub wNodeSetCullingState(byval node as wNode,_
								byval state as wCullingState)

declare function wNodeGetType(byval node as wNode) as wSceneNodeType

declare sub wNodeSetAnimationRange(byval node as wNode,_
									byval range as wVector2i)

declare sub wNodeGetAnimationRange(byval node as wNode,_
								byval range as wVector2i ptr)

declare sub wNodePlayMD2Animation(byval node as wNode,_
								byval iAnimation as wMd2AnimationType)

declare function wNodeGetPlayedMD2Animation(byval node as wNode) as wMd2AnimationType

declare sub wNodeSetAnimationSpeed(byval node as wNode, byval fSpeed as Float32)

declare function wNodeGetAnimationSpeed(byval node as wNode) as Float32

declare sub wNodeSetAnimationFrame(byval node as wNode, byval fFrame as Float32)

declare function wNodeGetAnimationFrame(byval node as wNode) as Float32

declare function wNodeGetAnimationFramesCount(byval node as wNode) as Int32

declare sub wNodeSetTransitionTime(byval node as wNode, byval fTime as Float32)

declare sub wNodeAnimateJoints(byval node as wNode)

declare sub wNodeSetJointMode(byval node as wNode, byval mode as wJointMode)

declare sub wNodeSetAnimationLoopMode(byval node as wNode, byval value as Boolean)

declare function wNodeGetAnimationLoopMode(byval node as wNode) as Boolean

declare sub wNodeDestroyAllAnimators(byval node as wNode)

declare function wNodeGetAnimatorsCount(byval node as wNode) as UInt32

declare function wNodeGetFirstAnimator(byval node as wNode) as wAnimator

declare function wNodeGetLastAnimator(byval node as wNode) as wAnimator

declare function wNodeGetAnimatorByIndex(byval node as wNode, byval index as UInt32) as wAnimator

declare sub wNodeDestroyAnimator(byval node as wNode,_
							byval anim as wAnimator)

declare sub wNodeOnAnimate(byval node as wNode,byval timeMs as UInt32)

declare sub wNodeDraw(byval node as wNode)

declare sub wNodeUpdateAbsolutePosition (byval node as wNode)

declare sub wNodeRemoveCollision(byval node as wNode,_
								byval selector as wSelector)
								
declare sub wNodeAddCollision(byval node as wNode,_
							byval selector as wSelector)

'///wMaterial///
declare sub wMaterialSetTexture(byval material as wMaterial, byval texIdx as UInt32, byval texture as wTexture)

declare function wMaterialGetTexture(byval material as wMaterial, byval texIdx as UInt32) as wTexture

declare sub wMaterialSetTextureScale(byval material as wMaterial,_
									byval texIdx as UInt32,_
									byval scale as wVector2f)
									
declare function wMaterialGetTextureScale(byval material as wMaterial,_
										byval texIdx as UInt32) as wVector2f

declare sub wMaterialSetTextureScaleFromCenter(byval material as wMaterial,_
												byval texIdx as UInt32,_
												byval scale as wVector2f)
												
declare sub wMaterialSetTextureTranslation(byval material as wMaterial,_
											byval texIdx as UInt32,_
											byval translate as wVector2f)
											
declare function wMaterialGetTextureTranslation(byval material as wMaterial,_
											byval texIdx as UInt32) as wVector2f

declare sub wMaterialSetTextureTranslationTransposed(byval material as wMaterial,_
											byval texIdx as UInt32,_
											byval translate as wVector2f)

declare sub wMaterialSetTextureRotation(byval material as wMaterial,_
										byval texIdx as UInt32,_
										byval angle as Float32)

declare function wMaterialGetTextureRotation(byval material as wMaterial,_
										byval texIdx as UInt32) as Float32

declare sub wMaterialSaveTextureMatrix(byval material as wMaterial,_
										byval texIdx as UInt32,_
										byval array16Ptr as Float32 ptr)

declare sub wMaterialRestoreTextureMatrix(byval material as wMaterial,_
										byval texIdx as UInt32,_
										byval array16Ptr as Float32 ptr)
										
declare sub wMaterialSetTextureWrapUMode(byval material as wMaterial, byval texIdx as UInt32, byval value as wTextureClamp)

declare function wMaterialGetTextureWrapUMode(byval material as wMaterial, byval texIdx as UInt32) as wTextureClamp

declare sub wMaterialSetTextureWrapVMode(byval material as wMaterial, byval texIdx as UInt32, byval value as wTextureClamp)

declare function wMaterialGetTextureWrapVMode(byval material as wMaterial, byval texIdx as UInt32) as wTextureClamp

declare sub wMaterialSetTextureLodBias(byval material as wMaterial, byval texIdx as UInt32, byval lodBias as UInt32)

declare function wMaterialGetTextureLodBias(byval material as wMaterial, byval texIdx as UInt32) as UInt32

declare sub wMaterialSetFlag(byval material as wMaterial, byval Flag as wMaterialFlags, byval boValue as Boolean)

declare function wMaterialGetFlag(byval material as wMaterial, byval Flag as wMaterialFlags) as Boolean

declare sub wMaterialSetType(byval material as wMaterial, byval type as wMaterialTypes)

declare function wMaterialGetType(byval material as wMaterial) as wMaterialTypes

declare sub wMaterialSetShininess(byval material as wMaterial, byval shininess as Float32)

declare function wMaterialGetShininess(byval material as wMaterial) as Float32

declare sub wMaterialSetVertexColoringMode(byval material as wMaterial, byval colorMaterial as wColorMaterial)

declare function wMaterialGetVertexColoringMode(byval material as wMaterial) as wColorMaterial

declare sub wMaterialSetSpecularColor(byval material as wMaterial, byval color as wColor4s)

declare function wMaterialGetSpecularColor(byval material as wMaterial) as wColor4s

declare sub wMaterialSetDiffuseColor(byval material as wMaterial, byval color as wColor4s)

declare function wMaterialGetDiffuseColor(byval material as wMaterial) as wColor4s

declare sub wMaterialSetAmbientColor(byval material as wMaterial, byval color as wColor4s)

declare function wMaterialGetAmbientColor(byval material as wMaterial) as wColor4s

declare sub wMaterialSetEmissiveColor(byval material as wMaterial, byval color as wColor4s)

declare function wMaterialGetEmissiveColor(byval material as wMaterial) as wColor4s

declare sub wMaterialSetTypeParameter(byval material as wMaterial, byval param1 as Float32)

declare function wMaterialGetTypeParameter(byval material as wMaterial) as Float32

declare sub wMaterialSetTypeParameter2(byval material as wMaterial, byval param2 as Float32)

declare function wMaterialGetTypeParameter2(byval material as wMaterial) as Float32

declare sub wMaterialSetBlendingMode(byval material as wMaterial,_
									byval paramNumber as UInt32,_'// 1 or 2 (TypeParameter1 / 2)
									byval blendSrc as const wBlendFactor,_
									byval blendDest as const wBlendFactor,_
									byval modulate as const wBlendModulateFunc = wBMF_MODULATE_1X,_
                                    byval alphaSource as const wBlendAlphaSource = wBAS_TEXTURE)

declare sub wMaterialGetBlendingMode(byval material as wMaterial,_
									byval paramNumber as UInt32,_
									byval blendSrc as const wBlendFactor ptr,_
									byval blendDest as const wBlendFactor ptr,_
									byval modulate as const wBlendModulateFunc ptr,_
                                    byval alphaSource as const wBlendAlphaSource ptr)

declare sub wMaterialSetLineThickness(byval material as wMaterial, byval lineThickness as Float32)

declare function wMaterialGetLineThickness(byval material as wMaterial) as Float32

declare sub wMaterialSetColorMask(byval material as wMaterial, byval value as wColorPlane)

declare function wMaterialGetColorMask(byval material as wMaterial) as wColorPlane

declare sub wMaterialSetAntiAliasingMode(byval material as wMaterial,_
										byval mode as wAntiAliasingMode)

declare function wMaterialGetAntiAliasingMode(byval material as wMaterial) as wAntiAliasingMode


'///wShader///
declare function wShaderCreateNamedVertexConstant(byval shader as wShader ptr,_
													byval name as const zstring ptr,_
													byval preset as Int32,_
													byval floats as const Float32 ptr,_
													byval count as Int32) as Boolean

declare function wShaderCreateNamedPixelConstant(byval shader as wShader ptr,_
												byval name as const zstring ptr,_
												byval preset as Int32,_
												byval floats as const Float32 ptr,_
												byval count as Int32) as Boolean

declare function wShaderCreateAddressedVertexConstant(byval shader as wShader ptr,_
												byval address as Int32,_
												byval preset as Int32,_
												byval floats as const Float32 ptr,_
												byval count as Int32) as Boolean

declare function wShaderCreateAddressedPixelConstant(byval shader as wShader ptr,_
													byval address as Int32,_
													byval preset as Int32,_
													byval floats as const Float32 ptr,_
													byval count as Int32) as Boolean

declare function wShaderAddHighLevelMaterial(byval vertexShaderProgram as const zstring ptr,_
											byval vertexShaderEntryPointName as const zstring ptr,_
											byval wVersion as wVertexShaderVersion,_
											byval pixelShaderProgram as const zstring ptr,_
											byval pixelShaderEntryPointName as const zstring ptr=@"main",_
											byval pVersion as wPixelShaderVersion = wPSV_1_1,_
											byval materialType as wMaterialTypes = wMT_SOLID,_
											byval userData as Int32 = 0) as wShader ptr

declare function wShaderAddHighLevelMaterialFromFiles(byval vertexShaderProgramFileName as const zstring ptr,_
													byval vertexShaderEntryPointName as const zstring ptr,_
													byval wVersion as wVertexShaderVersion,_
													byval pixelShaderProgramFileName as const zstring ptr,_
													byval pixelShaderEntryPointName as const zstring ptr=@"main",_
													byval pVersion as wPixelShaderVersion = wPSV_1_1,_
													byval materialType as wMaterialTypes = wMT_SOLID,_
													byval userData as Int32 = 0) as wShader ptr

declare function wShaderAddMaterial(byval vertexShaderProgram as const zstring ptr,_
									byval pixelShaderProgram as const zstring ptr,_
									byval materialType as wMaterialTypes = wMT_SOLID,_
									byval userData as Int32 = 0) as wShader ptr

declare function wShaderAddMaterialFromFiles(byval vertexShaderProgramFileName as const zstring ptr,_
											byval pixelShaderProgramFileName as const zstring ptr,_
											byval materialType as wMaterialTypes = wMT_SOLID,_
											byval userData as Int32 = 0) as wShader ptr

declare function wShaderAddHighLevelMaterialEx(byval vertexShaderProgram as const zstring ptr,_
												byval vertexShaderEntryPointName as const zstring ptr,_
												byval wVersion as wVertexShaderVersion,_
												byval pixelShaderProgram as const zstring ptr,_
												byval pixelShaderEntryPointName as const zstring ptr,_
												byval pVersion as wPixelShaderVersion,_
												byval geometryShaderProgram as const zstring ptr,_
												byval geometryShaderEntryPointName as const zstring ptr=@"main",_
												byval gVersion as wGeometryShaderVersion = wGSV_4_0,_
												byval inType as wPrimitiveType = wPT_TRIANGLES,_
												byval outType as wPrimitiveType = wPT_TRIANGLE_STRIP,_
												byval verticesOut as UInt32 = 0,_
												byval materialType as wMaterialTypes = wMT_SOLID,_
												byval userData as Int32 = 0) as wShader ptr

declare function wShaderAddHighLevelMaterialFromFilesEx(byval vertexShaderProgramFileName as const zstring ptr,_
														byval vertexShaderEntryPointName as const zstring ptr,_
														byval wVersion as wVertexShaderVersion,_
														byval pixelShaderProgramFileName as const zstring ptr,_
														byval pixelShaderEntryPointName as const zstring ptr,_
														byval pVersion as wPixelShaderVersion,_
														byval geometryShaderProgram as const zstring ptr,_
														byval geometryShaderEntryPointName as const zstring ptr=@"main",_
														byval gVersion as wGeometryShaderVersion = wGSV_4_0,_
														byval inType as wPrimitiveType = wPT_TRIANGLES,_
														byval outType as wPrimitiveType = wPT_TRIANGLE_STRIP,_
														byval verticesOut as UInt32 = 0,_
														byval materialType as wMaterialTypes = wMT_SOLID,_
														byval userData as Int32 = 0) as wShader ptr

'///wMesh
declare function wMeshLoad(byval cptrFile as const zstring ptr,_
						   byval ToTangents as Boolean=false) as wMesh

declare function wMeshCreate(byval cptrMeshName as const ZString ptr)as wMesh

declare sub wMeshAddMeshBuffer(byval mesh as wMesh,_
							   byval meshBuffer as wMeshBuffer)
                   
declare function wMeshCreateSphere(byval name as const zstring ptr,_
									byval radius as Float32,_
									byval polyCount as Int32,_
									byval isTangent as Boolean=false) as wMesh

declare function wMeshCreateCube(byval name as const zstring ptr,_
								byval size as wVector3f,_
								byval isTangent as Boolean=false) as wMesh

declare function wMeshCreateCylinder(byval name as const zstring ptr,_
                                     byval radius as Float32,_
                                     byval length as Float32,_
                                     byval tesselation as UInt32,_
                                     byval closeTop as Boolean=true,_
                                     byval oblique as Float32=0,_
                                     byval isTangent as Boolean=false) as wMesh

declare function wMeshCreateCone(byval name as const zstring ptr,_
								byval radius as Float32,_
								byval length as Float32,_
								byval tesselation as UInt32,_
								byval isTangent as Boolean=false) as wMesh

declare function wMeshSave(byval mesh as wMesh, byval type as wMeshFileFormat, byval filename as const zstring ptr) as Int32

declare sub wMeshDestroy(byval mesh as wMesh)

declare function wMeshSetName(byval mesh as wMesh, byval name as const zstring ptr) as Boolean

declare function wMeshGetName(byval mesh as wMesh) as const zstring ptr

declare function wMeshGetType(byval mesh as wMesh) as wAnimatedMeshType

/'
// When animating a mesh by "Morphing" or "Skeletal Animation" such as "*.md3", "*.x" and "*.b3d" using "Shaders" for rendering we can improve the final render if we "Cyclically Update" the "Tangents" and "Binormals"..
// We presume that our meshes are, among others, textured with a "NORMAL MAP" used by the "Shader" (cg, hlsl, or glsl etc) in calculating diffuse and specular.
// We also have one or more lights used by the shader. 

// Update TANGENTS & BINORMALS at every frame for a skinned animation..

 // We dont want to do this for static meshes like levels etc..
 // We also dont want to do it for Rotating, Scaled and translated meshes..(we can however, as a bonus, scale, rotate and translate these)
 // Only for animated skinned and morph based meshes..
 // This is loose code that works. If anyone can improve it for the engine itself that would be great..
 // You'll probably ID possible improvements immediately!

 // At every N'th Frame we loop through all the vertices..
 // 1. In the loop we Access the VERTEX of POINT A of the "INDEXED TRIANGLE"..
 // 2. We interrogate the "OTHER TWO" VERTICES (which thankfully do change at each frame) for their Positions, Normals, and UV Coords to
 //    Genertate a "BRAND NEW" (animated) TANGENT and BINORMAL. (We may want to calculate the the "Binormal" in the SHADER to save time)
 // 3. We REWRITE the Tangent and Binormal for our SELECTED TRIANGLE POINT.
 // 4. We DO THE SAME for POINTS B and C..
 //

 //  GENERATE "LIVING" TANGENTS & BINBORMALS
 //  REMEMBER!
 //  WE NEED "LOOP THROUGH ALL ITS BUFFERS"
 //  WE NEED "LOOP THROUGH ALL THOSE BUFFER VERTICES"
 // Possible types of (animated) meshes.
 // Enumerator:
 // 1  EAMT_MD2            Quake 2 MD2 model file..
 // 2  EAMT_MD3            Quake 3 MD3 model file..
 // 10 EAMT_MDL_HALFLIFE   Halflife MDL model file..
 // Below is what an item type must be for it to qualify for Tangent Updates..
 // 11 EAMT_SKINNED        generic skinned mesh "*.x" "*.b3d" etc.. (see Morphed too!)
 //
 // We want to change tangents for skinned meshes only so we must determine which ones are "Skinned"..
 // This may change if we add and remove meshes during runtime..'/
declare function wMeshCreateStaticWithTangents(byval animMesh as wMesh)as wMesh

declare sub wMeshRecalculateNormals(byval mesh as wMesh,_
									byval smooth as Boolean=false,_
									byval angleWeighted as Boolean=false)

declare sub wMeshRecalculateTangents(byval mesh as wMesh,_
									byval recalculateNormals as Boolean=false,_
									byval smooth as Boolean=false,_
									byval angleWeighted as Boolean=false)

declare sub wMeshUpdateTangentsAndBinormals(byval mesh as wMesh)

declare sub wMeshFlipSurface(byval mesh as wMesh)

declare function wMeshCreateHillPlane(byval meshname as const zstring ptr, byval tilesSize as wVector2f, byval tilesCount as wVector2i, byval material as wMaterial = 0, byval hillHeight as Float32 = 0, byval countHills as wVector2f = wVECTOR2f_ZERO, byval texRepeatCount as wVector2f = wVECTOR2f_ONE) as wMesh

declare function wMeshCreateArrow(byval name as const zstring ptr, byval cylinderColor as wColor4s = wCOLOR4s_WHITE, byval coneColor as wColor4s = wCOLOR4s_WHITE, byval tesselationCylinder as UInt32 = 4, byval tesselationCone as UInt32 = 8, byval height as Float32 = 1.0f, byval heightCylinder as Float32 = 0.05f, byval widthCylinder as Float32 = 0.05f, byval widthCone as Float32 = 0.3f) as wMesh

declare function wMeshCreateBatching() as wMesh

declare sub wMeshAddToBatching(byval meshBatch as wMesh, byval mesh as wMesh, byval position as wVector3f = wVECTOR3f_ZERO, byval rotation as wVector3f = wVECTOR3f_ZERO, byval scale as wVector3f = wVECTOR3f_ONE)

declare function wMeshFinalizeBatching(byval meshBatch as wMesh) as wMesh

declare sub wMeshClearBatching(byval meshBatch as wMesh)

declare sub wMeshDestroyBatching(byval meshBatch as wMesh)

declare sub wMeshEnableHardwareAcceleration(byval mesh as wMesh, byval iFrame as UInt32 = 0)

declare function wMeshGetFramesCount(byval mesh as wMesh) as UInt32

declare function wMeshGetIndicesCount(byval mesh as wMesh, byval iFrame as UInt32 = 0, byval iMeshBuffer as UInt32 = 0) as UInt32

declare function wMeshGetIndices(byval mesh as wMesh, byval iFrame as UInt32 = 0, byval iMeshBuffer as UInt32 = 0) as UInt16 ptr

declare sub wMeshSetIndices(byval mesh as wMesh, byval iFrame as UInt32, byval indicies as UInt16 ptr, byval iMeshBuffer as UInt32 = 0)

declare function wMeshGetVerticesCount(byval mesh as wMesh, byval iFrame as UInt32 = 0, byval iMeshBuffer as UInt32 = 0) as UInt32

declare sub wMeshGetVertices(byval mesh as wMesh,_
									byval iFrame as UInt32 = 0,_
									byval verts as wVert ptr,_
									byval iMeshBuffer as UInt32 = 0) 

declare function wMeshGetVerticesMemory(byval mesh as wMesh, byval iFrame as UInt32 = 0, byval iMeshBuffer as UInt32 = 0) as UInt32 ptr

declare sub wMeshSetVertices(byval mesh as wMesh, byval iFrame as UInt32, byval verts as wVert ptr, byval iMeshBuffer as UInt32 = 0)

declare sub wMeshSetScale(byval mesh as wMesh, byval scale as Float32, byval iFrame as UInt32 = 0, byval iMeshBuffer as UInt32 = 0, byval sourceMesh as wMesh = 0)

declare sub wMeshSetRotation(byval mesh as wMesh, byval rot as wVector3f)

declare sub wMeshSetVerticesColors(byval mesh as wMesh, byval iFrame as UInt32, byval verticesColor as wColor4s ptr, byval groupCount as UInt32 = 0, byval startPos as UInt32 ptr = 0, byval endPos as UInt32 ptr = 0, byval iMeshBuffer as UInt32 = 0)

declare sub wMeshSetVerticesAlpha(byval mesh as wMesh, byval iFrame as UInt32, byval value as UInt8)

declare sub wMeshSetVerticesCoords(byval mesh as wMesh, byval iFrame as UInt32, byval vertexCoord as wVector3f ptr, byval groupCount as UInt32 = 0, byval startPos as UInt32 ptr = 0, byval endPos as UInt32 ptr = 0, byval iMeshBuffer as UInt32 = 0)

declare sub wMeshSetVerticesSingleColor(byval mesh as wMesh, byval iFrame as UInt32, byval verticesColor as wColor4s, byval groupCount as UInt32 = 0, byval startPos as UInt32 ptr = 0, byval endPos as UInt32 ptr = 0, byval iMeshBuffer as UInt32 = 0)

declare sub wMeshGetBoundingBox(byval mesh as wMesh, byval min as wVector3f ptr, byval max as wVector3f ptr)

declare function wMeshDuplicate(byval src as wMesh) as wMesh

declare sub wMeshFit(byval src as wMesh, byval pivot as wVector3f, byval delta as wVector3f ptr)

declare function wMeshIsEmpty(byval mesh as wMesh) as Boolean

declare function wMeshGetBuffersCount(byval mesh as wMesh, byval iFrame as UInt32 = 0) as UInt32

declare function wMeshGetBuffer(byval mesh as wMesh, byval iFrame as UInt32, byval index as UInt32) as wMeshBuffer

'///wMeshBuffer///
declare function wMeshBufferCreate(byval iVertexCount as UInt32,_
                                   byval vVertices as wVert ptr,_
								   byval iIndicesCount as UInt32,_
                                   byval usIndices as UInt16 ptr) as wMeshBuffer
                                   
declare sub wMeshBufferDestroy(byval buffer as wMeshBuffer)
                                   
declare function wMeshBufferGetMaterial(byval buf as wMeshBuffer) as wMaterial

declare sub wMeshBufferAddToBatching(byval meshBatch as wMesh,_
									byval buffer as wMeshBuffer,_
									byval position as wVector3f = wVECTOR3f_ZERO,_
									byval rotation as wVector3f = wVECTOR3f_ZERO,_
									byval scale as wVector3f = wVECTOR3f_ONE)

'///wBsp///
declare function wBspGetEntityList(byval mesh as wMesh) as UInt32 ptr

declare function wBspGetEntityListSize(byval entityList as UInt32 ptr) as Int32

declare function wBspGetEntityIndexByName(byval entityList as UInt32 ptr, byval EntityName as const zstring ptr) as wVector2i

declare function wBspGetEntityNameByIndex(byval entityList as UInt32 ptr, byval number as UInt32) as const zstring ptr

declare function wBspGetEntityMeshFromBrush(byval bspMesh as wMesh, byval entityList as UInt32 ptr, byval index as Int32) as wMesh

declare function wBspGetVarGroupByIndex(byval entityList as UInt32 ptr, byval index as Int32) as UInt32 ptr

declare function wBspGetVarGroupSize(byval entityList as UInt32 ptr, byval index as Int32) as UInt32

declare function wBspGetVarGroupValueAsVec(byval group as UInt32 ptr, byval strName as const zstring ptr, byval parsePos as UInt32) as wVector3f

declare function wBspGetVarGroupValueAsFloat(byval group as UInt32 ptr, byval strName as const zstring ptr, byval parsePos as UInt32) as Float32

declare function wBspGetVarGroupValueAsString(byval group as UInt32 ptr, byval strName as const zstring ptr) as const zstring ptr

declare function wBspCreateFromMesh(byval mesh as wMesh,_
									byval isTangent as Boolean,_
									byval isOctree as Boolean,_
									byval fileEntity as const zstring ptr = 0,_
									byval isLoadShaders as Boolean = true,_
									byval PolysPerNode as UInt32 = 512) as wNode


declare function wBspGetVariableFromVarGroup(byval group as UInt32 ptr, byval index as Int32) as UInt32 ptr

declare function wBspGetVarGroupVariableSize(byval group as UInt32 ptr) as UInt32

declare function wBspGetVariableName(byval variable as UInt32 ptr) as const zstring ptr

declare function wBspGetVariableContent(byval variable as UInt32 ptr) as const zstring ptr

declare function wBspGetVariableValueAsVec(byval variable as UInt32 ptr, byval parsePos as UInt32) as wVector3f

declare function wBspGetVariableValueAsFloat(byval variable as UInt32 ptr, byval parsePos as UInt32) as Float32


'///Occlusion Query
declare sub wOcclusionQueryAddNode(byval node as wNode)

declare sub wOcclusionQueryAddMesh(byval node as wNode,_
								   byval mesh as wMesh)

declare sub wOcclusionQueryUpdate(byval node as wNode,_
								  byval block as Boolean)

declare sub wOcclusionQueryRun(byval node as wNode,_
							   byval visible as Boolean)

declare sub wOcclusionQueryUpdateAll(byval block as Boolean)

declare sub wOcclusionQueryRunAll(byval visible as Boolean)

declare sub wOcclusionQueryRemoveNode(byval node as wNode)

declare sub wOcclusionQueryRemoveAll()

declare function wOcclusionQueryGetResult(byval node as wNode) as Uint32

'///wSphericalTerrain///
declare function wSphericalTerrainCreate(byval cptrFile0 as const zstring ptr,_
										byval cptrFile1 as const zstring ptr,_
										byval cptrFile2 as const zstring ptr,_
										byval cptrFile3 as const zstring ptr,_
										byval cptrFile4 as const zstring ptr,_
										byval cptrFile5 as const zstring ptr,_
										byval position as wVector3f,_
										byval rotation as wVector3f,_
										byval scale as wVector3f,_
										byval color as wColor4s,_
										byval smootFactor as Int32,_
										byval spherical as Boolean,_
										byval maxLOD as Int32,_
										byval patchSize as wTerrainPatchSize) as wNode

declare sub wSphericalTerrainSetTextures(byval terrain as wNode, byval textureTop as wTexture, byval textureFront as wTexture, byval textureBack as wTexture, byval textureLeft as wTexture, byval textureRight as wTexture, byval textureBottom as wTexture, byval materialIndex as UInt32)

declare sub wSphericalTerrainLoadVertexColor(byval terrain as wNode, byval imageTop as wImage, byval imageFront as wImage, byval imageBack as wImage, byval imageLeft as wImage, byval imageRight as wImage, byval imageBottom as wImage)

declare function wSphericalTerrainGetSurfacePosition(byval terrain as wNode, byval face as Int32, byval logicalPos as wVector2f) as wVector3f

declare function wSphericalTerrainGetSurfaceAngle(byval terrain as wNode, byval face as Int32, byval logicalPos as wVector2f) as wVector3f

declare function wSphericalTerrainGetSurfaceLogicalPosition(byval terrain as wNode, byval position as wVector3f, byval face as Int32 ptr) as wVector2f

'///wTerrain///
declare function wTerrainCreate(byval cptrFile as const zstring ptr,_
								byval position as wVector3f=wVECTOR3f_ZERO,_
								byval rotation as wVector3f=wVECTOR3f_ZERO,_
								byval scale as wVector3f=wVECTOR3f_ONE,_
								byval color as wColor4s=wColor4s_WHITE,_
								byval smoothing as Int32=0,_
								byval maxLOD as Int32=5,_
								byval patchSize as wTerrainPatchSize=wTPS_17) as wNode

declare sub wTerrainScaleDetailTexture(byval terrain as wNode, byval scale as wVector2f)

declare function wTerrainGetHeight(byval terrain as wNode, byval positionXZ as wVector2f) as Float32

'///wTiledTerrain///
declare function wTiledTerrainCreate(byval image as wImage, byval tileSize as Int32, byval dataSize as wVector2i, byval position as wVector3f, byval rotation as wVector3f, byval scale as wVector3f, byval color as wColor4s, byval smoothing as Int32, byval maxLOD as Int32, byval patchSize as wTerrainPatchSize) as wNode

declare sub wTiledTerrainAddTile(byval terrain as wNode, byval neighbour as wNode, byval edge as wTiledTerrainEdge)

declare sub wTiledTerrainSetTileStructure(byval terrain as wNode, byval image as wImage, byval data as wVector2i)

declare sub wTiledTerrainSetTileColor(byval terrain as wNode, byval image as wImage, byval data as wVector2i)

'///wSoundBuffer
declare function wSoundBufferLoad(byval filePath as Const ZString ptr)as wSoundBuffer

declare function wSoundBufferLoadFromMemory(byval _data as Const zstring ptr,_
                                           byval length as Int32,_
                                           byval extension as const zstring ptr) as wSoundBuffer
                                           
declare sub wSoundBufferDestroy(byval buffer as wSoundBuffer)

'///wSound///
declare function wSoundLoad(byval filePath as const zstring ptr,_
						    byval stream as Boolean) as wSound

declare function wSoundLoadFromMemory(byval _name as const zstring ptr,_
									 byval _data as const zstring ptr,_
									 byval length as Int32,_
									 byval extension as const zstring ptr ) as wSound
									 
declare function wSoundLoadFromRaw(byval _name as const zstring ptr,_
									 byval _data as const zstring ptr,_
									 byval length as Int32,_
									 byval frequency as UInt32,_
									 byval _format as wAudioFormats) as wSound
									 
declare function wSoundCreateFromBuffer(byval buf as wSoundBuffer) as wSound

declare function wSoundIsPlaying(byval sound as wSound) as Boolean

declare function wSoundIsPaused(byval sound as wSound) as Boolean

declare function wSoundIsStopped(byval sound as wSound) as Boolean

declare sub wSoundSetVelocity(byval sound as wSound, byval velocity as wVector3f)

declare function wSoundGetVelocity(byval sound as wSound) as wVector3f

declare sub wSoundSetDirection(byval sound as wSound, byval direction as wVector3f)

declare function wSoundGetDirection(byval sound as wSound) as wVector3f

declare sub wSoundSetVolume(byval sound as wSound, byval value as Float32)

declare function wSoundGetVolume(byval sound as wSound) as Float32

declare sub wSoundSetMaxVolume(byval sound as wSound, byval value as Float32)

declare function wSoundGetMaxVolume(byval sound as wSound) as Float32

declare sub wSoundSetMinVolume(byval sound as wSound, byval value as Float32)

declare function wSoundGetMinVolume(byval sound as wSound) as Float32

declare sub wSoundSetPitch(byval sound as wSound, byval value as Float32)

declare function wSoundGetPitch(byval sound as wSound) as Float32

declare sub wSoundSetRollOffFactor(byval sound as wSound, byval value as Float32)

declare function wSoundGetRollOffFactor(byval sound as wSound) as Float32

declare sub wSoundSetStrength(byval sound as wSound, byval value as Float32)

declare function wSoundGetStrength(byval sound as wSound) as Float32

declare sub wSoundSetMinDistance(byval sound as wSound, byval value as Float32)

declare function wSoundGetMinDistance(byval sound as wSound) as Float32

declare sub wSoundSetMaxDistance(byval sound as wSound, byval Value as Float32)

declare function wSoundGetMaxDistance(byval sound as wSound) as Float32

declare sub wSoundSetInnerConeAngle(byval sound as wSound, byval Value as Float32)

declare function wSoundGetInnerConeAngle(byval sound as wSound) as Float32

declare sub wSoundSetOuterConeAngle(byval sound as wSound, byval Value as Float32)

declare function wSoundGetOuterConeAngle(byval sound as wSound) as Float32

declare sub wSoundSetOuterConeVolume(byval sound as wSound, byval Value as Float32)

declare function wSoundGetOuterConeVolume(byval sound as wSound) as Float32

declare sub wSoundSetDopplerStrength(byval sound as wSound, byval Value as Float32)

declare function wSoundGetDopplerStrength(byval sound as wSound) as Float32

declare sub wSoundSetDopplerVelocity(byval sound as wSound, byval velocity as wVector3f)

declare function wSoundGetDopplerVelocity(byval sound as wSound) as wVector3f

declare function wSoundCalculateGain(byval sound as wSound) as Float32

declare sub wSoundSetRelative(byval sound as wSound, byval value as Boolean)

declare function wSoundIsRelative(byval sound as wSound) as Boolean

declare function wSoundPlay(byval sound as wSound, byval loop as Boolean) as Boolean

declare sub wSoundStop(byval sound as wSound)

declare sub wSoundPause(byval sound as wSound)

declare sub wSoundSetLoopMode(byval sound as wSound, byval value as Boolean)

declare function wSoundIsLooping(byval sound as wSound) as Boolean

declare function wSoundIsValid(byval sound as wSound) as Boolean

declare function wSoundSeek(byval sound as wSound, byval seconds as Float32, byval relative as Boolean = false) as Boolean

declare sub wSoundUpdate(byval sound as wSound)

declare function wSoundGetTotalAudioTime(byval sound as wSound) as Float32

declare function wSoundGetTotalAudioSize(byval sound as wSound) as Int32

declare function wSoundGetCompressedAudioSize(byval sound as wSound) as Int32

declare function wSoundGetCurrentAudioTime(byval sound as wSound) as Float32

declare function wSoundGetCurrentAudioPosition(byval sound as wSound) as Int32

declare function wSoundGetCurrentCompressedAudioPosition(byval sound as wSound) as Int32

declare function wSoundGetNumEffectSlotsAvailable(byval sound as wSound) as UInt32

declare function wSoundAddEffect(byval sound as wSound, byval slot as UInt32, byval effect as wSoundEffect) as Boolean

declare sub wSoundRemoveEffect(byval sound as wSound, byval slot as UInt32)

declare function wSoundCreateEffect() as wSoundEffect

declare function wSoundIsEffectValid(byval effect as wSoundEffect) as Boolean

declare function wSoundIsEffectSupported(byval type as wSoundEffectType) as Boolean

declare function wSoundGetMaxEffectsSupported() as UInt32

declare sub wSoundSetEffectType(byval effect as wSoundEffect, byval type as wSoundEffectType)

declare function wSoundGetEffectType(byval effect as wSoundEffect) as wSoundEffectType

declare sub wSoundSetEffectAutowahParameters(byval effect as wSoundEffect, byval param as wAutowahParameters)

declare sub wSoundSetEffectChorusParameters(byval effect as wSoundEffect, byval param as wChorusParameters)

declare sub wSoundSetEffectCompressorParameters(byval effect as wSoundEffect, byval param as wCompressorParameters)

declare sub wSoundSetEffectDistortionParameters(byval effect as wSoundEffect, byval param as wDistortionParameters)

declare sub wSoundSetEffectEaxReverbParameters(byval effect as wSoundEffect, byval param as wEaxReverbParameters)

declare sub wSoundSetEffectEchoParameters(byval effect as wSoundEffect, byval param as wEchoParameters)

declare sub wSoundSetEffectEqualizerParameters(byval effect as wSoundEffect, byval param as wEqualizerParameters)

declare sub wSoundSetEffectFlangerParameters(byval effect as wSoundEffect, byval param as wFlangerParameters)

declare sub wSoundSetEffectFrequencyShiftParameters(byval effect as wSoundEffect, byval param as wFrequencyShiftParameters)

declare sub wSoundSetEffectPitchShifterParameters(byval effect as wSoundEffect, byval param as wPitchShifterParameters)

declare sub wSoundSetEffectReverbParameters(byval effect as wSoundEffect, byval param as wReverbParameters)

declare sub wSoundSetEffectRingModulatorParameters(byval effect as wSoundEffect, byval param as wRingModulatorParameters)

declare sub wSoundSetEffectVocalMorpherParameters(byval effect as wSoundEffect, byval param as wVocalMorpherParameters)

declare function wSoundCreateFilter() as wSoundFilter

declare function wSoundIsFilterValid(byval filter as wSoundFilter) as Boolean

declare function wSoundAddFilter(byval sound as wSound, byval filter as wSoundFilter) as Boolean

declare sub wSoundRemoveFilter(byval sound as wSound)

declare function wSoundIsFilterSupported(byval type as wSoundFilterType) as Boolean

declare sub wSoundSetFilterType(byval filter as wSoundFilter, byval type as wSoundFilterType)

declare function wSoundGetFilterType(byval filter as wSoundFilter) as wSoundFilterType

declare sub wSoundSetFilterVolume(byval filter as wSoundFilter, byval volume as Float32)

declare function wSoundGetFilterVolume(byval filter as wSoundFilter) as Float32

declare sub wSoundSetFilterHighFrequencyVolume(byval filter as wSoundFilter, byval volumeHF as Float32)

declare function wSoundGetFilterHighFrequencyVolume(byval filter as wSoundFilter) as Float32

declare sub wSoundSetFilterLowFrequencyVolume(byval filter as wSoundFilter, byval volumeLF as Float32)

declare function wSoundGetFilterLowFrequencyVolume(byval filter as wSoundFilter) as Float32

'///wVideo///
declare function wVideoLoad(byval fileName as const zstring ptr) as wVideo

declare sub wVideoPlay(byval player as wVideo)

declare function wVideoIsPlaying(byval player as wVideo) as Boolean

declare sub wVideoRewind(byval player as wVideo)

declare sub wVideoSetLoopMode(byval player as wVideo, byval looping as Boolean)

declare function wVideoIsLooping(byval player as wVideo) as Boolean

declare function wVideoCreateTargetImage(byval player as wVideo, byval position as wVector2i) as wGuiObject

declare function wVideoGetTargetTexture(byval player as wVideo) as wTexture

declare function wVideoGetSoundNode(byval player as wVideo) as wSound

declare sub wVideoUpdate(byval player as wVideo, byval timeMs as UInt32)

declare sub wVideoPause(byval player as wVideo)

declare function wVideoIsPaused(byval player as wVideo) as Boolean

declare function wVideoIsAtEnd(byval player as wVideo) as Boolean

declare function wVideoIsEmpty(byval player as wVideo) as Boolean

declare function wVideoGetFramePosition(byval player as wVideo) as Int64

declare function wVideoGetTimePosition(byval player as wVideo) as UInt32

declare function wVideoGetFrameSize(byval player as wVideo) as wVector2i

declare function wVideoGetQuality(byval player as wVideo) as Int32

declare sub wVideoDestroy(byval player as wVideo)

'///wDecal///
declare function wDecalCreateFromRay(byval texture as wTexture, byval startRay as wVector3f, byval endRay as wVector3f, byval dimension as Float32, byval textureRotation as Float32, byval lifeTime as Float32, byval visibleDistance as Float32) as wNode

declare function wDecalCreateFromPoint(byval texture as wTexture, byval position as wVector3f, byval normal as wVector3f, byval dimension as Float32, byval textureRotation as Float32, byval lifeTime as Float32, byval visibleDistance as Float32) as wNode

declare function wDecalGetLifeTime(byval node as wNode) as Float32

declare sub wDecalSetLifeTime(byval node as wNode, byval lifeTime as Float32)

declare function wDecalGetMaxVisibleDistance(byval node as wNode) as Float32

declare sub wDecalSetMaxVisibleDistance(byval node as wNode, byval distance as Float32)

declare sub wDecalSetFadeOutParams(byval node as wNode, byval isfadeOut as const Boolean, byval time as Float32)

declare sub wDecalsClear()

declare sub wDecalsDestroyAll()

declare sub wDecalsCombineAll()

declare function wDecalsGetCount() as Int32

'///wNetPacket///
declare function wNetPacketCreate(byval id as UInt64, byval inOrder as Boolean = true, byval reliable as Boolean = true, byval priority as UInt64 = 100) as wPacket

declare sub wNetPacketWriteUInt(byval msg as wPacket, byval value as UInt32)

declare sub wNetPacketWriteInt(byval msg as wPacket, byval value as Int32)

declare sub wNetPacketWriteFloat(byval msg as wPacket, byval value as Float32)

declare sub wNetPacketWriteString(byval msg as wPacket, byval newString as const zstring ptr)

declare function wNetPacketReadUint(byval numPacket as Int32) as UInt32

declare function wNetPacketReadInt(byval numPacket as Int32) as Int32

declare function wNetPacketReadFloat(byval numPacket as Int32) as Float32

declare function wNetPacketReadString(byval numPacket as Int32) as const zstring ptr

declare function wNetPacketReadMessage(byval numPacket as Int32) as const zstring ptr

declare function wNetPacketGetId(byval numPacket as Int32) as UInt64

declare function wNetPacketGetClientIp(byval numPacket as Int32) as const zstring ptr

declare function wNetPacketGetClientPtr(byval numPacket as Int32) as any ptr

declare function wNetPacketGetClientPort(byval numPacket as Int32) as UInt16

'///wNetManager///
declare sub wNetManagerSetVerbose(byval value as Boolean)

declare sub wNetManagerSetMessageId(byval newId as UInt64)

declare function wNetManagerGetMessageId() as UInt64

declare sub wNetManagerDestroyAllPackets()

declare function wNetManagerGetPacketsCount() as Int32

'///wNetServer///
declare function wNetServerCreate(byval port as UInt16, byval mode as Int32, byval maxClientsCount as Int32 = -1) as Boolean

declare sub wNetServerUpdate(byval sleepMs as Int32 = 100, byval countIteration as Int32 = 100, byval maxMSecsToWait as Int32 = -1)

declare sub wNetServerClear()

declare sub wNetServerSendPacket(byval destPtr as any ptr, byval msg as wPacket)

declare sub wNetServerBroadcastMessage(byval text as const zstring ptr)

declare sub wNetServerAcceptNewConnections(byval value as Boolean)

declare sub wNetServerStop(byval msTime as Int32 = 100)

declare function wNetServerGetClientsCount() as Int32

declare sub wNetServerKickClient(byval clientPtr as any ptr)

declare sub wNetServerUnKickClient(byval clientPtr as any ptr)

declare sub wNetServerClearBannedList()

'///wNetClient//
declare function wNetClientCreate(byval address as const zstring ptr, byval port as UInt16, byval mode as Int32, byval maxMSecsToWait as Int32 = 500) as Boolean

declare sub wNetClientUpdate(byval maxMessagesToProcess as Int32 = 100, byval countIteration as Int32 = 100, byval maxMSecsToWait as Int32 = -1)

declare sub wNetClientDisconnect(byval maxMSecsToWait as Int32 = 500)

declare sub wNetClientStop(byval maxMSecsToWait as Int32 = 500)

declare function wNetClientIsConnected() as Boolean

declare sub wNetClientSendMessage(byval text as const zstring ptr)

declare sub wNetClientSendPacket(byval msg as wPacket)

'///wPhys///
declare function wPhysStart() as Boolean

declare sub wPhysUpdate(byval timeStep as Float32)

declare sub wPhysStop()

declare sub wPhysSetGravity(byval gravity as wVector3f)

declare sub wPhysSetWorldSize(byval sizeMin as wVector3f,_
								byval sizeMax as wVector3f)

declare sub wPhysSetSolverModel(byval model as wPhysSolverModel )
	
declare sub wPhysSetFrictionModel(byval model as wPhysFrictionModel)

declare sub wPhysDestroyAllBodies()

declare sub wPhysDestroyAllJoints()

declare function wPhysGetBodiesCount() as Int32

declare function wPhysGetJointsCount() as Int32

declare function wPhysGetBodyPicked(byval position as wVector2i, byval mouseLeftKey as Boolean) as wNode

declare function wPhysGetBodyFromRay(byval start as wVector3f, byval end as wVector3f) as wNode

declare function wPhysGetBodyFromScreenCoords(byval position as wVector2i) as wNode

declare function wPhysGetBodyByName(byval name as const zstring ptr) as wNode

declare function wPhysGetBodyById(byval Id as Int32) as wNode

declare function wPhysGetBodyByIndex(byval idx as Int32)as wNode

declare function wPhysGetJointByName(byval name as const zstring ptr) as wNode

declare function wPhysGetJointById(byval Id as Int32) as wNode

declare function wPhysGetJointByIndex(byval idx as Int32)as wNode

'///wPhysBody///
declare function wPhysBodyCreateNull() as wNode

declare function wPhysBodyCreateCube(byval size as wVector3f, byval Mass as Float32) as wNode

declare function wPhysBodyCreateSphere(byval radius as wVector3f, byval Mass as Float32) as wNode

declare function wPhysBodyCreateCone(byval radius as Float32, byval height as Float32, byval mass as Float32, byval Offset as Boolean) as wNode

declare function wPhysBodyCreateCylinder(byval radius as Float32, byval height as Float32, byval mass as Float32, byval Offset as Boolean) as wNode

declare function wPhysBodyCreateCapsule(byval radius as Float32, byval height as Float32, byval mass as Float32, byval Offset as Boolean = false) as wNode

declare function wPhysBodyCreateHull(byval mesh as wNode, byval mass as Float32) as wNode

declare function wPhysBodyCreateTree(byval mesh as wNode) as wNode

declare function wPhysBodyCreateTreeBsp(byval mesh as wMesh, byval node as wNode) as wNode

declare function wPhysBodyCreateTerrain(byval mesh as wNode, byval LOD as Int32) as wNode

declare function wPhysBodyCreateHeightField(byval mesh as wNode) as wNode

declare function wPhysBodyCreateWaterSurface(byval size as wVector3f, byval FluidDensity as Float32, byval LinearViscosity as Float32, byval AngulaViscosity as Float32) as wNode

declare function wPhysBodyCreateCompound(byval nodes as wNode ptr, byval CountNodes as Int32, byval mass as Float32) as wNode

declare sub wPhysBodySetName(byval body as wNode, byval name as const zstring ptr)

declare function wPhysBodyGetName(byval body as wNode) as const zstring ptr

declare sub wPhysBodySetFreeze(byval body as wNode, byval freeze as Boolean)

declare function wPhysBodyIsFreeze(byval body as wNode) as Boolean

declare sub wPhysBodySetMaterial(byval body as wNode, byval MatId as Int32)

declare function wPhysBodyGetMaterial(byval body as wNode) as Int32

declare sub wPhysBodySetGravity(byval body as wNode, byval gravity as wVector3f)

declare function wPhysBodyGetGravity(byval body as wNode) as wVector3f

declare sub wPhysBodySetMass(byval body as wNode, byval NewMass as Float32)

declare function wPhysBodyGetMass(byval body as wNode) as Float32

declare sub wPhysBodySetCenterOfMass(byval body as wNode, byval center as wVector3f)

declare function wPhysBodyGetCenterOfMass(byval body as wNode) as wVector3f

declare sub wPhysBodySetMomentOfInertia(byval body as wNode, byval value as wVector3f)

declare function wPhysBodyGetMomentOfInertia(byval body as wNode) as wVector3f

declare sub wPhysBodySetAutoSleep(byval body as wNode, byval value as Boolean)

declare function wPhysBodyIsAutoSleep(byval body as wNode) as Boolean

declare sub wPhysBodySetLinearVelocity(byval body as wNode, byval velocity as wVector3f)

declare function wPhysBodyGetLinearVelocity(byval body as wNode) as wVector3f

declare sub wPhysBodySetAngularVelocity(byval body as wNode, byval velocity as wVector3f)

declare function wPhysBodyGetAngularVelocity(byval body as wNode) as wVector3f

declare sub wPhysBodySetLinearDamping(byval body as wNode, byval linearDamp as Float32)

declare function wPhysBodyGetLinearDamping(byval body as wNode) as Float32

declare sub wPhysBodySetAngularDamping(byval body as wNode, byval damping as wVector3f)

declare function wPhysBodyGetAngularDamping(byval body as wNode) as wVector3f

declare sub wPhysBodyAddImpulse(byval body as wNode, byval velosity as wVector3f, byval position as wVector3f)

declare sub wPhysBodyAddForce(byval body as wNode, byval force as wVector3f)

declare sub wPhysBodyAddTorque(byval body as wNode, byval torque as wVector3f)

declare function wPhysBodiesIsCollide(byval body1 as wNode, byval body2 as wNode) as Boolean

declare function wPhysBodiesGetCollisionPoint(byval body1 as wNode, byval body2 as wNode) as wVector3f

declare function wPhysBodiesGetCollisionNormal(byval body1 as wNode, byval body2 as wNode) as wVector3f

declare sub wPhysBodyDraw(byval body as wNode)

'///wPhysJoint///
declare function wPhysJointCreateBall(byval position as wVector3f, byval pinDir as wVector3f, byval body1 as wNode, byval body2 as wNode) as wNode

declare function wPhysJointCreateHinge(byval position as wVector3f, byval pinDir as wVector3f, byval body1 as wNode, byval body2 as wNode) as wNode

declare function wPhysJointCreateSlider(byval position as wVector3f, byval pinDir as wVector3f, byval body1 as wNode, byval body2 as wNode) as wNode

declare function wPhysJointCreateCorkScrew(byval position as wVector3f, byval pinDir as wVector3f, byval body1 as wNode, byval body2 as wNode) as wNode

declare function wPhysJointCreateUpVector(byval position as wVector3f, byval body as wNode) as wNode

declare sub wPhysJointSetName(byval joint as wNode, byval name as const zstring ptr)

declare function wPhysJointGetName(byval joint as wNode) as const zstring ptr

declare sub wPhysJointSetCollisionState(byval joint as wNode, byval isCollision as Boolean)

declare function wPhysJointIsCollision(byval Joint as wNode) as Boolean

declare sub wPhysJointSetBallLimits(byval joint as wNode, byval MaxConeAngle as Float32, byval twistAngles as wVector2f)

declare sub wPhysJointSetHingeLimits(byval joint as wNode, byval anglesLimits as wVector2f)

declare sub wPhysJointSetSliderLimits(byval joint as wNode, byval anglesLimits as wVector2f)

declare sub wPhysJointSetCorkScrewLinearLimits(byval joint as wNode, byval distLimits as wVector2f)

declare sub wPhysJointSetCorkScrewAngularLimits(byval joint as wNode, byval distLimits as wVector2f)

'///wPhysPlayerController///
declare function wPhysPlayerControllerCreate(byval position as wVector3f, byval body as wNode, byval maxStairStepFactor as Float32, byval cushion as Float32) as wNode

declare sub wPhysPlayerControllerSetVelocity(byval joint as wNode, byval forwardSpeed as Float32, byval sideSpeed as Float32, byval heading as Float32)

'///wPhysVehicle
declare function wPhysVehicleCreate(byval tiresCount as Int32,_
									byval rayCastType as wPhysVehicleType,_
									byval CarBody as wNode) as wNode

declare function wPhysVehicleAddTire(byval Car as wNode,_
									byval UserData as wNode,_
									byval tireType as wPhysVehicleTireType,_
									byval position as wVector3f,_
									byval Mass as Float32,_
									byval Radius as Float32,_
									byval Width as Float32,_
									byval SLenght as Float32,_
									byval SConst as Float32,_
									byval SDamper as Float32)as Int32

declare function wPhysVehicleGetSpeed(byval Car as wNode) as Float32

declare function wPhysVehicleGetTiresCount(byval Car as wNode)as Int32

declare sub wPhysVehicleSetBrake(byval Car as wNode,_
								byval value as Boolean)

declare function wPhysVehicleIsBrake(byval Car as wNode) as Boolean

declare function wPhysVehicleIsAllTiresCollided(byval Car as wNode)as Boolean

declare sub wPhysVehicleSetSteering(byval Car as wNode,_
									byval angle as Float32)' -1.......+1

declare function wPhysVehicleGetSteering(byval Car as wNode) as Float32 '/// return value: -1......+1

declare function wPhysVehicleGetBody(byval Car as wNode) as wNode

declare sub wPhysVehicleSetMotorValue(byval Car as wNode,_
									byval value as Float32) '-1....+1

declare function wPhysVehicleGetMotorValue(byval Car as wNode) as Float32

'///Vehicle Tires
declare sub wPhysVehicleSetTireMaxSteerAngle(byval Car as wNode,_
											byval tireIndex as Int32,_
											byval angleDeg as Float32)

declare function wPhysVehicleGetTireMaxSteerAngle(byval Car as wNode,_
												byval tireIndex as Int32) as Float32
												
declare function wPhysVehicleGetTireLocalPosition(byval Car as wNode,_
												byval tireIndex as Int32) as wVector3f

declare function wPhysVehicleGetTireUpDownPosition(byval Car as wNode,_
												byval tireIndex as Int32)as Float32


declare function wPhysVehicleGetTireAngularVelocity(byval Car as wNode,_
													byval tireIndex as Int32) as Float32

declare function wPhysVehicleGetTireSpeed(byval Car as wNode,_
										byval tireIndex as Int32) as Float32

declare function wPhysVehicleGetTireContactPoint(byval Car as wNode,_
												byval tireIndex as int32) as wVector3f

declare function wPhysVehicleGetTireContactNormal(byval Car as wNode,_
												byval tireIndex as Int32) as wVector3f

declare function wPhysVehicleIsTireBrake(byval Car as wNode,_
										byval tireIndex as Int32) as Boolean

declare function wPhysVehicleGetTireType(byval Car as wNode,_
                                         byval tireIndex as Int32) as wPhysVehicleTireType

declare sub wPhysVehicleSetTireType(byval Car as wNode,_
									byval tireIndex as Int32,_
									byval tireType as wPhysVehicleTireType)

declare sub wPhysVehicleSetTireBrakeForce(byval Car as wNode,_
										byval tireIndex as Int32,_
										byval value as Float32)

declare function wPhysVehicleGetTireBrakeForce(byval Car as wNode,_
												byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireBrakeLateralFriction(byval Car as wNode,_
													byval tireIndex as Int32,_
													byval value as Float32)

declare function wPhysVehicleGetTireBrakeLateralFriction(byval Car as wNode,_
														byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireBrakeLongitudinalFriction(byval Car as wNode,_
														byval tireIndex as Int32,_
														byval value as Float32)

declare function wPhysVehicleGetTireBrakeLongitudinalFriction(byval Car as wNode,_
															 byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireLateralFriction(byval Car as wNode,_
												byval tireIndex as Int32,_
												byval value as Float32)

declare function wPhysVehicleGetTireLateralFriction(byval Car as wNode,_
													byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireLongitudinalFriction(byval Car as wNode,_
													byval tireIndex as Int32,_
													byval value as Float32)

declare function wPhysVehicleGetTireLongitudinalFriction(byval Car as wNode,_
														byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireMass(byval Car as wNode,_
									byval tireIndex as Int32,_
									byval mass as Float32)

declare function wPhysVehicleGetTireMass(byval Car as wNode,_
										byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireRadius(byval Car as wNode,_
									byval tireIndex as Int32,_
									byval radius as Float32)

declare function wPhysVehicleGetTireRadius(byval Car as wNode,_
											byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireWidth(byval Car as wNode,_
									byval tireIndex as Int32,_
									byval width as Float32)

declare function wPhysVehicleGetTireWidth(byval Car as wNode,_
										byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireSpringConst(byval Car as wNode,_
											byval tireIndex as Int32,_
											byval value as Float32)

declare function wPhysVehicleGetTireSpringConst(byval Car as wNode,_
												byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireSpringDamper(byval Car as wNode,_
											byval tireIndex as Int32,_
											byval value as Float32)

declare function wPhysVehicleGetTireSpringDamper(byval Car as wNode,_
												byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireSuspensionLenght(byval Car as wNode,_
												byval tireIndex as Int32,_
												byval value as Float32)

declare function wPhysVehicleGetTireSuspensionLenght(byval Car as wNode,_
													byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireUserData(byval Car as wNode,_
										byval tireIndex as Int32,_
										byval userData as wNode)

declare function wPhysVehicleGetTireUserData(byval Car as wNode,_
											byval tireIndex as Int32) as wNode

declare sub wPhysVehicleSetTireMotorForce(byval Car as wNode,_
										byval tireIndex as Int32,_
										byval value as Float32)

declare function wPhysVehicleGetTireMotorForce(byval Car as wNode,_
												byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireTurnForceHelper(byval Car as wNode,_
												byval tireIndex as Int32,_
												byval value as Float32)

declare function wPhysVehicleGetTireTurnForceHelper(byval Car as wNode,_
													byval tireIndex as Int32) as Float32
													
declare sub wPhysVehicleSetTireSpinTorqueFactor(byval Car as wNode,_
												byval tireIndex as Int32,_
												byval value as Float32)

declare function wPhysVehicleGetTireSpinTorqueFactor(byval Car as wNode,_
													byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireTorquePosition(byval Car as wNode,_
											byval tireIndex as Int32,_
											byval position as wVector3f)

declare function wPhysVehicleGetTireTorquePosition(byval Car as wNode,_
													byval tireIndex as Int32) as wVector3f

declare function wPhysVehicleGetTireLoad(byval Car as wNode,_
										byval tireIndex as Int32) as Float32

declare sub wPhysVehicleSetTireSpinForce(byval Car as wNode,_
										byval tireIndex as Int32,_
										byval value as Float32)

declare function wPhysVehicleGetTireSpinForce(byval Car as wNode,_
											byval tireIndex as Int32) as Float32

'///wPhysMaterial///
declare function wPhysMaterialCreate() as Int32

declare sub wPhysMaterialSetElasticity(byval matId1 as Int32, byval matId2 as Int32, byval Elasticity as Float32)

declare sub wPhysMaterialSetFriction(byval matId1 as Int32, byval matId2 as Int32, byval StaticFriction as Float32, byval KineticFriction as Float32)

declare sub wPhysMaterialSetContactSound(byval matId1 as Int32, byval matId2 as Int32, byval soundNode as wSound)

declare sub wPhysMaterialSetSoftness(byval matId1 as Int32, byval matId2 as Int32, byval Softness as Float32)

declare sub wPhysMaterialSetCollidable(byval matId1 as Int32, byval matId2 as Int32, byval isCollidable as Boolean)

'///wGui///
declare sub wGuiDrawAll()

declare sub wGuiDestroyAll()

declare function wGuiIsEventAvailable() as Boolean

declare function wGuiReadEvent() as wGuiEvent ptr

declare function wGuiLoad(byval fileName as const zstring ptr, byval start as wGuiObject = 0) as Boolean

declare function wGuiSave(byval fileName as const zstring ptr, byval start as wGuiObject = 0) as Boolean

declare function wGuiGetSkin() as wGuiObject

declare sub wGuiSetSkin(byval skin as wGuiObject)

Declare Function wGuiGetLastSelectedFile()As Const WString ptr

declare function wGuiGetLastSelectedDirectory() as Const ZString ptr

declare function wGuiGetObjectFocused() as wGuiObject

declare function wGuiGetObjectHovered() as wGuiObject

declare function wGuiGetRootNode() as wGuiObject

declare function wGuiGetObjectById(byval id as Int32, byval searchchildren as Boolean) as wGuiObject

declare function wGuiGetObjectByName(byval name as const zstring ptr, byval searchchildren as Boolean) as wGuiObject

'///wGuiObject///
declare sub wGuiObjectDestroy(byval element as wGuiObject)

declare sub wGuiObjectSetParent(byval element as wGuiObject, byval parent as wGuiObject)

declare function wGuiObjectGetParent(byval element as wGuiObject) as wGuiObject

declare sub wGuiObjectSetRelativePosition(byval element as wGuiObject, byval position as wVector2i)

declare sub wGuiObjectSetRelativeSize(byval element as wGuiObject, byval size as wVector2i)

declare function wGuiObjectGetRelativePosition(byval element as wGuiObject) as wVector2i

declare function wGuiObjectGetRelativeSize(byval element as wGuiObject) as wVector2i

declare function wGuiObjectGetAbsolutePosition(byval element as wGuiObject) as wVector2i

declare function wGuiObjectGetAbsoluteClippedPosition(byval element as wGuiObject) as wVector2i

declare function wGuiObjectGetAbsoluteClippedSize(byval element as wGuiObject) as wVector2i

declare sub wGuiObjectSetClippingMode(byval element as wGuiObject, byval value as Boolean)

declare function wGuiObjectIsClipped(byval element as wGuiObject) as Boolean

declare sub wGuiObjectSetMaxSize(byval element as wGuiObject, byval size as wVector2i)

declare sub wGuiObjectSetMinSize(byval element as wGuiObject, byval size as wVector2i)

declare sub wGuiObjectSetAlignment(byval element as wGuiObject, byval left as wGuiAlignment, byval right as wGuiAlignment, byval top as wGuiAlignment, byval bottom as wGuiAlignment)

declare sub wGuiObjectUpdateAbsolutePosition(byval element as wGuiObject)

declare function wGuiObjectGetFromScreenPos(byval element as wGuiObject, byval position as wVector2i) as wGuiObject

declare function wGuiObjectIsPointInside(byval element as wGuiObject, byval position as wVector2i) as Boolean

declare sub wGuiObjectDestroyChild(byval element as wGuiObject, byval child as wGuiObject)

declare sub wGuiObjectDraw(byval element as wGuiObject)

declare sub wGuiObjectMoveTo(byval element as wGuiObject, byval position as wVector2i)

declare sub wGuiObjectSetVisible(byval element as wGuiObject, byval value as Boolean)

declare function wGuiObjectIsVisible(byval element as wGuiObject) as Boolean

declare sub wGuiObjectSetSubObject(byval element as wGuiObject, byval value as Boolean)

declare function wGuiObjectIsSubObject(byval element as wGuiObject) as Boolean

declare sub wGuiObjectSetTabStop(byval element as wGuiObject, byval value as Boolean)

declare function wGuiObjectIsTabStop(byval element as wGuiObject) as Boolean

declare sub wGuiObjectSetTabOrder(byval element as wGuiObject, byval index as Int32)

declare function wGuiObjectGetTabOrder(byval element as wGuiObject) as Int32

declare sub wGuiObjectSetTabGroup(byval element as wGuiObject, byval value as Boolean)

declare function wGuiObjectIsTabGroup(byval element as wGuiObject) as Boolean

declare sub wGuiObjectSetEnable(byval element as wGuiObject, byval value as Boolean)

declare function wGuiObjectIsEnabled(byval element as wGuiObject) as Boolean

declare sub wGuiObjectSetText(byval element as wGuiObject, byval text as const wstring ptr)

declare function wGuiObjectGetText(byval element as wGuiObject) as const wstring ptr

declare sub wGuiObjectSetToolTipText(byval element as wGuiObject, byval text as const wstring ptr)

declare function wGuiObjectGetToolTipText(byval element as wGuiObject) as const wstring ptr

declare sub wGuiObjectSetId(byval element as wGuiObject, byval id as Int32)

declare function wGuiObjectGetId(byval element as wGuiObject) as Int32

declare sub wGuiObjectSetName(byval element as wGuiObject, byval name as const zstring ptr)

declare function wGuiObjectIsHovered(byval el as wGuiObject) as Boolean

declare function wGuiObjectGetName(byval element as wGuiObject) as const zstring ptr

declare function wGuiObjectGetChildById(byval element as wGuiObject, byval id as Int32, byval searchchildren as Boolean) as wGuiObject

declare function wGuiObjectGetChildByName(byval element as wGuiObject, byval name as const zstring ptr, byval searchchildren as Boolean) as wGuiObject

declare function wGuiObjectIsChildOf(byval element as wGuiObject, byval child as wGuiObject) as Boolean

declare function wGuiObjectBringToFront(byval element as wGuiObject, byval subElement as wGuiObject) as Boolean

declare function wGuiObjectGetType(byval element as wGuiObject) as wGuiElementType

declare function wGuiObjectGetTypeName(byval element as wGuiObject) as const zstring ptr

declare function wGuiObjectHasType(byval element as wGuiObject, byval type as wGuiElementType) as Boolean

declare function wGuiObjectSetFocus(byval element as wGuiObject) as Boolean

declare function wGuiObjectRemoveFocus(byval element as wGuiObject) as Boolean

declare function wGuiObjectIsFocused(byval element as wGuiObject) as Boolean

declare sub wGuiObjectReadFromXml(byval node as wGuiObject, byval reader as wXmlReader)

declare sub wGuiObjectWriteToXml(byval node as wGuiObject, byval writer as wXmlWriter)
 
'///wGuiSkin///
declare function wGuiSkinCreate(byval type as wGuiSkinSpace) as wGuiObject

declare function wGuiSkinGetColor(byval skin as wGuiObject, byval elementType as wGuiDefaultColor) as wColor4s

declare sub wGuiSkinSetColor(byval skin as wGuiObject, byval elementType as wGuiDefaultColor, byval color as wColor4s)

declare sub wGuiSkinSetSize(byval skin as wGuiObject, byval sizeType as wGuiDefaultSize, byval newSize as Int32)

declare function wGuiSkinGetSize(byval skin as wGuiObject, byval sizeType as wGuiDefaultSize) as Int32

declare function wGuiSkinGetDefaultText(byval skin as wGuiObject, byval txt as wGuiDefaultText) as const wstring ptr

declare sub wGuiSkinSetDefaultText(byval skin as wGuiObject, byval txt as wGuiDefaultText, byval newText as const wstring ptr)

declare sub wGuiSkinSetFont(byval skin as wGuiObject, byval font as wFont, byval fntType as wGuiDefaultFont = wGDF_DEFAULT)

declare function wGuiSkinGetFont(byval skin as wGuiObject, byval fntType as wGuiDefaultFont = wGDF_DEFAULT) as wFont

declare sub wGuiSkinSetSpriteBank(byval skin as wGuiObject, byval bank as wGuiObject)

declare function wGuiSkinGetSpriteBank(byval skin as wGuiObject) as wGuiObject

declare sub wGuiSkinSetIcon(byval skin as wGuiObject, byval icn as wGuiDefaultIcon, byval index as UInt32)

declare function wGuiSkinGetIcon(byval skin as wGuiObject, byval icn as wGuiDefaultIcon) as UInt32

declare function wGuiSkinGetType(byval skin as wGuiObject) as wGuiSkinSpace

'///wGuiWindow///
declare function wGuiWindowCreate(byval wcptrTitle as const wstring ptr, byval minPos as wVector2i, byval maxPos as wVector2i, byval modal as Boolean) as wGuiObject

declare function wGuiWindowGetButtonClose(byval win as wGuiObject) as wGuiObject

declare function wGuiWindowGetButtonMinimize(byval win as wGuiObject) as wGuiObject

declare function wGuiWindowGetButtonMaximize(byval win as wGuiObject) as wGuiObject

declare sub wGuiWindowSetDraggable(byval win as wGuiObject, byval value as Boolean)

declare function wGuiWindowIsDraggable(byval win as wGuiObject) as Boolean

declare function wGuiWindowIsDrawBackground(byval win as wGuiObject) as Boolean

declare sub wGuiWindowSetDrawTitleBar(byval win as wGuiObject, byval value as Boolean)

declare function wGuiWindowIsDrawTitleBar(byval win as wGuiObject) as Boolean

declare sub wGuiWindowSetDrawBackground(byval win as wGuiObject,_
	                                    byval value as Boolean)
                                           
'///wGuiLabel///
declare function wGuiLabelCreate(byval wcptrText as const wstring ptr,_
								byval minPos as wVector2i,_
								byval maxPos as wVector2i,_
								byval boBorder as Boolean = false,_
								byval boWordWrap as Boolean = true) as wGuiObject

declare function wGuiLabelGetTextSize(byval txt as wGuiObject) as wVector2i

declare sub wGuiLabelSetOverrideFont(byval txt as wGuiObject,_
                                     byval font as wFont)
                                         
declare function wGuiLabelGetOverrideFont(byval txt as wGuiObject)as wFont

declare function wGuiLabelGetActiveFont(byval txt as wGuiObject) as wFont

declare sub wGuiLabelEnableOverrideColor(byval txt as wGuiObject,_
                                         byval value as Boolean)

declare function wGuiLabelIsOverrideColor(byval txt as wGuiObject)as Boolean

declare sub wGuiLabelSetOverrideColor(byval txt as wGuiObject,_
                                      byval _color as wColor4s )

declare function wGuiLabelGetOverrideColor(byval txt as wGuiObject)as wColor4s

declare sub wGuiLabelSetDrawBackground(byval txt as wGuiObject,_
                                       byval value as Boolean)
                                           
declare function wGuiLabelIsDrawBackGround(byval txt as wGuiObject) as Boolean                                        

declare sub wGuiLabelSetDrawBorder(byval txt as wGuiObject,_
                                   byval value as Boolean)

declare function wGuiLabelIsDrawBorder(byval txt as wGuiObject)as Boolean                                     
                                       
declare sub wGuiLabelSetTextAlignment(byval txt as wGuiObject,_
                                      byval Horizontalvalue as wGuiAlignment,_
                                      byval Verticalvalue as wGuiAlignment)
                                          
declare sub wGuiLabelSetWordWrap(byval txt as wGuiObject,_
                                 byval value as Boolean)
  
declare function wGuiLabelIsWordWrap(byval txt as wGuiObject)as Boolean
 
declare sub wGuiLabelSetBackgroundColor(byval txt as wGuiObject,_
                                        byval color1 as wColor4s)
                                             
declare function wGuiLabelGetBackgroundColor(byval txt as wGuiObject) as wColor4s

'///wGuiButton///
declare function wGuiButtonCreate(byval minPos as wVector2i, byval maxPos as wVector2i, byval wcptrLabel as const wstring ptr, byval wcptrTip as const wstring ptr) as wGuiObject

declare sub wGuiButtonSetImage(byval btn as wGuiObject, byval img as wTexture)

declare sub wGuiButtonSetImageFromRect(byval btn as wGuiObject, byval img as wTexture, byval minRect as wVector2i ptr, byval maxRect as wVector2i ptr)

declare sub wGuiButtonSetPressedImage(byval btn as wGuiObject, byval img as wTexture)

declare sub wGuiButtonSetPressedImageFromRect(byval btn as wGuiObject, byval img as wTexture, byval minRect as wVector2i ptr, byval maxRect as wVector2i ptr)

declare sub wGuiButtonSetSpriteBank(byval btn as wGuiObject, byval bank as wGuiObject)

declare sub wGuiButtonSetSprite(byval btn as wGuiObject, byval state as wGuiButtonState, byval index as Int32, byval color as wColor4s, byval loop as Boolean)

declare sub wGuiButtonSetPush(byval btn as wGuiObject, byval value as Boolean)

declare function wGuiButtonIsPushed(byval btn as wGuiObject) as Boolean

declare sub wGuiButtonSetPressed(byval btn as wGuiObject, byval value as Boolean)

declare function wGuiButtonIsPressed(byval btn as wGuiObject) as Boolean

declare sub wGuiButtonUseAlphaChannel(byval btn as wGuiObject, byval value as Boolean)

declare function wGuiButtonIsUsedAlphaChannel(byval btn as wGuiObject) as Boolean

declare sub wGuiButtonEnableScaleImage(byval btn as wGuiObject, byval value as Boolean)

declare function wGuiButtonIsScaledImage(byval btn as wGuiObject) as Boolean

declare sub wGuiButtonSetOverrideFont(byval btn as wGuiObject,_
                                      byval font as wFont)
                                         
declare function wGuiButtonGetOverrideFont(byval btn as wGuiObject) as wFont

declare function wGuiButtonGetActiveFont(byval btn as wGuiObject)as wFont

declare sub wGuiButtonSetDrawBorder(byval btn as wGuiObject,_
                                    byval value as Boolean)
                                       
declare function wGuiButtonIsDrawBorder(byval btn as wGuiObject)as Boolean

'///wGuiButtonGroup///
declare function wGuiButtonGroupCreate(byval minPos as wVector2i, byval maxPos as wVector2i) as wGuiObject

declare function wGuiButtonGroupAddButton(byval group as wGuiObject, byval button as wGuiObject) as Int32

declare function wGuiButtonGroupInsertButton(byval group as wGuiObject, byval button as wGuiObject, byval index as UInt32) as Int32

declare function wGuiButtonGroupGetButton(byval group as wGuiObject, byval index as UInt32) as wGuiObject

declare function wGuiButtonGroupRemoveButton(byval group as wGuiObject, byval index as UInt32) as Boolean

declare sub wGuiButtonGroupRemoveAll(byval group as wGuiObject)

declare function wGuiButtonGroupGetSize(byval group as wGuiObject) as UInt32

declare function wGuiButtonGroupGetSelectedIndex(byval group as wGuiObject) as Int32

declare sub wGuiButtonGroupSetSelectedIndex(byval group as wGuiObject, byval index as Int32)

declare sub wGuiButtonGroupClearSelection(byval group as wGuiObject)

declare sub wGuiButtonGroupSetBackgroundColor(byval group as wGuiObject,_
                                              byval color1 as wColor4s) 
 
declare sub wGuiButtonGroupDrawBackground(byval group as  wGuiObject,_
											byval value as Boolean)                                           
'///wGuiListBox///
declare function wGuiListBoxCreate(byval minPos as wVector2i, byval maxPos as wVector2i, byval background as Boolean) as wGuiObject

declare function wGuiListBoxGetItemsCount(byval lbox as wGuiObject) as UInt32

declare function wGuiListBoxGetItemByIndex(byval lbox as wGuiObject, byval id as UInt32) as const wstring ptr

declare function wGuiListBoxAddItem(byval lbox as wGuiObject, byval text as const wstring ptr) as UInt32

declare function wGuiListBoxAddItemWithIcon(byval lbox as wGuiObject, byval text as const wstring ptr, byval icon as Int32) as UInt32

declare sub wGuiListBoxRemoveItem(byval lbox as wGuiObject, byval index as UInt32)

declare sub wGuiListBoxRemoveAll(byval lbox as wGuiObject)

declare sub wGuiListBoxSetItem(byval lbox as wGuiObject, byval index as UInt32, byval text as const wstring ptr, byval icon as Int32)

declare sub wGuiListBoxInsertItem(byval lbox as wGuiObject, byval index as UInt32, byval text as const wstring ptr, byval icon as Int32)

declare function wGuiListBoxGetItemIcon(byval lbox as wGuiObject, byval index as UInt32) as Int32

declare function wGuiListBoxGetSelectedIndex(byval lbox as wGuiObject) as Int32

declare sub wGuiListBoxSelectItemByIndex(byval lbox as wGuiObject, byval index as UInt32)

declare sub wGuiListBoxSelectItemByText(byval lbox as wGuiObject, byval item as const wstring ptr)

declare sub wGuiListBoxSwapItems(byval lbox as wGuiObject, byval index1 as UInt32, byval index2 as UInt32)

declare sub wGuiListBoxSetItemsHeight(byval lbox as wGuiObject, byval height as Int32)

declare sub wGuiListBoxSetAutoScrolling(byval lbox as wGuiObject, byval scroll as Boolean)

declare function wGuiListBoxIsAutoScrolling(byval lbox as wGuiObject) as Boolean

declare sub wGuiListBoxSetItemColor(byval lbox as wGuiObject, byval index as UInt32, byval color as wColor4s)

declare sub wGuiListBoxSetElementColor(byval lbox as wGuiObject, byval index as UInt32, byval colorType as wGuiListboxColor, byval color as wColor4s)

declare sub wGuiListBoxClearItemColor(byval lbox as wGuiObject, byval index as UInt32)

declare sub wGuiListBoxClearElementColor(byval lbox as wGuiObject, byval index as UInt32, byval colorType as wGuiListboxColor)

declare function wGuiListBoxGetElementColor(byval lbox as wGuiObject, byval index as UInt32, byval colorType as wGuiListboxColor) as wColor4s

declare function wGuiListBoxHasElementColor(byval lbox as wGuiObject, byval index as UInt32, byval colorType as wGuiListboxColor) as Boolean

declare function wGuiListBoxGetDefaultColor(byval lbox as wGuiObject, byval colorType as wGuiListboxColor) as wColor4s

declare sub wGuiListBoxSetDrawBackground(byval lbox as wGuiObject,_
										byval value as Boolean)

'///wGuiScrollBar///
declare function wGuiScrollBarCreate(byval Horizontal as Boolean, byval minPos as wVector2i, byval maxPos as wVector2i) as wGuiObject

declare sub wGuiScrollBarSetMaxValue(byval scroll as wGuiObject, byval max as Int32)

declare function wGuiScrollBarGetMaxValue(byval scroll as wGuiObject) as Int32

declare sub wGuiScrollBarSetMinValue(byval scroll as wGuiObject, byval min as Int32)

declare function wGuiScrollBarGetMinValue(byval scroll as wGuiObject) as Int32

declare sub wGuiScrollBarSetValue(byval scroll as wGuiObject, byval value as Int32)

declare function wGuiScrollBarGetValue(byval scroll as wGuiObject) as Int32

declare sub wGuiScrollBarSetSmallStep(byval scroll as wGuiObject, byval step as Int32)

declare function wGuiScrollBarGetSmallStep(byval scroll as wGuiObject) as Int32

declare sub wGuiScrollBarSetLargeStep(byval scroll as wGuiObject, byval step as Int32)

declare function wGuiScrollBarGetLargeStep(byval scroll as wGuiObject) as Int32

'///wGuiEditBox///
declare function wGuiEditBoxCreate(byval wcptrText as const wstring ptr, byval minPos as wVector2i, byval maxPos as wVector2i) as wGuiObject

declare sub wGuiEditBoxSetMultiLine(byval box as wGuiObject, byval value as Boolean)

declare function wGuiEditBoxIsMultiLine(byval box as wGuiObject) as Boolean

declare sub wGuiEditBoxSetAutoScrolling(byval box as wGuiObject, byval value as Boolean)

declare function wGuiEditBoxIsAutoScrolling(byval box as wGuiObject) as Boolean

declare sub wGuiEditBoxSetPasswordMode(byval box as wGuiObject, byval value as Boolean)

declare function wGuiEditBoxIsPasswordMode(byval box as wGuiObject) as Boolean

declare function wGuiEditBoxGetTextSize(byval box as wGuiObject) as wVector2i

declare sub wGuiEditBoxSetCharactersLimit(byval box as wGuiObject, byval max as UInt32)

declare function wGuiEditGetCharactersLimit(byval box as wGuiObject) as UInt32

declare sub  wGuiEditBoxSetOverrideFont(byval box as wGuiObject,_
                                        byval font as wFont)
                                         
declare function wGuiEditBoxGetOverrideFont(byval box as wGuiObject) as wFont

declare function wGuiEditBoxGetActiveFont(byval box as wGuiObject)as wFont

declare sub wGuiEditBoxEnableOverrideColor(byval box as wGuiObject,_
                                           byval value as Boolean)
                                             
declare function wGuiEditBoxIsOverrideColor(byval box as wGuiObject) as Boolean

declare sub wGuiEditBoxSetOverrideColor(byval box as wGuiObject,_
                                        byval color1 as wColor4s)
                                           
declare function wGuiEditBoxGetOverrideColor(byval box as wGuiObject)as wColor4s

declare sub wGuiEditBoxSetDrawBackground(byval box as wGuiObject,_
                                         byval value as Boolean)
                                             
declare sub wGuiEditBoxSetDrawBorder(byval box as wGuiObject,_
                                     byval value as Boolean)
                                       
declare function wGuiEditBoxIsDrawBorder(byval box as wGuiObject) as Boolean                                    
                                       
declare sub wGuiEditBoxSetTextAlignment(byval box as wGuiObject,_
                                       byval Horizontalvalue as wGuiAlignment,_
                                       byval Verticalvalue as wGuiAlignment)                                     

declare sub wGuiEditBoxSetWordWrap(byval box as wGuiObject,_
                                   byval value as Boolean)
                                   
declare function wGuiEditBoxIsWordWrap(byval box as wGuiObject)as Boolean

'///wGuiTextArea///
declare function wGuiTextAreaCreate(byval minPos as wVector2i, byval maxPos as wVector2i, byval maxLines as Int32 = 1024) as wGuiObject

declare sub wGuiTextAreaSetBorderSize(byval tarea as wGuiObject, byval size as UInt32)

declare sub wGuiTextAreaSetAutoScroll(byval tarea as wGuiObject, byval value as Boolean)

declare sub wGuiTextAreaSetPadding(byval tarea as wGuiObject, byval padding as UInt32)

declare sub wGuiTextAreaSetBackTexture(byval tarea as wGuiObject, byval tex as wTexture)

declare sub wGuiTextAreaSetWrapping(byval tarea as wGuiObject, byval value as Boolean)

declare sub wGuiTextAreaSetFont(byval tarea as wGuiObject, byval font as wFont)

declare sub wGuiTextAreaAddLine(byval tarea as wGuiObject, byval text as const wstring ptr, byval lifeTime as UInt32, byval color as wColor4s = wCOLOR4s_BLACK, byval icon as wTexture = 0, byval iconMode as Int32 = 0)

declare sub wGuiTextAreaRemoveAll(byval tarea as wGuiObject)

declare sub wGuiTextAreaSetBackgroundColor(byval tarea as wGuiObject,_
                                           byval _color as wColor4s)

declare sub wGuiTextAreaSetBorderColor(byval tarea as wGuiObject,_
                                       byval color1 as wColor4s)  

'///wGuiImage///
declare function wGuiImageCreate(byval texture as wTexture, byval size as wVector2i, byval useAlpha as Boolean) as wGuiObject

declare sub wGuiImageSet(byval img as wGuiObject, byval tex as wTexture)

declare function wGuiImageGet(byval img as wGuiObject) as wTexture

declare sub wGuiImageSetColor(byval img as wGuiObject, byval color as wColor4s)

declare function wGuiImageGetColor(byval img as wGuiObject) as wColor4s

declare sub wGuiImageSetScaling(byval img as wGuiObject, byval scale as Boolean)

declare function wGuiImageIsScaled(byval img as wGuiObject) as Boolean

declare sub wGuiImageUseAlphaChannel(byval img as wGuiObject, byval use as Boolean)

declare function wGuiImageIsUsedAlphaChannel(byval img as wGuiObject) as Boolean

'///wGuiFader///
declare function wGuiFaderCreate(byval minPos as wVector2i, byval maxPos as wVector2i) as wGuiObject

declare sub wGuiFaderSetColor(byval fader as wGuiObject, byval color as wColor4s)

declare function wGuiFaderGetColor(byval fader as wGuiObject) as wColor4s

declare sub wGuiFaderSetColorExt(byval fader as wGuiObject, byval colorSrc as wColor4s, byval colorDest as wColor4s)

declare sub wGuiFaderFadeIn(byval fader as wGuiObject, byval timeMs as UInt32)

declare sub wGuiFaderFadeOut(byval fader as wGuiObject, byval timeMs as UInt32)

declare function wGuiFaderIsReady(byval fader as wGuiObject) as Boolean

'///wGuiFileOpenDialog///
declare function wGuiFileOpenDialogCreate(byval wcptrLabel as const wstring ptr, byval modal as Boolean) as wGuiObject

declare function wGuiFileOpenDialogGetFile(byval dialog as wGuiObject) as const wstring ptr

declare function wGuiFileOpenDialogGetDirectory(byval dialog as wGuiObject) as const zstring ptr

'///wGuiComboBox///
declare function wGuiComboBoxCreate(byval minPos as wVector2i, byval maxPos as wVector2i) as wGuiObject

declare function wGuiComboBoxGetItemsCount(byval combo as wGuiObject) as UInt32

declare function wGuiComboBoxGetItemByIndex(byval combo as wGuiObject, byval idx as UInt32) as const wstring ptr

declare function wGuiComboBoxGetItemDataByIndex(byval combo as wGuiObject, byval idx as UInt32) as UInt32

declare function wGuiComboBoxGetIndexByItemData(byval combo as wGuiObject, byval data as UInt32) as Int32

declare function wGuiComboBoxAddItem(byval combo as wGuiObject, byval text as const wstring ptr, byval data as UInt32) as UInt32

declare sub wGuiComboBoxRemoveItem(byval combo as wGuiObject, byval idx as UInt32)

declare sub wGuiComboBoxRemoveAll(byval combo as wGuiObject)

declare function wGuiComboBoxGetSelected(byval combo as wGuiObject) as Int32

declare sub wGuiComboBoxSetSelected(byval combo as wGuiObject, byval idx as UInt32)

declare sub wGuiComboBoxSetMaxSelectionRows(byval combo as wGuiObject, byval max as UInt32)

declare function wGuiComboBoxGetMaxSelectionRows(byval combo as wGuiObject) as UInt32

declare sub wGuiComboBoxSetTextAlignment(byval combo as wGuiObject,_
                                         byval Horizontalvalue as wGuiAlignment,_
                                         byval Verticalvalue as wGuiAlignment)
                                       
'///wGuiContextMenu///
declare function wGuiContextMenuCreate(byval minPos as wVector2i, byval maxPos as wVector2i) as wGuiObject

declare sub wGuiContextMenuSetCloseHandling(byval cmenu as wGuiObject, byval onClose as wContextMenuClose)

declare function wGuiContextMenuGetCloseHandling(byval cmenu as wGuiObject) as wContextMenuClose

declare function wGuiContextMenuGetItemsCount(byval cmenu as wGuiObject) as UInt32

declare function wGuiContextMenuAddItem(byval cmenu as wGuiObject, byval text as const wstring ptr, byval commandId as Int32 = -1, byval enabled as Boolean = true, byval hasSubMenu as Boolean = false, byval checked as Boolean = false, byval autoChecking as Boolean = false) as UInt32

declare function wGuiContextMenuInsertItem(byval cmenu as wGuiObject, byval idx as UInt32, byval text as const wstring ptr, byval commandId as Int32 = -1, byval enabled as Boolean = true, byval hasSubMenu as Boolean = false, byval checked as Boolean = false, byval autoChecking as Boolean = false) as UInt32

declare sub wGuiContextMenuAddSeparator(byval cmenu as wGuiObject)

declare function wGuiContextMenuGetItemText(byval cmenu as wGuiObject, byval idx as UInt32) as const wstring ptr

declare sub wGuiContextMenuSetItemText(byval cmenu as wGuiObject, byval idx as UInt32, byval text as const wstring ptr)

declare sub wGuiContextMenuSetItemEnabled(byval cmenu as wGuiObject, byval idx as UInt32, byval value as Boolean)

declare function wGuiContextMenuIsItemEnabled(byval cmenu as wGuiObject, byval idx as UInt32) as Boolean

declare sub wGuiContextMenuSetItemChecked(byval cmenu as wGuiObject, byval idx as UInt32, byval value as Boolean)

declare function wGuiContextMenuIsItemChecked(byval cmenu as wGuiObject, byval idx as UInt32) as Boolean

declare sub wGuiContextMenuRemoveItem(byval cmenu as wGuiObject, byval idx as UInt32)

declare sub wGuiContextMenuRemoveAll(byval cmenu as wGuiObject)

declare function wGuiContextMenuGetSelectedItem(byval cmenu as wGuiObject) as Int32

declare function wGuiContextMenuGetItemCommandId(byval cmenu as wGuiObject, byval idx as UInt32) as Int32

declare function wGuiContextMenuFindItem(byval cmenu as wGuiObject, byval id as Int32, byval idx as UInt32 = 0) as Int32

declare sub wGuiContextMenuSetItemCommandId(byval cmenu as wGuiObject, byval idx as UInt32, byval id as Int32)

declare function wGuiContextMenuGetSubMenu(byval cmenu as wGuiObject, byval idx as UInt32) as wGuiObject

declare sub wGuiContextMenuSetAutoChecking(byval cmenu as wGuiObject, byval idx as UInt32, byval autoChecking as Boolean)

declare function wGuiContextMenuIsAutoChecked(byval cmenu as wGuiObject, byval idx as UInt32) as Boolean

declare sub wGuiContextMenuSetEventParent(byval cmenu as wGuiObject, byval parent as wGuiObject)

'///wGuiMenu///
declare function wGuiMenuCreate() as wGuiObject

'///wGuiModalScreen///
declare function wGuiModalScreenCreate() as wGuiObject

'///wGuiSpinBox///
declare function wGuiSpinBoxCreate(byval wcptrText as const wstring ptr, byval minPos as wVector2i, byval maxPos as wVector2i, byval border as Boolean = true) as wGuiObject

declare function wGuiSpinBoxGetEditBox(byval box as wGuiObject) as wGuiObject

declare sub wGuiSpinBoxSetValue(byval spin as wGuiObject, byval value as Float32)

declare function wGuiSpinBoxGetValue(byval spin as wGuiObject) as Float32

declare sub wGuiSpinBoxSetRange(byval spin as wGuiObject, byval range as wVector2f)

declare function wGuiSpinBoxGetMin(byval spin as wGuiObject) as Float32

declare function wGuiSpinBoxGetMax(byval spin as wGuiObject) as Float32

declare sub wGuiSpinBoxSetStepSize(byval spin as wGuiObject, byval step as Float32)

declare function wGuiSpinBoxGetStepSize(byval spin as wGuiObject) as Float32

declare sub wGuiSpinBoxSetDecimalPlaces(byval spin as wGuiObject, byval places as Int32)

'///wGuiTab///
declare function wGuiTabCreate(byval minPos as wVector2i, byval maxPos as wVector2i) as wGuiObject

declare function wGuiTabGetNumber(byval tab as wGuiObject) as Int32

declare sub wGuiTabSetTextColor(byval tab as wGuiObject, byval color as wColor4s)

declare function wGuiTabGetTextColor(byval tab as wGuiObject) as wColor4s

declare sub wGuiTabSetDrawBackground(byval tab as wGuiObject,_
                                     byval value as Boolean)

declare function wGuiTabIsDrawBackground(byval tab as wGuiObject) as Boolean
                                     
declare sub wGuiTabSetBackgroundColor(byval tab as wGuiObject,_
                                      byval _color as wColor4s)
                                             
declare function wGuiTabGetBackgroundColor(byval tab as wGuiObject)as wColor4s

'///wGuiTabControl///
declare function wGuiTabControlCreate(byval minPos as wVector2i, byval maxPos as wVector2i, byval background as Boolean = false, byval border as Boolean = true) as wGuiObject

declare function wGuiTabControlGetTabsCount(byval control as wGuiObject) as Int32

declare function wGuiTabControlAddTab(byval control as wGuiObject, byval caption as const wstring ptr, byval id as Int32 = -1) as wGuiObject

declare function wGuiTabControlInsertTab(byval control as wGuiObject, byval idx as UInt32, byval caption as const wstring ptr, byval id as Int32 = -1) as wGuiObject

declare function wGuiTabControlGetTab(byval control as wGuiObject, byval idx as Int32) as wGuiObject

declare function wGuiTabControlSetActiveTabByIndex(byval control as wGuiObject, byval idx as Int32) as Boolean

declare function wGuiTabControlSetActiveTab(byval control as wGuiObject, byval tab as wGuiObject) as Boolean

declare function wGuiTabControlGetActiveTab(byval control as wGuiObject) as Int32

declare function wGuiTabControlGetTabFromPos(byval control as wGuiObject, byval position as wVector2i) as Int32

declare sub wGuiTabControlRemoveTab(byval control as wGuiObject, byval idx as Int32)

declare sub wGuiTabControlRemoveAll(byval control as wGuiObject)

declare sub wGuiTabControlSetTabHeight(byval control as wGuiObject, byval height as Int32)

declare function wGuiTabControlGetTabHeight(byval control as wGuiObject) as Int32

declare sub wGuiTabControlSetTabMaxWidth(byval control as wGuiObject, byval width as Int32)

declare function wGuiTabControlGetTabMaxWidth(byval control as wGuiObject) as Int32

declare sub wGuiTabControlSetVerticalAlignment(byval control as wGuiObject, byval al as wGuiAlignment)

declare function wGuiTabControlGetVerticalAlignment(byval control as wGuiObject) as wGuiAlignment

declare sub wGuiTabControlSetTabExtraWidth(byval control as wGuiObject, byval extraWidth as Int32)

declare function wGuiTabControlGetTabExtraWidth(byval control as wGuiObject) as Int32

declare sub wGuiTabControlAttachTab(byval control as wGuiObject,_
                                    byval tab as wGuiObject)

declare sub wGuiTabControlDetachTab(byval control as wGuiObject,_
                             byval tab as wGuiObject)

'///wGuiTable///
declare function wGuiTableCreate(byval minPos as wVector2i, byval maxPos as wVector2i, byval background as Boolean = false) as wGuiObject

declare sub wGuiTableAddColumn(byval table as wGuiObject, byval caption as wstring ptr, byval columnIndex as Int32 = -1)

declare sub wGuiTableRemoveColumn(byval table as wGuiObject, byval columnIndex as UInt32)

declare function wGuiTableGetColumnsCount(byval table as wGuiObject) as Int32

declare function wGuiTableSetActiveColumn(byval table as wGuiObject, byval idx as Int32, byval doOrder as Boolean = false) as Boolean

declare function wGuiTableGetActiveColumn(byval table as wGuiObject) as Int32

'declare function wGuiTableGetActiveColumnOrdering(byval table as wGuiObject) as wGuiColumnOrdering
declare function wGuiTableGetActiveColumnOrdering(byval table as wGuiObject) as wGuiOrderingMode

declare sub wGuiTableSetColumnWidth(byval table as wGuiObject, byval columnIndex as UInt32, byval width as UInt32)

declare sub wGuiTableSetColumnsResizable(byval table as wGuiObject, byval resizible as Boolean)

declare function wGuiTableIsColumnsResizable(byval table as wGuiObject) as Boolean

declare function wGuiTableGetSelected(byval table as wGuiObject) as Int32

declare sub wGuiTableSetSelectedByIndex(byval table as wGuiObject, byval index as Int32)

declare function wGuiTableGetRowsCount(byval table as wGuiObject) as Int32

declare function wGuiTableAddRow(byval table as wGuiObject, byval rowIndex as UInt32) as UInt32

declare sub wGuiTableRemoveRow(byval table as wGuiObject, byval rowIndex as UInt32)

declare sub wGuiTableClearRows(byval table as wGuiObject)

declare sub wGuiTableSwapRows(byval table as wGuiObject, byval rowIndexA as UInt32, byval rowIndexB as UInt32)

declare sub wGuiTableSetOrderRows(byval table as wGuiObject, byval columnIndex as Int32, byval mode as wGuiOrderingMode)

declare sub wGuiTableSetCellText(byval table as wGuiObject, byval rowIndex as UInt32, byval columnIndex as UInt32, byval text as const wstring ptr, byval color as wColor4s)

declare sub wGuiTableSetCellData(byval table as wGuiObject, byval rowIndex as UInt32, byval columnIndex as UInt32, byval data as UInt32 ptr)

declare sub wGuiTableSetCellColor(byval table as wGuiObject, byval rowIndex as UInt32, byval columnIndex as UInt32, byval color as wColor4s)

declare function wGuiTableGetCellText(byval table as wGuiObject, byval rowIndex as UInt32, byval columnIndex as UInt32) as const wstring ptr

declare function wGuiTableGetCellData(byval table as wGuiObject, byval rowIndex as UInt32, byval columnIndex as UInt32) as UInt32 ptr

declare sub wGuiTableSetDrawFlags(byval table as wGuiObject, byval flags as wGuiTableDrawFlags)

declare function wGuiTableGetDrawFlags(byval table as wGuiObject) as wGuiTableDrawFlags

declare sub wGuiTableSetOverrideFont(byval table as wGuiObject,_
                                     byval font as wFont)

declare function wGuiTableGetOverrideFont(byval table as wGuiObject)as wFont

declare function wGuiTableGetActiveFont(byval table as wGuiObject) as wFont

declare function wGuiTableGetItemHeight(byval table as wGuiObject)as Int32

declare function wGuiTableGetVerticalScrollBar(byval table as wGuiObject) as wGuiObject

declare function wGuiTableGetHorizontalScrollBar(byval table as wGuiObject) as wGuiObject

declare sub wGuiTableSetDrawBackground(byval table as wGuiObject,_
									byval value as Boolean)

declare function wGuiTableIsDrawBackground(byval table as wGuiObject) as Boolean

'///wGuiToolBar///
declare function wGuiToolBarCreate() as wGuiObject

declare function wGuiToolBarAddButton(byval bar as wGuiObject, byval text as const wstring ptr, byval tooltiptext as const wstring ptr, byval img as wTexture = 0, byval pressedImg as wTexture = 0, byval isPushButton as Boolean = false, byval useAlphaChannel as Boolean = true) as wGuiObject

'///wGuiMessageBox
declare function wGuiMessageBoxCreate(byval wcptrTitle as const wstring ptr, byval wcptrTCaption as const wstring ptr = 0, byval modal as Boolean = true, byval flags as wGuiMessageBoxFlags = wGMBF_OK, byval image as wTexture = 0) as wGuiObject

'///wGuiTree///
declare function wGuiTreeCreate(byval minPos as wVector2i, byval maxPos as wVector2i, byval background as Boolean, byval barvertical as Boolean, byval barhorizontal as Boolean) as wGuiObject

declare function wGuiTreeGetRoot(byval tree as wGuiObject) as wGuiObject

declare function wGuiTreeGetSelected(byval tree as wGuiObject) as wGuiObject

declare sub wGuiTreeSetLinesVisible(byval tree as wGuiObject, byval visible as Boolean)

declare function wGuiTreeIsLinesVisible(byval tree as wGuiObject) as Boolean

declare sub wGuiTreeSetIconFont(byval tree as wGuiObject, byval font as wFont)

declare sub wGuiTreeSetImageList(byval tree as wGuiObject, byval list as wGuiObject)

declare function wGuiTreeGetImageList(byval tree as wGuiObject) as wGuiObject

declare sub wGuiTreeSetImageLeftOfIcon(byval tree as wGuiObject, byval bLeftOf as Boolean)

declare function wGuiTreeIsImageLeftOfIcon(byval tree as wGuiObject) as Boolean

declare function wGuiTreeGetLastEventNode(byval tree as wGuiObject) as wGuiObject

'///wGuiTreeNode///
declare function wGuiTreeNodeGetOwner(byval node as wGuiObject) as wGuiObject

declare function wGuiTreeNodeGetParent(byval node as wGuiObject) as wGuiObject

declare function wGuiTreeNodeGetText(byval node as wGuiObject) as const wstring ptr

declare sub wGuiTreeNodeSetText(byval node as wGuiObject, byval text as const wstring ptr)

declare sub wGuiTreeNodeSetIcon(byval node as wGuiObject, byval icon as const wstring ptr)

declare function wGuiTreeNodeGetIcon(byval node as wGuiObject) as const wstring ptr

declare sub wGuiTreeNodeSetImageIndex(byval node as wGuiObject, byval imageIndex as UInt32)

declare function wGuiTreeNodeGetImageIndex(byval node as wGuiObject) as UInt32

declare sub wGuiTreeNodeSetSelectedImageIndex(byval node as wGuiObject, byval imageIndex as UInt32)

declare function wGuiTreeNodeGetSelectedImageIndex(byval node as wGuiObject) as UInt32

declare sub wGuiTreeNodeSetData(byval node as wGuiObject, byval data as UInt32 ptr)

declare function wGuiTreeNodeGetData(byval node as wGuiObject) as UInt32 ptr

declare sub wGuiTreeNodeSetData2(byval node as wGuiObject, byval data2 as UInt32 ptr)

declare function wGuiTreeNodeGetData2(byval node as wGuiObject) as UInt32 ptr

declare function wGuiTreeNodeGetChildsCount(byval node as wGuiObject) as UInt32

declare sub wGuiTreeNodeRemoveChild(byval node as wGuiObject, byval child as wGuiObject)

declare sub wGuiTreeNodeRemoveChildren(byval node as wGuiObject)

declare function wGuiTreeNodeHasChildren(byval node as wGuiObject) as Boolean

declare function wGuiTreeNodeAddChildBack(byval node as wGuiObject, byval text as const wstring ptr, byval icon as const wstring ptr = 0, byval imageIndex as Int32 = -1, byval selectedImageIndex as Int32 = -1, byval data as any ptr = 0, byval data2 as UInt32 ptr = 0) as wGuiObject

declare function wGuiTreeNodeAddChildFront(byval node as wGuiObject, byval text as const wstring ptr, byval icon as const wstring ptr = 0, byval imageIndex as Int32 = -1, byval selectedImageIndex as Int32 = -1, byval data as any ptr = 0, byval data2 as UInt32 ptr = 0) as wGuiObject

declare function wGuiTreeNodeInsertChildAfter(byval node as wGuiObject, byval other as wGuiObject, byval text as const wstring ptr, byval icon as const wstring ptr = 0, byval imageIndex as Int32 = -1, byval selectedImageIndex as Int32 = -1, byval data as any ptr = 0, byval data2 as UInt32 ptr = 0) as wGuiObject

declare function wGuiTreeNodeInsertChildBefore(byval node as wGuiObject, byval other as wGuiObject, byval text as const wstring ptr, byval icon as const wstring ptr = 0, byval imageIndex as Int32 = -1, byval selectedImageIndex as Int32 = -1, byval data as any ptr = 0, byval data2 as UInt32 ptr = 0) as wGuiObject

declare function wGuiTreeNodeGetFirstChild(byval node as wGuiObject) as wGuiObject

declare function wGuiTreeNodeGetLastChild(byval node as wGuiObject) as wGuiObject

declare function wGuiTreeNodeGetPrevSibling(byval node as wGuiObject) as wGuiObject

declare function wGuiTreeNodeGetNextSibling(byval node as wGuiObject) as wGuiObject

declare function wGuiTreeNodeGetNextVisible(byval node as wGuiObject) as wGuiObject

declare function wGuiTreeNodeMoveChildUp(byval node as wGuiObject, byval child as wGuiObject) as Boolean

declare function wGuiTreeNodeMoveChildDown(byval node as wGuiObject, byval child as wGuiObject) as Boolean

declare sub wGuiTreeNodeSetExpanded(byval node as wGuiObject, byval expanded as Boolean)

declare function wGuiTreeNodeIsExpanded(byval node as wGuiObject) as Boolean

declare sub wGuiTreeNodeSetSelected(byval node as wGuiObject, byval selected as Boolean)

declare function wGuiTreeNodeIsSelected(byval node as wGuiObject) as Boolean

declare function wGuiTreeNodeIsRoot(byval node as wGuiObject) as Boolean

declare function wGuiTreeNodeGetLevel(byval node as wGuiObject) as Int32

declare function wGuiTreeNodeIsVisible(byval node as wGuiObject) as Boolean

'///wGuiImageList///
declare function wGuiImageListCreate(byval texture as wTexture, byval size as wVector2i, byval useAlphaChannel as Boolean) as wGuiObject

declare sub wGuiImageListDraw(byval list as wGuiObject, byval index as Int32, byval pos as wVector2i, byval clipPos as wVector2i, byval clipSize as wVector2i)

declare function wGuiImageListGetCount(byval list as wGuiObject) as Int32

declare function wGuiImageListGetSize(byval list as wGuiObject) as wVector2i

'///wGuiColorSelectDialog
declare function wGuiColorSelectDialogCreate(byval title as const wstring ptr, byval modal as Boolean) as wGuiObject

'///wGuiMeshViewer///
declare function wGuiMeshViewerCreate(byval minPos as wVector2i, byval maxPos as wVector2i, byval text as const wstring ptr) as wGuiObject

declare sub wGuiMeshViewerSetMesh(byval viewer as wGuiObject, byval mesh as wMesh)

declare function wGuiMeshViewerGetMesh(byval viewer as wGuiObject) as wMesh

declare sub wGuiMeshViewerSetMaterial(byval viewer as wGuiObject, byval material as wMaterial)

declare function wGuiMeshViewerGetMaterial(byval viewer as wGuiObject) as wMaterial

'///wGuiSpriteBank///
declare function wGuiSpriteBankLoad(byval file as const zstring ptr) as wGuiObject

declare function wGuiSpriteBankCreate(byval name as const zstring ptr) as wGuiObject

declare sub wGuiSpriteBankAddTexture(byval bank as wGuiObject, byval texture as wTexture)

declare sub wGuiSpriteBankSetTexture(byval bank as wGuiObject, byval index as UInt32, byval texture as wTexture)

declare function wGuiSpriteBankAddSprite(byval bank as wGuiObject, byval texture as wTexture) as Int32

declare function wGuiSpriteBankGetTexture(byval bank as wGuiObject, byval index as UInt32) as wTexture

declare function wGuiSpriteBankGetTexturesCount(byval bank as wGuiObject) as UInt32

declare sub wGuiSpriteBankRemoveAll(byval bank as wGuiObject)

declare sub wGuiSpriteBankDrawSprite(byval bank as wGuiObject, byval index as UInt32, byval position as wVector2i, byval clipPosition as wVector2i ptr = 0, byval clipSize as wVector2i ptr = 0, byval color as wColor4s = wCOLOR4s_WHITE, byval starttime as UInt32 = 0, byval currenttime as UInt32 = 0, byval loop as Boolean = true, byval center as Boolean = false)

declare sub wGuiSpriteBankDrawSpriteBatch(byval bank as wGuiObject, byval indexArray as UInt32 ptr, byval idxArrayCount as UInt32, byval positionArray as wVector2i ptr, byval posArrayCount as UInt32, byval clipPosition as wVector2i ptr = 0, byval clipSize as wVector2i ptr = 0, byval color as wColor4s = wCOLOR4s_WHITE, byval starttime as UInt32 = 0, byval currenttime as UInt32 = 0, byval loop as Boolean = true, byval center as Boolean = false)

'///wGuiCheckBox///
declare function wGuiCheckBoxCreate(byval wcptrText as const wstring ptr, byval minPos as wVector2i, byval maxPos as wVector2i, byval checked as Boolean) as wGuiObject

declare sub wGuiCheckBoxCheck(byval box as wGuiObject, byval checked as Boolean)

declare function wGuiCheckBoxIsChecked(byval box as wGuiObject) as Boolean

'/// Sets whether to draw the background
declare sub wGuiCheckBoxSetDrawBackground(byval checkbox as wGUIObject,_
											byval value as Boolean)

'/// Checks if background drawing is enabled
'///return true if background drawing is enabled, false otherwise
declare function wGuiCheckBoxIsDrawBackground(byval checkbox as wGuiObject)as Boolean

'/// Sets whether to draw the border
declare sub wGuiCheckBoxSetDrawBorder(byval checkbox as wGuiObject,_
                                      byval value as Boolean)

'/// Checks if border drawing is enabled
'///return true if border drawing is enabled, false otherwise
declare function wGuiCheckBoxIsDrawBorder(byval checkbox as wGuiObject) as Boolean

declare sub wGuiCheckBoxSetFilled(byval checkbox as wGuiObject,_
                                  byval value as Boolean)

declare function wGuiCheckBoxIsFilled(byval checkbox as wGuiObject)as Boolean


'///wGuiCheckBoxGroup///
declare function wGuiCheckBoxGroupCreate(byval minPos as wVector2i, byval maxPos as wVector2i) as wGuiObject

declare function wGuiCheckBoxGroupAddCheckBox(byval group as wGuiObject, byval check as wGuiObject) as Int32

declare function wGuiCheckBoxGroupInsertCheckBox(byval group as wGuiObject, byval check as wGuiObject, byval index as UInt32) as Int32

declare function wGuiCheckBoxGroupGetCheckBox(byval group as wGuiObject, byval index as UInt32) as wGuiObject

declare function wGuiCheckBoxGroupGetIndex(byval group as wGuiObject, byval check as wGuiObject) as Int32

declare function wGuiCheckBoxGroupGetSelectedIndex(byval group as wGuiObject) as Int32

declare function wGuiCheckBoxGroupRemoveCheckBox(byval group as wGuiObject, byval index as UInt32) as Boolean

declare sub wGuiCheckBoxGroupRemoveAll(byval group as wGuiObject)

declare function wGuiCheckBoxGroupGetSize(byval group as wGuiObject) as UInt32

declare sub wGuiCheckBoxGroupSelectCheckBox(byval group as wGuiObject, byval index as Int32)

declare sub wGuiCheckBoxGroupClearSelection(byval group as wGuiObject)

declare sub wGuiCheckBoxGroupSetBackgroundColor(byval group as wGuiObject,_
                                                byval _color as wColor4s)
                                                
Declare sub wGuiCheckBoxGroupDrawBackground(_
					ByVal group As wGUIObject,_
					byval isTrue As Int32)
					
'///wGuiProgressBar///
declare function wGuiProgressBarCreate(byval minPos as wVector2i, byval maxPos as wVector2i, byval isHorizontal as Boolean = true) as wGuiObject

declare sub wGuiProgressBarSetPercentage(byval bar as wGuiObject, byval percent as UInt32)

declare function wGuiProgressBarGetPercentage(byval bar as wGuiObject) as UInt32

declare sub wGuiProgressBarSetDirection(byval bar as wGuiObject, byval isHorizontal as Boolean)

declare function wGuiProgressBarIsHorizontal(byval bar as wGuiObject) as Boolean

declare sub wGuiProgressBarSetBorderSize(byval bar as wGuiObject, byval size as UInt32)

declare sub wGuiProgressBarSetSize(byval bar as wGuiObject, byval size as wVector2u)

declare sub wGuiProgressBarSetFillColor(byval bar as wGuiObject, byval color as wColor4s)

declare function wGuiProgressBarGetFillColor(byval bar as wGuiObject) as wColor4s

declare sub wGuiProgressBarSetTextColor(byval bar as wGuiObject, byval color as wColor4s)

declare sub wGuiProgressBarShowText(byval bar as wGuiObject, byval value as Boolean)

declare function wGuiProgressBarIsShowText(byval bar as wGuiObject) as Boolean

declare sub wGuiProgressBarSetFillTexture(byval bar as wGuiObject, byval tex as wTexture)

declare sub wGuiProgressBarSetBackTexture(byval bar as wGuiObject, byval tex as wTexture)

declare sub wGuiProgressBarSetFont(byval bar as wGuiObject, byval font as wFont)

declare sub wGuiProgressBarSetBackgroundColor(byval bar as wGuiObject,_
                                              byval _color as wColor4s )
                                             
declare sub wGuiProgressBarSetBorderColor(byval bar as wGuiObject,_
                                          byval _color as wColor4s) 

'///wGuiCEditor///
declare function wGuiCEditorCreate(byval wcptrText as const wstring ptr, byval minPos as wVector2i, byval maxPos as wVector2i, byval border as Boolean) as any ptr

declare sub wGuiCEditorSetHScrollVisible(byval box as wGuiObject, byval value as Boolean)

declare sub wGuiCEditorSetText(byval box as wGuiObject, byval text as const wstring ptr)

declare sub wGuiCEditorSetColors(byval box as wGuiObject, byval backColor as wColor4s, byval lineColor as wColor4s, byval textColor as wColor4s)

declare sub wGuiCEditorSetLinesCountVisible(byval box as wGuiObject, byval value as Boolean)

declare function wGuiCEditorIsLinesCountVisible(byval box as wGuiObject) as Boolean

declare sub wGuiCEditorSetElementText(byval box as wGuiObject, byval index as UInt32, byval text as const wstring ptr)

declare sub wGuiCEditorSetSelectionColors(byval box as wGuiObject, byval backColor as wColor4s, byval textColor as wColor4s, byval back2Color as wColor4s)

declare sub wGuiCEditorRemoveText(byval box as wGuiObject)

declare sub wGuiCEditorAddKeyword(byval box as wGuiObject, byval word as const zstring ptr, byval color as wColor4s, byval matchCase as Boolean)

declare sub wGuiCEditorAddLineKeyword(byval box as wGuiObject, byval word as const zstring ptr, byval color as wColor4s, byval matchCase as Boolean)

declare sub wGuiCEditorAddGroupKeyword(byval box as wGuiObject, byval word as const zstring ptr, byval endKeyword as const zstring ptr, byval color as wColor4s, byval matchCase as Boolean)

declare sub wGuiCEditorBoxAddKeywordInfo(byval box as wGuiObject, byval size as Int32, byval type as Int32)

declare sub wGuiCEditorBoxRemoveAllKeywords(byval box as wGuiObject)

declare sub wGuiCEditorBoxAddCppKeywords(byval box as wGuiObject, byval key as wColor4s, byval string as wColor4s, byval comment as wColor4s)

declare sub wGuiCEditorAddLuaKeywords(byval box as wGuiObject, byval key as wColor4s, byval string as wColor4s, byval comment as wColor4s)

declare sub wGuiCEditorAddFbKeywords(byval box as wGuiObject, byval key as wColor4s, byval string as wColor4s, byval comment as wColor4s)

declare sub wGuiCEditorReplaceText(byval box as wGuiObject, byval start as Int32, byval end as Int32, byval text as const wstring ptr)

declare sub wGuiCEditorPressReturn(byval box as wGuiObject)

declare sub wGuiCEditorAddText(byval box as wGuiObject, byval addText as const wstring ptr)

declare function wGuiCEditorGetText(byval box as wGuiObject) as const wstring ptr

declare sub wGuiCEditorSetLineToggleVisible(byval box as wGuiObject, byval value as Boolean)

declare sub wGuiCEditorSetContextMenuText(byval box as wGuiObject, byval cut_text as const wstring ptr, byval copy_text as const wstring ptr, byval paste_text as const wstring ptr, byval del_text as const wstring ptr, byval redo_text as const wstring ptr, byval undo_text as const wstring ptr, byval btn_text as const wstring ptr)

declare sub wGuiCEditorBoxCopy(byval box as wGuiObject)

declare sub wGuiCEditorCut(byval box as wGuiObject)

declare sub wGuiCEditorPaste(byval box as wGuiObject)

declare sub wGuiCEditorUndo(byval box as wGuiObject)

declare sub wGuiCEditorRedo(byval box as wGuiObject)

declare function wGuiCEditorGetOverrideFont(byval box as wGuiObject) as wFont

declare function wGuiCEditorGetActiveFont(byval box as wGuiObject)as wFont

declare sub wGuiCEditorEnableOverrideColor(byval box as wGuiObject,_
                                           byval value as Boolean)
                                             
declare function wGuiCEditorIsOverrideColor(byval box as wGuiObject)as Boolean

declare sub wGuiCEditorSetOverrideColor(byval box as wGuiObject,_
                                        byval _color as wColor4s)
 
declare function wGuiCEditorGetOverrideColor(byval box as wGuiObject) as wColor4s

declare sub wGuiCEditorSetDrawBackground(byval box as wGuiObject,_
                                         byval value as Boolean)
                                           
declare function wGuiCEditorIsDrawBackGround(byval box as wGuiObject)as Boolean

declare sub wGuiCEditorSetDrawBorder(byval box as wGuiObject,_
                                     byval value as Boolean)

declare function wGuiCEditorIsDrawBorder(byval box as wGuiObject) as Boolean

declare sub wGuiCEditorSetTextAlignment(byval box as wGuiObject,_
                                        byval Horizontalvalue as wGuiAlignment,_
                                        byval Verticalvalue as wGuiAlignment)
                                       
declare sub wGuiCEditorSetWordWrap(byval box as wGuiObject,_
                                   byval value as Boolean)
                                      
declare function wGuiCEditorIsWordWrap(byval box as wGuiObject)as Boolean 

declare sub wGuiCEditorSetBackgroundColor(byval box as wGuiObject,_
                                          byval _color as wColor4s)

end extern
