/*
    Raydium - CQFD Corp.
    http://raydium.org/
    Released under both BSD license and Lesser GPL library license.
    See "license.txt" file.
*/

// Raydium configuration file
// For other options, see common.h

// Enable PHP support
#ifndef NO_PHP_SUPPORT
#define PHP_SUPPORT
#define PHP_INI_PATH "./"
#endif

// You may define this during compilation (-DRAYPHP_PATH=\"...\")
#ifndef RAYPHP_PATH
#define RAYPHP_PATH "rayphp"
#endif

#ifndef NO_ODE_SUPPORT
// Enable ODE physics support
#define ODE_SUPPORT
#define ODE_QUICKSTEP
#define ODE_PREDICTION
//#define ODE_NETWORK_GHOSTS
#endif

// RegApi Support (exports Raydium API to PHP)
#define REG_API

// enable profiling
#define DEBUG_PROFILE

// (link to OpenAL is always required !)
//#define NO_SOUND_DEBUG

// Allow Xinerama Support for X11
#define HAVE_XINERAMA

// Allow DPMS Support for X11
#define HAVE_DPMS

// will highlight triangle with tag != 0 at render time :
//#define RENDER_DEBUG_TAG

// disable clipping
//#define RENDER_DEBUG_NO_CLIP

// disable display list optims
//#define DEBUG_RENDER_DISABLE_DISPLAYLISTS

// draw shadow map (view from main light)
//#define DEBUG_SHADOW_MAP_VIEW

// draw HDR stencil (press F10)
//#define DEBUG_HDR_STENCIL

// debug network "tcp style" ACKs
//#define DEBUG_NETWORK

// debug ODE Network interface (verbose !)
//#define DEBUG_ODENET

// enable movie linear framerate (1/x sec)
// press F11 and see movie/ subdir [or create it]
//#define DEBUG_MOVIE 25

// allow vertex lighting for lightmaps textures
//#define RENDER_ALLOW_LIGHTING_FOR_LIGHTMAPS

// raydium_capture_frame_jpeg() JPEG quality percentage
#define DEBUG_JPEG_QUALITY      75

// axis used by Volumetric Fog when rendering meshes
// values: 0=x y=1 z=2
#define RENDER_VOLUMETRIC_FOG_AXIS      2

// reverse values from axis ?
#define RENDER_VOLUMETRIC_FOG_AXIS_REVERSE

// on iPhone 4G, disable retina screen (480x320 instead of native 960x640)
//#define IPHONEOS_NORETINA

// experimental Vertex Array renderer
//#define DEBUG_RENDER_VERTEXARRAY
//#define DEBUG_RENDER_VERTEXARRAY_GLBINDS_DISPLAY
 ##raydium_hdr_enable()## before creating a lens flare effect, so the
textures will be automagically set to be HDR able.

This effect can be quiet heavy on the framerate, especially when using multiple
big blended layers. So please be careful, you have been warned. ;)
**/

__rayapi void raydium_lensflare_init(void);
/**
Internal use.
**/

__rayapi void raydium_lensflare_enable(void);
/**
Enables the lens flare effect system.
**/

__rayapi void raydium_lensflare_disable(void);
/**
Disables the lens flare effect system.
**/

__rayapi signed char raydium_lensflare_isvalid(int lf);
/**
Internal use, but you can call this function to verify if ##lf## lens flare
has a valid id inside array range, see ##RAYDIUM_MAX_LENSFLARES##.
**/

__rayapi void raydium_lensflare_reset(int lf);
/**
Deactivates and resets ##lf## lens flare to the initial state.
**/

__rayapi void raydium_lensflare_on(int lf);
/**
Turns ##lf## lens flare on.
**/

__rayapi void raydium_lensflare_off(int lf);
/**
Turns ##lf## lens flare off.
**/

__rayapi void raydium_lensflare_switch(int lf);
/**
Toggles ##lf## lens flare state.
**/

__rayapi void raydium_lensflare_texture_name(int lf, char *name);
/**
This function allows to load custom name lens flare textures.
By default the names of the lens flare textures are:
##LFglow.tga##, ##LFstar.tga##, ##LFstreak.tga##, ##LFhalo.tga##,
##LFray.tga##, ##LFanam.tga##.

However with this function you can define your own set of lens flare textures,
with the following name format:
##LF_<name>_glow.tga##, ##LF_<name>_star.tga##, ...

Example:
%%(c)
raydium_lensflare_texture_name(raydium_lensflare_find("myname"),"mytex");
// Lens flare textures will be LF_mytex_glow.tga, LF_mytex_star.tga, ...
%%

If you want to use lens flare effects together with HDR, be sure to enable HDR
calling ##raydium_hdr_enable()## before using this function, so the textures
will be automagically set to be HDR able.
**/

__rayapi void raydium_lensflare_move(int lf, float *pos);
/**
This function will move ##lf## lens flare to position ##pos##.
##pos## is a float array of three values (x,y,z).
**/

__rayapi void raydium_lensflare_move_3f(int lf, float x, float y, float z);
/**
Same as above, but using three float values.
**/

__rayapi void raydium_lensflare_move_relative_3f(int lf, float x, float y, float z);
/**
Same as above, but using relative coordinates. Useful for ingame displacements.
**/

__rayapi signed char raydium_lensflare_fx_isvalid(int fx);
/**
Internal use, but you can call this function to verify if ##fx## FX group
has a valid id inside array range, see ##RAYDIUM_LENSFLARE_MAX_FX##.
**/

__rayapi void raydium_lensflare_fx_on(int lf, int fx);
/**
Turns ##fx## FX group on.
**/

__rayapi void raydium_lensflare_fx_off(int lf, int fx);
/**
Turns ##fx## FX group off.
**/

__rayapi void raydium_lensflare_fx_switch(int lf, int fx);
/**
Toggles ##fx## FX group state.
**/

__rayapi void raydium_lensflare_fx_size_change(int lf, int fx, float s);
/**
Sets ##s## size of ##fx## FX group within ##lf## lens flare effect.
**/

__rayapi void raydium_lensflare_fx_color_change(int lf, int fx, float r, float g, float b);
/**
Sets color of ##fx## FX group within ##lf## lens flare effect.
**/

__rayapi void raydium_lensflare_fx_alpha_change(int lf, int fx, float a);
/**
Sets alpha transparency of ##fx## FX group within ##lf## lens flare effect.
**/

__rayapi void raydium_lensflare_fx_color_rgba(int lf, int fx, float r, float g, float b, float a);
/**
Sets color and alpha of ##fx## FX group within ##lf## lens flare effect.
**/

__rayapi void raydium_lensflare_fx_velocity_change(int lf, int fx, float v);
/**
Sets ##v## velocity of ##fx## FX group within ##lf## lens flare effect.
**/

__rayapi signed char raydium_lensflare_internal_load(int lf, char *filename);
/**
Internal use, load ##lf## lens flare values from ##filename## configuration.
**/

__rayapi int raydium_lensflare_find(char *name);
/**
Resolves lens flare id from its ##name##.
**/

__rayapi int raydium_lensflare_create(char *name, char *filename);
/**
Builds a new lens flare effect with ##name## using the values from the
##filename## configuration and returns the new lens flare id or -1 on error.

You can also call this function several times with the same ##name## to
overwrite the lens flare values with different ##filename## configurations.

There are ##RAYDIUM_MAX_LENSFLARES## slots available at the same time.
**/

__rayapi signed char raydium_lensflare_internal_point_is_occluded(float x, float y, float z);
/**
Internal use.
**/

__rayapi void raydium_lensflare_fx_internal_draw(int lf, int fx, int id, int tex, float d, float cx, float cy, float vx, float vy, float g, float pt);
/**
Internal use.
**/

__rayapi void raydium_lensflare_draw(int lf);
/**
Internal use.
**/

__rayapi void raydium_lensflare_draw_all(void);
/**
Internal use.
**/

#endif