/*************************************************************************

	form*Z by auto*des*sys, Inc.
	Copyright (c) 1989-2004 auto*des*sys, Inc.  All rights reserved.

	File:			x_rndr.h
	Author:			auto*des*sys, Inc.
	Created on:		02/03/04
	Description:	X-Renderer plugin header.

*************************************************************************/

#ifndef __X_RNDR_H
#define __X_RNDR_H 1


/************************************************************************
	formZ api headers
*************************************************************************/


/* Required for all plugins */

#include "fzrt_api.h"

/* Required for plugins created by auto*des*sys, Inc. */

#include "formz_vendor.h"

/* Required for this specific plugin */

#include "fz_rndr_api.h" /* required for the rendering fsets */
#include "fz_proj_api.h" /* required for the proj fset */
#include "fz_ffmt_api.h" /* required for the ffmt fset */
#include "fz_notf_api.h" /* required for the notf fset */
#include "fz_tmap_api.h" /* required for the tmap fset */
#include "fz_wind_api.h" /* required for the wind fset */
#include "fz_srep_api.h"

/************************************************************************
	Globals
*************************************************************************/


/* X-Renderer plugin identification */

#define X_RNDR_PLUGIN_UUID			"\x1e\xee\x93\x79\x90\x41\x40\x6d\xbb\x3c\xc6\x84\xd0\x52\x1e\x63"
#define X_RNDR_PLUGIN_VERSION		FZPL_VERS_MAKE(6,1,0,0)
#define X_RNDR_PLUGIN_VENDOR		FORMZ_VENDOR
#define X_RNDR_PLUGIN_URL			FORMZ_VENDOR_URL

#define X_VCTR_PLUGIN_UUID			"\x1e\x4c\x18\x73\xc4\x48\x48\x6a\x99\xa5\x35\xc8\xf9\xc4\x35\xd7"
#define X_VCTR_PLUGIN_TMPL_UUID		"\x1e\x63\xd8\xf5\x81\xd2\x4a\x47\x8a\xc2\xd4\xe0\xf8\x63\x56\x70"

#define X_PIXEL_PLUGIN_UUID			"\x1e\xab\x12\x0f\x03\x7c\x41\x4c\x87\x19\x02\x02\x46\x61\x75\x15"
#define X_PIXEL_PLUGIN_TMPL_UUID	"\x1e\xbf\xab\xe0\x15\x09\x49\x8a\xb0\xfe\xf0\x9a\x06\x80\x4a\xbf"

#define X_PIXEL_LREP_UUID           "\x1e\xbf\xac\xe1\x16\x0a\x4a\x8b\xb1\xff\xf1\x9b\x07\x81\x4b\xc"
#define X_PIXEL_LREP_XPIXEL_LIGHT   "\x1f\xc0\xc0\xc0\xc0\x00\x4a\x8b\xb1\xff\xf1\x9b\x07\x81\x4b\xc"
#define X_PIXEL_LREP_PARM_INTENS    "\x2f\xd1\xd1\xd1\xd1\x00\x4a\x8b\xb1\xff\xf1\x9b\x07\x81\x4b\xc"


/* localization strings */

#define X_RNDR_STRINGS			1
#define X_RNDR_NAME_STR			1

#define X_VCTR_STRINGS			2
#define X_VCTR_NAME_STR			1
#define X_VCTR_OPTS_NAME_STR	2
#define AMPLITUDE_STR			3
#define RESOLUTION_STR			4
#define CONNECT_STR				5
#define EXT_BYND_STR			6
#define EXT_LEN_STR				7
#define PERTURB_EXT_STR			8
#define SHORTEN_LEN_STR			9
#define RND_SEED_STR			10

#define X_PIXEL_STRINGS			3
#define X_PIXEL_NAME_STR		1
#define X_PIXEL_OPTS_NAME_STR	2
#define SHADOWS_STR				3
#define SPECULAR_STR			4
#define SPECULAR_SHI_STR		5
#define TEXTURING_STR			6

#define X_ERROR_STRINGS			4
#define X_ERROR_PIXEL_RENDER	1
#define X_ERROR_VCTR_RENDER		2
#define X_ERROR_VCTR_EXPT		3

/* for localization */
#define STRING_SIZE			256

/* function set provided by formZ. */
extern const fzpl_fset_glue_fset* _fset_glue;

/* needed for textures */
#define UCHAR_FACTOR 1.0 / 255.0

/* formZ provided function sets to hold on to */
extern fz_ffmt_fset			_ffmt_funcs;
extern fz_fzrt_file_fset	_file_funcs;
extern fz_fuim_fset			_fuim_funcs;
extern fz_fzrt_base_fset	_base_funcs;
extern fz_fzrt_graf_fset	_grph_funcs;
extern fz_lite_fset			_lite_funcs;
extern fz_math_fset			_math_funcs;
extern fz_fzrt_mem_fset		_mem_funcs;
extern fz_objt_attr_fset	_model_attr_funcs;
extern fz_model_fset		_model_funcs;
extern fz_proj_fset			_proj_funcs;
extern fz_rmtl_fset			_rmtl_funcs;
extern fz_rndr_mngr_fset	_rndr_funcs;
extern fz_type_fset			_type_funcs;
extern fz_view_fset			_view_funcs;
extern fz_iost_fset			_iost_funcs;
extern fz_expt_vect_fset	_expt_funcs;
extern fz_tmap_fset			_tmap_funcs;
extern fz_symb_model_fset	_sym_funcs;
extern fz_layr_fset			_layr_funcs;
extern fz_wind_fset			_wind_funcs;

/* ids assigned at run-time */
extern fzrt_unsigned_int		_x_rndr_plugin_runtime_id;
	
/* localization */
extern fzrt_fzr_ref_td		_rsrc_ref;
extern char					_progress_bar_text[STRING_SIZE];

/* functions referenced in multiple source files */
fzrt_error_td x_pixel_fill_rndr_fset(const fzpl_fset_def_ptr fset_def, fzpl_fset_td* const fset);
fzrt_error_td x_vctr_fill_rndr_fset(const fzpl_fset_def_ptr fset_def, fzpl_fset_td* const fset);
fzrt_error_td x_pixel_fill_notf_fset(const fzpl_fset_def_ptr fset_def, fzpl_fset_td* const fset);
fzrt_error_td x_pixel_fill_srep_fset(const fzpl_fset_def_ptr fset_def, fzpl_fset_td* const fset);
fzrt_error_td x_pixel_fill_lrep_fset(const fzpl_fset_def_ptr fset_def, fzpl_fset_td* const fset);

#endif /* __X_RNDR_H */
