UFO: Alien Invasion
r_lightmap.h
Go to the documentation of this file.
1
6/*
7All original material Copyright (C) 2002-2022 UFO: Alien Invasion.
8
9This program is free software; you can redistribute it and/or
10modify it under the terms of the GNU General Public License
11as published by the Free Software Foundation; either version 2
12of the License, or (at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18See the GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, 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
37void R_EndBuildingLightmaps(void);
39
40void R_Trace(const Line& trLine, float size, int contentmask);
41
42typedef struct lightmaps_s {
43 GLuint lightmap_texnums[MAX_GL_LIGHTMAPS];
44 GLuint deluxemap_texnums[MAX_GL_DELUXEMAPS];
45
48
50
51 int size;
53 unsigned* allocated;
58
Definition: line.h:31
voidpf void uLong size
Definition: ioapi.h:42
QGL_EXTERN GLuint
Definition: r_gl.h:124
#define MAX_GL_DELUXEMAPS
Definition: r_image.h:78
#define MAX_GL_LIGHTMAPS
Definition: r_image.h:77
void R_BeginBuildingLightmaps(void)
Definition: r_lightmap.cpp:273
lightmaps_t r_lightmaps
Definition: r_lightmap.cpp:32
void R_CreateSurfaceLightmap(mBspSurface_t *surf)
Definition: r_lightmap.cpp:223
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
void R_EndBuildingLightmaps(void)
Definition: r_lightmap.cpp:298
int deluxemap_count
Definition: r_lightmap.h:47
bool incomplete_atlas
Definition: r_lightmap.h:49
unsigned * allocated
Definition: r_lightmap.h:53
byte * direction_buffer
Definition: r_lightmap.h:56
int lightmap_count
Definition: r_lightmap.h:46
byte * sample_buffer
Definition: r_lightmap.h:55