Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
sphere.cpp
Go to the documentation of this file.
1
#include "
sphere.h
"
2
#include "
ani_texture.h
"
3
#include "
vegastrike.h
"
4
#include "
config_xml.h
"
5
#include "
vs_globals.h
"
6
#include "
vsfilesystem.h
"
7
#include "
xml_support.h
"
8
#ifndef M_PI
9
#define M_PI (3.1415926536F)
10
#endif
11
#include "
gfx/camera.h
"
12
13
using
XMLSupport::tostring
;
14
15
static
GFXColor
getSphereColor
()
16
{
17
float
color[4];
18
vs_config
->
getColor
(
"planet_ambient"
, color );
19
GFXColor
tmp( color[0], color[1], color[2], color[3] );
20
return
tmp;
21
}
22
23
void
SphereMesh::ProcessDrawQueue
(
int
whichpass,
int
whichdrawqueue,
bool
zsort,
const
QVector
&sortctr )
24
{
25
static
GFXColor
spherecol(
getSphereColor
() );
26
GFXColor
tmpcol( 0, 0, 0, 1 );
27
GFXGetLightContextAmbient
( tmpcol );
28
GFXLightContextAmbient
( spherecol );
29
Mesh::ProcessDrawQueue
( whichpass, whichdrawqueue, zsort, sortctr );
30
GFXLightContextAmbient
( tmpcol );
31
GFXPolygonOffset
( 0, 0 );
32
}
33
34
void
SphereMesh::SelectCullFace
(
int
whichdrawqueue )
35
{
36
GFXEnable
(
CULLFACE
);
37
}
38
39
void
CityLights::ProcessDrawQueue
(
int
whichpass,
int
whichdrawqueue,
bool
zsort,
const
QVector
&sortctr )
40
{
41
const
GFXColor
citycol( 1, 1, 1, 1 );
42
GFXColor
tmpcol( 0, 0, 0, 1 );
43
GFXGetLightContextAmbient
( tmpcol );
44
GFXLightContextAmbient
( citycol );
45
Mesh::ProcessDrawQueue
( whichpass, whichdrawqueue, zsort, sortctr );
46
GFXLightContextAmbient
( tmpcol );
47
GFXPolygonOffset
( 0, 0 );
48
}
49
src
gfx
sphere.cpp
Generated on Fri May 29 2015 23:07:28 for Vegastrike 0.5.1 rc1 by
1.8.4