;**
;* IrrlichtWrapper 1.1
;* 


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Enumerated Type Definitions

; Rendering Device Types
Enumeration ;IRR_DEVICE_TYPES
    #IRR_EDT_NULL = 0            ; a NULL device With no display
    #IRR_EDT_SOFTWARE            ; Irrlichts Default software renderer
;only in 1.3    #IRR_EDT_BURNINGSVIDEO
    #IRR_EDT_SOFTWARE2           ; An improved quality software renderer
    #IRR_EDT_DIRECT3D8           ; hardware accelerated DirectX 8 renderer
    #IRR_EDT_DIRECT3D9           ; hardware accelerated DirectX 9 renderer
    #IRR_EDT_OPENGL              ; hardware accelerated OpenGL renderer
  EndEnumeration

; Material Flags
Enumeration ;IRR_MATERIAL_FLAGS
    #IRR_EMF_WIREFRAME = 0       ; render As wireframe outline
		#IRR_EMF_POINTCLOUD           ;Draw As point cloud Or filled triangles? Default: false
    #IRR_EMF_GOURAUD_SHADING     ; render smoothly across polygons
    #IRR_EMF_LIGHTING            ; material is effected by lighting
    #IRR_EMF_ZBUFFER             ; enable z buffer
    #IRR_EMF_ZWRITE_ENABLE       ; can write As well As Read z buffer
    #IRR_EMF_BACK_FACE_CULLING   ; cull polygons facing away
    #IRR_EMF_BILINEAR_FILTER     ; enable bilinear filtering
    #IRR_EMF_TRILINEAR_FILTER    ; enable trilinear filtering
    #IRR_EMF_ANISOTROPIC_FILTER  ; reduce blur in distant textures
    #IRR_EMF_FOG_ENABLE          ; enable fogging in the distance
    #IRR_EMF_NORMALIZE_NORMALS   ; use when scaling dynamically lighted models
EndEnumeration


; Material Types
;IRR_MATERIAL_TYPES
Enumeration 
    #IRR_EMT_SOLID = 0           ; Standard solid rendering uses one texture
    #IRR_EMT_SOLID_2_LAYER       ; 2 blended textures (Not available on OpenGL)
    #IRR_EMT_LIGHTMAP            ; 2 textures: 0=color 1=lighting level
    #IRR_EMT_LIGHTMAP_ADD        ; ... As above but adds levels
    #IRR_EMT_LIGHTMAP_M2         ; ... As above but multiplies levels by 2
    #IRR_EMT_LIGHTMAP_M4
    #IRR_EMT_LIGHTMAP_LIGHTING   ; ... As above With dynamic lighting
    #IRR_EMT_LIGHTMAP_LIGHTING_M2
    #IRR_EMT_LIGHTMAP_LIGHTING_M4 
    #IRR_EMT_DETAIL_MAP          ; 2 textures blended one can be scaled
    #IRR_EMT_SPHERE_MAP
    #IRR_EMT_REFLECTION_2_LAYER
    #IRR_EMT_TRANSPARENT_ADD_COLOR
    #IRR_EMT_TRANSPARENT_ALPHA_CHANNEL
    #IRR_EMT_TRANSPARENT_ALPHA_CHANNEL_REF
    #IRR_EMT_TRANSPARENT_VERTEX_ALPHA
    #IRR_EMT_TRANSPARENT_REFLECTION_2_LAYER
    #IRR_EMT_NORMAL_MAP_SOLID
    #IRR_EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR
    #IRR_EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA
    #IRR_EMT_PARALLAX_MAP_SOLID
    #IRR_EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR
    #IRR_EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA
    #IRR_EMT_FORCE_32BIT = $7FFFFFFF
EndEnumeration


                                                                          

; Mouse events
Enumeration ;IRR_MOUSE_EVENTS
    #IRR_EMIE_LMOUSE_PRESSED_DOWN = 0
    #IRR_EMIE_RMOUSE_PRESSED_DOWN
    #IRR_EMIE_MMOUSE_PRESSED_DOWN
    #IRR_EMIE_LMOUSE_LEFT_UP
    #IRR_EMIE_RMOUSE_LEFT_UP
    #IRR_EMIE_MMOUSE_LEFT_UP
    #IRR_EMIE_MOUSE_MOVED
    #IRR_EMIE_MOUSE_WHEEL
EndEnumeration

; MD2 Animation sequences
Enumeration ;IRR_MD2_ANIM_SEQUENCES
    #IRR_EMAT_STAND = 0
    #IRR_EMAT_RUN
    #IRR_EMAT_ATTACK
    #IRR_EMAT_PAIN_A
    #IRR_EMAT_PAIN_B
    #IRR_EMAT_PAIN_C
    #IRR_EMAT_JUMP
    #IRR_EMAT_FLIP
    #IRR_EMAT_SALUTE
    #IRR_EMAT_FALLBACK
    #IRR_EMAT_WAVE
    #IRR_EMAT_POINT
    #IRR_EMAT_CROUCH_STAND
    #IRR_EMAT_CROUCH_WALK
    #IRR_EMAT_CROUCH_ATTACK
    #IRR_EMAT_CROUCH_PAIN
    #IRR_EMAT_CROUCH_DEATH
    #IRR_EMAT_DEATH_FALLBACK
    #IRR_EMAT_DEATH_FALLFORWARD
    #IRR_EMAT_DEATH_FALLBACKSLOW
    #IRR_EMAT_BOOM
EndEnumeration


Enumeration ; EKEY_CODE
#IRR_KEY_LBUTTON          = $01  ; Left mouse button  
#IRR_KEY_RBUTTON          = $02  ; Right mouse button  
#IRR_KEY_CANCEL           = $03  ; Control-Break processing  
#IRR_KEY_MBUTTON          = $04  ; Middle mouse button (three-button mouse)  
#IRR_KEY_XBUTTON1         = $05  ; Windows 2000/XP: X1 mouse button 
#IRR_KEY_XBUTTON2         = $06  ; Windows 2000/XP: X2 mouse button 
#IRR_KEY_BACK             = $08  ; BACKSPACE key  
#IRR_KEY_TAB              = $09  ; TAB key  
#IRR_KEY_CLEAR            = $0C  ; CLEAR key  
#IRR_KEY_RETURN           = $0D  ; ENTER key  
#IRR_KEY_SHIFT            = $10  ; SHIFT key  
#IRR_KEY_CONTROL          = $11  ; CTRL key  
#IRR_KEY_MENU             = $12  ; ALT key  
#IRR_KEY_PAUSE            = $13  ; PAUSE key  
#IRR_KEY_CAPITAL          = $14  ; CAPS LOCK key  
#IRR_KEY_KANA             = $15  ; IME Kana mode 
#IRR_KEY_HANGUEL          = $15  ; IME Hanguel mode (maintained For compatibility use KEY_HANGUL) 
#IRR_KEY_HANGUL           = $15  ; IME Hangul mode 
#IRR_KEY_JUNJA            = $17  ; IME Junja mode 
#IRR_KEY_FINAL            = $18  ; IME final mode 
#IRR_KEY_HANJA            = $19  ; IME Hanja mode 
#IRR_KEY_KANJI            = $19  ; IME Kanji mode 
#IRR_KEY_ESCAPE           = $1B  ; ESC key  
#IRR_KEY_CONVERT          = $1C  ; IME convert 
#IRR_KEY_NONCONVERT       = $1D  ; IME nonconvert 
#IRR_KEY_ACCEPT           = $1E  ; IME accept 
#IRR_KEY_MODECHANGE       = $1F  ; IME mode change request 
#IRR_KEY_SPACE            = $20  ; SPACEBAR  
#IRR_KEY_PRIOR            = $21  ; PAGE UP key  
#IRR_KEY_NEXT             = $22  ; PAGE DOWN key  
#IRR_KEY_END              = $23  ; End key  
#IRR_KEY_HOME             = $24  ; HOME key  
#IRR_KEY_ARROW_LEFT       = $25  ; LEFT ARROW key  
#IRR_KEY_ARROW_UP         = $26  ; UP ARROW key  
#IRR_KEY_ARROW_RIGHT      = $27  ; RIGHT ARROW key  
#IRR_KEY_ARROW_DOWN       = $28  ; DOWN ARROW key  
#IRR_KEY_SELECT           = $29  ; Select key  
#IRR_KEY_PRINT            = $2A  ; PRINT key
#IRR_KEY_EXECUT           = $2B  ; EXECUTE key  
#IRR_KEY_SNAPSHOT         = $2C  ; PRINT SCREEN key  
#IRR_KEY_INSERT           = $2D  ; INS key  
#IRR_KEY_DELETE           = $2E  ; DEL key  
#IRR_KEY_HELP             = $2F  ; HELP key  
#IRR_KEY_KEY_0            = $30  ; 0 key  
#IRR_KEY_KEY_1            = $31  ; 1 key  
#IRR_KEY_KEY_2            = $32  ; 2 key  
#IRR_KEY_KEY_3            = $33  ; 3 key  
#IRR_KEY_KEY_4            = $34  ; 4 key  
#IRR_KEY_KEY_5            = $35  ; 5 key  
#IRR_KEY_KEY_6            = $36  ; 6 key  
#IRR_KEY_KEY_7            = $37  ; 7 key  
#IRR_KEY_KEY_8            = $38  ; 8 key  
#IRR_KEY_KEY_9            = $39  ; 9 key  
#IRR_KEY_KEY_A            = $41  ; A key  
#IRR_KEY_KEY_B            = $42  ; B key  
#IRR_KEY_KEY_C            = $43  ; C key  
#IRR_KEY_KEY_D            = $44  ; D key  
#IRR_KEY_KEY_E            = $45  ; E key  
#IRR_KEY_KEY_F            = $46  ; F key  
#IRR_KEY_KEY_G            = $47  ; G key  
#IRR_KEY_KEY_H            = $48  ; H key  
#IRR_KEY_KEY_I            = $49  ; I key  
#IRR_KEY_KEY_J            = $4A  ; J key  
#IRR_KEY_KEY_K            = $4B  ; K key  
#IRR_KEY_KEY_L            = $4C  ; L key  
#IRR_KEY_KEY_M            = $4D  ; M key  
#IRR_KEY_KEY_N            = $4E  ; N key  
#IRR_KEY_KEY_O            = $4F  ; O key  
#IRR_KEY_KEY_P            = $50  ; P key  
#IRR_KEY_KEY_Q            = $51  ; Q key  
#IRR_KEY_KEY_R            = $52  ; R key  
#IRR_KEY_KEY_S            = $53  ; S key  
#IRR_KEY_KEY_T            = $54  ; T key  
#IRR_KEY_KEY_U            = $55  ; U key  
#IRR_KEY_KEY_V            = $56  ; V key  
#IRR_KEY_KEY_W            = $57  ; W key  
#IRR_KEY_KEY_X            = $58  ; X key  
#IRR_KEY_KEY_Y            = $59  ; Y key  
#IRR_KEY_KEY_Z            = $5A  ; Z key  
#IRR_KEY_LWIN             = $5B  ; Left Windows key (Microsoft® Natural® keyboard)  
#IRR_KEY_RWIN             = $5C  ; Right Windows key (Natural keyboard)  
#IRR_KEY_APPS             = $5D  ;Applications key (Natural keyboard)  
#IRR_KEY_SLEEP            = $5F  ; Computer Sleep key 
#IRR_KEY_NUMPAD0          = $60  ; Numeric keypad 0 key  
#IRR_KEY_NUMPAD1          = $61  ; Numeric keypad 1 key  
#IRR_KEY_NUMPAD2          = $62  ; Numeric keypad 2 key  
#IRR_KEY_NUMPAD3          = $63  ; Numeric keypad 3 key  
#IRR_KEY_NUMPAD4          = $64  ; Numeric keypad 4 key  
#IRR_KEY_NUMPAD5          = $65  ; Numeric keypad 5 key  
#IRR_KEY_NUMPAD6          = $66  ; Numeric keypad 6 key  
#IRR_KEY_NUMPAD7          = $67  ; Numeric keypad 7 key  
#IRR_KEY_NUMPAD8          = $68  ; Numeric keypad 8 key  
#IRR_KEY_NUMPAD9          = $69  ; Numeric keypad 9 key  
#IRR_KEY_MULTIPLY         = $6A  ; Multiply key  
#IRR_KEY_ADD              = $6B  ; Add key  
#IRR_KEY_SEPARATOR        = $6C  ; Separator key  
#IRR_KEY_SUBTRACT         = $6D  ; Subtract key  
#IRR_KEY_DECIMAL          = $6E  ; Decimal key  
#IRR_KEY_DIVIDE           = $6F  ; Divide key  
#IRR_KEY_F1               = $70  ; F1 key  
#IRR_KEY_F2               = $71  ; F2 key  
#IRR_KEY_F3               = $72  ; F3 key  
#IRR_KEY_F4               = $73  ; F4 key  
#IRR_KEY_F5               = $74  ; F5 key  
#IRR_KEY_F6               = $75  ; F6 key  
#IRR_KEY_F7               = $76  ; F7 key  
#IRR_KEY_F8               = $77  ; F8 key  
#IRR_KEY_F9               = $78  ; F9 key  
#IRR_KEY_F10              = $79  ; F10 key  
#IRR_KEY_F11              = $7A  ; F11 key  
#IRR_KEY_F12              = $7B  ; F12 key  
#IRR_KEY_F13              = $7C  ; F13 key  
#IRR_KEY_F14              = $7D  ; F14 key  
#IRR_KEY_F15              = $7E  ; F15 key  
#IRR_KEY_F16              = $7F  ; F16 key  
#IRR_KEY_F17              = $80  ; F17 key  
#IRR_KEY_F18              = $81  ; F18 key  
#IRR_KEY_F19              = $82  ; F19 key  
#IRR_KEY_F20              = $83  ; F20 key  
#IRR_KEY_F21              = $84  ; F21 key  
#IRR_KEY_F22              = $85  ; F22 key  
#IRR_KEY_F23              = $86  ; F23 key  
#IRR_KEY_F24              = $87  ; F24 key  
#IRR_KEY_NUMLOCK          = $90  ; NUM LOCK key  
#IRR_KEY_SCROLL           = $91  ; SCROLL LOCK key  
#IRR_KEY_LSHIFT           = $A0  ; Left SHIFT key 
#IRR_KEY_RSHIFT           = $A1  ; Right SHIFT key 
#IRR_KEY_LCONTROL         = $A2  ; Left CONTROL key 
#IRR_KEY_RCONTROL         = $A3  ; Right CONTROL key 
#IRR_KEY_LMENU            = $A4  ; Left MENU key 
#IRR_KEY_RMENU            = $A5  ; Right MENU key 
#IRR_KEY_PLUS             = $BB  ; Plus Key   (+)
#IRR_KEY_COMMA            = $BC  ; Comma Key  (,)
#IRR_KEY_MINUS            = $BD  ; Minus Key  (-)
#IRR_KEY_PERIOD           = $BE  ; Period Key (.)
#IRR_KEY_ATTN             = $F6  ; Attn key 
#IRR_KEY_CRSEL            = $F7  ; CrSel key 
#IRR_KEY_EXSEL            = $F8  ; ExSel key 
#IRR_KEY_EREOF            = $F9  ; Erase EOF key 
#IRR_KEY_PLAY             = $FA  ; Play key 
#IRR_KEY_ZOOM             = $FB  ; Zoom key 
#IRR_KEY_PA1              = $FD  ; PA1 key 
#IRR_KEY_OEM_CLEAR        = $FE   ; Clear key 

#IRR_KEY_KEY_CODES_COUNT  = $FF ; this is Not a key, but the amount of keycodes there are.
EndEnumeration



Enumeration ;enum EGUI_EVENT_TYPE
  #IRR_EGET_ELEMENT_FOCUS_LOST = 0
;; only in 1.3  #IRR_EGET_ELEMENT_FOCUSED 
  #IRR_EGET_ELEMENT_HOVERED
  #IRR_EGET_ELEMENT_LEFT
#IRR_EGET_BUTTON_CLICKED
#IRR_EGET_SCROLL_BAR_CHANGED
#IRR_EGET_CHECKBOX_CHANGED
#IRR_EGET_LISTBOX_CHANGED
#IRR_EGET_LISTBOX_SELECTED_AGAIN
#IRR_EGET_FILE_SELECTED
#IRR_EGET_FILE_CHOOSE_DIALOG_CANCELLED
#IRR_EGET_MESSAGEBOX_YES
#IRR_EGET_MESSAGEBOX_NO
#IRR_EGET_MESSAGEBOX_OK
#IRR_EGET_MESSAGEBOX_CANCEL
#IRR_EGET_EDITBOX_ENTER
#IRR_EGET_TAB_CHANGED
#IRR_EGET_MENU_ITEM_SELECTED
#IRR_EGET_COMBO_BOX_CHANGED
EndEnumeration

Enumeration
#IRR_EGDC_3D_DARK_SHADOW    ;Dark shadow For three-dimensional display elements.  
#IRR_EGDC_3D_SHADOW         ;Shadow color For three-dimensional display elements (For edges facing away from the light source).  
#IRR_EGDC_3D_FACE           ;Face color For three-dimensional display elements And For dialog box backgrounds.  
#IRR_EGDC_3D_HIGH_LIGHT     ;Highlight color For three-dimensional display elements (For edges facing the light source.).  
#IRR_EGDC_3D_LIGHT          ;Light color For three-dimensional display elements (For edges facing the light source.).  
#IRR_EGDC_ACTIVE_BORDER     ;Active window border.  
#IRR_EGDC_ACTIVE_CAPTION    ;Active window title bar text.  
#IRR_EGDC_APP_WORKSPACE     ;Background color of multiple document Interface (MDI) applications.  
#IRR_EGDC_BUTTON_TEXT       ;Text on a button.  
#IRR_EGDC_GRAY_TEXT         ;Grayed (disabled) text.  
#IRR_EGDC_HIGH_LIGHT        ;Item(s) selected in a control.  
#IRR_EGDC_HIGH_LIGHT_TEXT   ;Text of item(s) selected in a control.  
#IRR_EGDC_INACTIVE_BORDER   ;Inactive window border.  
#IRR_EGDC_INACTIVE_CAPTION  ;Inactive window caption.  
#IRR_EGDC_TOOLTIP           ;Tool tip color.  
#IRR_EGDC_SCROLLBAR         ;Scrollbar gray area.  
#IRR_EGDC_WINDOW            ;Window background.  
#IRR_EGDC_COUNT
EndEnumeration


Enumeration
#IRR_EGUIET_ELEMENT         ; Unknown type. Use this when creating your own elements.  
#IRR_EGUIET_BUTTON          ; A button (IGUIButton).  
#IRR_EGUIET_CHECK_BOX       ; A check Box (IGUICheckBox).  
#IRR_EGUIET_COMBO_BOX       ; A combo Box (IGUIComboBox).  
#IRR_EGUIET_CONTEXT_MENU    ; A context menu (IGUIContextMenu).  
#IRR_EGUIET_EDIT_BOX        ; An edit Box (IGUIEditBox).  
#IRR_EGUIET_FILE_OPEN_DIALOG  ;A file open dialog (IGUIFileOpenDialog).  
#IRR_EGUIET_IN_OUT_FADER    ; A in/out fader (IGUIInOutFader).  
#IRR_EGUIET_IMAGE           ; An image (IGUIImage).  
#IRR_EGUIET_LIST_BOX        ; A list Box (IGUIListBox).  
#IRR_EGUIET_MESH_VIEWER     ; A mesh viewer (IGUIMeshViewer).  
#IRR_EGUIET_MODAL_SCREEN    ; A modal screen.  
#IRR_EGUIET_SCROLL_BAR      ; A scroll bar (IGUIScrollBar).  
#IRR_EGUIET_STATIC_TEXT     ; A Static text (IGUIStaticText).  
#IRR_EGUIET_TAB             ; A tab (IGUITab).  
#IRR_EGUIET_TAB_CONTROL     ; A tab control.  
#IRR_EGUIET_TOOL_BAR        ; A tool bar (IGUIToolBar).  
#IRR_EGUIET_WINDOW          ; A window.  
#IRR_EGUIET_COUNT           ; Not an element, amount of elements in there.  
EndEnumeration

Enumeration
#IRR_EGEIT_BUTTON_PANE_STANDARD = 0
#IRR_EGEIT_BUTTON_PANE_PRESSED
#IRR_EGEIT_SUNKEN_PANE_FLAT
#IRR_EGEIT_SUNKEN_PANE_SUNKEN
#IRR_EGEIT_WINDOW_BACKGROUND
#IRR_EGEIT_WINDOW_BACKGROUND_TITLEBAR
#IRR_EGEIT_MENU_PANE
#IRR_EGEIT_TOOLBAR
#IRR_EGEIT_TAB_BUTTON
#IRR_EGEIT_TAB_BODY
#IRR_EGEIT_COUNT
EndEnumeration




Enumeration  ;@NAME=ECOLOR_FORMAT
#IRR_ECF_A1R5G5B5 = 0     
#IRR_ECF_R5G6B5
#IRR_ECF_R8G8B8
#IRR_ECF_A8R8G8B8
EndEnumeration


Enumeration 
#IRR_ETS_VIEW       ;View transformation.  
#IRR_ETS_WORLD      ;World transformation.  
#IRR_ETS_PROJECTION ;Projection transformation.  
EndEnumeration


 
;Enumeration For querying features of the video driver. 
Enumeration 
#IRR_EVDF_RENDER_TO_TARGET =0 ;Is driver able To render To a surface?  
#IRR_EVDF_HARDWARE_TL         ;Is hardeware transform And lighting supported?  
#IRR_EVDF_MULTITEXTURE        ;
#IRR_EVDF_BILINEAR_FILTER     ;Is driver able To render With a bilinear filter applied?  
#IRR_EVDF_MIP_MAP             ;Can the driver handle mip maps?  
#IRR_EVDF_MIP_MAP_AUTO_UPDATE ;
#IRR_EVDF_STENCIL_BUFFER      ;Are stencilbuffers switched on And does the device support stencil buffers?  
#IRR_EVDF_VERTEX_SHADER_1_1   ;Is Vertex Shader 1.1 supported?  
#IRR_EVDF_VERTEX_SHADER_2_0   ;Is Vertex Shader 2.0 supported?  
#IRR_EVDF_VERTEX_SHADER_3_0   ;Is Vertex Shader 3.0 supported?  
#IRR_EVDF_PIXEL_SHADER_1_1    ;Is Pixel Shader 1.1 supported?  
#IRR_EVDF_PIXEL_SHADER_1_2    ;Is Pixel Shader 1.2 supported?  
#IRR_EVDF_PIXEL_SHADER_1_3    ;Is Pixel Shader 1.3 supported?  
#IRR_EVDF_PIXEL_SHADER_1_4    ;Is Pixel Shader 1.4 supported?  
#IRR_EVDF_PIXEL_SHADER_2_0    ;Is Pixel Shader 2.0 supported?  
#IRR_EVDF_PIXEL_SHADER_3_0    ;Is Pixel Shader 3.0 supported?  
#IRR_EVDF_ARB_VERTEX_PROGRAM_1 ;Are ARB vertex programs v1.0 supported?  
#IRR_EVDF_ARB_FRAGMENT_PROGRAM_1  ;Are ARB fragment programs v1.0 supported?  
#IRR_EVDF_ARB_GLSL            ;Is GLSL supported?  
#IRR_EVDF_HLSL                ;Is HLSL supported?  
#IRR_EVDF_TEXTURE_NPOT
#IRR_EVDF_FRAMEBUFFER_OBJECT
EndEnumeration




;Compiletarget for Vertex-Shader
Enumeration
#IRR_EVST_VS_1_1  = 0 
#IRR_EVST_VS_2_0   
#IRR_EVST_VS_2_a   
#IRR_EVST_VS_3_0  
EndEnumeration

;Compiletarget for Pixel-Shader
Enumeration
#IRR_EPST_PS_1_1  = 0 
#IRR_EPST_PS_1_2   
#IRR_EPST_PS_1_3   
#IRR_EPST_PS_1_4   
#IRR_EPST_PS_2_0   
#IRR_EPST_PS_2_a   
#IRR_EPST_PS_2_b   
#IRR_EPST_PS_3_0  
EndEnumeration


Enumeration
#IRR_ETCF_ALWAYS_16_BIT		; Forces the driver to create 16 bit textures always, 
							; indepenent of which format the file on disk has. When choosing this you
							; may loose some color detail, but gain much speed and memory. 16 bit textures
							; can be transferred twice as fast as 32 bit textures and only use half of the
							; space in memory. When using this flag, it does not make sence to use the 
							; flags ETCF_ALWAYS_32_BIT, ETCF_OPTIMIZED_FOR_QUALITY, or ETCF_OPTIMIZED_FOR_SPEED
							; at the same time.  
#IRR_ETCF_ALWAYS_32_BIT ; Forces the driver to create 32 bit textures always, indepenent of which format
						; the file on disk has. Please note that some drivers (like the software device)
						; will ignore this, because they only are able to create and use 16 bit textures.
						; When using this flag, it does not make sence to use the flags 
						; ETCF_ALWAYS_16_BIT, ETCF_OPTIMIZED_FOR_QUALITY, or ETCF_OPTIMIZED_FOR_SPEED at
						; the same time.  
#IRR_ETCF_OPTIMIZED_FOR_QUALITY ; Lets the driver decide in which format the texutures are created and
								; tries to make the textures look as good as possible. Usually it simply
								; chooses the format in which the texture was stored on disk. When using
								; this flag, it does not make sence to use the flags 
								; ETCF_ALWAYS_16_BIT, ETCF_ALWAYS_32_BIT, or ETCF_OPTIMIZED_FOR_SPEED 
								; at the same time.  
#IRR_ETCF_OPTIMIZED_FOR_SPEED   ; Lets the driver decide in which format the textures are created and tries
								; to create them maximizing render speed. When using this flag, it does not
								; make sence to use the flags ETCF_ALWAYS_16_BIT, ETCF_ALWAYS_32_BIT,
								; or ETCF_OPTIMIZED_FOR_QUALITY, at the same time.  
#IRR_ETCF_CREATE_MIP_MAPS  		;Automaticly creates mip map levels for the textures.  
EndEnumeration




Enumeration
#IRR_EMBF_OK      = $01;Flag For the ok button.  
#IRR_EMBF_CANCEL  = $02;Flag For the cancel button.  
#IRR_EMBF_YES     = $04;Flag For the yes button.  
#IRR_EMBF_NO      = $08;Flag For the no button.  
EndEnumeration

;XML-Nodetypes
Enumeration
#IRR_EXN_NONE         ;No xml node. This is usually the node If you did Not Read anything yet.  
#IRR_EXN_ELEMENT      ;An xml element such As <foo>.  
#IRR_EXN_ELEMENT_END  ;End of an xml element such As </foo>.  
#IRR_EXN_TEXT         ;Text within an xml element: <foo> this is the text. <foo>.  
#IRR_EXN_COMMENT      ;An xml comment like <!-- I am a comment --> Or a DTD definition.  
#IRR_EXN_CDATA        ;An xml cdata section like <![CDATA[ this is some CDATA ]]>.  
#IRR_EXN_UNKNOWN  
EndEnumeration



Enumeration 
#IRR_EET_GUI_EVENT = 0
#IRR_EET_MOUSE_INPUT_EVENT
#IRR_EET_KEY_INPUT_EVENT
#IRR_EET_LOG_TEXT_EVENT
#IRR_EET_USER_EVENT
EndEnumeration

 
;Enumeration For key actions. Used For example in the fps Camera.  
Enumeration       
#IRR_EKA_MOVE_FORWARD   
#IRR_EKA_MOVE_BACKWARD   
#IRR_EKA_STRAFE_LEFT   
#IRR_EKA_STRAFE_RIGHT   
#IRR_EKA_COUNT   
EndEnumeration
          
          


;--- Enums for Irrklang
; enum E_SOUND_ENGINE_OPTIONS
#IRRKLANG_ESEO_MULTI_THREADED = 1
#IRRKLANG_ESEO_MUTE_IF_NOT_FOCUSED =2
#IRRKLANG_ESEO_LOAD_PLUGINS = 4
#IRRKLANG_ESEO_USE_3D_BUFFERS = 8
#IRRKLANG_ESEO_PRINT_DEBUG_INFO_TO_DEBUGGER = $10
#IRRKLANG_ESEO_LINEAR_ROLLOFF = $20
#IRRKLANG_ESEO_DEFAULT_OPTIONS = #IRRKLANG_ESEO_MULTI_THREADED | #IRRKLANG_ESEO_LOAD_PLUGINS | #IRRKLANG_ESEO_USE_3D_BUFFERS | #IRRKLANG_ESEO_PRINT_DEBUG_INFO_TO_DEBUGGER
#IRRKLANG_ESEO_FORCE_32_BIT = $7FFFFFFF



;enum E_SOUND_OUTPUT_DRIVER
Enumeration
#IRRKLANG_ESOD_AUTO_DETECT = 0
#IRRKLANG_ESOD_DIRECT_SOUND
#IRRKLANG_ESOD_WIN_MM
#IRRKLANG_ESOD_ALSA
#IRRKLANG_ESOD_NULL
#IRRKLANG_ESOD_COUNT
#IRRKLANG_ESOD_FORCE_32_BIT = $7FFFFFFF
EndEnumeration



;enum E_STREAM_MODE
Enumeration
#IRRKLANG_ESM_AUTO_DETECT = 0
#IRRKLANG_ESM_STREAMING
#IRRKLANG_ESM_NO_STREAMING
#IRRKLANG_ESM_FORCE_32_BIT = $7FFFFFFF
EndEnumeration      
      

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Constant Definitions

; Flag definition
#IRR_OFF  = 0
#IRR_ON   = 1

; Input definitions
#IRR_KEY_UP   =0
#IRR_KEY_DOWN =1

; System Device definitions
#IRR_WINDOWED   = 0
#IRR_FULLSCREEN = 1

#IRR_NO_SHADOWS =0
#IRR_SHADOWS    =1

#IRR_IGNORE_EVENTS  =0
#IRR_CAPTURE_EVENTS =1

#IRR_LINEAR_FOG       =0
#IRR_EXPONENTIAL_FOG  =1

; Filing system definitions
#IRR_USE_CASE     =0
#IRR_IGNORE_CASE  =1
#IRR_USE_PATHS    =0
#IRR_IGNORE_PATHS =1

; 2D image definitions
#IRR_IGNORE_ALPHA =0
#IRR_USE_ALPHA    =1

; Node definitions
#IRR_INVISIBLE    =0
#IRR_VISIBLE      =1

#IRR_ONE_SHOT     =0
#IRR_LOOP         =1

; Particle definitions
#IRR_NO_EMITTER      =0
#IRR_DEFAULT_EMITTER =1

; GUI Interface definitions
#IRR_GUI_NO_BORDER  = 0
#IRR_GUI_BORDER     = 1
#IRR_GUI_NO_WRAP    = 0
#IRR_GUI_WRAP       = 1



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Type Definitions


; Irrlicht Keyboard And Mouse Event Structures

;@@structure IRR_MOUSE_EVENT
;@
;@@Description.de
;@		Structure um Maus-Events auszuwerten. 
;@
;@@Description
;@		Structure for Mouse events
Structure IRR_MOUSE_EVENT
    action.l
    wheel.f
    x.l
    y.l
EndStructure

;@@structure IRR_KEY_EVENT
;@
;@@Description.de
;@		Structure um Tasten-Events auszuwerten. 
;@
;@@Description
;@		Structure for Key events
Structure IRR_KEY_EVENT
    key.l
    direction.l
    flags.l
EndStructure


;@@structure IRR_GUI_EVENT
;@
;@@Description.de
;@		Structure um Gui-Events auszuwerten. 
;@
;@@Description
;@		Structure for Gui events
Structure IRR_GUI_EVENT
    Caller.l
    EventType.l
    itemID.l
EndStructure



; Particle emitter properties
Structure IRR_PARTICLE_EMITTER
    min_box_x.f     ; The bounding box For the emitter
    min_box_y.f
    min_box_z.f

    max_box_x.f
    max_box_y.f
    max_box_z.f

    direction_x.f
    direction_y.f
    direction_z.f

    min_paritlcles_per_second.l
    max_paritlcles_per_second.l

    min_start_color_red.l
    min_start_color_green.l
    min_start_color_blue.l

    max_start_color_red.l
    max_start_color_green.l
    max_start_color_blue.l
    
    min_lifetime.l
    max_lifetime.l
    
    max_angle_degrees.l
EndStructure

; a vertex used in creating custom Static mesh objects
Structure IRR_VERT
    x.f             ; The x position of the vertex
    y.f             ; The y position of the vertex
    z.f             ; The z position of the vertex
    normal_x.f      ; The x normal of the vertex
    normal_y.f      ; The y normal of the vertex
    normal_z.f      ; The z normal of the vertex
    vcolor.l        ; The 32bit ARGB color of the vertex
    texture_x.f     ; the x co-ordinate of the vertex on the texture (0 To 1)
    texture_y.f     ; the y co-ordinate of the vertex on the texture (0 To 1)
  EndStructure
  
  ; a vector consisting of 3 float values
  Structure IRR_VECTOR
    x.f
    y.f
    z.f
  EndStructure
  
  ; a vector consisting of 2 float values
  Structure IRR_VECTOR2DF
    x.f
    y.f
  EndStructure
  
  
; a structure to hold a Positin in Longs
Structure IRR_POS2D
    x.l;
    y.l;
EndStructure

; a structure to hold a Positin in Floats
Structure IRR_POS2DF
    x.f;
    y.f;
EndStructure

; a structure to hold a Dimension in Longs
Structure IRR_DIM2D
    width.l;
    height.l
EndStructure

; .............................................................................
; Irrlicht Object Types - these are used To represent objects in the Irrlicht
; engine And their purpose is To warn the programmer of type errors
; (thanks To v1ctor For the advice on this correction)


Structure irr_mesh    : EndStructure
Structure irr_texture : EndStructure
Structure irr_node    : EndStructure
Structure irr_camera  : EndStructure
Structure irr_terrain : EndStructure
Structure irr_selector: EndStructure
Structure irr_particle_system: EndStructure
Structure irr_animator: EndStructure
Structure irr_font: EndStructure
  

; TYPE irr_mesh As UINTEGER PTR
; 
; TYPE irr_texture As UINTEGER PTR
; 
; TYPE irr_node As UINTEGER PTR
; 
; TYPE irr_camera As UINTEGER PTR
; 
; TYPE irr_terrain As UINTEGER PTR
; 
; TYPE irr_selector As UINTEGER PTR
; 
; TYPE irr_particle_system As UINTEGER PTR
; 
; TYPE irr_animator As UINTEGER PTR
; 
; TYPE irr_font As UINTEGER PTR

Structure irr_model; UNION irr_model
  StructureUnion 
    *node.irr_node       ;As irr_node
    *camera.irr_camera    ; As irr_camera
    *terrain.irr_terrain   ; As irr_terrain
    *particles.irr_particle_system ; As irr_particle_system
  EndStructureUnion    
EndStructure ;End UNION

;----- Functions  ----------------------
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;System Functions





; a structure for a GUI-Event
Structure GuiEventStruct
  *caller.l
  EventType.l
EndStructure 

; a structure for a Mouse-Event
Structure MouseEventStruct 
  x.l
  y.l
  wheel.f
  event.l
EndStructure

; a structure for a Key-Event
Structure KeyEventStruct 
  Char.l     ; Eventuell umwandeln in string
  key.l
  PressedDown.l
  Shift.l
  Control.l  
EndStructure

; a structure for a Log-Event
Structure LogEventStruct
  text.l ; point auf Text !
  Level.l 
EndStructure 

; a structure for a User-Event
Structure UserEventStruct 
  UserData1.l
  UserData2.l
  UserData3.f 
EndStructure 
  
; a structure for Events in the EventReceiver
Structure SEvent
  EventType.l
  StructureUnion
    GuiEvent.GuiEventStruct;
    MouseEvent.MouseEventStruct;
    KeyEvent.KeyEventStruct
    LogEvent.LogEventStruct
    UserEvent.UserEventStruct
  EndStructureUnion
EndStructure
  
Structure IRR_KEYMAP
  action.l
  KeyCode.l
EndStructure 


Structure SD3D9VideoData
  *D3D9.l     ;IDirect3D9* D3D9;
  *D3D9Dev.l ; IDirect3DDevice9* D3DDev9;
  hwnd.l ; s32 hwnd; 
EndStructure 

Structure SD3D8VideoData
  *D3D8.l     ;IDirect3D9* D3D9;
  *D3D8Dev.l ; IDirect3DDevice9* D3DDev9;
  hwnd.l ; s32 hwnd; 
EndStructure 

Structure SOpenGLVideoData
  hdc.l ; s32 hdc; 
  HRc.l ; s32 HRc; 
  hwnd.l ;  s32 hwnd;
EndStructure 

Structure SOpenGLLinuxVideoData
  ; XWindow Handle
  Window.l  ;  u32 Window;
EndStructure 

Structure SExposedVideoData
  StructureUnion 
    D3D9.SD3D9VideoData
    D3D8.SD3D8VideoData
    OpenGL.SOpenGLVideoData
    OpenGLLinux.SOpenGLLinuxVideoData
  EndStructureUnion
EndStructure 


Structure sPhysicsCar
	;The car body's offset from the origin. For example, if you want the car body to be 5 units above the ground, this should be (0, 5.0f, 0).
	carBodyOffset.IRR_VECTOR;
	; The car body is currently modelled As a box, With these dimensions. This will be changed soon!
	carBodySize.IRR_VECTOR;
	; The car's mass. Note that this is the mass of the car body, not the tires.
	carMass.f;

	;The front axle's offset from the origin. This will determine how far forwards the front wheels are.
	frontAxleOffset.f;
	;The rear axle's offset from the origin. This should be a positive number. This will determine how far back the rear wheels are.
	rearAxleOffset.f;

	; The axle width. The same value will be used For both front And back axles. This will determine how far apart the left And right wheels are.
	axleWidth.f;

	; The mass of a tire.
	tireMass.f;

	; The width of a tire.
	tireWidth.f;
	; The radius of a tire.
	tireRadius.f;

	; The scene node For the car body.
	*carBodyNode.l;
	; The scene node For the <B>front left</B> tire.
	*tireNode_FL.l;
	; The scene node For the <B>front right</B> tire.
	*tireNode_FR.l;
	; The scene node For the <B>rear left</B> tire.
	*tireNode_RL.l;
	; The scene node For the <B>rear right</B> tire.
	*tireNode_RR.l;

	; The tire suspension shock - this is passed straight To Newton. From the Newton docs: "parametrized damping constant for a spring, mass, damper system. A value of one corresponds to a critically damped system."
  tireSuspensionShock.f;
	; The tire suspension spring - this is passed straight To Newton. From the Newton docs: "parametrized spring constant for a spring, mass, damper system. A value of one corresponds to a critically damped system."
	tireSuspensionSpring.f; 
	; The tire suspension length - this is passed straight To Newton. From the Newton docs: "distance from the tire set position to the upper stop on the vehicle body frame. The total suspension length is twice that."
	tireSuspensionLength.f;

	; The max steering angle the car is able To make. A higher number means the car will be able To make tighter turns.
	maxSteerAngle.f;
	; The max torque that the car can produce. A higher number means that the car gan go faster, but too high And it will start To skid And lose control.
	maxTorque.f;
	; The max brakes that the car has. A higher number means stronger brakes.
	maxBrakes.f;
EndStructure



XIncludeFile #PB_Compiler_Home + "Includes\Imports\IrrlichtWrapper_Import.pbi"

; Simple handy thingies

Macro IrrHideMouse(): IrrDisplayMouse(0) : EndMacro
Macro IrrShowMouse(): IrrDisplayMouse(1) : EndMacro

Procedure.l IrrMakeARGB ( Alpha.b, Red.b, Green.b, Blue.b)
    ProcedureReturn (Alpha << 24) + (Red << 16) + (Green << 8) + Blue
EndProcedure

Procedure.l IrrPBImage2Texture(ImageNo.l, name.s, hasAlpha.l = #True)
  Define *Image.l = 0
  Define Format.l = #IRR_ECF_A8R8G8B8  ; Standard
  Define ImageID.l
  Define ImageInfo.BITMAP
  Define ImWidth.l, ImHeight.l, ImBytes.l, ImLine.l
  Define *IImage.l, *MeshTexture.l
  
  ImageID = ImageID(ImageNo)
  If GetObject_(ImageID, SizeOf(BITMAP), @ImageInfo)
    ImWidth  = ImageInfo\bmWidth
    ImHeight = ImageInfo\bmHeight
    ImBytes  = ImageInfo\bmBitsPixel/8
    ImLine   = ImWidth*ImBytes
    *Image   = ImageInfo\bmBits
  EndIf
  
  ;find the right Format
  
  Select ImageDepth(ImageNo)
    Case 1,8, 16
      Debug("Image needs minimal Depth of 24 Bit !!")
    Case 24
      If hasAlpha 
        Format = #IRR_ECF_A1R5G5B5
      Else
        Format = #IRR_ECF_R8G8B8
      EndIf
    Case 32
      If hasAlpha 
        Format = #IRR_ECF_A8R8G8B8
      Else
        Format = #IRR_ECF_R8G8B8
      EndIf
  EndSelect       
   
  ;Create a Image from Data
  *IImage.l = IrrCreateImageFromData(Format,ImWidth,ImHeight,*Image)
  *MeshTexture = IrrAddTextureFromImage(name,*IImage)
  IrrDropPointer(*IImage)
  ProcedureReturn  *MeshTexture

EndProcedure 





; IDE Options = PureBasic v4.02 (Windows - x86)
; CursorPosition = 796
; FirstLine = 782
; jaPBe Version=3.7.5.643
; Build=0
; FirstLine=781
; CursorPosition=796
; ExecutableFormat=Windows
; DontSaveDeclare
; IDE Options = PureBasic 4.10 Beta 2 (Windows - x86)
; CursorPosition = 828
; FirstLine = 788
; Folding = -