r_sphere.h

Go to the documentation of this file.
00001 
00005 /*
00006 Copyright (C) 1997-2001 Id Software, Inc.
00007 
00008 This program is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016 
00017 See the GNU General Public License for more details.
00018 
00019 You should have received a copy of the GNU General Public License
00020 along with this program; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00023 */
00024 
00025 typedef struct sphere_s {
00026     GLint list;         
00027     float *texes;       
00028     float *verts;       
00029     float *normals;     
00030     image_t* texture;   
00031     image_t* blendTexture;  
00032     image_t* overlay;   
00033     image_t* overlayAlphaMask;  
00034     image_t* normalMap; 
00035     int num_tris;       
00038     r_program_t *glslProgram;
00039     float blendScale;
00040     float glowScale;
00041     vec4_t nightLightPos;
00042     int season;
00043 } sphere_t;
00044 
00045 extern sphere_t r_globeEarth;
00046 extern sphere_t r_globeMoon;
00047 extern sphere_t r_globeEarthAtmosphere;
00048 
00049 void R_SphereGenerate(sphere_t *sphere, const int tris, const float radius);
00050 void R_SphereRender(const sphere_t *sphere, const vec3_t pos, const vec3_t rotate, const float scale, const vec4_t lightPos);
00051 void R_SphereInit(void);
00052 void R_SphereShade(const sphere_t *sphere);
00053 void R_SphereShadeGLSL(const sphere_t *sphere);

Generated by  doxygen 1.6.2