2007-01-29 01:18:16 +00:00
|
|
|
// here lies the GREAT JUSTICE RENDERER
|
|
|
|
// TODO :
|
2008-03-30 11:43:24 +00:00
|
|
|
// - CORE STUFF
|
|
|
|
// o there's also the texture alignment problem Hunter reported (san andreas fault)
|
2009-03-25 19:48:27 +00:00
|
|
|
// o RTT portals (water)
|
|
|
|
// o clip mirrors/portals to their planes
|
|
|
|
// o merge mirrors/portals from the same plane
|
2008-03-30 11:43:24 +00:00
|
|
|
// - SPRITES
|
2009-03-03 21:12:17 +00:00
|
|
|
// o sprite panning
|
2008-03-30 11:43:24 +00:00
|
|
|
// - SKIES
|
2009-03-25 19:48:27 +00:00
|
|
|
// o skyview
|
2008-03-30 11:43:24 +00:00
|
|
|
// - MDSPRITES
|
|
|
|
// o need full translation and rotation support from CON to attach to game world or tags
|
|
|
|
//
|
|
|
|
// the renderer should hopefully be pretty solid after all that
|
|
|
|
// the rest will be a bliss :)
|
2007-01-29 01:18:16 +00:00
|
|
|
|
|
|
|
#ifndef _polymer_h_
|
|
|
|
# define _polymer_h_
|
|
|
|
|
|
|
|
# include "compat.h"
|
2009-02-05 08:56:59 +00:00
|
|
|
# include "baselayer.h"
|
2007-01-29 01:18:16 +00:00
|
|
|
# include "build.h"
|
|
|
|
# include "glbuild.h"
|
|
|
|
# include "osd.h"
|
2008-12-02 10:44:39 +00:00
|
|
|
# include "hightile.h"
|
2008-05-05 09:05:07 +00:00
|
|
|
# include "mdsprite.h"
|
2008-12-02 10:44:39 +00:00
|
|
|
# include "polymost.h"
|
2006-09-27 17:55:49 +00:00
|
|
|
# include "pragmas.h"
|
2007-07-01 06:32:03 +00:00
|
|
|
# include <math.h>
|
|
|
|
|
2007-01-29 01:18:16 +00:00
|
|
|
// CVARS
|
2009-04-12 17:14:18 +00:00
|
|
|
extern int32_t pr_lighting;
|
|
|
|
extern int32_t pr_normalmapping;
|
|
|
|
extern int32_t pr_specularmapping;
|
|
|
|
extern int32_t pr_shadows;
|
|
|
|
extern int32_t pr_shadowcount;
|
|
|
|
extern int32_t pr_shadowdetail;
|
2009-06-06 16:00:48 +00:00
|
|
|
extern int32_t pr_shadowfiltering;
|
2009-04-01 18:52:15 +00:00
|
|
|
extern int32_t pr_maxlightpasses;
|
2009-04-12 17:14:18 +00:00
|
|
|
extern int32_t pr_maxlightpriority;
|
2009-01-16 05:03:12 +00:00
|
|
|
extern int32_t pr_fov;
|
2009-09-30 14:32:11 +00:00
|
|
|
extern float pr_customaspect;
|
2009-01-16 05:03:12 +00:00
|
|
|
extern int32_t pr_billboardingmode;
|
|
|
|
extern int32_t pr_verbosity;
|
|
|
|
extern int32_t pr_wireframe;
|
|
|
|
extern int32_t pr_vbos;
|
|
|
|
extern int32_t pr_gpusmoothing;
|
2009-03-29 15:16:33 +00:00
|
|
|
extern int32_t pr_overrideparallax;
|
|
|
|
extern float pr_parallaxscale;
|
|
|
|
extern float pr_parallaxbias;
|
2009-03-29 17:14:41 +00:00
|
|
|
extern int32_t pr_overridespecular;
|
|
|
|
extern float pr_specularpower;
|
|
|
|
extern float pr_specularfactor;
|
2009-06-28 21:03:50 +00:00
|
|
|
extern int32_t pr_ati_fboworkaround;
|
2009-06-28 21:16:11 +00:00
|
|
|
extern int32_t pr_ati_nodepthoffset;
|
2007-01-29 01:18:16 +00:00
|
|
|
|
2009-06-09 02:12:35 +00:00
|
|
|
extern int32_t r_pr_maxlightpasses;
|
|
|
|
|
2008-11-25 10:42:22 +00:00
|
|
|
// MATERIAL
|
2008-11-27 22:26:46 +00:00
|
|
|
typedef enum {
|
2009-02-05 08:56:59 +00:00
|
|
|
PR_BIT_HEADER, // must be first
|
2008-11-27 22:26:46 +00:00
|
|
|
PR_BIT_ANIM_INTERPOLATION,
|
2009-03-12 13:51:30 +00:00
|
|
|
PR_BIT_LIGHTING_PASS,
|
2009-03-13 15:18:46 +00:00
|
|
|
PR_BIT_NORMAL_MAP,
|
2008-11-27 22:26:46 +00:00
|
|
|
PR_BIT_DIFFUSE_MAP,
|
|
|
|
PR_BIT_DIFFUSE_DETAIL_MAP,
|
|
|
|
PR_BIT_DIFFUSE_MODULATION,
|
2009-03-28 16:14:10 +00:00
|
|
|
PR_BIT_SPECULAR_MAP,
|
2009-03-28 12:14:37 +00:00
|
|
|
PR_BIT_SPECULAR_MATERIAL,
|
2009-03-28 11:43:16 +00:00
|
|
|
PR_BIT_MIRROR_MAP,
|
2009-04-11 18:01:39 +00:00
|
|
|
PR_BIT_FOG,
|
2009-03-28 11:43:16 +00:00
|
|
|
PR_BIT_GLOW_MAP,
|
2009-03-26 16:32:00 +00:00
|
|
|
PR_BIT_SHADOW_MAP,
|
2009-05-12 20:08:38 +00:00
|
|
|
PR_BIT_LIGHT_MAP,
|
2009-03-25 19:48:27 +00:00
|
|
|
PR_BIT_SPOT_LIGHT,
|
2009-03-12 13:51:30 +00:00
|
|
|
PR_BIT_POINT_LIGHT,
|
2009-02-05 08:56:59 +00:00
|
|
|
PR_BIT_FOOTER, // must be just before last
|
|
|
|
PR_BIT_COUNT // must be last
|
2008-11-27 22:26:46 +00:00
|
|
|
} prbittype;
|
|
|
|
|
2008-11-25 10:42:22 +00:00
|
|
|
typedef struct s_prmaterial {
|
2008-11-27 16:19:24 +00:00
|
|
|
// PR_BIT_ANIM_INTERPOLATION
|
|
|
|
GLfloat frameprogress;
|
|
|
|
GLfloat* nextframedata;
|
|
|
|
GLsizei nextframedatastride;
|
2009-03-13 15:18:46 +00:00
|
|
|
// PR_BIT_NORMAL_MAP
|
|
|
|
GLuint normalmap;
|
2009-03-29 15:16:33 +00:00
|
|
|
GLfloat normalbias[2];
|
2008-11-27 16:19:24 +00:00
|
|
|
// PR_BIT_DIFFUSE_MAP
|
2008-11-25 10:42:22 +00:00
|
|
|
GLuint diffusemap;
|
2008-11-27 22:26:46 +00:00
|
|
|
GLfloat diffusescale[2];
|
|
|
|
// PR_BIT_DIFFUSE_DETAIL_MAP
|
|
|
|
GLuint detailmap;
|
|
|
|
GLfloat detailscale[2];
|
2008-11-27 16:19:24 +00:00
|
|
|
// PR_BIT_DIFFUSE_MODULATION
|
2009-12-07 07:01:44 +00:00
|
|
|
GLubyte diffusemodulation[4];
|
2009-03-28 16:14:10 +00:00
|
|
|
// PR_BIT_SPECULAR_MAP
|
|
|
|
GLuint specmap;
|
2009-03-28 12:14:37 +00:00
|
|
|
// PR_BIT_SPECULAR_MATERIAL
|
|
|
|
GLfloat specmaterial[2];
|
2009-03-28 11:43:16 +00:00
|
|
|
// PR_BIT_MIRROR_MAP
|
2009-03-23 14:18:20 +00:00
|
|
|
GLuint mirrormap;
|
2009-03-28 11:43:16 +00:00
|
|
|
// PR_BIT_GLOW_MAP
|
2008-11-27 23:00:57 +00:00
|
|
|
GLuint glowmap;
|
2009-03-27 12:56:42 +00:00
|
|
|
// PR_BIT_SHADOW_MAP
|
|
|
|
GLboolean mdspritespace;
|
2008-11-25 10:42:22 +00:00
|
|
|
} _prmaterial;
|
|
|
|
|
2008-11-27 22:26:46 +00:00
|
|
|
typedef struct s_prrograminfo {
|
|
|
|
GLhandleARB handle;
|
|
|
|
// PR_BIT_ANIM_INTERPOLATION
|
|
|
|
GLint attrib_nextFrameData;
|
2009-03-10 14:30:34 +00:00
|
|
|
GLint attrib_nextFrameNormal;
|
2008-11-27 22:26:46 +00:00
|
|
|
GLint uniform_frameProgress;
|
2009-03-13 15:18:46 +00:00
|
|
|
// PR_BIT_NORMAL_MAP
|
|
|
|
GLint attrib_T;
|
|
|
|
GLint attrib_B;
|
|
|
|
GLint attrib_N;
|
2009-03-28 18:25:30 +00:00
|
|
|
GLint uniform_eyePosition;
|
|
|
|
GLint uniform_normalMap;
|
2009-03-29 15:16:33 +00:00
|
|
|
GLint uniform_normalBias;
|
2008-11-27 22:26:46 +00:00
|
|
|
// PR_BIT_DIFFUSE_MAP
|
|
|
|
GLint uniform_diffuseMap;
|
|
|
|
GLint uniform_diffuseScale;
|
|
|
|
// PR_BIT_DIFFUSE_DETAIL_MAP
|
|
|
|
GLint uniform_detailMap;
|
|
|
|
GLint uniform_detailScale;
|
2009-03-28 16:14:10 +00:00
|
|
|
// PR_BIT_SPECULAR_MAP
|
|
|
|
GLint uniform_specMap;
|
2009-03-28 12:14:37 +00:00
|
|
|
// PR_BIT_SPECULAR_MATERIAL
|
|
|
|
GLint uniform_specMaterial;
|
2009-03-28 11:43:16 +00:00
|
|
|
// PR_BIT_MIRROR_MAP
|
2009-03-23 14:18:20 +00:00
|
|
|
GLint uniform_mirrorMap;
|
2009-03-28 11:43:16 +00:00
|
|
|
// PR_BIT_GLOW_MAP
|
2008-11-27 23:00:57 +00:00
|
|
|
GLint uniform_glowMap;
|
2009-03-26 16:32:00 +00:00
|
|
|
// PR_BIT_SHADOW_MAP
|
|
|
|
GLint uniform_shadowMap;
|
|
|
|
GLint uniform_shadowProjMatrix;
|
2009-05-12 20:08:38 +00:00
|
|
|
// PR_BIT_LIGHT_MAP
|
|
|
|
GLint uniform_lightMap;
|
2009-03-25 19:48:27 +00:00
|
|
|
// PR_BIT_SPOT_LIGHT
|
|
|
|
GLint uniform_spotDir;
|
|
|
|
GLint uniform_spotRadius;
|
2008-11-27 22:26:46 +00:00
|
|
|
} _prprograminfo;
|
|
|
|
|
2009-04-14 13:58:38 +00:00
|
|
|
#define PR_INFO_LOG_BUFFER_SIZE 8192
|
2008-11-27 22:26:46 +00:00
|
|
|
|
|
|
|
typedef struct s_prprogrambit {
|
2009-01-16 05:03:12 +00:00
|
|
|
int32_t bit;
|
2008-11-27 22:26:46 +00:00
|
|
|
char* vert_def;
|
|
|
|
char* vert_prog;
|
|
|
|
char* frag_def;
|
|
|
|
char* frag_prog;
|
|
|
|
} _prprogrambit;
|
|
|
|
|
2009-03-08 20:38:51 +00:00
|
|
|
// LIGHTS
|
2009-10-07 06:47:35 +00:00
|
|
|
#define PR_MAXLIGHTS 1024
|
2009-03-27 13:46:40 +00:00
|
|
|
#define SHADOW_DEPTH_OFFSET 30
|
2009-04-28 22:56:43 +00:00
|
|
|
#define PR_MAXLIGHTPRIORITY 6
|
|
|
|
|
2009-06-07 12:51:00 +00:00
|
|
|
typedef struct s_prplanelist {
|
|
|
|
struct s_prplane* plane;
|
|
|
|
struct s_prplanelist* n;
|
|
|
|
} _prplanelist;
|
|
|
|
|
2009-07-12 01:55:34 +00:00
|
|
|
#pragma pack(push,1)
|
2009-03-08 20:38:51 +00:00
|
|
|
typedef struct s_prlight {
|
2009-03-25 13:23:35 +00:00
|
|
|
int32_t x, y, z, horiz, range;
|
2009-03-25 19:48:27 +00:00
|
|
|
int16_t angle, faderadius, radius, sector;
|
2009-04-28 22:56:43 +00:00
|
|
|
uint8_t color[3], priority;
|
2009-04-12 12:32:50 +00:00
|
|
|
int8_t minshade, maxshade;
|
2009-05-12 20:08:38 +00:00
|
|
|
int16_t tilenum;
|
|
|
|
// internal members
|
2009-03-25 21:14:51 +00:00
|
|
|
GLfloat proj[16];
|
|
|
|
GLfloat transform[16];
|
|
|
|
float frustum[5 * 4];
|
2009-03-26 16:32:00 +00:00
|
|
|
int32_t rtindex;
|
2009-06-01 20:55:36 +00:00
|
|
|
struct {
|
|
|
|
int32_t active : 1;
|
|
|
|
int32_t invalidate : 1;
|
|
|
|
int32_t isinview : 1;
|
|
|
|
} flags;
|
2009-05-12 20:08:38 +00:00
|
|
|
GLuint lightmap;
|
2009-06-07 12:51:00 +00:00
|
|
|
_prplanelist* planelist;
|
|
|
|
int32_t planecount;
|
2009-03-08 20:38:51 +00:00
|
|
|
} _prlight;
|
|
|
|
|
2009-06-06 13:12:29 +00:00
|
|
|
extern _prlight prlights[PR_MAXLIGHTS];
|
2009-06-06 22:30:53 +00:00
|
|
|
extern int32_t lightcount;
|
2009-03-31 23:23:06 +00:00
|
|
|
|
2009-04-12 13:02:36 +00:00
|
|
|
extern _prlight gamelights[PR_MAXLIGHTS];
|
|
|
|
extern int32_t gamelightcount;
|
2009-07-12 01:55:34 +00:00
|
|
|
#pragma pack(pop)
|
2009-04-12 13:02:36 +00:00
|
|
|
|
2009-06-06 13:12:29 +00:00
|
|
|
// RENDER TARGETS
|
|
|
|
typedef struct s_prrt {
|
|
|
|
GLenum target;
|
|
|
|
GLuint color;
|
|
|
|
GLuint z;
|
|
|
|
GLuint fbo;
|
|
|
|
int32_t xdim, ydim;
|
|
|
|
} _prrt;
|
|
|
|
|
|
|
|
// BUILD DATA
|
|
|
|
typedef struct s_prplane {
|
|
|
|
// geometry
|
|
|
|
GLfloat* buffer;
|
|
|
|
int32_t vertcount;
|
|
|
|
GLuint vbo;
|
|
|
|
// attributes
|
|
|
|
GLfloat t[3];
|
|
|
|
GLfloat b[3];
|
|
|
|
GLfloat n[3];
|
|
|
|
GLfloat plane[4];
|
|
|
|
_prmaterial material;
|
|
|
|
// elements
|
|
|
|
GLushort* indices;
|
|
|
|
int32_t indicescount;
|
|
|
|
GLuint ivbo;
|
|
|
|
// lights
|
|
|
|
int16_t lights[PR_MAXLIGHTS];
|
2009-06-09 02:12:35 +00:00
|
|
|
uint16_t lightcount;
|
2009-06-06 13:12:29 +00:00
|
|
|
} _prplane;
|
2008-05-18 07:35:35 +00:00
|
|
|
|
|
|
|
typedef struct s_prsector {
|
|
|
|
// polymer data
|
|
|
|
GLdouble* verts;
|
|
|
|
_prplane floor;
|
|
|
|
_prplane ceil;
|
2009-01-16 05:03:12 +00:00
|
|
|
int16_t curindice;
|
|
|
|
int32_t indicescount;
|
|
|
|
int32_t oldindicescount;
|
2008-03-30 14:22:03 +00:00
|
|
|
// stuff
|
|
|
|
float wallsproffset;
|
|
|
|
float floorsproffset;
|
2008-04-02 06:58:26 +00:00
|
|
|
// build sector data
|
2009-01-16 05:03:12 +00:00
|
|
|
int32_t ceilingz, floorz;
|
|
|
|
int16_t ceilingstat, floorstat;
|
|
|
|
int16_t ceilingpicnum, ceilingheinum;
|
|
|
|
int8_t ceilingshade;
|
2008-04-02 06:58:26 +00:00
|
|
|
char ceilingpal, ceilingxpanning, ceilingypanning;
|
2009-01-16 05:03:12 +00:00
|
|
|
int16_t floorpicnum, floorheinum;
|
|
|
|
int8_t floorshade;
|
2008-04-02 06:58:26 +00:00
|
|
|
char floorpal, floorxpanning, floorypanning;
|
2006-09-27 17:55:49 +00:00
|
|
|
|
2009-06-09 09:32:23 +00:00
|
|
|
struct {
|
|
|
|
int32_t empty : 1;
|
|
|
|
int32_t uptodate : 1;
|
|
|
|
int32_t invalidtex : 1;
|
|
|
|
} flags;
|
2009-01-16 05:03:12 +00:00
|
|
|
uint32_t invalidid;
|
2006-09-27 02:23:27 +00:00
|
|
|
} _prsector;
|
2006-09-29 21:36:12 +00:00
|
|
|
|
|
|
|
typedef struct s_prwall {
|
2008-05-18 07:35:35 +00:00
|
|
|
_prplane wall;
|
|
|
|
_prplane over;
|
|
|
|
_prplane mask;
|
|
|
|
// stuff
|
2008-04-03 06:58:36 +00:00
|
|
|
GLfloat* bigportal;
|
2008-04-12 08:16:01 +00:00
|
|
|
GLfloat* cap;
|
2008-05-24 09:37:09 +00:00
|
|
|
GLuint stuffvbo;
|
2008-04-09 07:27:17 +00:00
|
|
|
// build wall data
|
2009-01-16 05:03:12 +00:00
|
|
|
int16_t cstat, nwallcstat;
|
|
|
|
int16_t picnum, overpicnum, nwallpicnum;
|
|
|
|
int8_t shade;
|
2008-04-02 08:49:21 +00:00
|
|
|
char pal, xrepeat, yrepeat, xpanning, ypanning;
|
|
|
|
char nwallxpanning, nwallypanning;
|
|
|
|
|
2006-09-29 21:36:12 +00:00
|
|
|
char underover;
|
2009-01-16 05:03:12 +00:00
|
|
|
uint32_t invalidid;
|
2009-06-09 09:32:23 +00:00
|
|
|
struct {
|
|
|
|
int32_t empty : 1;
|
|
|
|
int32_t uptodate : 1;
|
|
|
|
int32_t invalidtex : 1;
|
|
|
|
} flags;
|
2006-09-29 21:36:12 +00:00
|
|
|
} _prwall;
|
|
|
|
|
2009-03-23 14:18:20 +00:00
|
|
|
typedef struct s_prmirror {
|
|
|
|
_prplane *plane;
|
|
|
|
int16_t sectnum;
|
|
|
|
int16_t wallnum;
|
|
|
|
} _prmirror;
|
|
|
|
|
2009-02-14 14:31:58 +00:00
|
|
|
typedef void (*animatespritesptr)(int32_t, int32_t, int32_t, int32_t);
|
|
|
|
|
2008-04-06 23:35:48 +00:00
|
|
|
typedef struct s_pranimatespritesinfo {
|
|
|
|
animatespritesptr animatesprites;
|
2009-01-16 05:03:12 +00:00
|
|
|
int32_t x, y, a, smoothratio;
|
2008-04-06 23:35:48 +00:00
|
|
|
} _pranimatespritesinfo;
|
2006-10-14 23:33:10 +00:00
|
|
|
|
2006-09-29 21:36:12 +00:00
|
|
|
// EXTERNAL FUNCTIONS
|
2009-01-16 05:03:12 +00:00
|
|
|
int32_t polymer_init(void);
|
2009-05-22 23:49:25 +00:00
|
|
|
void polymer_uninit(void);
|
2006-09-29 21:36:12 +00:00
|
|
|
void polymer_glinit(void);
|
|
|
|
void polymer_loadboard(void);
|
2009-01-09 09:29:17 +00:00
|
|
|
void polymer_drawrooms(int32_t daposx, int32_t daposy, int32_t daposz, int16_t daang, int32_t dahoriz, int16_t dacursectnum);
|
2008-03-30 09:16:39 +00:00
|
|
|
void polymer_drawmasks(void);
|
2009-12-07 07:01:44 +00:00
|
|
|
void polymer_editorpick(void);
|
2009-01-09 09:29:17 +00:00
|
|
|
void polymer_rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum, int8_t dashade, char dapalnum, char dastat, int32_t cx1, int32_t cy1, int32_t cx2, int32_t cy2);
|
|
|
|
void polymer_drawmaskwall(int32_t damaskwallcnt);
|
|
|
|
void polymer_drawsprite(int32_t snum);
|
2009-02-14 14:31:58 +00:00
|
|
|
void polymer_setanimatesprites(animatespritesptr animatesprites, int32_t x, int32_t y, int32_t a, int32_t smoothratio);
|
2009-06-01 20:55:36 +00:00
|
|
|
int16_t polymer_addlight(_prlight* light);
|
|
|
|
void polymer_deletelight(int16_t lighti);
|
2009-06-09 02:12:35 +00:00
|
|
|
void polymer_invalidatelights(void);
|
2009-06-09 09:32:23 +00:00
|
|
|
void polymer_texinvalidate(void);
|
2008-04-02 09:29:58 +00:00
|
|
|
|
|
|
|
# ifdef POLYMER_C
|
|
|
|
|
2008-04-06 03:00:39 +00:00
|
|
|
// CORE
|
2009-01-09 09:29:17 +00:00
|
|
|
static void polymer_displayrooms(int16_t sectnum);
|
2009-03-23 14:18:20 +00:00
|
|
|
static void polymer_drawplane(_prplane* plane);
|
2009-04-12 21:52:49 +00:00
|
|
|
static inline void polymer_inb4mirror(GLfloat* buffer, GLfloat* plane);
|
2008-04-06 23:35:48 +00:00
|
|
|
static void polymer_animatesprites(void);
|
2009-05-22 23:49:25 +00:00
|
|
|
static void polymer_freeboard(void);
|
2006-10-15 18:51:41 +00:00
|
|
|
// SECTORS
|
2009-01-16 05:03:12 +00:00
|
|
|
static int32_t polymer_initsector(int16_t sectnum);
|
|
|
|
static int32_t polymer_updatesector(int16_t sectnum);
|
2006-09-29 21:36:12 +00:00
|
|
|
void PR_CALLBACK polymer_tesserror(GLenum error);
|
|
|
|
void PR_CALLBACK polymer_tessedgeflag(GLenum error);
|
|
|
|
void PR_CALLBACK polymer_tessvertex(void* vertex, void* sector);
|
2009-01-16 05:03:12 +00:00
|
|
|
static int32_t polymer_buildfloor(int16_t sectnum);
|
2009-01-09 09:29:17 +00:00
|
|
|
static void polymer_drawsector(int16_t sectnum);
|
2006-10-15 18:51:41 +00:00
|
|
|
// WALLS
|
2009-01-16 05:03:12 +00:00
|
|
|
static int32_t polymer_initwall(int16_t wallnum);
|
2009-01-09 09:29:17 +00:00
|
|
|
static void polymer_updatewall(int16_t wallnum);
|
|
|
|
static void polymer_drawwall(int16_t sectnum, int16_t wallnum);
|
2006-10-14 23:33:10 +00:00
|
|
|
// HSR
|
2009-04-19 17:23:07 +00:00
|
|
|
static void polymer_computeplane(_prplane* p);
|
2009-04-12 21:52:49 +00:00
|
|
|
static inline void polymer_crossproduct(GLfloat* in_a, GLfloat* in_b, GLfloat* out);
|
|
|
|
static inline void polymer_transformpoint(float* inpos, float* pos, float* matrix);
|
|
|
|
static inline void polymer_pokesector(int16_t sectnum);
|
2009-01-14 14:13:51 +00:00
|
|
|
static void polymer_extractfrustum(GLfloat* modelview, GLfloat* projection, float* frustum);
|
2009-06-13 21:06:45 +00:00
|
|
|
static inline int32_t polymer_planeinfrustum(_prplane *plane, float* frustum);
|
2009-04-12 21:52:49 +00:00
|
|
|
static inline void polymer_scansprites(int16_t sectnum, spritetype* tsprite, int32_t* spritesortcnt);
|
2006-10-18 03:59:28 +00:00
|
|
|
// SKIES
|
2008-04-02 09:29:58 +00:00
|
|
|
static void polymer_getsky(void);
|
2009-06-07 18:38:13 +00:00
|
|
|
static void polymer_drawsky(int16_t tilenum, char palnum, int8_t shade);
|
2008-06-09 09:25:47 +00:00
|
|
|
static void polymer_initartsky(void);
|
2009-06-07 18:38:13 +00:00
|
|
|
static void polymer_drawartsky(int16_t tilenum, char palnum, int8_t shade);
|
2009-01-09 09:29:17 +00:00
|
|
|
static void polymer_drawartskyquad(int32_t p1, int32_t p2, GLfloat height);
|
2009-06-07 18:38:13 +00:00
|
|
|
static void polymer_drawskybox(int16_t tilenum, char palnum, int8_t shade);
|
2008-06-01 08:58:06 +00:00
|
|
|
// MDSPRITES
|
|
|
|
static void polymer_drawmdsprite(spritetype *tspr);
|
2009-01-10 07:38:50 +00:00
|
|
|
static void polymer_loadmodelvbos(md3model_t* m);
|
2008-11-26 14:22:07 +00:00
|
|
|
// MATERIALS
|
2008-11-27 16:19:24 +00:00
|
|
|
static void polymer_getscratchmaterial(_prmaterial* material);
|
2009-01-09 09:29:17 +00:00
|
|
|
static void polymer_getbuildmaterial(_prmaterial* material, int16_t tilenum, char pal, int8_t shade);
|
2009-06-01 20:55:36 +00:00
|
|
|
static int32_t polymer_bindmaterial(_prmaterial material, int16_t* lights, int lightcount);
|
2009-01-09 09:29:17 +00:00
|
|
|
static void polymer_unbindmaterial(int32_t programbits);
|
|
|
|
static void polymer_compileprogram(int32_t programbits);
|
2009-02-14 14:31:58 +00:00
|
|
|
// LIGHTS
|
2009-06-01 20:55:36 +00:00
|
|
|
static void polymer_removelight(int16_t lighti);
|
|
|
|
static void polymer_updatelights(void);
|
2009-04-12 13:51:43 +00:00
|
|
|
static void polymer_resetlights(void);
|
2009-06-08 00:31:53 +00:00
|
|
|
static inline void polymer_resetplanelights(_prplane* plane);
|
2009-06-01 20:55:36 +00:00
|
|
|
static void polymer_addplanelight(_prplane* plane, int16_t lighti);
|
2009-06-06 22:30:53 +00:00
|
|
|
static inline void polymer_deleteplanelight(_prplane* plane, int16_t lighti);
|
2009-03-08 20:38:51 +00:00
|
|
|
static int32_t polymer_planeinlight(_prplane* plane, _prlight* light);
|
2009-06-01 20:55:36 +00:00
|
|
|
static void polymer_invalidateplanelights(_prplane* plane);
|
|
|
|
static void polymer_invalidatesectorlights(int16_t sectnum);
|
|
|
|
static void polymer_processspotlight(_prlight* light);
|
|
|
|
static inline void polymer_culllight(int16_t lighti);
|
2009-03-26 16:32:00 +00:00
|
|
|
static void polymer_prepareshadows(void);
|
2009-03-23 14:18:20 +00:00
|
|
|
// RENDER TARGETS
|
|
|
|
static void polymer_initrendertargets(int32_t count);
|
2008-04-02 09:29:58 +00:00
|
|
|
|
2008-05-05 09:05:07 +00:00
|
|
|
# endif // !POLYMER_C
|
2007-01-29 01:18:16 +00:00
|
|
|
|
|
|
|
#endif // !_polymer_h_
|