]> icculus.org git repositories - divverent/darkplaces.git/blob - r_shadow.h
improve console text parsing a little (now handles \r line endings as well as \n...
[divverent/darkplaces.git] / r_shadow.h
1
2 #ifndef R_SHADOW_H
3 #define R_SHADOW_H
4
5 extern cvar_t r_shadow_lightattenuationscale;
6 extern cvar_t r_shadow_lightintensityscale;
7 extern cvar_t r_shadow_realtime_world;
8 extern cvar_t r_shadow_realtime_world_lightmaps;
9 extern cvar_t r_shadow_realtime_dlight;
10 extern cvar_t r_shadow_visiblevolumes;
11 extern cvar_t r_shadow_gloss;
12 extern cvar_t r_shadow_debuglight;
13 extern cvar_t r_shadow_bumpscale_bumpmap;
14 extern cvar_t r_shadow_bumpscale_basetexture;
15 extern cvar_t r_shadow_worldshadows;
16 extern cvar_t r_shadow_dlightshadows;
17
18 void R_Shadow_Init(void);
19 void R_Shadow_VolumeFromList(int numverts, int numtris, const float *invertex3f, const int *elements, const int *neighbors, const vec3_t projectorigin, float projectdistance, int nummarktris, const int *marktris);
20 void R_Shadow_VolumeFromBox(int numverts, int numtris, const float *invertex3f, const int *elements, const int *neighbors, const vec3_t projectorigin, float projectdistance, const vec3_t mins, const vec3_t maxs);
21 void R_Shadow_VolumeFromSphere(int numverts, int numtris, const float *invertex3f, const int *elements, const int *neighbors, const vec3_t projectorigin, float projectdistance, float radius);
22 void R_Shadow_DiffuseLighting(int numverts, int numtriangles, const int *elements, const float *vertices, const float *svectors, const float *tvectors, const float *normals, const float *texcoords, const float *relativelightorigin, const float *lightcolor, const matrix4x4_t *matrix_worldtolight, const matrix4x4_t *matrix_worldtoattenuationxyz, const matrix4x4_t *matrix_worldtoattenuationz, rtexture_t *basetexture, rtexture_t *bumptexture, rtexture_t *lightcubemap);
23 void R_Shadow_SpecularLighting(int numverts, int numtriangles, const int *elements, const float *vertices, const float *svectors, const float *tvectors, const float *normals, const float *texcoords, const float *relativelightorigin, const float *relativeeyeorigin, const float *lightcolor, const matrix4x4_t *matrix_worldtolight, const matrix4x4_t *matrix_worldtoattenuationxyz, const matrix4x4_t *matrix_worldtoattenuationz, rtexture_t *glosstexture, rtexture_t *bumptexture, rtexture_t *lightcubemap);
24 void R_Shadow_ClearStencil(void);
25
26 void R_Shadow_RenderVolume(int numvertices, int numtriangles, const float *vertex3f, const int *element3i);
27 void R_Shadow_RenderShadowMeshVolume(shadowmesh_t *mesh);
28 void R_Shadow_Stage_Begin(void);
29 void R_Shadow_LoadWorldLightsIfNeeded(void);
30 void R_Shadow_Stage_ShadowVolumes(void);
31 void R_Shadow_Stage_LightWithShadows(void);
32 void R_Shadow_Stage_LightWithoutShadows(void);
33 void R_Shadow_Stage_End(void);
34 int R_Shadow_ScissorForBBox(const float *mins, const float *maxs);
35
36 // these never change, they are used to create attenuation matrices
37 extern matrix4x4_t matrix_attenuationxyz;
38 extern matrix4x4_t matrix_attenuationz;
39
40 rtexture_t *R_Shadow_Cubemap(const char *basename);
41
42 extern dlight_t *r_shadow_worldlightchain;
43
44 void R_Shadow_UpdateWorldLightSelection(void);
45
46 void R_RTLight_UpdateFromDLight(rtlight_t *rtlight, const dlight_t *light, int isstatic);
47 void R_RTLight_Compile(rtlight_t *rtlight);
48 void R_RTLight_Uncompile(rtlight_t *rtlight);
49
50 void R_ShadowVolumeLighting(int visiblevolumes);
51
52 int *R_Shadow_ResizeShadowElements(int numtris);
53
54 extern int maxshadowmark;
55 extern int numshadowmark;
56 extern int *shadowmark;
57 extern int *shadowmarklist;
58 extern int shadowmarkcount;
59 void R_Shadow_PrepareShadowMark(int numtris);
60
61 #endif