text: #pragma once
  #include <cstdint>
  
  namespace RenderingServerEnums {
  enum {
  
      NO_INDEX_ARRAY = -1,
      ARRAY_WEIGHTS_SIZE = 4,
      CANVAS_ITEM_Z_MIN = -4096,
      CANVAS_ITEM_Z_MAX = 4096,
      MAX_GLOW_LEVELS = 7,
  };
  
  /* TEXTURE API */
  
  enum TextureFlags {
      TEXTURE_FLAG_MIPMAPS = 1, /// Enable automatic mipmap generation - when available
      TEXTURE_FLAG_REPEAT = 2, /// Repeat texture (Tiling), otherwise Clamping
      TEXTURE_FLAG_FILTER = 4, /// Create texture with linear (or available) filter
      TEXTURE_FLAG_ANISOTROPIC_FILTER = 8,
      TEXTURE_FLAG_CONVERT_TO_LINEAR = 16,
      TEXTURE_FLAG_MIRRORED_REPEAT = 32, /// Repeat texture, with alternate sections mirrored
      TEXTURE_FLAG_USED_FOR_STREAMING = 2048,
      TEXTURE_FLAGS_DEFAULT = TEXTURE_FLAG_REPEAT | TEXTURE_FLAG_MIPMAPS | TEXTURE_FLAG_FILTER
  };
  
  enum TextureType : int8_t  {
      TEXTURE_TYPE_2D,
      TEXTURE_TYPE_EXTERNAL,
      TEXTURE_TYPE_CUBEMAP,
      TEXTURE_TYPE_2D_ARRAY,
      TEXTURE_TYPE_3D,
  };
  
  enum CubeMapSide : int8_t  {
  
      CUBEMAP_LEFT,
      CUBEMAP_RIGHT,
      CUBEMAP_BOTTOM,
      CUBEMAP_TOP,
      CUBEMAP_FRONT,
      CUBEMAP_BACK
  };
  /* SHADER API */
  
  enum class ShaderMode : int8_t  {
  
      SPATIAL,
      CANVAS_ITEM,
      PARTICLES,
      MAX
  };
  
  /* COMMON MATERIAL API */
  
  enum {
      MATERIAL_RENDER_PRIORITY_MIN = -128,
      MATERIAL_RENDER_PRIORITY_MAX = 127,
  
  };
  
  /* MESH API */
  
  enum ArrayType : int8_t  {
  
      ARRAY_VERTEX = 0,
      ARRAY_NORMAL = 1,
      ARRAY_TANGENT = 2,
      ARRAY_COLOR = 3,
      ARRAY_TEX_UV = 4,
      ARRAY_TEX_UV2 = 5,
      ARRAY_BONES = 6,
      ARRAY_WEIGHTS = 7,
      ARRAY_INDEX = 8,
      ARRAY_MAX = 9
  };
  
  enum ArrayFormat {
      /* ARRAY FORMAT FLAGS */
      ARRAY_FORMAT_VERTEX = 1 << ARRAY_VERTEX, // mandatory
      ARRAY_FORMAT_NORMAL = 1 << ARRAY_NORMAL,
      ARRAY_FORMAT_TANGENT = 1 << ARRAY_TANGENT,
      ARRAY_FORMAT_COLOR = 1 << ARRAY_COLOR,
      ARRAY_FORMAT_TEX_UV = 1 << ARRAY_TEX_UV,
      ARRAY_FORMAT_TEX_UV2 = 1 << ARRAY_TEX_UV2,
      ARRAY_FORMAT_BONES = 1 << ARRAY_BONES,
      ARRAY_FORMAT_WEIGHTS = 1 << ARRAY_WEIGHTS,
      ARRAY_FORMAT_INDEX = 1 << ARRAY_INDEX,
  
      ARRAY_COMPRESS_BASE = (ARRAY_INDEX + 1),
      ARRAY_COMPRESS_VERTEX = 1 << (ARRAY_VERTEX + ARRAY_COMPRESS_BASE), // mandatory
      ARRAY_COMPRESS_NORMAL = 1 << (ARRAY_NORMAL + ARRAY_COMPRESS_BASE),
      ARRAY_COMPRESS_TANGENT = 1 << (ARRAY_TANGENT + ARRAY_COMPRESS_BASE),
      ARRAY_COMPRESS_COLOR = 1 << (ARRAY_COLOR + ARRAY_COMPRESS_BASE),
      ARRAY_COMPRESS_TEX_UV = 1 << (ARRAY_TEX_UV + ARRAY_COMPRESS_BASE),
      ARRAY_COMPRESS_TEX_UV2 = 1 << (ARRAY_TEX_UV2 + ARRAY_COMPRESS_BASE),
      ARRAY_COMPRESS_BONES = 1 << (ARRAY_BONES + ARRAY_COMPRESS_BASE),
      ARRAY_COMPRESS_WEIGHTS = 1 << (ARRAY_WEIGHTS + ARRAY_COMPRESS_BASE),
      ARRAY_COMPRESS_INDEX = 1 << (ARRAY_INDEX + ARRAY_COMPRESS_BASE),
  
      ARRAY_FLAG_USE_2D_VERTICES = ARRAY_COMPRESS_INDEX << 1,
      ARRAY_FLAG_USE_16_BIT_BONES = ARRAY_COMPRESS_INDEX << 2,
      ARRAY_FLAG_USE_DYNAMIC_UPDATE = ARRAY_COMPRESS_INDEX << 3,
  
      ARRAY_COMPRESS_DEFAULT = ARRAY_COMPRESS_NORMAL | ARRAY_COMPRESS_TANGENT | ARRAY_COMPRESS_COLOR | ARRAY_COMPRESS_TEX_UV | ARRAY_COMPRESS_TEX_UV2 | ARRAY_COMPRESS_WEIGHTS
  
  };
  
  enum PrimitiveType : int8_t  {
      PRIMITIVE_POINTS = 0,
      PRIMITIVE_LINES = 1,
      PRIMITIVE_LINE_STRIP = 2,
      PRIMITIVE_LINE_LOOP = 3,
      PRIMITIVE_TRIANGLES = 4,
      PRIMITIVE_TRIANGLE_STRIP = 5,
      PRIMITIVE_TRIANGLE_FAN = 6,
      PRIMITIVE_MAX = 7,
  };
  
  enum BlendShapeMode : int8_t  {
      BLEND_SHAPE_MODE_NORMALIZED,
      BLEND_SHAPE_MODE_RELATIVE,
  };
  /* MULTIMESH API */
  
  enum MultimeshTransformFormat : int8_t  {
      MULTIMESH_TRANSFORM_2D,
      MULTIMESH_TRANSFORM_3D,
  };
  
  enum MultimeshColorFormat  : int8_t {
      MULTIMESH_COLOR_NONE,
      MULTIMESH_COLOR_8BIT,
      MULTIMESH_COLOR_FLOAT,
      MULTIMESH_COLOR_MAX
  };
  
  enum MultimeshCustomDataFormat : int8_t  {
      MULTIMESH_CUSTOM_DATA_NONE,
      MULTIMESH_CUSTOM_DATA_8BIT,
      MULTIMESH_CUSTOM_DATA_FLOAT,
      MULTIMESH_CUSTOM_DATA_MAX,
  };
  /* Light API */
  
  enum LightType : int8_t {
      LIGHT_DIRECTIONAL,
      LIGHT_OMNI,
      LIGHT_SPOT
  };
  
  enum LightParam  : int8_t {
  
      LIGHT_PARAM_ENERGY,
      LIGHT_PARAM_INDIRECT_ENERGY,
      LIGHT_PARAM_SPECULAR,
      LIGHT_PARAM_RANGE,
      LIGHT_PARAM_ATTENUATION,
      LIGHT_PARAM_SPOT_ANGLE,
      LIGHT_PARAM_SPOT_ATTENUATION,
      LIGHT_PARAM_CONTACT_SHADOW_SIZE,
      LIGHT_PARAM_SHADOW_MAX_DISTANCE,
      LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET,
      LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET,
      LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET,
      LIGHT_PARAM_SHADOW_NORMAL_BIAS,
      LIGHT_PARAM_SHADOW_BIAS,
      LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE,
      LIGHT_PARAM_MAX
  };
  // omni light
  enum LightOmniShadowMode : int8_t {
      LIGHT_OMNI_SHADOW_DUAL_PARABOLOID,
      LIGHT_OMNI_SHADOW_CUBE,
  };
  // omni light
  enum LightOmniShadowDetail : int8_t{
      LIGHT_OMNI_SHADOW_DETAIL_VERTICAL,
      LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL
  };
  // directional light
  enum LightDirectionalShadowMode : int8_t {
      LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL,
      LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS,
      LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS
  };
  
  enum LightDirectionalShadowDepthRangeMode : int8_t {
      LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE,
      LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED,
  
  };
  /* PROBE API */
  
  enum ReflectionProbeUpdateMode : int8_t {
      REFLECTION_PROBE_UPDATE_ONCE,
      REFLECTION_PROBE_UPDATE_ALWAYS,
  };
  /* PARTICLES API */
  
  enum ParticlesDrawOrder : int8_t  {
      PARTICLES_DRAW_ORDER_INDEX,
      PARTICLES_DRAW_ORDER_LIFETIME,
      PARTICLES_DRAW_ORDER_VIEW_DEPTH,
  };
  
  /* VIEWPORT TARGET API */
  
  enum ViewportUpdateMode : int8_t {
      VIEWPORT_UPDATE_DISABLED,
      VIEWPORT_UPDATE_ONCE, //then goes to disabled, must be manually updated
      VIEWPORT_UPDATE_WHEN_VISIBLE, // default
      VIEWPORT_UPDATE_ALWAYS
  };
  enum ViewportClearMode : int8_t  {
  
      VIEWPORT_CLEAR_ALWAYS,
      VIEWPORT_CLEAR_NEVER,
      VIEWPORT_CLEAR_ONLY_NEXT_FRAME
  };
  enum ViewportMSAA : int8_t {
      VIEWPORT_MSAA_DISABLED,
      VIEWPORT_MSAA_2X,
      VIEWPORT_MSAA_4X,
      VIEWPORT_MSAA_8X,
      VIEWPORT_MSAA_16X,
      VIEWPORT_MSAA_EXT_2X,
      VIEWPORT_MSAA_EXT_4X,
  };
  enum ViewportUsage : int8_t {
      VIEWPORT_USAGE_2D,
      VIEWPORT_USAGE_2D_NO_SAMPLING,
      VIEWPORT_USAGE_3D,
      VIEWPORT_USAGE_3D_NO_EFFECTS,
  };
  enum ViewportRenderInfo : int8_t {
  
      VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME,
      VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME,
      VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME,
      VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME,
      VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME,
      VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME,
      VIEWPORT_RENDER_INFO_2D_ITEMS_IN_FRAME,
      VIEWPORT_RENDER_INFO_2D_DRAW_CALLS_IN_FRAME,
      VIEWPORT_RENDER_INFO_MAX
  };
  enum ViewportDebugDraw : int8_t {
      VIEWPORT_DEBUG_DRAW_DISABLED,
      VIEWPORT_DEBUG_DRAW_UNSHADED,
      VIEWPORT_DEBUG_DRAW_OVERDRAW,
      VIEWPORT_DEBUG_DRAW_WIREFRAME,
  };
  /* ENVIRONMENT API */
  
  enum EnvironmentBG : int8_t {
  
      ENV_BG_CLEAR_COLOR,
      ENV_BG_COLOR,
      ENV_BG_SKY,
      ENV_BG_COLOR_SKY,
      ENV_BG_CANVAS,
      ENV_BG_KEEP,
      ENV_BG_CAMERA_FEED,
      ENV_BG_MAX
  };
  enum EnvironmentDOFBlurQuality : int8_t {
      ENV_DOF_BLUR_QUALITY_LOW,
      ENV_DOF_BLUR_QUALITY_MEDIUM,
      ENV_DOF_BLUR_QUALITY_HIGH,
  };
  enum EnvironmentGlowBlendMode : int8_t {
      GLOW_BLEND_MODE_ADDITIVE,
      GLOW_BLEND_MODE_SCREEN,
      GLOW_BLEND_MODE_SOFTLIGHT,
      GLOW_BLEND_MODE_REPLACE,
  };
  enum EnvironmentToneMapper : int8_t {
      ENV_TONE_MAPPER_LINEAR,
      ENV_TONE_MAPPER_REINHARD,
      ENV_TONE_MAPPER_FILMIC,
      ENV_TONE_MAPPER_ACES
  };
  enum EnvironmentSSAOQuality : int8_t {
      ENV_SSAO_QUALITY_LOW,
      ENV_SSAO_QUALITY_MEDIUM,
      ENV_SSAO_QUALITY_HIGH,
  };
  
  enum EnvironmentSSAOBlur : int8_t {
      ENV_SSAO_BLUR_DISABLED,
      ENV_SSAO_BLUR_1x1,
      ENV_SSAO_BLUR_2x2,
      ENV_SSAO_BLUR_3x3,
  };
  /* SCENARIO API */
  
  enum ScenarioDebugMode : int8_t {
      SCENARIO_DEBUG_DISABLED,
      SCENARIO_DEBUG_WIREFRAME,
      SCENARIO_DEBUG_OVERDRAW,
      SCENARIO_DEBUG_SHADELESS,
  
  };
  /* INSTANCING API */
  
  enum InstanceType {
  
      INSTANCE_NONE,
      INSTANCE_MESH,
      INSTANCE_MULTIMESH,
      INSTANCE_IMMEDIATE,
      INSTANCE_PARTICLES,
      INSTANCE_LIGHT,
      INSTANCE_REFLECTION_PROBE,
      INSTANCE_GI_PROBE,
      INSTANCE_LIGHTMAP_CAPTURE,
      INSTANCE_MAX,
  
      INSTANCE_GEOMETRY_MASK = (1 << INSTANCE_MESH) | (1 << INSTANCE_MULTIMESH) | (1 << INSTANCE_IMMEDIATE) | (1 << INSTANCE_PARTICLES)
  };
  enum InstanceFlags : int8_t {
      INSTANCE_FLAG_USE_BAKED_LIGHT,
      INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE,
      INSTANCE_FLAG_MAX
  };
  
  enum ShadowCastingSetting : int8_t {
      SHADOW_CASTING_SETTING_OFF,
      SHADOW_CASTING_SETTING_ON,
      SHADOW_CASTING_SETTING_DOUBLE_SIDED,
      SHADOW_CASTING_SETTING_SHADOWS_ONLY,
  };
  enum NinePatchAxisMode : int8_t {
      NINE_PATCH_STRETCH,
      NINE_PATCH_TILE,
      NINE_PATCH_TILE_FIT,
  };
  enum CanvasLightMode : int8_t {
      CANVAS_LIGHT_MODE_ADD,
      CANVAS_LIGHT_MODE_SUB,
      CANVAS_LIGHT_MODE_MIX,
      CANVAS_LIGHT_MODE_MASK,
  };
  
  enum CanvasLightShadowFilter : int8_t {
      CANVAS_LIGHT_FILTER_NONE,
      CANVAS_LIGHT_FILTER_PCF3,
      CANVAS_LIGHT_FILTER_PCF5,
      CANVAS_LIGHT_FILTER_PCF7,
      CANVAS_LIGHT_FILTER_PCF9,
      CANVAS_LIGHT_FILTER_PCF13,
  };
  enum CanvasOccluderPolygonCullMode : int8_t {
      CANVAS_OCCLUDER_POLYGON_CULL_DISABLED,
      CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE,
      CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE,
  };
  
  /* STATUS INFORMATION */
  
  enum RenderInfo : int8_t {
  
      INFO_OBJECTS_IN_FRAME,
      INFO_VERTICES_IN_FRAME,
      INFO_MATERIAL_CHANGES_IN_FRAME,
      INFO_SHADER_CHANGES_IN_FRAME,
      INFO_SURFACE_CHANGES_IN_FRAME,
      INFO_DRAW_CALLS_IN_FRAME,
      INFO_2D_ITEMS_IN_FRAME,
      INFO_2D_DRAW_CALLS_IN_FRAME,
      INFO_USAGE_VIDEO_MEM_TOTAL,
      INFO_VIDEO_MEM_USED,
      INFO_TEXTURE_MEM_USED,
      INFO_VERTEX_MEM_USED,
  };
  
  /* TESTING */
  
  enum Features : int8_t {
      FEATURE_SHADERS,
      FEATURE_MULTITHREADED,
  };
  
  }
  //typedef RenderingServer VS; // makes it easier to use
  namespace RS=RenderingServerEnums;
  