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

Cg.h File Reference

#include <string>
#include <map>
#include <Cg/cgGL.h>

Go to the source code of this file.

Namespaces

namespace  std

Classes

class  CgObjects
 Global Cg Objects maintenance class. More...

class  CgProgram
 A Cg program. More...

class  CgFragmentProgram
class  CgVertexProgram
 A Cg Vertex program. More...


Functions

CgObjectsCg ()
 Access to global Cg Objects.

char * fragmentProgramDir ()
 Get directory where common fragment programs can be found.

char * vertexProgramDir ()
 Get directory where common vertex programs can be found.

void releaseCg ()
 Release all resources associated with Cg (excluding shader objects).


Detailed Description

Header File - Cg Wrapper classes, init, release

(c) Bastian Goldluecke, MPI Informatik Saarbruecken. mailto: bg@mpi-sb.mpg.de

Version history:

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Definition in file Cg.h.


Function Documentation

class CgObjects* Cg  ) 
 

Access to global Cg Objects.

Global objects are created when this function is first called. They must be destroyed manually after all shaders are deleted using a call to releaseCg()

Definition at line 92 of file Cg.cpp.

References g_pCg.

Referenced by CgObjects::cgErrorCallback(), CgProgram::setup(), CgVertexProgram::setup(), and CgFragmentProgram::setup().

00093 {
00094   if (g_pCg == NULL) {
00095     printf( "Initializing Cg ... " );
00096     g_pCg = new CgObjects;
00097     printf( "done.\n" );
00098   }
00099   return g_pCg;
00100 }

char* fragmentProgramDir  ) 
 

Get directory where common fragment programs can be found.

void releaseCg  ) 
 

Release all resources associated with Cg (excluding shader objects).

Definition at line 102 of file Cg.cpp.

References g_pCg.

00103 {
00104   printf( "Destroying Cg Objects ....\n" );
00105   delete g_pCg;
00106   g_pCg = NULL;
00107 }

char* vertexProgramDir  ) 
 

Get directory where common vertex programs can be found.


Generated on Thu Jan 20 02:47:13 2005 for Projective_Texture_Effect_Demo by doxygen 1.3.6