Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

fragmentprog.h File Reference

#include <celmath/vecmath.h>
#include <celutil/color.h>
#include <celutil/util.h>
#include <celengine/gl.h>

Include dependency graph for fragmentprog.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fp

Enumerations

enum  Parameter {
  SunDirection = 0, EyePosition = 1, DiffuseColor = 2, SpecularColor = 3,
  SpecularExponent = 4, AmbientColor = 5, HazeColor = 6, TextureTranslation = 7,
  TexGen_S = 8, TexGen_T = 9, ShadowParams0 = 20, ShadowParams1 = 21
}

Functions

void disable ()
void enable ()
FragmentProcessorinitARB ()
FragmentProcessorinitNV ()
void parameter (unsigned int, float, float, float, float)
void parameter (unsigned int, const Color &)
void parameter (unsigned int, const Point3f &)
void parameter (unsigned int, const Vec3f &)
void use (unsigned int)

Variables

unsigned int eclipseShadow1 = 0
unsigned int eclipseShadow2 = 0
unsigned int sphereShadowOnRings = 0
unsigned int texDiffuse = 0
unsigned int texDiffuseBump = 0
unsigned int texSpecular = 0
unsigned int texSpecularAlpha = 0


Enumeration Type Documentation

enum fp::Parameter
 

Enumeration values:
SunDirection 
EyePosition 
DiffuseColor 
SpecularColor 
SpecularExponent 
AmbientColor 
HazeColor 
TextureTranslation 
TexGen_S 
TexGen_T 
ShadowParams0 
ShadowParams1 

Definition at line 33 of file fragmentprog.h.

00033                    {
00034         SunDirection       = 0,
00035         EyePosition        = 1,
00036         DiffuseColor       = 2,
00037         SpecularColor      = 3,
00038         SpecularExponent   = 4,
00039         AmbientColor       = 5,
00040         HazeColor          = 6,
00041         TextureTranslation = 7,
00042         TexGen_S           = 8,
00043         TexGen_T           = 9,
00044         ShadowParams0      = 20,
00045         ShadowParams1      = 21,
00046     };


Function Documentation

void disable  ) 
 

void enable  ) 
 

FragmentProcessor * fp::initARB  ) 
 

Definition at line 146 of file fragmentprog.cpp.

References _.

00147 {
00148     cout << _("Initializing ARB fragment programs . . .\n");
00149 
00150     return new FragmentProcessorARB();
00151 }

FragmentProcessor * fp::initNV  ) 
 

Definition at line 122 of file fragmentprog.cpp.

References _, fp::eclipseShadow1, fp::eclipseShadow2, LoadNvFragmentProgram(), fp::sphereShadowOnRings, fp::texDiffuse, fp::texDiffuseBump, fp::texSpecular, and fp::texSpecularAlpha.

Referenced by GLContext::init().

00123 {
00124     cout << _("Initializing NV fragment programs . . .\n");
00125     if (!LoadNvFragmentProgram("shaders/shadow_on_rings_nv.fp", sphereShadowOnRings))
00126         return NULL;
00127     if (!LoadNvFragmentProgram("shaders/eclipse1_nv.fp", eclipseShadow1))
00128         return NULL;
00129     if (!LoadNvFragmentProgram("shaders/eclipse2_nv.fp", eclipseShadow2))
00130         return NULL;
00131     if (!LoadNvFragmentProgram("shaders/diffuse_nv.fp", texDiffuse))
00132         return NULL;
00133     if (!LoadNvFragmentProgram("shaders/bumpdiffuse_nv.fp", texDiffuseBump))
00134         return NULL;
00135     if (!LoadNvFragmentProgram("shaders/texphong_nv.fp", texSpecular))
00136         return NULL;
00137     if (!LoadNvFragmentProgram("shaders/texphong_alpha_nv.fp", texSpecularAlpha))
00138         return NULL;
00139 
00140     cout << _("All NV fragment programs loaded successfully.\n");
00141 
00142     return new FragmentProcessorNV();
00143 }

void parameter unsigned  int,
float  ,
float  ,
float  ,
float 
 

void parameter unsigned  int,
const Color
 

void parameter unsigned  int,
const Point3f
 

void parameter unsigned  int,
const Vec3f
 

void use unsigned  int  ) 
 


Variable Documentation

unsigned int fp::eclipseShadow1 = 0
 

Definition at line 21 of file fragmentprog.cpp.

Referenced by fp::initNV().

unsigned int fp::eclipseShadow2 = 0
 

Definition at line 22 of file fragmentprog.cpp.

Referenced by fp::initNV().

unsigned int fp::sphereShadowOnRings = 0
 

Definition at line 20 of file fragmentprog.cpp.

Referenced by fp::initNV().

unsigned int fp::texDiffuse = 0
 

Definition at line 23 of file fragmentprog.cpp.

Referenced by fp::initNV().

unsigned int fp::texDiffuseBump = 0
 

Definition at line 24 of file fragmentprog.cpp.

Referenced by fp::initNV().

unsigned int fp::texSpecular = 0
 

Definition at line 25 of file fragmentprog.cpp.

Referenced by fp::initNV().

unsigned int fp::texSpecularAlpha = 0
 

Definition at line 26 of file fragmentprog.cpp.

Referenced by fp::initNV().


Generated on Sat Jan 14 22:30:49 2006 for Celestia by  doxygen 1.4.1