UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
r_lightmap.h
Go to the documentation of this file.
1 
6 /*
7 All original material Copyright (C) 2002-2020 UFO: Alien Invasion.
8 
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 
18 See the GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 
24 */
25 
26 #pragma once
27 
28 #include "r_entity.h"
29 
30 #define LIGHTMAP_DEFAULT_PAGE_SIZE 1024
31 #define LIGHTMAP_MAX_PAGE_SIZE 4096
32 
33 #define LIGHTMAP_SAMPLE_SIZE 3 /* RGB */
34 #define DELUXEMAP_SAMPLE_SIZE 3 /* XYZ */
35 
37 void R_EndBuildingLightmaps(void);
38 void R_BeginBuildingLightmaps(void);
39 
40 void R_Trace(const Line& trLine, float size, int contentmask);
41 
42 typedef struct lightmaps_s {
45 
48 
50 
51  int size;
53  unsigned* allocated;
57 } lightmaps_t;
58 
void R_Trace(const Line &trLine, float size, int contentmask)
Moves the given mins/maxs volume through the world from start to end.
Definition: r_lightmap.cpp:317
GLuint deluxemap_texnums[MAX_GL_DELUXEMAPS]
Definition: r_lightmap.h:44
#define MAX_GL_LIGHTMAPS
Definition: r_image.h:77
void R_BeginBuildingLightmaps(void)
Definition: r_lightmap.cpp:273
byte * direction_buffer
Definition: r_lightmap.h:56
byte * sample_buffer
Definition: r_lightmap.h:55
bool incomplete_atlas
Definition: r_lightmap.h:49
GLuint lightmap_texnums[MAX_GL_LIGHTMAPS]
Definition: r_lightmap.h:43
QGL_EXTERN GLuint
Definition: r_gl.h:124
unsigned * allocated
Definition: r_lightmap.h:53
struct lightmaps_s lightmaps_t
#define MAX_GL_DELUXEMAPS
Definition: r_image.h:78
GLsizei size
Definition: r_gl.h:152
void R_EndBuildingLightmaps(void)
Definition: r_lightmap.cpp:298
Definition: line.h:31
void R_CreateSurfaceLightmap(mBspSurface_t *surf)
Definition: r_lightmap.cpp:223
lightmaps_t r_lightmaps
Definition: r_lightmap.cpp:32
int deluxemap_count
Definition: r_lightmap.h:47
uint8_t byte
Definition: ufotypes.h:34
int lightmap_count
Definition: r_lightmap.h:46