blob: 5add9a26006382c6c18d43db7e37f7bea15bae68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
/**
* \defgroup rpltmap RpLtMap
* \ingroup rpplugin
*
* Lightmap Plugin for RenderWare Graphics.
*/
#ifndef RPLTMAP_H
#define RPLTMAP_H
/*===========================================================================*
*--- Includes --------------------------------------------------------------*
*===========================================================================*/
#include "rwcore.h"
#include "rpworld.h"
#define rpLTMAPDEFAULTLIGHTMAPSIZE 128
#define rpLTMAPMINLIGHTMAPSIZE 16
#define rpLTMAPMAXLIGHTMAPSIZE 512/*?? any better way of determining this ??*/
#define rpLTMAPMAXPREFIXSTRINGLENGTH 4
#define rpLTMAPDEFAULTMAXAREALIGHTSAMPLESPERMESH 256
/* The default tolerance for errors induced by area light ROIs is 1
* (being the smallest difference in lightmap colour values) */
#define rpLTMAPDEFAULTAREALIGHTROICUTOFF (1.0f)
/**
* \ingroup rpltmap
* \ref RpLtMapStyle
* Flags specifying the rendering style of the lightmap plugin.
*
* \see RpLtMapGetRenderStyle
* \see RpLtMapSetRenderStyle
*/
enum RpLtMapStyle
{
rpLTMAPSTYLENASTYLE = 0x0,
rpLTMAPSTYLERENDERBASE = 0x1, /**< The base texture should be rendered */
rpLTMAPSTYLERENDERLIGHTMAP = 0x2, /**< The lightmap should be rendered */
rpLTMAPSTYLEPOINTSAMPLE = 0x4, /**< The lightmap should be point-sampled */
rpLTMAPSTYLEFORCEENUMSIZEINT = 0x7FFFFFFF
};
typedef enum RpLtMapStyle RpLtMapStyle;
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
extern RwBool
RpLtMapPluginAttach(void);
extern RxPipeline *
RpLtMapGetPlatformAtomicPipeline(void);
extern RxPipeline *
RpLtMapGetPlatformWorldSectorPipeline(void);
extern RwBool
RpLtMapSetRenderStyle(RpLtMapStyle style, RpWorld *world);
extern RpLtMapStyle
RpLtMapGetRenderStyle(void);
extern RwUInt32
RpLtMapWorldLightMapsQuery(RpWorld *world);
extern RwTexture *
RpLtMapWorldSectorGetLightMap(RpWorldSector *sector);
extern RpWorldSector *
RpLtMapWorldSectorSetLightMap(RpWorldSector *sector, RwTexture *lightMap);
extern RwTexture *
RpLtMapAtomicGetLightMap(RpAtomic *atomic);
extern RpAtomic *
RpLtMapAtomicSetLightMap(RpAtomic *atomic, RwTexture *lightMap);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* RPLTMAP_H */
|