UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
r_sphere.h
Go to the documentation of this file.
1 
5 /*
6 Copyright (C) 1997-2001 Id Software, Inc.
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 
17 See the GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 
23 */
24 
25 #pragma once
26 
27 typedef struct sphere_s {
29  float* texes;
30  float* verts;
31  float* normals;
37  int num_tris;
41  float blendScale;
42  float glowScale;
44  int season;
45 } sphere_t;
46 
47 extern sphere_t r_globeEarth;
48 extern sphere_t r_globeMoon;
50 
51 void R_SphereGenerate(sphere_t* sphere, const int tris, const float radius);
52 void R_SphereRender(const sphere_t* sphere, const vec3_t pos, const vec3_t rotate, const float scale, const vec4_t lightPos);
53 void R_SphereInit(void);
float * normals
Definition: r_sphere.h:31
sphere_t r_globeMoon
Definition: r_sphere.cpp:34
void R_SphereInit(void)
Creates the spheres we need for rendering the 3d globe.
Definition: r_sphere.cpp:119
struct sphere_s sphere_t
int num_tris
Definition: r_sphere.h:37
static const vec3_t scale
sphere_t r_globeEarth
Definition: r_sphere.cpp:33
const GLenum *typedef GLint
Definition: r_gl.h:205
image_t * blendTexture
Definition: r_sphere.h:33
int season
Definition: r_sphere.h:44
float * verts
Definition: r_sphere.h:30
image_t * texture
Definition: r_sphere.h:32
float blendScale
Definition: r_sphere.h:41
image_t * overlay
Definition: r_sphere.h:34
void R_SphereRender(const sphere_t *sphere, const vec3_t pos, const vec3_t rotate, const float scale, const vec4_t lightPos)
Draw the sphere.
Definition: r_sphere.cpp:247
float glowScale
Definition: r_sphere.h:42
vec_t vec3_t[3]
Definition: ufotypes.h:39
vec4_t nightLightPos
Definition: r_sphere.h:43
GLint list
Definition: r_sphere.h:28
image_t * overlayAlphaMask
Definition: r_sphere.h:35
image_t * normalMap
Definition: r_sphere.h:36
float * texes
Definition: r_sphere.h:29
sphere_t r_globeEarthAtmosphere
Definition: r_sphere.cpp:35
r_program_t * glslProgram
Definition: r_sphere.h:40
void R_SphereGenerate(sphere_t *sphere, const int tris, const float radius)
Initialize the globe chain arrays.
Definition: r_sphere.cpp:51
vec_t vec4_t[4]
Definition: ufotypes.h:40